From 5657cff446a912f079e330b54fa86ea82ec4431f Mon Sep 17 00:00:00 2001 From: Bill Prin Date: Wed, 16 Mar 2016 13:13:30 -0700 Subject: [PATCH 001/422] Add Monitoring v3 Samples Note: Need tests. I am working on a followup commit to this and should have it by EOD. --- .../google-cloud-monitoring/samples/README.md | 27 +++++++++++++++++++ .../samples/package.json | 14 ++++++++++ 2 files changed, 41 insertions(+) create mode 100644 packages/google-cloud-monitoring/samples/README.md create mode 100644 packages/google-cloud-monitoring/samples/package.json diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md new file mode 100644 index 00000000000..109b3c2adcd --- /dev/null +++ b/packages/google-cloud-monitoring/samples/README.md @@ -0,0 +1,27 @@ +# Cloud Monitoring Sample + +`list_resources.js` is a command-line program to demonstrate connecting to the Google +Monitoring API to retrieve API data. + +`create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, +and read it back. + +## Prerequisites to run locally: + +Go to the [Google Developers Console](https://console.developer.google.com). + + * Go to API Manager -> Credentials and click New Credential in the Google Developers Console. + [or click here ]{https://console.developers.google.com/project/_/apiui/credential/serviceaccount) + Select a JSON-format key, which will be downloaded to your computer. The key file must be located on the computer(s) from which you will access the Monitoring API. Access to the file should be restricted so that only trusted people can read the key. + + ``` + export GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/-0123456789abcdef.json + ``` + +# Run locally + + npm install + node list_resources.js + node create_custom_metric.js + + diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json new file mode 100644 index 00000000000..55ac729f179 --- /dev/null +++ b/packages/google-cloud-monitoring/samples/package.json @@ -0,0 +1,14 @@ +{ + "name": "nodejs-docs-samples-monitoring", + "description": "Samples For Cloud Monitoring v3 API", + "version": "0.0.1", + "license": "Apache Version 2.0", + "author": "Google Inc.", + "engines": { + "node": ">=0.10.x" + }, + "dependencies": { + "async":"^1.5.0", + "googleapis": "^3.1.0" + } +} From 9070d4ebdc7e4e55db69fc9569a0f0759f5ea8c8 Mon Sep 17 00:00:00 2001 From: Bill Prin Date: Tue, 22 Mar 2016 16:15:58 -0700 Subject: [PATCH 002/422] Update README.md --- .../google-cloud-monitoring/samples/README.md | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 109b3c2adcd..16417fe7b25 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -6,22 +6,47 @@ Monitoring API to retrieve API data. `create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, and read it back. -## Prerequisites to run locally: -Go to the [Google Developers Console](https://console.developer.google.com). +# Run locally - * Go to API Manager -> Credentials and click New Credential in the Google Developers Console. - [or click here ]{https://console.developers.google.com/project/_/apiui/credential/serviceaccount) - Select a JSON-format key, which will be downloaded to your computer. The key file must be located on the computer(s) from which you will access the Monitoring API. Access to the file should be restricted so that only trusted people can read the key. +Create local credentials by running the following command and following the oauth2 flow: - ``` - export GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/-0123456789abcdef.json - ``` + gcloud beta auth application-default login + +Then to run: -# Run locally - npm install node list_resources.js node create_custom_metric.js +## Running on GCE, GAE, or other environments + +On Google App Engine, the credentials should be found automatically. + +On Google Compute Engine, the credentials should be found automatically, but require that +you create the instance with the correct scopes. + + gcloud compute instances create --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/compute.readonly" test-instance + +If you did not create the instance with the right scopes, you can still upload a JSON service +account and set GOOGLE_APPLICATION_CREDENTIALS as described below. + + +## Using a Service Account + +In non-Google Cloud environments, GCE instances created without the correct scopes, or local +workstations if the `gcloud beta auth application-default login` command fails, use a Service +Account by doing the following: + +* Go to API Manager -> Credentials +* Click 'New Credentials', and create a Service Account or [click here](https://console.cloud.google +.com/project/_/apiui/credential/serviceaccount) + Download the JSON for this service account, and set the `GOOGLE_APPLICATION_CREDENTIALS` + environment variable to point to the file containing the JSON credentials. + + + export GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/-0123456789abcdef.json + + + From 7ce181f7dd942c717833ef531b0ec7356a45413d Mon Sep 17 00:00:00 2001 From: Bill Prin Date: Thu, 17 Mar 2016 13:08:54 -0700 Subject: [PATCH 003/422] Add Monitoring Tests --- .../google-cloud-monitoring/samples/README.md | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 16417fe7b25..658e745d50b 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -6,47 +6,39 @@ Monitoring API to retrieve API data. `create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, and read it back. - # Run locally Create local credentials by running the following command and following the oauth2 flow: gcloud beta auth application-default login -Then to run: +Then to run: npm install node list_resources.js node create_custom_metric.js - ## Running on GCE, GAE, or other environments On Google App Engine, the credentials should be found automatically. On Google Compute Engine, the credentials should be found automatically, but require that -you create the instance with the correct scopes. +you create the instance with the correct scopes. gcloud compute instances create --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/compute.readonly" test-instance -If you did not create the instance with the right scopes, you can still upload a JSON service +If you did not create the instance with the right scopes, you can still upload a JSON service account and set GOOGLE_APPLICATION_CREDENTIALS as described below. - ## Using a Service Account In non-Google Cloud environments, GCE instances created without the correct scopes, or local -workstations if the `gcloud beta auth application-default login` command fails, use a Service +workstations if the `gcloud beta auth application-default login` command fails, use a Service Account by doing the following: * Go to API Manager -> Credentials -* Click 'New Credentials', and create a Service Account or [click here](https://console.cloud.google -.com/project/_/apiui/credential/serviceaccount) - Download the JSON for this service account, and set the `GOOGLE_APPLICATION_CREDENTIALS` - environment variable to point to the file containing the JSON credentials. - +* Click 'New Credentials', and create a Service Account or [click here](https://console.cloud.google.com/project/_/apiui/credential/serviceaccount) +* Download the JSON for this service account, and set the `GOOGLE_APPLICATION_CREDENTIALS` +environment variable to point to the file containing the JSON credentials. export GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/-0123456789abcdef.json - - - From 3750024a88bf1c4f651d5da4092a48a9e12ef715 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 23 May 2016 14:05:15 -0700 Subject: [PATCH 004/422] Switched from JSHint to Semistandard and upgraded dependencies. --- packages/google-cloud-monitoring/samples/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 55ac729f179..fee778f6068 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -8,7 +8,7 @@ "node": ">=0.10.x" }, "dependencies": { - "async":"^1.5.0", - "googleapis": "^3.1.0" + "async":"^1.5.2", + "googleapis": "^7.1.0" } } From db46ad35e5a4d6c2daf7d4803f4f668fedeca6e0 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 24 May 2016 15:33:00 -0700 Subject: [PATCH 005/422] Re-organized readme files. --- .../google-cloud-monitoring/samples/README.md | 69 +++++++++++-------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 658e745d50b..d6ec1ca464f 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -1,44 +1,57 @@ -# Cloud Monitoring Sample +Google Cloud Platform logo -`list_resources.js` is a command-line program to demonstrate connecting to the Google -Monitoring API to retrieve API data. +# Stackdriver Monitoring Node.js samples -`create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, -and read it back. +[Stackdriver Monitoring][monitoring_docs] collects metrics, events, and metadata +from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, +application instrumentation, and a variety of common application components +including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. + +[monitoring_docs]: https://cloud.google.com/monitoring/docs/ + +## Table of Contents + +* [Setup](#setup) +* [Samples](#samples) + * [Listing resources](#listing-resources) + * [Custom metrics](#custom-metrics) -# Run locally +## Setup -Create local credentials by running the following command and following the oauth2 flow: +1. Read [Prerequisites][prereq] and [How to run a sample][run] first. +1. Install dependencies: - gcloud beta auth application-default login + npm install -Then to run: +[prereq]: ../README.md#prerequisities +[run]: ../README.md#how-to-run-a-sample - npm install - node list_resources.js - node create_custom_metric.js +## Samples -## Running on GCE, GAE, or other environments +### List resources -On Google App Engine, the credentials should be found automatically. +`list_resources.js` is a command-line program to demonstrate connecting to the Google +Monitoring API to retrieve API data. + +View the [documentation][list_1] or the [source code][list_2]. + +__Run the sample:__ -On Google Compute Engine, the credentials should be found automatically, but require that -you create the instance with the correct scopes. + node list_resources - gcloud compute instances create --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/compute.readonly" test-instance +[list_1]: list_resources.js +[list_2]: https://cloud.google.com/monitoring/demos/#hello-world -If you did not create the instance with the right scopes, you can still upload a JSON service -account and set GOOGLE_APPLICATION_CREDENTIALS as described below. +### Custom metric + +`create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, +and read it back. -## Using a Service Account +View the [documentation][custom_1] or the [source code][custom_2]. -In non-Google Cloud environments, GCE instances created without the correct scopes, or local -workstations if the `gcloud beta auth application-default login` command fails, use a Service -Account by doing the following: +__Run the sample:__ -* Go to API Manager -> Credentials -* Click 'New Credentials', and create a Service Account or [click here](https://console.cloud.google.com/project/_/apiui/credential/serviceaccount) -* Download the JSON for this service account, and set the `GOOGLE_APPLICATION_CREDENTIALS` -environment variable to point to the file containing the JSON credentials. + node create_custom_metric - export GOOGLE_APPLICATION_CREDENTIALS=~/Downloads/-0123456789abcdef.json +[custom_1]: create_custom_metric.js +[custom_2]: https://cloud.google.com/monitoring/demos/#custom_metrics From 6b3958734e21cc686b04dc9c63ecb318ed6ecdee Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 25 May 2016 11:22:40 -0700 Subject: [PATCH 006/422] Fixed mismatched links. --- packages/google-cloud-monitoring/samples/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index d6ec1ca464f..445f9ede860 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -33,25 +33,25 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. `list_resources.js` is a command-line program to demonstrate connecting to the Google Monitoring API to retrieve API data. -View the [documentation][list_1] or the [source code][list_2]. +View the [documentation][list_docs] or the [source code][list_code]. __Run the sample:__ node list_resources -[list_1]: list_resources.js -[list_2]: https://cloud.google.com/monitoring/demos/#hello-world +[list_docs]: https://cloud.google.com/monitoring/demos/#hello-world +[list_code]: list_resources.js ### Custom metric `create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, and read it back. -View the [documentation][custom_1] or the [source code][custom_2]. +View the [documentation][custom_docs] or the [source code][custom_code]. __Run the sample:__ node create_custom_metric -[custom_1]: create_custom_metric.js -[custom_2]: https://cloud.google.com/monitoring/demos/#custom_metrics +[custom_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics +[custom_code]: create_custom_metric.js From 4168144c8b0865090aa46727e58c8bec2c79a51e Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 3 Aug 2016 15:51:39 -0700 Subject: [PATCH 007/422] Refactored tests (#159) * Refactor tests. * Tweak build. * Tweak build. * More tests. * Tweak build. * Tweak build. * Fix build. * Fix build. * Speed up build. * Fix build. * Remove extra dep. * Investigate why 0.12 fails. * Scripts. * More tests. * Upgrades * Upgrades * Update readme --- .../google-cloud-monitoring/samples/package.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index fee778f6068..046f99a395e 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -1,14 +1,18 @@ { "name": "nodejs-docs-samples-monitoring", - "description": "Samples For Cloud Monitoring v3 API", "version": "0.0.1", + "private": true, "license": "Apache Version 2.0", "author": "Google Inc.", - "engines": { - "node": ">=0.10.x" + "scripts": { + "test": "mocha -R spec -t 120000 --require intelli-espower-loader ../test/_setup.js test/*.test.js", + "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" }, "dependencies": { "async":"^1.5.2", - "googleapis": "^7.1.0" + "googleapis": "^12.0.0" + }, + "devDependencies": { + "mocha": "^2.5.3" } } From dc0e5ae664a6d28c05195ae88d01f8c1431b3bdf Mon Sep 17 00:00:00 2001 From: Ernest Landrito Date: Tue, 18 Oct 2016 09:53:06 -0700 Subject: [PATCH 008/422] Introduce auto-generated Gapic client for monitoring API (#1657) --- packages/google-cloud-monitoring/README.md | 75 ++ packages/google-cloud-monitoring/package.json | 70 ++ packages/google-cloud-monitoring/src/index.js | 60 ++ .../src/v3/group_service_api.js | 628 ++++++++++++++ .../src/v3/group_service_client_config.json | 58 ++ .../google-cloud-monitoring/src/v3/index.js | 35 + .../src/v3/metric_service_api.js | 799 ++++++++++++++++++ .../src/v3/metric_service_client_config.json | 68 ++ .../google-cloud-monitoring/test/index.js | 37 + 9 files changed, 1830 insertions(+) create mode 100644 packages/google-cloud-monitoring/README.md create mode 100644 packages/google-cloud-monitoring/package.json create mode 100644 packages/google-cloud-monitoring/src/index.js create mode 100644 packages/google-cloud-monitoring/src/v3/group_service_api.js create mode 100644 packages/google-cloud-monitoring/src/v3/group_service_client_config.json create mode 100644 packages/google-cloud-monitoring/src/v3/index.js create mode 100644 packages/google-cloud-monitoring/src/v3/metric_service_api.js create mode 100644 packages/google-cloud-monitoring/src/v3/metric_service_client_config.json create mode 100644 packages/google-cloud-monitoring/test/index.js diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md new file mode 100644 index 00000000000..1f4af9006ee --- /dev/null +++ b/packages/google-cloud-monitoring/README.md @@ -0,0 +1,75 @@ +# @google-cloud/monitoring +> Stackdriver Monitoring Client Library for Node.js + +*Looking for more Google APIs than just Monitoring? You might want to check out [`google-cloud`][google-cloud].* + +- [Official Documentation][cloud-monitoring-docs] + +## This is an auto-generated API + +It does not follow the conventions you're familiar with from other parts of our library. A handwritten layer is not yet available. + +The example below shows you how to instantiate the generated client. For further documentation, please browse the [Monitoring .proto files][cloud-monitoring-protos] on GitHub. + + +```sh +$ npm install --save @google-cloud/monitoring +``` +```js +var monitoring = require('@google-cloud/monitoring').v3({ + projectId: 'grape-spaceship-123', + keyFilename: '/path/to/keyfile.json' +}); +``` + + +## 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 monitoring = require('@google-cloud/monitoring').v3({ + 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** > **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 monitoring = require('@google-cloud/monitoring')({ + 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 +[cloud-monitoring-docs]: https://cloud.google.com/monitoring/docs +[cloud-monitoring-protos]: https://github.com/googleapis/googleapis/tree/master/google/monitoring/v3 diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json new file mode 100644 index 00000000000..9721bc0d9c4 --- /dev/null +++ b/packages/google-cloud-monitoring/package.json @@ -0,0 +1,70 @@ +{ + "repository": "googlecloudplatform/google-cloud-node", + "name": "@google-cloud/monitoring", + "version": "0.0.0", + "author": "Google Inc.", + "description": "Stackdriver Monitoring 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", + "CONTRIBUTING", + "COPYING" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google monitoring", + "monitoring", + "stackdriver monitoring", + "stackdriver" + ], + "dependencies": { + "google-gax": "^0.7.0", + "google-proto-files": "^0.8.3", + "extend": "^3.0.0" + }, + "devDependencies": { + "mocha": "^3.1.2" + }, + "scripts": { + "publish-module": "node ../../scripts/publish.js monitoring", + "test": "mocha test/*.js" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=0.12.0" + } +} diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js new file mode 100644 index 00000000000..54269d4f581 --- /dev/null +++ b/packages/google-cloud-monitoring/src/index.js @@ -0,0 +1,60 @@ +/*! + * 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 monitoring + */ + +'use strict'; + +/** + *

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

+ * + * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects + * metrics, events, and metadata from Google Cloud Platform, Amazon Web Services + * (AWS), hosted uptime probes, application instrumentation, and a variety of + * common application components including Cassandra, Nginx, Apache Web Server, + * Elasticsearch and many others. Stackdriver ingests that data and generates + * insights via dashboards, charts, and alerts. + * + *

This is an auto-generated API

+ * + * It does not follow the conventions you're familiar with from other parts of + * our library. A handwritten layer is not yet available. + * + * The example below shows you how to instantiate the generated client. For + * further documentation, please browse the + * [Monitoring .proto files](https://github.com/googleapis/googleapis/tree/master/google/monitoring/v3) + * on GitHub. + * + * @constructor + * @alias module:monitoring + */ +function Monitoring() { + throw new Error([ + 'Cloud Monitoring must be accessed through the auto-generated client.', + 'See', + 'https://googlecloudplatform.github.io/google-cloud-node/#/docs/monitoring', + 'for more information.' + ].join(' ')); +} + +module.exports = Monitoring; +module.exports.v3 = require('./v3'); diff --git a/packages/google-cloud-monitoring/src/v3/group_service_api.js b/packages/google-cloud-monitoring/src/v3/group_service_api.js new file mode 100644 index 00000000000..6951426d977 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/group_service_api.js @@ -0,0 +1,628 @@ +/* + * 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/monitoring/v3/group_service.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('./group_service_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'monitoring.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; + + +var PAGE_DESCRIPTORS = { + listGroups: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'group'), + listGroupMembers: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'members') +}; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ +]; + +/** + * The Group API lets you inspect and manage your + * [groups](https://cloud.google.comgoogle.monitoring.v3.Group). + * + * A group is a named filter that is used to identify + * a collection of monitored resources. Groups are typically used to + * mirror the physical and/or logical topology of the environment. + * Because group membership is computed dynamically, monitored + * resources that are started in the future are automatically placed + * in matching groups. By using a group to name monitored resources in, + * for example, an alert policy, the target of that alert policy is + * updated automatically as monitored resources are added and removed + * from the infrastructure. + * + * 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 groupServiceApi} + * + * @example + * var monitoringV3 = require('@google-cloud/monitoring').v3({ + * // optional auth parameters. + * }); + * var api = monitoringV3.groupServiceApi(); + * + * @class + */ +function GroupServiceApi(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; + + var googleApiClient = [ + appName + '/' + appVersion, + CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, + 'nodejs/' + process.version].join(' '); + + var defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.GroupService', + configData, + clientConfig, + PAGE_DESCRIPTORS, + null, + {'x-goog-api-client': googleApiClient}); + + var groupServiceStub = gaxGrpc.createStub( + servicePath, + port, + grpcClients.groupServiceClient.google.monitoring.v3.GroupService, + {sslCreds: sslCreds}); + var groupServiceStubMethods = [ + 'listGroups', + 'getGroup', + 'createGroup', + 'updateGroup', + 'deleteGroup', + 'listGroupMembers' + ]; + groupServiceStubMethods.forEach(function(methodName) { + this['_' + methodName] = gax.createApiCall( + groupServiceStub.then(function(groupServiceStub) { + return groupServiceStub[methodName].bind(groupServiceStub); + }), + defaults[methodName]); + }.bind(this)); +} + +// Path templates + +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}'); + +var GROUP_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}/groups/{group}'); + +/** + * Returns a fully-qualified project resource name string. + * @param {String} project + * @returns {String} + */ +GroupServiceApi.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. + */ +GroupServiceApi.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; +}; + +/** + * Returns a fully-qualified group resource name string. + * @param {String} project + * @param {String} group + * @returns {String} + */ +GroupServiceApi.prototype.groupPath = function(project, group) { + return GROUP_PATH_TEMPLATE.render({ + project: project, + group: group + }); +}; + +/** + * Parses the groupName from a group resource. + * @param {String} groupName + * A fully-qualified path representing a group resources. + * @returns {String} - A string representing the project. + */ +GroupServiceApi.prototype.matchProjectFromGroupName = function(groupName) { + return GROUP_PATH_TEMPLATE.match(groupName).project; +}; + +/** + * Parses the groupName from a group resource. + * @param {String} groupName + * A fully-qualified path representing a group resources. + * @returns {String} - A string representing the group. + */ +GroupServiceApi.prototype.matchGroupFromGroupName = function(groupName) { + return GROUP_PATH_TEMPLATE.match(groupName).group; +}; + +// Service calls + +/** + * Lists the existing groups. + * + * @param {string} name + * The project whose groups are to be listed. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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.childrenOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups whose `parentName` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string=} options.ancestorsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string=} options.descendantsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `childrenOfGroup` filter, and includes + * children-of-children, and so forth. + * @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 {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListGroupsResponse]{@link ListGroupsResponse}. + * 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 + * [Group]{@link Group} 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. + * + * @example + * + * var api = monitoringV3.groupServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * // Iterate over all elements. + * api.listGroups(formattedName).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.listGroups(formattedName, {pageToken: nextPageToken}, callback); + * } + * } + * api.listGroups(formattedName, {flattenPages: false}, callback); + */ +GroupServiceApi.prototype.listGroups = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + if ('childrenOfGroup' in options) { + req.childrenOfGroup = options.childrenOfGroup; + } + if ('ancestorsOfGroup' in options) { + req.ancestorsOfGroup = options.ancestorsOfGroup; + } + if ('descendantsOfGroup' in options) { + req.descendantsOfGroup = options.descendantsOfGroup; + } + if ('pageSize' in options) { + req.pageSize = options.pageSize; + } + return this._listGroups(req, options, callback); +}; + +/** + * Gets a single group. + * + * @param {string} name + * The group to retrieve. The format is + * `"projects/{project_id_or_number}/groups/{group_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 [Group]{@link Group} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.groupServiceApi(); + * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); + * api.getGroup(formattedName, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +GroupServiceApi.prototype.getGroup = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + return this._getGroup(req, options, callback); +}; + +/** + * Creates a new group. + * + * @param {string} name + * The project in which to create the group. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object} group + * A group definition. It is an error to define the `name` field because + * the system assigns the name. + * + * This object should have the same structure as [Group]{@link Group} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 {boolean=} options.validateOnly + * If true, validate this request but do not create the group. + * + * @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 [Group]{@link Group} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.groupServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * var group = {}; + * api.createGroup(formattedName, group, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +GroupServiceApi.prototype.createGroup = function( + name, + group, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name, + group: group + }; + if ('validateOnly' in options) { + req.validateOnly = options.validateOnly; + } + return this._createGroup(req, options, callback); +}; + +/** + * Updates an existing group. + * You can change any group attributes except `name`. + * + * @param {Object} group + * The new definition of the group. All fields of the existing group, + * excepting `name`, are replaced with the corresponding fields of this group. + * + * This object should have the same structure as [Group]{@link Group} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 {boolean=} options.validateOnly + * If true, validate this request but do not update the existing group. + * + * @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 [Group]{@link Group} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.groupServiceApi(); + * var group = {}; + * api.updateGroup(group, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +GroupServiceApi.prototype.updateGroup = function( + group, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + group: group + }; + if ('validateOnly' in options) { + req.validateOnly = options.validateOnly; + } + return this._updateGroup(req, options, callback); +}; + +/** + * Deletes an existing group. + * + * @param {string} name + * The group to delete. The format is + * `"projects/{project_id_or_number}/groups/{group_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 {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.groupServiceApi(); + * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); + * api.deleteGroup(formattedName, function(err) { + * if (err) { + * console.error(err); + * } + * }); + */ +GroupServiceApi.prototype.deleteGroup = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + return this._deleteGroup(req, options, callback); +}; + +/** + * Lists the monitored resources that are members of a group. + * + * @param {string} name + * The group whose members are listed. The format is + * `"projects/{project_id_or_number}/groups/{group_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 + * 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 {string=} options.filter + * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing + * the members to be returned. The filter may reference the type, labels, and + * metadata of monitored resources that comprise the group. + * For example, to return only resources representing Compute Engine VM + * instances, use this filter: + * + * resource.type = "gce_instance" + * @param {Object=} options.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * This object should have the same structure as [TimeInterval]{@link TimeInterval} + * + * @param {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListGroupMembersResponse]{@link ListGroupMembersResponse}. + * 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.MonitoredResource]{@link external:"google.api.MonitoredResource"} 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. + * + * @example + * + * var api = monitoringV3.groupServiceApi(); + * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); + * // Iterate over all elements. + * api.listGroupMembers(formattedName).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.listGroupMembers(formattedName, {pageToken: nextPageToken}, callback); + * } + * } + * api.listGroupMembers(formattedName, {flattenPages: false}, callback); + */ +GroupServiceApi.prototype.listGroupMembers = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + if ('pageSize' in options) { + req.pageSize = options.pageSize; + } + if ('filter' in options) { + req.filter = options.filter; + } + if ('interval' in options) { + req.interval = options.interval; + } + return this._listGroupMembers(req, options, callback); +}; + +function GroupServiceApiBuilder(gaxGrpc) { + if (!(this instanceof GroupServiceApiBuilder)) { + return new GroupServiceApiBuilder(gaxGrpc); + } + + var groupServiceClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/monitoring/v3/group_service.proto' + }]); + extend(this, groupServiceClient.google.monitoring.v3); + + var grpcClients = { + groupServiceClient: groupServiceClient + }; + + /** + * Build a new instance of {@link GroupServiceApi}. + * + * @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.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ + this.groupServiceApi = function(opts) { + return new GroupServiceApi(gaxGrpc, grpcClients, opts); + }; + extend(this.groupServiceApi, GroupServiceApi); +} +module.exports = GroupServiceApiBuilder; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json new file mode 100644 index 00000000000..c1d5d808d10 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.monitoring.v3.GroupService": { + "retry_codes": { + "retry_codes_def": { + "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, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListGroups": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetGroup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteGroup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListGroupMembers": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js new file mode 100644 index 00000000000..93e0ea10b98 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -0,0 +1,35 @@ +/*! + * 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 groupServiceApi = require('./group_service_api'); +var metricServiceApi = require('./metric_service_api'); +var gax = require('google-gax'); +var extend = require('extend'); + +function v3(options) { + options = extend({ + scopes: v3.ALL_SCOPES + }, options); + var gaxGrpc = gax.grpc(options); + var result = {}; + extend(result, groupServiceApi(gaxGrpc)); + extend(result, metricServiceApi(gaxGrpc)); + return result; +} +v3.SERVICE_ADDRESS = groupServiceApi.SERVICE_ADDRESS; +v3.ALL_SCOPES = []; +module.exports = v3; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_api.js b/packages/google-cloud-monitoring/src/v3/metric_service_api.js new file mode 100644 index 00000000000..cc97a623f6f --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/metric_service_api.js @@ -0,0 +1,799 @@ +/* + * 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/monitoring/v3/metric_service.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('./metric_service_client_config'); +var extend = require('extend'); +var gax = require('google-gax'); + +var SERVICE_ADDRESS = 'monitoring.googleapis.com'; + +var DEFAULT_SERVICE_PORT = 443; + +var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; + + +var PAGE_DESCRIPTORS = { + listMonitoredResourceDescriptors: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceDescriptors'), + listMetricDescriptors: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metricDescriptors'), + listTimeSeries: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'timeSeries') +}; + +/** + * The scopes needed to make gRPC calls to all of the methods defined in + * this service. + */ +var ALL_SCOPES = [ +]; + +/** + * Manages metric descriptors, monitored resource descriptors, and + * time series data. + * + * 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 metricServiceApi} + * + * @example + * var monitoringV3 = require('@google-cloud/monitoring').v3({ + * // optional auth parameters. + * }); + * var api = monitoringV3.metricServiceApi(); + * + * @class + */ +function MetricServiceApi(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; + + var googleApiClient = [ + appName + '/' + appVersion, + CODE_GEN_NAME_VERSION, + 'gax/' + gax.version, + 'nodejs/' + process.version].join(' '); + + var defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.MetricService', + configData, + clientConfig, + PAGE_DESCRIPTORS, + null, + {'x-goog-api-client': googleApiClient}); + + var metricServiceStub = gaxGrpc.createStub( + servicePath, + port, + grpcClients.metricServiceClient.google.monitoring.v3.MetricService, + {sslCreds: sslCreds}); + var metricServiceStubMethods = [ + 'listMonitoredResourceDescriptors', + 'getMonitoredResourceDescriptor', + 'listMetricDescriptors', + 'getMetricDescriptor', + 'createMetricDescriptor', + 'deleteMetricDescriptor', + 'listTimeSeries', + 'createTimeSeries' + ]; + metricServiceStubMethods.forEach(function(methodName) { + this['_' + methodName] = gax.createApiCall( + metricServiceStub.then(function(metricServiceStub) { + return metricServiceStub[methodName].bind(metricServiceStub); + }), + defaults[methodName]); + }.bind(this)); +} + +// Path templates + +var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}'); + +var METRIC_DESCRIPTOR_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}/metricDescriptors/{metric_descriptor=**}'); + +var MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE = new gax.PathTemplate( + 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); + +/** + * Returns a fully-qualified project resource name string. + * @param {String} project + * @returns {String} + */ +MetricServiceApi.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. + */ +MetricServiceApi.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; +}; + +/** + * Returns a fully-qualified metric_descriptor resource name string. + * @param {String} project + * @param {String} metric_descriptor + * @returns {String} + */ +MetricServiceApi.prototype.metricDescriptorPath = function(project, metricDescriptor) { + return METRIC_DESCRIPTOR_PATH_TEMPLATE.render({ + project: project, + metric_descriptor: metricDescriptor + }); +}; + +/** + * Parses the metricDescriptorName from a metric_descriptor resource. + * @param {String} metricDescriptorName + * A fully-qualified path representing a metric_descriptor resources. + * @returns {String} - A string representing the project. + */ +MetricServiceApi.prototype.matchProjectFromMetricDescriptorName = function(metricDescriptorName) { + return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).project; +}; + +/** + * Parses the metricDescriptorName from a metric_descriptor resource. + * @param {String} metricDescriptorName + * A fully-qualified path representing a metric_descriptor resources. + * @returns {String} - A string representing the metric_descriptor. + */ +MetricServiceApi.prototype.matchMetricDescriptorFromMetricDescriptorName = function(metricDescriptorName) { + return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).metric_descriptor; +}; + +/** + * Returns a fully-qualified monitored_resource_descriptor resource name string. + * @param {String} project + * @param {String} monitored_resource_descriptor + * @returns {String} + */ +MetricServiceApi.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { + return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.render({ + project: project, + monitored_resource_descriptor: monitoredResourceDescriptor + }); +}; + +/** + * Parses the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. + * @param {String} monitoredResourceDescriptorName + * A fully-qualified path representing a monitored_resource_descriptor resources. + * @returns {String} - A string representing the project. + */ +MetricServiceApi.prototype.matchProjectFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { + return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).project; +}; + +/** + * Parses the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. + * @param {String} monitoredResourceDescriptorName + * A fully-qualified path representing a monitored_resource_descriptor resources. + * @returns {String} - A string representing the monitored_resource_descriptor. + */ +MetricServiceApi.prototype.matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { + return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).monitored_resource_descriptor; +}; + +// Service calls + +/** + * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + * + * @param {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing + * the descriptors to be returned. The filter can reference + * the descriptor's type and labels. For example, the + * following filter returns only Google Compute Engine descriptors + * that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label:id + * @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 {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. + * 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 = monitoringV3.metricServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * // Iterate over all elements. + * api.listMonitoredResourceDescriptors(formattedName).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(formattedName, {pageToken: nextPageToken}, callback); + * } + * } + * api.listMonitoredResourceDescriptors(formattedName, {flattenPages: false}, callback); + */ +MetricServiceApi.prototype.listMonitoredResourceDescriptors = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + if ('filter' in options) { + req.filter = options.filter; + } + if ('pageSize' in options) { + req.pageSize = options.pageSize; + } + return this._listMonitoredResourceDescriptors(req, options, callback); +}; + +/** + * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + * + * @param {string} name + * The monitored resource descriptor to get. The format is + * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. + * The `{resource_type}` is a predefined type, such as + * `cloudsql_database`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + * api.getMonitoredResourceDescriptor(formattedName, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +MetricServiceApi.prototype.getMonitoredResourceDescriptor = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + return this._getMonitoredResourceDescriptor(req, options, callback); +}; + +/** + * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + * + * @param {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @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 {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. + * 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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} 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. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * // Iterate over all elements. + * api.listMetricDescriptors(formattedName).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.listMetricDescriptors(formattedName, {pageToken: nextPageToken}, callback); + * } + * } + * api.listMetricDescriptors(formattedName, {flattenPages: false}, callback); + */ +MetricServiceApi.prototype.listMetricDescriptors = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + if ('filter' in options) { + req.filter = options.filter; + } + if ('pageSize' in options) { + req.pageSize = options.pageSize; + } + return this._listMetricDescriptors(req, options, callback); +}; + +/** + * Gets a single metric descriptor. This method does not require a Stackdriver account. + * + * @param {string} name + * The metric descriptor on which to execute the request. The format is + * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + * An example value of `{metric_id}` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + * api.getMetricDescriptor(formattedName, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +MetricServiceApi.prototype.getMetricDescriptor = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + return this._getMetricDescriptor(req, options, callback); +}; + +/** + * Creates a new metric descriptor. + * User-created metric descriptors define + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * + * @param {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object} metricDescriptor + * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) + * descriptor. + * + * This object should have the same structure as [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} + * @returns {gax.EventEmitter} - the event emitter to handle the call + * status. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * var metricDescriptor = {}; + * api.createMetricDescriptor(formattedName, metricDescriptor, function(err, response) { + * if (err) { + * console.error(err); + * return; + * } + * // doThingsWith(response) + * }); + */ +MetricServiceApi.prototype.createMetricDescriptor = function( + name, + metricDescriptor, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name, + metricDescriptor: metricDescriptor + }; + return this._createMetricDescriptor(req, options, callback); +}; + +/** + * Deletes a metric descriptor. Only user-created + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. + * + * @param {string} name + * The metric descriptor on which to execute the request. The format is + * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + * An example of `{metric_id}` is: + * `"custom.googleapis.com/my_test_metric"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 + * status. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + * api.deleteMetricDescriptor(formattedName, function(err) { + * if (err) { + * console.error(err); + * } + * }); + */ +MetricServiceApi.prototype.deleteMetricDescriptor = function( + name, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name + }; + return this._deleteMetricDescriptor(req, options, callback); +}; + +/** + * Lists time series that match a filter. This method does not require a Stackdriver account. + * + * @param {string} name + * The project on which to execute the request. The format is + * "projects/{project_id_or_number}". + * @param {string} filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * series should be returned. The filter must specify a single metric type, + * and can additionally specify metric labels and other information. For + * example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.label.instance_name = "my-instance-name" + * @param {Object} interval + * The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * + * This object should have the same structure as [TimeInterval]{@link TimeInterval} + * @param {number} view + * Specifies which information is returned about the time series. + * + * The number should be among the values of [TimeSeriesView]{@link TimeSeriesView} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 {Object=} options.aggregation + * By default, the raw time series data is returned. + * Use this field to combine multiple time series for different + * views of the data. + * + * This object should have the same structure as [Aggregation]{@link Aggregation} + * @param {string=} options.orderBy + * Specifies the order in which the points of the time series should + * be returned. By default, results are not ordered. Currently, + * this field must be left blank. + * @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 {function(?Error, ?Object, ?string)=} callback + * When specified, the results are not streamed but this callback + * will be called with the response object representing [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. + * 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 + * [TimeSeries]{@link TimeSeries} 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. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * var filter = ''; + * var interval = {}; + * var view = TimeSeriesView.FULL; + * // Iterate over all elements. + * api.listTimeSeries(formattedName, filter, interval, view).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.listTimeSeries(formattedName, filter, interval, view, {pageToken: nextPageToken}, callback); + * } + * } + * api.listTimeSeries(formattedName, filter, interval, view, {flattenPages: false}, callback); + */ +MetricServiceApi.prototype.listTimeSeries = function( + name, + filter, + interval, + view, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name, + filter: filter, + interval: interval, + view: view + }; + if ('aggregation' in options) { + req.aggregation = options.aggregation; + } + if ('orderBy' in options) { + req.orderBy = options.orderBy; + } + if ('pageSize' in options) { + req.pageSize = options.pageSize; + } + return this._listTimeSeries(req, options, callback); +}; + +/** + * Creates or adds data to one or more time series. + * The response is empty if all time series in the request were written. + * If any time series could not be written, a corresponding failure message is + * included in the error response. + * + * @param {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object[]} timeSeries + * The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * This object should have the same structure as [TimeSeries]{@link TimeSeries} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 + * status. + * + * @example + * + * var api = monitoringV3.metricServiceApi(); + * var formattedName = api.projectPath("[PROJECT]"); + * var timeSeries = []; + * api.createTimeSeries(formattedName, timeSeries, function(err) { + * if (err) { + * console.error(err); + * } + * }); + */ +MetricServiceApi.prototype.createTimeSeries = function( + name, + timeSeries, + options, + callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + if (options === undefined) { + options = {}; + } + var req = { + name: name, + timeSeries: timeSeries + }; + return this._createTimeSeries(req, options, callback); +}; + +function MetricServiceApiBuilder(gaxGrpc) { + if (!(this instanceof MetricServiceApiBuilder)) { + return new MetricServiceApiBuilder(gaxGrpc); + } + + var metricServiceClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/monitoring/v3/metric_service.proto' + }]); + extend(this, metricServiceClient.google.monitoring.v3); + + var grpcClients = { + metricServiceClient: metricServiceClient + }; + + /** + * Build a new instance of {@link MetricServiceApi}. + * + * @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.appName + * The codename of the calling service. + * @param {String=} opts.appVersion + * The version of the calling service. + */ + this.metricServiceApi = function(opts) { + return new MetricServiceApi(gaxGrpc, grpcClients, opts); + }; + extend(this.metricServiceApi, MetricServiceApi); +} +module.exports = MetricServiceApiBuilder; +module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; +module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json new file mode 100644 index 00000000000..4ec14c73bde --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json @@ -0,0 +1,68 @@ +{ + "interfaces": { + "google.monitoring.v3.MetricService": { + "retry_codes": { + "retry_codes_def": { + "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, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListMonitoredResourceDescriptors": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetMonitoredResourceDescriptor": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListMetricDescriptors": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetMetricDescriptor": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateMetricDescriptor": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteMetricDescriptor": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListTimeSeries": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateTimeSeries": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/test/index.js b/packages/google-cloud-monitoring/test/index.js new file mode 100644 index 00000000000..24b31285c0c --- /dev/null +++ b/packages/google-cloud-monitoring/test/index.js @@ -0,0 +1,37 @@ +/** + * 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 Monitoring = require('../src/index.js'); + +describe('Monitoring', function() { + describe('instantiation', function() { + it('should throw if invoked', function() { + var expectedMessage = [ + 'Cloud Monitoring must be accessed through the auto-generated client.', + ' See https://googlecloudplatform.github.io/google-cloud-node/#/docs/', + 'monitoring for more information.' + ].join(''); + + assert.throws(function() { + new Monitoring(); + }, new RegExp(expectedMessage)); + }); + }); +}); From bb1bef38095c346c3085199ef7a219749f1a51d1 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 21 Oct 2016 15:11:41 -0400 Subject: [PATCH 009/422] monitoring: update gapic layer (#1733) --- packages/google-cloud-monitoring/package.json | 2 +- .../src/v3/group_service_api.js | 242 +++++--------- .../src/v3/metric_service_api.js | 307 +++++++----------- 3 files changed, 204 insertions(+), 347 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 9721bc0d9c4..f559affb517 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -52,7 +52,7 @@ "stackdriver" ], "dependencies": { - "google-gax": "^0.7.0", + "google-gax": "^0.8.1", "google-proto-files": "^0.8.3", "extend": "^3.0.0" }, diff --git a/packages/google-cloud-monitoring/src/v3/group_service_api.js b/packages/google-cloud-monitoring/src/v3/group_service_api.js index 6951426d977..19e0fb5722b 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_api.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_api.js @@ -194,54 +194,53 @@ GroupServiceApi.prototype.matchGroupFromGroupName = function(groupName) { /** * Lists the existing groups. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project whose groups are to be listed. The format is * `"projects/{project_id_or_number}"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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.childrenOfGroup + * @param {string=} request.childrenOfGroup * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns groups whose `parentName` field contains the group * name. If no groups have this parent, the results are empty. - * @param {string=} options.ancestorsOfGroup + * @param {string=} request.ancestorsOfGroup * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns groups that are ancestors of the specified group. * The groups are returned in order, starting with the immediate parent and * ending with the most distant ancestor. If the specified group has no * immediate parent, the results are empty. - * @param {string=} options.descendantsOfGroup + * @param {string=} request.descendantsOfGroup * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns the descendants of the specified group. This is a superset of * the results returned by the `childrenOfGroup` filter, and includes * children-of-children, and so forth. - * @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 [ListGroupsResponse]{@link ListGroupsResponse}. * 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 * [Group]{@link Group} 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 = monitoringV3.groupServiceApi(); * var formattedName = api.projectPath("[PROJECT]"); * // Iterate over all elements. - * api.listGroups(formattedName).on('data', function(element) { + * api.listGroups({name: formattedName}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -254,15 +253,12 @@ GroupServiceApi.prototype.matchGroupFromGroupName = function(groupName) { * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listGroups(formattedName, {pageToken: nextPageToken}, callback); + * api.listGroups({name: formattedName}, {pageToken: nextPageToken}, callback); * } * } - * api.listGroups(formattedName, {flattenPages: false}, callback); + * api.listGroups({name: formattedName}, {flattenPages: false}, callback); */ -GroupServiceApi.prototype.listGroups = function( - name, - options, - callback) { +GroupServiceApi.prototype.listGroups = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -270,28 +266,15 @@ GroupServiceApi.prototype.listGroups = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - if ('childrenOfGroup' in options) { - req.childrenOfGroup = options.childrenOfGroup; - } - if ('ancestorsOfGroup' in options) { - req.ancestorsOfGroup = options.ancestorsOfGroup; - } - if ('descendantsOfGroup' in options) { - req.descendantsOfGroup = options.descendantsOfGroup; - } - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listGroups(req, options, callback); + return this._listGroups(request, options, callback); }; /** * Gets a single group. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The group to retrieve. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * @param {Object=} options @@ -301,25 +284,20 @@ GroupServiceApi.prototype.listGroups = function( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [Group]{@link Group} - * @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 = monitoringV3.groupServiceApi(); * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); - * api.getGroup(formattedName, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.getGroup({name: formattedName}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -GroupServiceApi.prototype.getGroup = function( - name, - options, - callback) { +GroupServiceApi.prototype.getGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -327,56 +305,50 @@ GroupServiceApi.prototype.getGroup = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - return this._getGroup(req, options, callback); + return this._getGroup(request, options, callback); }; /** * Creates a new group. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project in which to create the group. The format is * `"projects/{project_id_or_number}"`. - * @param {Object} group + * @param {Object} request.group * A group definition. It is an error to define the `name` field because * the system assigns the name. * * This object should have the same structure as [Group]{@link Group} + * @param {boolean=} request.validateOnly + * If true, validate this request but do not create the group. * @param {Object=} options * Optional parameters. You can override the default settings for 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 {boolean=} options.validateOnly - * If true, validate this request but do not create the group. - * * @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 [Group]{@link Group} - * @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 = monitoringV3.groupServiceApi(); * var formattedName = api.projectPath("[PROJECT]"); * var group = {}; - * api.createGroup(formattedName, group, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * name: formattedName, + * group: group + * }; + * api.createGroup(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -GroupServiceApi.prototype.createGroup = function( - name, - group, - options, - callback) { +GroupServiceApi.prototype.createGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -384,56 +356,43 @@ GroupServiceApi.prototype.createGroup = function( if (options === undefined) { options = {}; } - var req = { - name: name, - group: group - }; - if ('validateOnly' in options) { - req.validateOnly = options.validateOnly; - } - return this._createGroup(req, options, callback); + return this._createGroup(request, options, callback); }; /** * Updates an existing group. * You can change any group attributes except `name`. * - * @param {Object} group + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.group * The new definition of the group. All fields of the existing group, * excepting `name`, are replaced with the corresponding fields of this group. * * This object should have the same structure as [Group]{@link Group} + * @param {boolean=} request.validateOnly + * If true, validate this request but do not update the existing group. * @param {Object=} options * Optional parameters. You can override the default settings for 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 {boolean=} options.validateOnly - * If true, validate this request but do not update the existing group. - * * @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 [Group]{@link Group} - * @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 = monitoringV3.groupServiceApi(); * var group = {}; - * api.updateGroup(group, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.updateGroup({group: group}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -GroupServiceApi.prototype.updateGroup = function( - group, - options, - callback) { +GroupServiceApi.prototype.updateGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -441,19 +400,15 @@ GroupServiceApi.prototype.updateGroup = function( if (options === undefined) { options = {}; } - var req = { - group: group - }; - if ('validateOnly' in options) { - req.validateOnly = options.validateOnly; - } - return this._updateGroup(req, options, callback); + return this._updateGroup(request, options, callback); }; /** * Deletes an existing group. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The group to delete. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * @param {Object=} options @@ -461,23 +416,18 @@ GroupServiceApi.prototype.updateGroup = function( * 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 = monitoringV3.groupServiceApi(); * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); - * api.deleteGroup(formattedName, function(err) { - * if (err) { - * console.error(err); - * } + * api.deleteGroup({name: formattedName}).catch(function(err) { + * console.error(err); * }); */ -GroupServiceApi.prototype.deleteGroup = function( - name, - options, - callback) { +GroupServiceApi.prototype.deleteGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -485,30 +435,24 @@ GroupServiceApi.prototype.deleteGroup = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - return this._deleteGroup(req, options, callback); + return this._deleteGroup(request, options, callback); }; /** * Lists the monitored resources that are members of a group. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The group whose members are listed. The format is * `"projects/{project_id_or_number}/groups/{group_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 {string=} options.filter + * @param {string=} request.filter * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing * the members to be returned. The filter may reference the type, labels, and * metadata of monitored resources that comprise the group. @@ -516,32 +460,34 @@ GroupServiceApi.prototype.deleteGroup = function( * instances, use this filter: * * resource.type = "gce_instance" - * @param {Object=} options.interval + * @param {Object=} request.interval * An optional time interval for which results should be returned. Only * members that were part of the group during the specified interval are * included in the response. If no interval is provided then the group * membership over the last minute is returned. * * This object should have the same structure as [TimeInterval]{@link TimeInterval} - * + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [ListGroupMembersResponse]{@link ListGroupMembersResponse}. * 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.MonitoredResource]{@link external:"google.api.MonitoredResource"} 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 = monitoringV3.groupServiceApi(); * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); * // Iterate over all elements. - * api.listGroupMembers(formattedName).on('data', function(element) { + * api.listGroupMembers({name: formattedName}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -554,15 +500,12 @@ GroupServiceApi.prototype.deleteGroup = function( * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listGroupMembers(formattedName, {pageToken: nextPageToken}, callback); + * api.listGroupMembers({name: formattedName}, {pageToken: nextPageToken}, callback); * } * } - * api.listGroupMembers(formattedName, {flattenPages: false}, callback); + * api.listGroupMembers({name: formattedName}, {flattenPages: false}, callback); */ -GroupServiceApi.prototype.listGroupMembers = function( - name, - options, - callback) { +GroupServiceApi.prototype.listGroupMembers = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -570,19 +513,7 @@ GroupServiceApi.prototype.listGroupMembers = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - if ('filter' in options) { - req.filter = options.filter; - } - if ('interval' in options) { - req.interval = options.interval; - } - return this._listGroupMembers(req, options, callback); + return this._listGroupMembers(request, options, callback); }; function GroupServiceApiBuilder(gaxGrpc) { @@ -590,10 +521,7 @@ function GroupServiceApiBuilder(gaxGrpc) { return new GroupServiceApiBuilder(gaxGrpc); } - var groupServiceClient = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/monitoring/v3/group_service.proto' - }]); + var groupServiceClient = require('grpc-google-monitoring-v3').client; extend(this, groupServiceClient.google.monitoring.v3); var grpcClients = { @@ -625,4 +553,4 @@ function GroupServiceApiBuilder(gaxGrpc) { } module.exports = GroupServiceApiBuilder; 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/packages/google-cloud-monitoring/src/v3/metric_service_api.js b/packages/google-cloud-monitoring/src/v3/metric_service_api.js index cc97a623f6f..7b9300e4eaa 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_api.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_api.js @@ -226,15 +226,12 @@ MetricServiceApi.prototype.matchMonitoredResourceDescriptorFromMonitoredResource /** * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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.filter + * @param {string=} request.filter * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing * the descriptors to be returned. The filter can reference * the descriptor's type and labels. For example, the @@ -242,31 +239,33 @@ MetricServiceApi.prototype.matchMonitoredResourceDescriptorFromMonitoredResource * that have an `id` label: * * resource.type = starts_with("gce_") AND resource.label:id - * @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 [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 = monitoringV3.metricServiceApi(); * var formattedName = api.projectPath("[PROJECT]"); * // Iterate over all elements. - * api.listMonitoredResourceDescriptors(formattedName).on('data', function(element) { + * api.listMonitoredResourceDescriptors({name: formattedName}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -279,15 +278,12 @@ MetricServiceApi.prototype.matchMonitoredResourceDescriptorFromMonitoredResource * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listMonitoredResourceDescriptors(formattedName, {pageToken: nextPageToken}, callback); + * api.listMonitoredResourceDescriptors({name: formattedName}, {pageToken: nextPageToken}, callback); * } * } - * api.listMonitoredResourceDescriptors(formattedName, {flattenPages: false}, callback); + * api.listMonitoredResourceDescriptors({name: formattedName}, {flattenPages: false}, callback); */ -MetricServiceApi.prototype.listMonitoredResourceDescriptors = function( - name, - options, - callback) { +MetricServiceApi.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -295,22 +291,15 @@ MetricServiceApi.prototype.listMonitoredResourceDescriptors = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - if ('filter' in options) { - req.filter = options.filter; - } - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listMonitoredResourceDescriptors(req, options, callback); + return this._listMonitoredResourceDescriptors(request, options, callback); }; /** * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The monitored resource descriptor to get. The format is * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. * The `{resource_type}` is a predefined type, such as @@ -322,25 +311,20 @@ MetricServiceApi.prototype.listMonitoredResourceDescriptors = function( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} - * @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 = monitoringV3.metricServiceApi(); * var formattedName = api.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); - * api.getMonitoredResourceDescriptor(formattedName, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.getMonitoredResourceDescriptor({name: formattedName}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -MetricServiceApi.prototype.getMonitoredResourceDescriptor = function( - name, - options, - callback) { +MetricServiceApi.prototype.getMonitoredResourceDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -348,24 +332,18 @@ MetricServiceApi.prototype.getMonitoredResourceDescriptor = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - return this._getMonitoredResourceDescriptor(req, options, callback); + return this._getMonitoredResourceDescriptor(request, options, callback); }; /** * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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.filter + * @param {string=} request.filter * If this field is empty, all custom and * system-defined metric descriptors are returned. * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) @@ -374,31 +352,33 @@ MetricServiceApi.prototype.getMonitoredResourceDescriptor = function( * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): * * metric.type = starts_with("custom.googleapis.com/") - * @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 [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. * 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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} 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 = monitoringV3.metricServiceApi(); * var formattedName = api.projectPath("[PROJECT]"); * // Iterate over all elements. - * api.listMetricDescriptors(formattedName).on('data', function(element) { + * api.listMetricDescriptors({name: formattedName}).on('data', function(element) { * // doThingsWith(element) * }); * @@ -411,15 +391,12 @@ MetricServiceApi.prototype.getMonitoredResourceDescriptor = function( * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listMetricDescriptors(formattedName, {pageToken: nextPageToken}, callback); + * api.listMetricDescriptors({name: formattedName}, {pageToken: nextPageToken}, callback); * } * } - * api.listMetricDescriptors(formattedName, {flattenPages: false}, callback); + * api.listMetricDescriptors({name: formattedName}, {flattenPages: false}, callback); */ -MetricServiceApi.prototype.listMetricDescriptors = function( - name, - options, - callback) { +MetricServiceApi.prototype.listMetricDescriptors = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -427,22 +404,15 @@ MetricServiceApi.prototype.listMetricDescriptors = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - if ('filter' in options) { - req.filter = options.filter; - } - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listMetricDescriptors(req, options, callback); + return this._listMetricDescriptors(request, options, callback); }; /** * Gets a single metric descriptor. This method does not require a Stackdriver account. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The metric descriptor on which to execute the request. The format is * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example value of `{metric_id}` is @@ -454,25 +424,20 @@ MetricServiceApi.prototype.listMetricDescriptors = function( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} - * @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 = monitoringV3.metricServiceApi(); * var formattedName = api.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); - * api.getMetricDescriptor(formattedName, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * api.getMetricDescriptor({name: formattedName}).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -MetricServiceApi.prototype.getMetricDescriptor = function( - name, - options, - callback) { +MetricServiceApi.prototype.getMetricDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -480,10 +445,7 @@ MetricServiceApi.prototype.getMetricDescriptor = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - return this._getMetricDescriptor(req, options, callback); + return this._getMetricDescriptor(request, options, callback); }; /** @@ -491,10 +453,12 @@ MetricServiceApi.prototype.getMetricDescriptor = function( * User-created metric descriptors define * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {Object} metricDescriptor + * @param {Object} request.metricDescriptor * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) * descriptor. * @@ -506,27 +470,25 @@ MetricServiceApi.prototype.getMetricDescriptor = function( * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} - * @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 = monitoringV3.metricServiceApi(); * var formattedName = api.projectPath("[PROJECT]"); * var metricDescriptor = {}; - * api.createMetricDescriptor(formattedName, metricDescriptor, function(err, response) { - * if (err) { - * console.error(err); - * return; - * } + * var request = { + * name: formattedName, + * metricDescriptor: metricDescriptor + * }; + * api.createMetricDescriptor(request).then(function(response) { * // doThingsWith(response) + * }).catch(function(err) { + * console.error(err); * }); */ -MetricServiceApi.prototype.createMetricDescriptor = function( - name, - metricDescriptor, - options, - callback) { +MetricServiceApi.prototype.createMetricDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -534,18 +496,16 @@ MetricServiceApi.prototype.createMetricDescriptor = function( if (options === undefined) { options = {}; } - var req = { - name: name, - metricDescriptor: metricDescriptor - }; - return this._createMetricDescriptor(req, options, callback); + return this._createMetricDescriptor(request, options, callback); }; /** * Deletes a metric descriptor. Only user-created * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The metric descriptor on which to execute the request. The format is * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example of `{metric_id}` is: @@ -555,23 +515,18 @@ MetricServiceApi.prototype.createMetricDescriptor = function( * 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 = monitoringV3.metricServiceApi(); * var formattedName = api.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); - * api.deleteMetricDescriptor(formattedName, function(err) { - * if (err) { - * console.error(err); - * } + * api.deleteMetricDescriptor({name: formattedName}).catch(function(err) { + * console.error(err); * }); */ -MetricServiceApi.prototype.deleteMetricDescriptor = function( - name, - options, - callback) { +MetricServiceApi.prototype.deleteMetricDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -579,19 +534,18 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function( if (options === undefined) { options = {}; } - var req = { - name: name - }; - return this._deleteMetricDescriptor(req, options, callback); + return this._deleteMetricDescriptor(request, options, callback); }; /** * Lists time series that match a filter. This method does not require a Stackdriver account. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project on which to execute the request. The format is * "projects/{project_id_or_number}". - * @param {string} filter + * @param {string} request.filter * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time * series should be returned. The filter must specify a single metric type, * and can additionally specify metric labels and other information. For @@ -599,49 +553,46 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function( * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.label.instance_name = "my-instance-name" - * @param {Object} interval + * @param {Object} request.interval * The time interval for which results should be returned. Only time series * that contain data points in the specified interval are included * in the response. * * This object should have the same structure as [TimeInterval]{@link TimeInterval} - * @param {number} view + * @param {number} request.view * Specifies which information is returned about the time series. * * The number should be among the values of [TimeSeriesView]{@link TimeSeriesView} - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 {Object=} options.aggregation + * @param {Object=} request.aggregation * By default, the raw time series data is returned. * Use this field to combine multiple time series for different * views of the data. * * This object should have the same structure as [Aggregation]{@link Aggregation} - * @param {string=} options.orderBy + * @param {string=} request.orderBy * Specifies the order in which the points of the time series should * be returned. By default, results are not ordered. Currently, * this field must be left blank. - * @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 [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. * 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 * [TimeSeries]{@link TimeSeries} 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 * @@ -650,8 +601,14 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function( * var filter = ''; * var interval = {}; * var view = TimeSeriesView.FULL; + * var request = { + * name: formattedName, + * filter: filter, + * interval: interval, + * view: view + * }; * // Iterate over all elements. - * api.listTimeSeries(formattedName, filter, interval, view).on('data', function(element) { + * api.listTimeSeries(request).on('data', function(element) { * // doThingsWith(element) * }); * @@ -664,18 +621,12 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function( * // doThingsWith(response) * if (nextPageToken) { * // fetch the next page. - * api.listTimeSeries(formattedName, filter, interval, view, {pageToken: nextPageToken}, callback); + * api.listTimeSeries(request, {pageToken: nextPageToken}, callback); * } * } - * api.listTimeSeries(formattedName, filter, interval, view, {flattenPages: false}, callback); + * api.listTimeSeries(request, {flattenPages: false}, callback); */ -MetricServiceApi.prototype.listTimeSeries = function( - name, - filter, - interval, - view, - options, - callback) { +MetricServiceApi.prototype.listTimeSeries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -683,22 +634,7 @@ MetricServiceApi.prototype.listTimeSeries = function( if (options === undefined) { options = {}; } - var req = { - name: name, - filter: filter, - interval: interval, - view: view - }; - if ('aggregation' in options) { - req.aggregation = options.aggregation; - } - if ('orderBy' in options) { - req.orderBy = options.orderBy; - } - if ('pageSize' in options) { - req.pageSize = options.pageSize; - } - return this._listTimeSeries(req, options, callback); + return this._listTimeSeries(request, options, callback); }; /** @@ -707,10 +643,12 @@ MetricServiceApi.prototype.listTimeSeries = function( * If any time series could not be written, a corresponding failure message is * included in the error response. * - * @param {string} name + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {Object[]} timeSeries + * @param {Object[]} request.timeSeries * The new data to be added to a list of time series. * Adds at most one data point to each of several time series. The new data * point must be more recent than any other point in its time series. Each @@ -723,25 +661,23 @@ MetricServiceApi.prototype.listTimeSeries = function( * 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 = monitoringV3.metricServiceApi(); * var formattedName = api.projectPath("[PROJECT]"); * var timeSeries = []; - * api.createTimeSeries(formattedName, timeSeries, function(err) { - * if (err) { - * console.error(err); - * } + * var request = { + * name: formattedName, + * timeSeries: timeSeries + * }; + * api.createTimeSeries(request).catch(function(err) { + * console.error(err); * }); */ -MetricServiceApi.prototype.createTimeSeries = function( - name, - timeSeries, - options, - callback) { +MetricServiceApi.prototype.createTimeSeries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -749,11 +685,7 @@ MetricServiceApi.prototype.createTimeSeries = function( if (options === undefined) { options = {}; } - var req = { - name: name, - timeSeries: timeSeries - }; - return this._createTimeSeries(req, options, callback); + return this._createTimeSeries(request, options, callback); }; function MetricServiceApiBuilder(gaxGrpc) { @@ -761,10 +693,7 @@ function MetricServiceApiBuilder(gaxGrpc) { return new MetricServiceApiBuilder(gaxGrpc); } - var metricServiceClient = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/monitoring/v3/metric_service.proto' - }]); + var metricServiceClient = require('grpc-google-monitoring-v3').client; extend(this, metricServiceClient.google.monitoring.v3); var grpcClients = { @@ -796,4 +725,4 @@ function MetricServiceApiBuilder(gaxGrpc) { } module.exports = MetricServiceApiBuilder; 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 af01eccb143111a5afc5de2ade297ac5fc4f69fa Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 21 Oct 2016 16:51:48 -0400 Subject: [PATCH 010/422] monitoring @ 0.1.0 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f559affb517..99069c60113 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.0.0", + "version": "0.1.0", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From aae9d88be89101d0e5c35656830b57b117f80f16 Mon Sep 17 00:00:00 2001 From: Ernest Landrito Date: Sat, 22 Oct 2016 11:03:13 -0700 Subject: [PATCH 011/422] Regen Monitoring (#1741) --- .../google-cloud-monitoring/src/v3/group_service_api.js | 5 ++++- .../google-cloud-monitoring/src/v3/metric_service_api.js | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/group_service_api.js b/packages/google-cloud-monitoring/src/v3/group_service_api.js index 19e0fb5722b..45d256fd584 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_api.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_api.js @@ -521,7 +521,10 @@ function GroupServiceApiBuilder(gaxGrpc) { return new GroupServiceApiBuilder(gaxGrpc); } - var groupServiceClient = require('grpc-google-monitoring-v3').client; + var groupServiceClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/monitoring/v3/group_service.proto' + }]); extend(this, groupServiceClient.google.monitoring.v3); var grpcClients = { diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_api.js b/packages/google-cloud-monitoring/src/v3/metric_service_api.js index 7b9300e4eaa..7d08431e7c4 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_api.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_api.js @@ -158,7 +158,7 @@ MetricServiceApi.prototype.matchProjectFromProjectName = function(projectName) { /** * Returns a fully-qualified metric_descriptor resource name string. * @param {String} project - * @param {String} metric_descriptor + * @param {String} metricDescriptor * @returns {String} */ MetricServiceApi.prototype.metricDescriptorPath = function(project, metricDescriptor) { @@ -191,7 +191,7 @@ MetricServiceApi.prototype.matchMetricDescriptorFromMetricDescriptorName = funct /** * Returns a fully-qualified monitored_resource_descriptor resource name string. * @param {String} project - * @param {String} monitored_resource_descriptor + * @param {String} monitoredResourceDescriptor * @returns {String} */ MetricServiceApi.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { @@ -693,7 +693,10 @@ function MetricServiceApiBuilder(gaxGrpc) { return new MetricServiceApiBuilder(gaxGrpc); } - var metricServiceClient = require('grpc-google-monitoring-v3').client; + var metricServiceClient = gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/monitoring/v3/metric_service.proto' + }]); extend(this, metricServiceClient.google.monitoring.v3); var grpcClients = { From 73f4a0e2ba6c2ca2fc5a29a42be7ca1e9325c664 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sat, 22 Oct 2016 14:04:40 -0400 Subject: [PATCH 012/422] monitoring @ 0.1.1 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 99069c60113..d67809401b0 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.1.0", + "version": "0.1.1", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From 35f1354a08d8e641b8a24f87567b22e4568fe7a0 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 11:16:08 -0500 Subject: [PATCH 013/422] docs: update API key generation steps (#1791) --- packages/google-cloud-monitoring/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 1f4af9006ee..36bb4f93cae 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -49,8 +49,8 @@ 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** > **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 da1dbbf03ffee54b011000b5b7a7962f30ac1992 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 14:39:40 -0500 Subject: [PATCH 014/422] update dependencies --- packages/google-cloud-monitoring/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d67809401b0..6adf3739ca3 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -52,9 +52,9 @@ "stackdriver" ], "dependencies": { - "google-gax": "^0.8.1", - "google-proto-files": "^0.8.3", - "extend": "^3.0.0" + "extend": "^3.0.0", + "google-gax": "^0.9.1", + "google-proto-files": "^0.8.3" }, "devDependencies": { "mocha": "^3.1.2" From 5d40a17bb8c74ddbdef5639e36fad7eb34431ad1 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Nov 2016 16:29:43 -0500 Subject: [PATCH 015/422] monitoring @ 0.1.2 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 6adf3739ca3..bca8a431e49 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.1.1", + "version": "0.1.2", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From 253dd21eeb33d29ee7aa1083382f7ec1e0920ae0 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 16 Nov 2016 14:57:03 -0800 Subject: [PATCH 016/422] Refactor Cloud Functions samples. (#245) --- packages/google-cloud-monitoring/samples/package.json | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 046f99a395e..23f73965804 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -5,14 +5,11 @@ "license": "Apache Version 2.0", "author": "Google Inc.", "scripts": { - "test": "mocha -R spec -t 120000 --require intelli-espower-loader ../test/_setup.js test/*.test.js", - "system-test": "mocha -R spec -t 120000 --require intelli-espower-loader ../system-test/_setup.js system-test/*.test.js" + "test": "cd ..; npm run t -- monitoring/test/*.test.js", + "system-test": "cd ..; npm run st -- monitoring/system-test/*.test.js" }, "dependencies": { - "async":"^1.5.2", - "googleapis": "^12.0.0" - }, - "devDependencies": { - "mocha": "^2.5.3" + "async":"2.1.2", + "googleapis": "14.2.0" } } From 372cea9605d893f2f668f00f7aa8f5d93c8f196a Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Mon, 28 Nov 2016 12:04:05 -0800 Subject: [PATCH 017/422] Regenerate monitoring API client. (#1829) --- packages/google-cloud-monitoring/package.json | 2 +- ...service_api.js => group_service_client.js} | 374 +++++++++--- .../google-cloud-monitoring/src/v3/index.js | 12 +- ...ervice_api.js => metric_service_client.js} | 542 +++++++++++++----- 4 files changed, 697 insertions(+), 233 deletions(-) rename packages/google-cloud-monitoring/src/v3/{group_service_api.js => group_service_client.js} (53%) rename packages/google-cloud-monitoring/src/v3/{metric_service_api.js => metric_service_client.js} (51%) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index bca8a431e49..c7b559621b9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -53,7 +53,7 @@ ], "dependencies": { "extend": "^3.0.0", - "google-gax": "^0.9.1", + "google-gax": "^0.10.0", "google-proto-files": "^0.8.3" }, "devDependencies": { diff --git a/packages/google-cloud-monitoring/src/v3/group_service_api.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js similarity index 53% rename from packages/google-cloud-monitoring/src/v3/group_service_api.js rename to packages/google-cloud-monitoring/src/v3/group_service_client.js index 45d256fd584..8cd73812c3f 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_api.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -37,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; - var PAGE_DESCRIPTORS = { listGroups: new gax.PageDescriptor( 'pageToken', @@ -54,6 +53,10 @@ var PAGE_DESCRIPTORS = { * this service. */ var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write' ]; /** @@ -72,17 +75,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 groupServiceApi} + * @see {@link groupServiceClient} * * @example * var monitoringV3 = require('@google-cloud/monitoring').v3({ * // optional auth parameters. * }); - * var api = monitoringV3.groupServiceApi(); + * var client = monitoringV3.groupServiceClient(); * * @class */ -function GroupServiceApi(gaxGrpc, grpcClients, opts) { +function GroupServiceClient(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; @@ -101,8 +104,6 @@ function GroupServiceApi(gaxGrpc, grpcClients, opts) { 'google.monitoring.v3.GroupService', configData, clientConfig, - PAGE_DESCRIPTORS, - null, {'x-goog-api-client': googleApiClient}); var groupServiceStub = gaxGrpc.createStub( @@ -123,7 +124,8 @@ function GroupServiceApi(gaxGrpc, grpcClients, opts) { groupServiceStub.then(function(groupServiceStub) { return groupServiceStub[methodName].bind(groupServiceStub); }), - defaults[methodName]); + defaults[methodName], + PAGE_DESCRIPTORS[methodName]); }.bind(this)); } @@ -140,7 +142,7 @@ var GROUP_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -GroupServiceApi.prototype.projectPath = function(project) { +GroupServiceClient.prototype.projectPath = function(project) { return PROJECT_PATH_TEMPLATE.render({ project: project }); @@ -152,7 +154,7 @@ GroupServiceApi.prototype.projectPath = function(project) { * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -GroupServiceApi.prototype.matchProjectFromProjectName = function(projectName) { +GroupServiceClient.prototype.matchProjectFromProjectName = function(projectName) { return PROJECT_PATH_TEMPLATE.match(projectName).project; }; @@ -162,7 +164,7 @@ GroupServiceApi.prototype.matchProjectFromProjectName = function(projectName) { * @param {String} group * @returns {String} */ -GroupServiceApi.prototype.groupPath = function(project, group) { +GroupServiceClient.prototype.groupPath = function(project, group) { return GROUP_PATH_TEMPLATE.render({ project: project, group: group @@ -175,7 +177,7 @@ GroupServiceApi.prototype.groupPath = function(project, group) { * A fully-qualified path representing a group resources. * @returns {String} - A string representing the project. */ -GroupServiceApi.prototype.matchProjectFromGroupName = function(groupName) { +GroupServiceClient.prototype.matchProjectFromGroupName = function(groupName) { return GROUP_PATH_TEMPLATE.match(groupName).project; }; @@ -185,7 +187,7 @@ GroupServiceApi.prototype.matchProjectFromGroupName = function(groupName) { * A fully-qualified path representing a group resources. * @returns {String} - A string representing the group. */ -GroupServiceApi.prototype.matchGroupFromGroupName = function(groupName) { +GroupServiceClient.prototype.matchGroupFromGroupName = function(groupName) { return GROUP_PATH_TEMPLATE.match(groupName).group; }; @@ -223,42 +225,64 @@ GroupServiceApi.prototype.matchGroupFromGroupName = function(groupName) { * @param {Object=} options * Optional parameters. You can override the default settings for 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 [ListGroupsResponse]{@link ListGroupsResponse}. - * 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 - * [Group]{@link Group} 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 [Group]{@link Group}. + * + * 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 [ListGroupsResponse]{@link ListGroupsResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Group]{@link Group}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Group]{@link Group} 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 [ListGroupsResponse]{@link ListGroupsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.groupServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * // Iterate over all elements. - * api.listGroups({name: formattedName}).on('data', function(element) { - * // doThingsWith(element) + * client.listGroups({name: formattedName}).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.listGroups({name: formattedName}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listGroups(nextRequest, options).then(callback); * } * } - * api.listGroups({name: formattedName}, {flattenPages: false}, callback); + * client.listGroups({name: formattedName}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -GroupServiceApi.prototype.listGroups = function(request, options, callback) { +GroupServiceClient.prototype.listGroups = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -266,9 +290,73 @@ GroupServiceApi.prototype.listGroups = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._listGroups(request, options, callback); }; +/** + * Equivalent to {@link listGroups}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listGroups} 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.name + * The project whose groups are to be listed. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.childrenOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups whose `parentName` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string=} request.ancestorsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string=} request.descendantsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `childrenOfGroup` filter, and includes + * children-of-children, and so forth. + * @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 [Group]{@link Group} on 'data' event. + * + * @example + * + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); + * client.listGroupsStream({name: formattedName}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', function(err) { + * console.error(err); + * }); + */ +GroupServiceClient.prototype.listGroupsStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listGroups.createStream(this._listGroups, request, options); +}; + /** * Gets a single group. * @@ -283,21 +371,23 @@ GroupServiceApi.prototype.listGroups = 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 [Group]{@link Group} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [Group]{@link Group}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Group]{@link Group}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.groupServiceApi(); - * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); - * api.getGroup({name: formattedName}).then(function(response) { + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + * client.getGroup({name: formattedName}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -GroupServiceApi.prototype.getGroup = function(request, options, callback) { +GroupServiceClient.prototype.getGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -305,6 +395,7 @@ GroupServiceApi.prototype.getGroup = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._getGroup(request, options, callback); }; @@ -329,26 +420,28 @@ GroupServiceApi.prototype.getGroup = 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 [Group]{@link Group} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [Group]{@link Group}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Group]{@link Group}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.groupServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * var group = {}; * var request = { * name: formattedName, * group: group * }; - * api.createGroup(request).then(function(response) { + * client.createGroup(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -GroupServiceApi.prototype.createGroup = function(request, options, callback) { +GroupServiceClient.prototype.createGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -356,6 +449,7 @@ GroupServiceApi.prototype.createGroup = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._createGroup(request, options, callback); }; @@ -378,21 +472,23 @@ GroupServiceApi.prototype.createGroup = 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 [Group]{@link Group} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [Group]{@link Group}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Group]{@link Group}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.groupServiceApi(); + * var client = monitoringV3.groupServiceClient(); * var group = {}; - * api.updateGroup({group: group}).then(function(response) { + * client.updateGroup({group: group}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -GroupServiceApi.prototype.updateGroup = function(request, options, callback) { +GroupServiceClient.prototype.updateGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -400,6 +496,7 @@ GroupServiceApi.prototype.updateGroup = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._updateGroup(request, options, callback); }; @@ -416,18 +513,18 @@ GroupServiceApi.prototype.updateGroup = function(request, options, callback) { * 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 = monitoringV3.groupServiceApi(); - * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); - * api.deleteGroup({name: formattedName}).catch(function(err) { + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + * client.deleteGroup({name: formattedName}).catch(function(err) { * console.error(err); * }); */ -GroupServiceApi.prototype.deleteGroup = function(request, options, callback) { +GroupServiceClient.prototype.deleteGroup = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -435,6 +532,7 @@ GroupServiceApi.prototype.deleteGroup = function(request, options, callback) { if (options === undefined) { options = {}; } + return this._deleteGroup(request, options, callback); }; @@ -470,42 +568,64 @@ GroupServiceApi.prototype.deleteGroup = function(request, options, callback) { * @param {Object=} options * Optional parameters. You can override the default settings for 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 [ListGroupMembersResponse]{@link ListGroupMembersResponse}. - * 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.MonitoredResource]{@link external:"google.api.MonitoredResource"} 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.MonitoredResource]{@link external:"google.api.MonitoredResource"}. + * + * 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 [ListGroupMembersResponse]{@link ListGroupMembersResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} 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 [ListGroupMembersResponse]{@link ListGroupMembersResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.groupServiceApi(); - * var formattedName = api.groupPath("[PROJECT]", "[GROUP]"); + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); * // Iterate over all elements. - * api.listGroupMembers({name: formattedName}).on('data', function(element) { - * // doThingsWith(element) + * client.listGroupMembers({name: formattedName}).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.listGroupMembers({name: formattedName}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listGroupMembers(nextRequest, options).then(callback); * } * } - * api.listGroupMembers({name: formattedName}, {flattenPages: false}, callback); + * client.listGroupMembers({name: formattedName}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -GroupServiceApi.prototype.listGroupMembers = function(request, options, callback) { +GroupServiceClient.prototype.listGroupMembers = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -513,12 +633,76 @@ GroupServiceApi.prototype.listGroupMembers = function(request, options, callback if (options === undefined) { options = {}; } + return this._listGroupMembers(request, options, callback); }; -function GroupServiceApiBuilder(gaxGrpc) { - if (!(this instanceof GroupServiceApiBuilder)) { - return new GroupServiceApiBuilder(gaxGrpc); +/** + * Equivalent to {@link listGroupMembers}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listGroupMembers} 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.name + * The group whose members are listed. The format is + * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter + * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing + * the members to be returned. The filter may reference the type, labels, and + * metadata of monitored resources that comprise the group. + * For example, to return only resources representing Compute Engine VM + * instances, use this filter: + * + * resource.type = "gce_instance" + * @param {Object=} request.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * This object should have the same structure as [TimeInterval]{@link TimeInterval} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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.MonitoredResource]{@link external:"google.api.MonitoredResource"} on 'data' event. + * + * @example + * + * var client = monitoringV3.groupServiceClient(); + * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + * client.listGroupMembersStream({name: formattedName}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', function(err) { + * console.error(err); + * }); + */ +GroupServiceClient.prototype.listGroupMembersStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listGroupMembers.createStream(this._listGroupMembers, request, options); +}; + +function GroupServiceClientBuilder(gaxGrpc) { + if (!(this instanceof GroupServiceClientBuilder)) { + return new GroupServiceClientBuilder(gaxGrpc); } var groupServiceClient = gaxGrpc.load([{ @@ -532,7 +716,7 @@ function GroupServiceApiBuilder(gaxGrpc) { }; /** - * Build a new instance of {@link GroupServiceApi}. + * Build a new instance of {@link GroupServiceClient}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath @@ -549,11 +733,11 @@ function GroupServiceApiBuilder(gaxGrpc) { * @param {String=} opts.appVersion * The version of the calling service. */ - this.groupServiceApi = function(opts) { - return new GroupServiceApi(gaxGrpc, grpcClients, opts); + this.groupServiceClient = function(opts) { + return new GroupServiceClient(gaxGrpc, grpcClients, opts); }; - extend(this.groupServiceApi, GroupServiceApi); + extend(this.groupServiceClient, GroupServiceClient); } -module.exports = GroupServiceApiBuilder; +module.exports = GroupServiceClientBuilder; 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/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index 93e0ea10b98..ca79c93644c 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -15,8 +15,8 @@ */ 'use strict'; -var groupServiceApi = require('./group_service_api'); -var metricServiceApi = require('./metric_service_api'); +var groupServiceClient = require('./group_service_client'); +var metricServiceClient = require('./metric_service_client'); var gax = require('google-gax'); var extend = require('extend'); @@ -26,10 +26,10 @@ function v3(options) { }, options); var gaxGrpc = gax.grpc(options); var result = {}; - extend(result, groupServiceApi(gaxGrpc)); - extend(result, metricServiceApi(gaxGrpc)); + extend(result, groupServiceClient(gaxGrpc)); + extend(result, metricServiceClient(gaxGrpc)); return result; } -v3.SERVICE_ADDRESS = groupServiceApi.SERVICE_ADDRESS; -v3.ALL_SCOPES = []; +v3.SERVICE_ADDRESS = groupServiceClient.SERVICE_ADDRESS; +v3.ALL_SCOPES = groupServiceClient.ALL_SCOPES; module.exports = v3; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_api.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js similarity index 51% rename from packages/google-cloud-monitoring/src/v3/metric_service_api.js rename to packages/google-cloud-monitoring/src/v3/metric_service_client.js index 7d08431e7c4..b73f64c2fa7 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_api.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -37,7 +37,6 @@ var DEFAULT_SERVICE_PORT = 443; var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; - var PAGE_DESCRIPTORS = { listMonitoredResourceDescriptors: new gax.PageDescriptor( 'pageToken', @@ -58,6 +57,10 @@ var PAGE_DESCRIPTORS = { * this service. */ var ALL_SCOPES = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write' ]; /** @@ -66,17 +69,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 metricServiceApi} + * @see {@link metricServiceClient} * * @example * var monitoringV3 = require('@google-cloud/monitoring').v3({ * // optional auth parameters. * }); - * var api = monitoringV3.metricServiceApi(); + * var client = monitoringV3.metricServiceClient(); * * @class */ -function MetricServiceApi(gaxGrpc, grpcClients, opts) { +function MetricServiceClient(gaxGrpc, grpcClients, opts) { opts = opts || {}; var servicePath = opts.servicePath || SERVICE_ADDRESS; var port = opts.port || DEFAULT_SERVICE_PORT; @@ -95,8 +98,6 @@ function MetricServiceApi(gaxGrpc, grpcClients, opts) { 'google.monitoring.v3.MetricService', configData, clientConfig, - PAGE_DESCRIPTORS, - null, {'x-goog-api-client': googleApiClient}); var metricServiceStub = gaxGrpc.createStub( @@ -119,7 +120,8 @@ function MetricServiceApi(gaxGrpc, grpcClients, opts) { metricServiceStub.then(function(metricServiceStub) { return metricServiceStub[methodName].bind(metricServiceStub); }), - defaults[methodName]); + defaults[methodName], + PAGE_DESCRIPTORS[methodName]); }.bind(this)); } @@ -139,7 +141,7 @@ var MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE = new gax.PathTemplate( * @param {String} project * @returns {String} */ -MetricServiceApi.prototype.projectPath = function(project) { +MetricServiceClient.prototype.projectPath = function(project) { return PROJECT_PATH_TEMPLATE.render({ project: project }); @@ -151,7 +153,7 @@ MetricServiceApi.prototype.projectPath = function(project) { * A fully-qualified path representing a project resources. * @returns {String} - A string representing the project. */ -MetricServiceApi.prototype.matchProjectFromProjectName = function(projectName) { +MetricServiceClient.prototype.matchProjectFromProjectName = function(projectName) { return PROJECT_PATH_TEMPLATE.match(projectName).project; }; @@ -161,7 +163,7 @@ MetricServiceApi.prototype.matchProjectFromProjectName = function(projectName) { * @param {String} metricDescriptor * @returns {String} */ -MetricServiceApi.prototype.metricDescriptorPath = function(project, metricDescriptor) { +MetricServiceClient.prototype.metricDescriptorPath = function(project, metricDescriptor) { return METRIC_DESCRIPTOR_PATH_TEMPLATE.render({ project: project, metric_descriptor: metricDescriptor @@ -174,7 +176,7 @@ MetricServiceApi.prototype.metricDescriptorPath = function(project, metricDescri * A fully-qualified path representing a metric_descriptor resources. * @returns {String} - A string representing the project. */ -MetricServiceApi.prototype.matchProjectFromMetricDescriptorName = function(metricDescriptorName) { +MetricServiceClient.prototype.matchProjectFromMetricDescriptorName = function(metricDescriptorName) { return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).project; }; @@ -184,7 +186,7 @@ MetricServiceApi.prototype.matchProjectFromMetricDescriptorName = function(metri * A fully-qualified path representing a metric_descriptor resources. * @returns {String} - A string representing the metric_descriptor. */ -MetricServiceApi.prototype.matchMetricDescriptorFromMetricDescriptorName = function(metricDescriptorName) { +MetricServiceClient.prototype.matchMetricDescriptorFromMetricDescriptorName = function(metricDescriptorName) { return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).metric_descriptor; }; @@ -194,7 +196,7 @@ MetricServiceApi.prototype.matchMetricDescriptorFromMetricDescriptorName = funct * @param {String} monitoredResourceDescriptor * @returns {String} */ -MetricServiceApi.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { +MetricServiceClient.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.render({ project: project, monitored_resource_descriptor: monitoredResourceDescriptor @@ -207,7 +209,7 @@ MetricServiceApi.prototype.monitoredResourceDescriptorPath = function(project, m * A fully-qualified path representing a monitored_resource_descriptor resources. * @returns {String} - A string representing the project. */ -MetricServiceApi.prototype.matchProjectFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { +MetricServiceClient.prototype.matchProjectFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).project; }; @@ -217,7 +219,7 @@ MetricServiceApi.prototype.matchProjectFromMonitoredResourceDescriptorName = fun * A fully-qualified path representing a monitored_resource_descriptor resources. * @returns {String} - A string representing the monitored_resource_descriptor. */ -MetricServiceApi.prototype.matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { +MetricServiceClient.prototype.matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).monitored_resource_descriptor; }; @@ -248,42 +250,64 @@ MetricServiceApi.prototype.matchMonitoredResourceDescriptorFromMonitoredResource * @param {Object=} options * Optional parameters. You can override the default settings for 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 = monitoringV3.metricServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * // Iterate over all elements. - * api.listMonitoredResourceDescriptors({name: formattedName}).on('data', function(element) { - * // doThingsWith(element) + * client.listMonitoredResourceDescriptors({name: formattedName}).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({name: formattedName}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); * } * } - * api.listMonitoredResourceDescriptors({name: formattedName}, {flattenPages: false}, callback); + * client.listMonitoredResourceDescriptors({name: formattedName}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -MetricServiceApi.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { +MetricServiceClient.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -291,9 +315,66 @@ MetricServiceApi.prototype.listMonitoredResourceDescriptors = function(request, if (options === undefined) { options = {}; } + 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 {string} request.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing + * the descriptors to be returned. The filter can reference + * the descriptor's type and labels. For example, the + * following filter returns only Google Compute Engine descriptors + * that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label: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 [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. + * + * @example + * + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); + * client.listMonitoredResourceDescriptorsStream({name: formattedName}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', function(err) { + * console.error(err); + * }); + */ +MetricServiceClient.prototype.listMonitoredResourceDescriptorsStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listMonitoredResourceDescriptors.createStream(this._listMonitoredResourceDescriptors, request, options); +}; + /** * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. * @@ -310,21 +391,23 @@ MetricServiceApi.prototype.listMonitoredResourceDescriptors = function(request, * @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 [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.metricServiceApi(); - * var formattedName = api.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); - * api.getMonitoredResourceDescriptor({name: formattedName}).then(function(response) { + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + * client.getMonitoredResourceDescriptor({name: formattedName}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -MetricServiceApi.prototype.getMonitoredResourceDescriptor = function(request, options, callback) { +MetricServiceClient.prototype.getMonitoredResourceDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -332,6 +415,7 @@ MetricServiceApi.prototype.getMonitoredResourceDescriptor = function(request, op if (options === undefined) { options = {}; } + return this._getMonitoredResourceDescriptor(request, options, callback); }; @@ -361,42 +445,64 @@ MetricServiceApi.prototype.getMonitoredResourceDescriptor = function(request, op * @param {Object=} options * Optional parameters. You can override the default settings for 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 [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. - * 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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} 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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. + * + * 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 [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} 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 [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.metricServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * // Iterate over all elements. - * api.listMetricDescriptors({name: formattedName}).on('data', function(element) { - * // doThingsWith(element) + * client.listMetricDescriptors({name: formattedName}).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.listMetricDescriptors({name: formattedName}, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listMetricDescriptors(nextRequest, options).then(callback); * } * } - * api.listMetricDescriptors({name: formattedName}, {flattenPages: false}, callback); + * client.listMetricDescriptors({name: formattedName}, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -MetricServiceApi.prototype.listMetricDescriptors = function(request, options, callback) { +MetricServiceClient.prototype.listMetricDescriptors = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -404,9 +510,67 @@ MetricServiceApi.prototype.listMetricDescriptors = function(request, options, ca if (options === undefined) { options = {}; } + return this._listMetricDescriptors(request, options, callback); }; +/** + * Equivalent to {@link listMetricDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listMetricDescriptors} 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.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} on 'data' event. + * + * @example + * + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); + * client.listMetricDescriptorsStream({name: formattedName}).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', function(err) { + * console.error(err); + * }); + */ +MetricServiceClient.prototype.listMetricDescriptorsStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listMetricDescriptors.createStream(this._listMetricDescriptors, request, options); +}; + /** * Gets a single metric descriptor. This method does not require a Stackdriver account. * @@ -423,21 +587,23 @@ MetricServiceApi.prototype.listMetricDescriptors = function(request, options, ca * @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 [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.metricServiceApi(); - * var formattedName = api.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); - * api.getMetricDescriptor({name: formattedName}).then(function(response) { + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + * client.getMetricDescriptor({name: formattedName}).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -MetricServiceApi.prototype.getMetricDescriptor = function(request, options, callback) { +MetricServiceClient.prototype.getMetricDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -445,6 +611,7 @@ MetricServiceApi.prototype.getMetricDescriptor = function(request, options, call if (options === undefined) { options = {}; } + return this._getMetricDescriptor(request, options, callback); }; @@ -469,26 +636,28 @@ MetricServiceApi.prototype.getMetricDescriptor = function(request, options, call * @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 [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} - * @returns {Promise} - The promise which resolves to the response object. + * The second parameter to the callback is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.metricServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * var metricDescriptor = {}; * var request = { * name: formattedName, * metricDescriptor: metricDescriptor * }; - * api.createMetricDescriptor(request).then(function(response) { + * client.createMetricDescriptor(request).then(function(responses) { + * var response = responses[0]; * // doThingsWith(response) * }).catch(function(err) { * console.error(err); * }); */ -MetricServiceApi.prototype.createMetricDescriptor = function(request, options, callback) { +MetricServiceClient.prototype.createMetricDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -496,6 +665,7 @@ MetricServiceApi.prototype.createMetricDescriptor = function(request, options, c if (options === undefined) { options = {}; } + return this._createMetricDescriptor(request, options, callback); }; @@ -515,18 +685,18 @@ MetricServiceApi.prototype.createMetricDescriptor = function(request, options, c * 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 = monitoringV3.metricServiceApi(); - * var formattedName = api.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); - * api.deleteMetricDescriptor({name: formattedName}).catch(function(err) { + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + * client.deleteMetricDescriptor({name: formattedName}).catch(function(err) { * console.error(err); * }); */ -MetricServiceApi.prototype.deleteMetricDescriptor = function(request, options, callback) { +MetricServiceClient.prototype.deleteMetricDescriptor = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -534,6 +704,7 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function(request, options, c if (options === undefined) { options = {}; } + return this._deleteMetricDescriptor(request, options, callback); }; @@ -582,25 +753,33 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function(request, options, c * @param {Object=} options * Optional parameters. You can override the default settings for 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 [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. - * 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 - * [TimeSeries]{@link TimeSeries} 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 [TimeSeries]{@link TimeSeries}. + * + * 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 [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [TimeSeries]{@link TimeSeries}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [TimeSeries]{@link TimeSeries} 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 [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * - * var api = monitoringV3.metricServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * var filter = ''; * var interval = {}; - * var view = TimeSeriesView.FULL; + * var view = monitoringV3.ListTimeSeriesRequest.TimeSeriesView.FULL; * var request = { * name: formattedName, * filter: filter, @@ -608,25 +787,39 @@ MetricServiceApi.prototype.deleteMetricDescriptor = function(request, options, c * view: view * }; * // Iterate over all elements. - * api.listTimeSeries(request).on('data', function(element) { - * // doThingsWith(element) + * client.listTimeSeries(request).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.listTimeSeries(request, {pageToken: nextPageToken}, callback); + * if (nextRequest) { + * // Fetch the next page. + * return client.listTimeSeries(nextRequest, options).then(callback); * } * } - * api.listTimeSeries(request, {flattenPages: false}, callback); + * client.listTimeSeries(request, options) + * .then(callback) + * .catch(function(err) { + * console.error(err); + * }); */ -MetricServiceApi.prototype.listTimeSeries = function(request, options, callback) { +MetricServiceClient.prototype.listTimeSeries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -634,9 +827,95 @@ MetricServiceApi.prototype.listTimeSeries = function(request, options, callback) if (options === undefined) { options = {}; } + return this._listTimeSeries(request, options, callback); }; +/** + * Equivalent to {@link listTimeSeries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listTimeSeries} 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.name + * The project on which to execute the request. The format is + * "projects/{project_id_or_number}". + * @param {string} request.filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * series should be returned. The filter must specify a single metric type, + * and can additionally specify metric labels and other information. For + * example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.label.instance_name = "my-instance-name" + * @param {Object} request.interval + * The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * + * This object should have the same structure as [TimeInterval]{@link TimeInterval} + * @param {number} request.view + * Specifies which information is returned about the time series. + * + * The number should be among the values of [TimeSeriesView]{@link TimeSeriesView} + * @param {Object=} request.aggregation + * By default, the raw time series data is returned. + * Use this field to combine multiple time series for different + * views of the data. + * + * This object should have the same structure as [Aggregation]{@link Aggregation} + * @param {string=} request.orderBy + * Specifies the order in which the points of the time series should + * be returned. By default, results are not ordered. Currently, + * this field must be left blank. + * @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 [TimeSeries]{@link TimeSeries} on 'data' event. + * + * @example + * + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); + * var filter = ''; + * var interval = {}; + * var view = monitoringV3.ListTimeSeriesRequest.TimeSeriesView.FULL; + * var request = { + * name: formattedName, + * filter: filter, + * interval: interval, + * view: view + * }; + * client.listTimeSeriesStream(request).on('data', function(element) { + * // doThingsWith(element) + * }).on('error', function(err) { + * console.error(err); + * }); + */ +MetricServiceClient.prototype.listTimeSeriesStream = function(request, options) { + if (options === undefined) { + options = {}; + } + + return PAGE_DESCRIPTORS.listTimeSeries.createStream(this._listTimeSeries, request, options); +}; + /** * Creates or adds data to one or more time series. * The response is empty if all time series in the request were written. @@ -661,23 +940,23 @@ MetricServiceApi.prototype.listTimeSeries = function(request, options, callback) * 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 = monitoringV3.metricServiceApi(); - * var formattedName = api.projectPath("[PROJECT]"); + * var client = monitoringV3.metricServiceClient(); + * var formattedName = client.projectPath("[PROJECT]"); * var timeSeries = []; * var request = { * name: formattedName, * timeSeries: timeSeries * }; - * api.createTimeSeries(request).catch(function(err) { + * client.createTimeSeries(request).catch(function(err) { * console.error(err); * }); */ -MetricServiceApi.prototype.createTimeSeries = function(request, options, callback) { +MetricServiceClient.prototype.createTimeSeries = function(request, options, callback) { if (options instanceof Function && callback === undefined) { callback = options; options = {}; @@ -685,12 +964,13 @@ MetricServiceApi.prototype.createTimeSeries = function(request, options, callbac if (options === undefined) { options = {}; } + return this._createTimeSeries(request, options, callback); }; -function MetricServiceApiBuilder(gaxGrpc) { - if (!(this instanceof MetricServiceApiBuilder)) { - return new MetricServiceApiBuilder(gaxGrpc); +function MetricServiceClientBuilder(gaxGrpc) { + if (!(this instanceof MetricServiceClientBuilder)) { + return new MetricServiceClientBuilder(gaxGrpc); } var metricServiceClient = gaxGrpc.load([{ @@ -704,7 +984,7 @@ function MetricServiceApiBuilder(gaxGrpc) { }; /** - * Build a new instance of {@link MetricServiceApi}. + * Build a new instance of {@link MetricServiceClient}. * * @param {Object=} opts - The optional parameters. * @param {String=} opts.servicePath @@ -721,11 +1001,11 @@ function MetricServiceApiBuilder(gaxGrpc) { * @param {String=} opts.appVersion * The version of the calling service. */ - this.metricServiceApi = function(opts) { - return new MetricServiceApi(gaxGrpc, grpcClients, opts); + this.metricServiceClient = function(opts) { + return new MetricServiceClient(gaxGrpc, grpcClients, opts); }; - extend(this.metricServiceApi, MetricServiceApi); + extend(this.metricServiceClient, MetricServiceClient); } -module.exports = MetricServiceApiBuilder; +module.exports = MetricServiceClientBuilder; 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 6627dd65afb780a42b35b1f6a083724cd0d11c17 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 30 Nov 2016 07:59:30 -0500 Subject: [PATCH 018/422] monitoring @ 0.1.3 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c7b559621b9..3b594975b2e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.1.2", + "version": "0.1.3", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From 68c85d58b75d700e80f0a46361afef40b78d901e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Thu, 8 Dec 2016 18:34:53 -0500 Subject: [PATCH 019/422] prepare READMEs for beta release (#1864) --- packages/google-cloud-monitoring/README.md | 25 +++++++------------ packages/google-cloud-monitoring/src/index.js | 6 ----- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 36bb4f93cae..1a04f7beb2d 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -1,5 +1,5 @@ -# @google-cloud/monitoring -> Stackdriver Monitoring Client Library for Node.js +# @google-cloud/monitoring ([Alpha][versioning]) +> Google Stackdriver Monitoring Client Library for Node.js *Looking for more Google APIs than just Monitoring? You might want to check out [`google-cloud`][google-cloud].* @@ -27,24 +27,19 @@ var monitoring = require('@google-cloud/monitoring').v3({ 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 monitoring = require('@google-cloud/monitoring').v3({ - projectId: projectId -}); - +var monitoring = require('@google-cloud/monitoring').v3(); // ...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. @@ -53,11 +48,7 @@ If you are not running this client on Google Compute Engine, you need a Google D * 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' - -var monitoring = require('@google-cloud/monitoring')({ - projectId: projectId, - +var monitoring = require('@google-cloud/monitoring').v3({ // The path to your key file: keyFilename: '/path/to/keyfile.json' @@ -68,6 +59,8 @@ var monitoring = require('@google-cloud/monitoring')({ // ...you're good to go! ``` + +[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/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index 54269d4f581..7029aef0c7c 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -21,12 +21,6 @@ 'use strict'; /** - *

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

- * * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects * metrics, events, and metadata from Google Cloud Platform, Amazon Web Services * (AWS), hosted uptime probes, application instrumentation, and a variety of From f3eea5184c1105626be15ac348c45337c43d4c1f Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 9 Dec 2016 15:16:00 -0800 Subject: [PATCH 020/422] Update storage samples. (#263) * Update storage samples. * Update dependencies. --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 23f73965804..b682bbbf982 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -10,6 +10,6 @@ }, "dependencies": { "async":"2.1.2", - "googleapis": "14.2.0" + "googleapis": "15.0.0" } } From f523069945919c16473af7f236e0e38e5fa31256 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 6 Jan 2017 15:30:36 -0800 Subject: [PATCH 021/422] Switch from Mocha to Ava for faster tests (#289) * Switch from Mocha to Ava * Concurrency: 5 --- packages/google-cloud-monitoring/samples/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index b682bbbf982..2969e485ead 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -5,8 +5,7 @@ "license": "Apache Version 2.0", "author": "Google Inc.", "scripts": { - "test": "cd ..; npm run t -- monitoring/test/*.test.js", - "system-test": "cd ..; npm run st -- monitoring/system-test/*.test.js" + "test": "cd ..; npm run st -- monitoring/system-test/*.test.js" }, "dependencies": { "async":"2.1.2", From d2f566ad6843a5765480924abf28966023102d25 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 9 Jan 2017 14:02:52 -0800 Subject: [PATCH 022/422] Switch to Yarn for CI build. (#290) --- packages/google-cloud-monitoring/samples/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 2969e485ead..66ce1a78459 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -5,10 +5,10 @@ "license": "Apache Version 2.0", "author": "Google Inc.", "scripts": { - "test": "cd ..; npm run st -- monitoring/system-test/*.test.js" + "test": "cd ..; npm run st -- --verbose monitoring/system-test/*.test.js" }, "dependencies": { - "async":"2.1.2", - "googleapis": "15.0.0" + "async":"2.1.4", + "googleapis": "16.0.0" } } From 74de5674b96a1396acb7593f0a1f58af17f5bc2e Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 25 Jan 2017 13:56:39 -0800 Subject: [PATCH 023/422] Add new Monitoring snippets. (#301) --- .../google-cloud-monitoring/samples/README.md | 51 +++++++++++++ .../samples/package.json | 6 +- .../samples/quickstart.js | 71 +++++++++++++++++++ 3 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-monitoring/samples/quickstart.js diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 445f9ede860..aeebd85a647 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -28,6 +28,57 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. ## Samples +### Metrics + +View the [documentation][metrics_docs] or the [source code][metrics_code]. + +__Usage:__ `node metrics.js --help` + +``` +Commands: + create [projectId] Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric + descriptor. + list [projectId] Lists metric descriptors. + get [projectId] Get a metric descriptor. + delete [projectId] Deletes a custom metric descriptor. + write [projectId] Writes example time series data to + 'custom.googleapis.com/stores/daily_sales'. + read [projectId] Reads time series data that matches the given filter. + read-fields [projectId] Reads headers of time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + read-aggregate [projectId] Aggregates time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + read-reduce [projectId] Reduces time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + list-resources [projectId] Lists monitored resource descriptors. + get-resource [projectId] Get a monitored resource descriptor. + +Options: + --help Show help [boolean] + --projectId, -p [string] + +Examples: + node metrics.js create + node metrics.js list + node metrics.js get logging.googleapis.com/log_entry_count + node metrics.js delete + custom.googleapis.com/stores/daily_sales + node metrics.js list-resources + node metrics.js get-resource cloudsql_database + node metrics.js write + node metrics.js read + 'metric.type="compute.googleapis.com/instance/cpu/utilizatio + n"' + node metrics.js read-fields + node metrics.js read-aggregate + node metrics.js read-reduce + +For more information, see https://cloud.google.com/monitoring/docs +``` + +[metrics_docs]: https://cloud.google.com/monitoring/docs +[metrics_code]: metrics.js + ### List resources `list_resources.js` is a command-line program to demonstrate connecting to the Google diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 66ce1a78459..15de3068d06 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -8,7 +8,9 @@ "test": "cd ..; npm run st -- --verbose monitoring/system-test/*.test.js" }, "dependencies": { - "async":"2.1.4", - "googleapis": "16.0.0" + "@google-cloud/monitoring": "0.1.4", + "async": "2.1.4", + "googleapis": "16.0.0", + "yargs": "6.6.0" } } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js new file mode 100644 index 00000000000..c743cc18560 --- /dev/null +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -0,0 +1,71 @@ +/** + * 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. + */ + +'use strict'; + +// [START monitoring_quickstart] +// Imports the Google Cloud client library +const Monitoring = require('@google-cloud/monitoring'); + +// Your Google Cloud Platform project ID +const projectId = 'YOUR_PROJECT_ID'; + +// Instantiates a client +const client = Monitoring.v3().metricServiceClient(); + +// Prepares an individual data point +const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000 + } + }, + value: { + // The amount of sales + doubleValue: 123.45 + } +}; + +// Prepares the time series request +const request = { + name: client.projectPath(projectId), + timeSeries: [ + { + // Ties the data point to a custom metric + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh' + } + }, + resource: { + type: 'global', + labels: { + project_id: projectId + } + }, + points: [ + dataPoint + ] + } + ] +}; + +// Writes time series data +client.createTimeSeries(request) + .then((results) => { + console.log(`Done writing time series data.`); + }); +// [END monitoring_quickstart] From 5a419e9072b2aa43421c177be5d0268589aa629f Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 6 Feb 2017 14:59:32 -0800 Subject: [PATCH 024/422] Update dependencies. --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 15de3068d06..7c121d7d3a9 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -10,7 +10,7 @@ "dependencies": { "@google-cloud/monitoring": "0.1.4", "async": "2.1.4", - "googleapis": "16.0.0", + "googleapis": "16.1.0", "yargs": "6.6.0" } } From 23ed37e3a049558c63b1697e7a08c3798d729f4f Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Feb 2017 12:18:51 -0500 Subject: [PATCH 025/422] update deps --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 3b594975b2e..8158e171431 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -54,7 +54,7 @@ "dependencies": { "extend": "^3.0.0", "google-gax": "^0.10.0", - "google-proto-files": "^0.8.3" + "google-proto-files": "^0.9.1" }, "devDependencies": { "mocha": "^3.1.2" From 053af44de168272a4cae38eec803258884acd1d9 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 2 Mar 2017 20:27:44 -0500 Subject: [PATCH 026/422] docs: change Google Cloud to Cloud (#1995) --- packages/google-cloud-monitoring/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 1a04f7beb2d..52686636362 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -25,7 +25,7 @@ var monitoring = require('@google-cloud/monitoring').v3({ ## 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 From 52ac850252e8ec1220e159d9bf9b148b44f04757 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 3 Mar 2017 15:23:24 -0500 Subject: [PATCH 027/422] update gax & google-proto-files --- packages/google-cloud-monitoring/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8158e171431..29dd40b1fef 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -53,8 +53,8 @@ ], "dependencies": { "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" }, "devDependencies": { "mocha": "^3.1.2" From 7f40ab0cd954dcaab76b84ccc0609a35b172fb1e Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Tue, 7 Mar 2017 12:24:38 -0800 Subject: [PATCH 028/422] Regenerate monitoring APIs (#2059) Updates #2019 --- packages/google-cloud-monitoring/package.json | 2 +- .../src/v3/group_service_client.js | 64 +++++++++++-------- .../src/v3/group_service_client_config.json | 14 ++-- .../google-cloud-monitoring/src/v3/index.js | 6 +- .../src/v3/metric_service_client.js | 64 +++++++++++-------- .../src/v3/metric_service_client_config.json | 14 ++-- 6 files changed, 93 insertions(+), 71 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 29dd40b1fef..e95b50a4ee1 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -53,7 +53,7 @@ ], "dependencies": { "extend": "^3.0.0", - "google-gax": "^0.12.2", + "google-gax": "^0.12.3", "google-proto-files": "^0.10.0" }, "devDependencies": { diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 8cd73812c3f..1cab7077adf 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'monitoring.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; var PAGE_DESCRIPTORS = { listGroups: new gax.PageDescriptor( @@ -86,31 +86,36 @@ var ALL_SCOPES = [ * @class */ function GroupServiceClient(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.monitoring.v3.GroupService', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + + var self = this; + this.auth = gaxGrpc.auth; var groupServiceStub = gaxGrpc.createStub( - servicePath, - port, - grpcClients.groupServiceClient.google.monitoring.v3.GroupService, - {sslCreds: sslCreds}); + grpcClients.google.monitoring.v3.GroupService, + opts); var groupServiceStubMethods = [ 'listGroups', 'getGroup', @@ -120,13 +125,16 @@ function GroupServiceClient(gaxGrpc, grpcClients, opts) { 'listGroupMembers' ]; groupServiceStubMethods.forEach(function(methodName) { - this['_' + methodName] = gax.createApiCall( + self['_' + methodName] = gax.createApiCall( groupServiceStub.then(function(groupServiceStub) { - return groupServiceStub[methodName].bind(groupServiceStub); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return groupServiceStub[methodName].apply(groupServiceStub, args); + }; }), defaults[methodName], PAGE_DESCRIPTORS[methodName]); - }.bind(this)); + }); } // Path templates @@ -191,6 +199,15 @@ GroupServiceClient.prototype.matchGroupFromGroupName = function(groupName) { return GROUP_PATH_TEMPLATE.match(groupName).group; }; +/** + * Get the project ID used by this class. + * @aram {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +GroupServiceClient.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + // Service calls /** @@ -711,9 +728,6 @@ function GroupServiceClientBuilder(gaxGrpc) { }]); extend(this, groupServiceClient.google.monitoring.v3); - var grpcClients = { - groupServiceClient: groupServiceClient - }; /** * Build a new instance of {@link GroupServiceClient}. @@ -728,13 +742,9 @@ function GroupServiceClientBuilder(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.groupServiceClient = function(opts) { - return new GroupServiceClient(gaxGrpc, grpcClients, opts); + return new GroupServiceClient(gaxGrpc, groupServiceClient, opts); }; extend(this.groupServiceClient, GroupServiceClient); } diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json index c1d5d808d10..825193b3a41 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json @@ -2,13 +2,13 @@ "interfaces": { "google.monitoring.v3.GroupService": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] }, "retry_params": { "default": { diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index ca79c93644c..e26eedb2776 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -1,5 +1,5 @@ -/*! - * 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. @@ -30,6 +30,8 @@ function v3(options) { extend(result, metricServiceClient(gaxGrpc)); return result; } + v3.SERVICE_ADDRESS = groupServiceClient.SERVICE_ADDRESS; v3.ALL_SCOPES = groupServiceClient.ALL_SCOPES; + module.exports = v3; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index b73f64c2fa7..62706b2ffbd 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'monitoring.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.1.0'; +var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; var PAGE_DESCRIPTORS = { listMonitoredResourceDescriptors: new gax.PageDescriptor( @@ -80,31 +80,36 @@ var ALL_SCOPES = [ * @class */ function MetricServiceClient(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.monitoring.v3.MetricService', configData, - clientConfig, - {'x-goog-api-client': googleApiClient}); + opts.clientConfig, + {'x-goog-api-client': googleApiClient.join(' ')}); + + var self = this; + this.auth = gaxGrpc.auth; var metricServiceStub = gaxGrpc.createStub( - servicePath, - port, - grpcClients.metricServiceClient.google.monitoring.v3.MetricService, - {sslCreds: sslCreds}); + grpcClients.google.monitoring.v3.MetricService, + opts); var metricServiceStubMethods = [ 'listMonitoredResourceDescriptors', 'getMonitoredResourceDescriptor', @@ -116,13 +121,16 @@ function MetricServiceClient(gaxGrpc, grpcClients, opts) { 'createTimeSeries' ]; metricServiceStubMethods.forEach(function(methodName) { - this['_' + methodName] = gax.createApiCall( + self['_' + methodName] = gax.createApiCall( metricServiceStub.then(function(metricServiceStub) { - return metricServiceStub[methodName].bind(metricServiceStub); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return metricServiceStub[methodName].apply(metricServiceStub, args); + }; }), defaults[methodName], PAGE_DESCRIPTORS[methodName]); - }.bind(this)); + }); } // Path templates @@ -223,6 +231,15 @@ MetricServiceClient.prototype.matchMonitoredResourceDescriptorFromMonitoredResou return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).monitored_resource_descriptor; }; +/** + * Get the project ID used by this class. + * @aram {function(Error, string)} callback - the callback to be called with + * the current project Id. + */ +MetricServiceClient.prototype.getProjectId = function(callback) { + return this.auth.getProjectId(callback); +}; + // Service calls /** @@ -979,9 +996,6 @@ function MetricServiceClientBuilder(gaxGrpc) { }]); extend(this, metricServiceClient.google.monitoring.v3); - var grpcClients = { - metricServiceClient: metricServiceClient - }; /** * Build a new instance of {@link MetricServiceClient}. @@ -996,13 +1010,9 @@ function MetricServiceClientBuilder(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.metricServiceClient = function(opts) { - return new MetricServiceClient(gaxGrpc, grpcClients, opts); + return new MetricServiceClient(gaxGrpc, metricServiceClient, opts); }; extend(this.metricServiceClient, MetricServiceClient); } diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json index 4ec14c73bde..b04f7227700 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json @@ -2,13 +2,13 @@ "interfaces": { "google.monitoring.v3.MetricService": { "retry_codes": { - "retry_codes_def": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - } + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [ + "UNAVAILABLE" + ] }, "retry_params": { "default": { From 1584f84876043820d8e699e4cd2e37a1f4cfce9e Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Tue, 14 Mar 2017 17:07:59 -0400 Subject: [PATCH 029/422] monitoring @ 0.1.5 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e95b50a4ee1..d80aa854eea 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.1.3", + "version": "0.1.5", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From 8bf80bd97cd2cbf941bf951ad328de95045d6fee Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 13:50:44 -0400 Subject: [PATCH 030/422] 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 --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d80aa854eea..bd93a06bbb2 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -65,6 +65,6 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=0.12.0" + "node": ">=4.0.0" } } From 66049ca7045d08bb3b00d07e8cd31a7bba410ebb Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Fri, 31 Mar 2017 14:58:33 -0400 Subject: [PATCH 031/422] monitoring @ 0.2.0 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index bd93a06bbb2..ce9108f563b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.1.5", + "version": "0.2.0", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From c16b1f00c0fabe26350ad627e6ca761f93687821 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Wed, 5 Apr 2017 15:57:12 -0500 Subject: [PATCH 032/422] Travis: fix failing tests + update dependencies (#335) * Make unify script recursive + clean up dependency conflicts * Restore travis.yml * Delete outdated text detection sample that duplicates detect.js * Fix failing KMS + vision tests by updating dependencies * Fix video tests using a bad cwd * Upgrade monitoring dependency + skip flaky monitoring tests * Fix DLP tests having wrong cwd * Fix failing vision test * Fix datastore tests * Update broken dependency * Update possibly broken compute engine dependency * Fix typos * Disable Node 4 testing * Revert deletion of outdated sample - @gguuss says we still use this. This reverts commit b7259c820fb011369c7b5badac82fcde26be008a. * Update dependency --- packages/google-cloud-monitoring/samples/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 7c121d7d3a9..043697e003f 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -8,9 +8,9 @@ "test": "cd ..; npm run st -- --verbose monitoring/system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.1.4", + "@google-cloud/monitoring": "0.2.0", "async": "2.1.4", - "googleapis": "16.1.0", + "googleapis": "18.0.0", "yargs": "6.6.0" } } From b6b5f464b2383f38d6d53dfa5c83f263c1e90e1f Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Mon, 10 Apr 2017 21:38:40 -0400 Subject: [PATCH 033/422] update deps --- packages/google-cloud-monitoring/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index ce9108f563b..d5b7d5e7f1b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -53,8 +53,8 @@ ], "dependencies": { "extend": "^3.0.0", - "google-gax": "^0.12.3", - "google-proto-files": "^0.10.0" + "google-gax": "^0.13.0", + "google-proto-files": "^0.11.0" }, "devDependencies": { "mocha": "^3.1.2" From 91578cceebefa66d2bab9b549798027269011c8a Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 24 Apr 2017 14:40:11 -0700 Subject: [PATCH 034/422] Cleanup App Engine samples and re-work tests. (#354) --- .../google-cloud-monitoring/samples/README.md | 26 ++++++++++++++-- .../samples/package.json | 30 +++++++++++++++---- .../samples/quickstart.js | 3 ++ 3 files changed, 52 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index aeebd85a647..4ac615e71ee 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -15,14 +15,21 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. * [Samples](#samples) * [Listing resources](#listing-resources) * [Custom metrics](#custom-metrics) +* [Running the tests](#running-the-tests) ## Setup -1. Read [Prerequisites][prereq] and [How to run a sample][run] first. -1. Install dependencies: +1. Read [Prerequisites][prereq] and [How to run a sample][run] first. +1. Install dependencies: + + With `npm`: npm install + With `yarn`: + + yarn install + [prereq]: ../README.md#prerequisities [run]: ../README.md#how-to-run-a-sample @@ -106,3 +113,18 @@ __Run the sample:__ [custom_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics [custom_code]: create_custom_metric.js + +## Running the tests + +1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment + variables. + +1. Run the tests: + + With `npm`: + + npm test + + With `yarn`: + + yarn test diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 043697e003f..9fa560d0eb4 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -2,15 +2,35 @@ "name": "nodejs-docs-samples-monitoring", "version": "0.0.1", "private": true, - "license": "Apache Version 2.0", + "license": "Apache-2.0", "author": "Google Inc.", + "repository": { + "type": "git", + "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" + }, + "cloud": { + "requiresKeyFile": true, + "requiresProjectId": true + }, + "engines": { + "node": ">=4.3.2" + }, "scripts": { - "test": "cd ..; npm run st -- --verbose monitoring/system-test/*.test.js" + "lint": "samples lint", + "pretest": "npm run lint", + "system-test": "ava -T 2m --verbose system-test/*.test.js", + "test": "npm run system-test" }, "dependencies": { "@google-cloud/monitoring": "0.2.0", - "async": "2.1.4", - "googleapis": "18.0.0", - "yargs": "6.6.0" + "async": "2.3.0", + "googleapis": "19.0.0", + "yargs": "7.1.0" + }, + "devDependencies": { + "@google-cloud/nodejs-repo-tools": "1.3.1", + "ava": "0.19.1", + "proxyquire": "1.7.11", + "sinon": "2.1.0" } } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index c743cc18560..0dff897ae30 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -67,5 +67,8 @@ const request = { client.createTimeSeries(request) .then((results) => { console.log(`Done writing time series data.`); + }) + .catch((err) => { + console.error('ERROR:', err); }); // [END monitoring_quickstart] From f57515814ae092effd57a637fa74106ebc5e4652 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 2 May 2017 08:54:19 -0700 Subject: [PATCH 035/422] Upgrade to repo tools v1.4.7 (#370) --- .../google-cloud-monitoring/samples/README.md | 62 ++++++++++--------- .../samples/package.json | 44 +++++++++++-- 2 files changed, 70 insertions(+), 36 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 4ac615e71ee..e0784bbc9f8 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -1,18 +1,16 @@ Google Cloud Platform logo -# Stackdriver Monitoring Node.js samples +# Stackdriver Monitoring Node.js Samples -[Stackdriver Monitoring][monitoring_docs] collects metrics, events, and metadata -from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, -application instrumentation, and a variety of common application components -including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. +[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-monitoring.svg)]() -[monitoring_docs]: https://cloud.google.com/monitoring/docs/ +[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. ## Table of Contents * [Setup](#setup) * [Samples](#samples) + * [Metrics](#metrics) * [Listing resources](#listing-resources) * [Custom metrics](#custom-metrics) * [Running the tests](#running-the-tests) @@ -37,7 +35,8 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. ### Metrics -View the [documentation][metrics_docs] or the [source code][metrics_code]. + +View the [documentation][metrics_0_docs] or the [source code][metrics_0_code]. __Usage:__ `node metrics.js --help` @@ -68,14 +67,11 @@ Examples: node metrics.js create node metrics.js list node metrics.js get logging.googleapis.com/log_entry_count - node metrics.js delete - custom.googleapis.com/stores/daily_sales + node metrics.js delete custom.googleapis.com/stores/daily_sales node metrics.js list-resources node metrics.js get-resource cloudsql_database node metrics.js write - node metrics.js read - 'metric.type="compute.googleapis.com/instance/cpu/utilizatio - n"' + node metrics.js read 'metric.type="compute.googleapis.com/instance/cpu/utilization"' node metrics.js read-fields node metrics.js read-aggregate node metrics.js read-reduce @@ -83,36 +79,42 @@ Examples: For more information, see https://cloud.google.com/monitoring/docs ``` -[metrics_docs]: https://cloud.google.com/monitoring/docs -[metrics_code]: metrics.js +[metrics_0_docs]: https://cloud.google.com/monitoring/docs +[metrics_0_code]: metrics.js + +### Listing resources -### List resources -`list_resources.js` is a command-line program to demonstrate connecting to the Google -Monitoring API to retrieve API data. +View the [documentation][list_1_docs] or the [source code][list_1_code]. -View the [documentation][list_docs] or the [source code][list_code]. +`list_resources.js` is a command-line program to demonstrate connecting to the +Google Monitoring API to retrieve API data. -__Run the sample:__ +__Usage:__ `node list_resources ` - node list_resources +``` +node list_resources my-cool-project +``` -[list_docs]: https://cloud.google.com/monitoring/demos/#hello-world -[list_code]: list_resources.js +[list_1_docs]: https://cloud.google.com/monitoring/demos/#hello-world +[list_1_code]: list_resources.js -### Custom metric +### Custom metrics -`create_custom_metric.js` demonstrates how to create a custom metric, write a timeseries value to it, -and read it back. -View the [documentation][custom_docs] or the [source code][custom_code]. +View the [documentation][metrics_2_docs] or the [source code][metrics_2_code]. -__Run the sample:__ +`create_custom_metric.js` demonstrates how to create a custom metric, write a +timeseries value to it, and read it back. - node create_custom_metric +__Usage:__ `node create_custom_metric ` + +``` +node create_custom_metric my-cool-project +``` -[custom_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics -[custom_code]: create_custom_metric.js +[metrics_2_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics +[metrics_2_code]: create_custom_metric.js ## Running the tests diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 9fa560d0eb4..32c9d40422c 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -8,17 +8,13 @@ "type": "git", "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" }, - "cloud": { - "requiresKeyFile": true, - "requiresProjectId": true - }, "engines": { "node": ">=4.3.2" }, "scripts": { "lint": "samples lint", "pretest": "npm run lint", - "system-test": "ava -T 2m --verbose system-test/*.test.js", + "system-test": "ava -T 3m --verbose system-test/*.test.js", "test": "npm run system-test" }, "dependencies": { @@ -28,9 +24,45 @@ "yargs": "7.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.3.1", + "@google-cloud/nodejs-repo-tools": "1.4.7", "ava": "0.19.1", "proxyquire": "1.7.11", "sinon": "2.1.0" + }, + "cloud-repo-tools": { + "requiresKeyFile": true, + "requiresProjectId": true, + "product": "monitoring", + "samples": [ + { + "id": "metrics", + "name": "Metrics", + "file": "metrics.js", + "docs_link": "https://cloud.google.com/monitoring/docs", + "usage": "node metrics.js --help" + }, + { + "id": "list", + "name": "Listing resources", + "file": "list_resources.js", + "docs_link": "https://cloud.google.com/monitoring/demos/#hello-world", + "description": "`list_resources.js` is a command-line program to demonstrate connecting to the\nGoogle Monitoring API to retrieve API data.", + "usage": { + "text": "node list_resources " + }, + "help": "node list_resources my-cool-project" + }, + { + "id": "metrics", + "name": "Custom metrics", + "file": "create_custom_metric.js", + "docs_link": "https://cloud.google.com/monitoring/demos/#custom_metrics", + "description": "`create_custom_metric.js` demonstrates how to create a custom metric, write a\ntimeseries value to it, and read it back.", + "usage": { + "text": "node create_custom_metric " + }, + "help": "node create_custom_metric my-cool-project" + } + ] } } From 7be7f711d00bc69a39390ff7eab0fd6c8e4831a4 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 10 May 2017 16:47:18 -0700 Subject: [PATCH 036/422] Upgrade repo tools and regenerate READMEs. (#384) --- packages/google-cloud-monitoring/samples/README.md | 14 +++++--------- .../google-cloud-monitoring/samples/package.json | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index e0784bbc9f8..b8a64bcf547 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -20,11 +20,11 @@ 1. Read [Prerequisites][prereq] and [How to run a sample][run] first. 1. Install dependencies: - With `npm`: + With **npm**: npm install - With `yarn`: + With **yarn**: yarn install @@ -35,7 +35,6 @@ ### Metrics - View the [documentation][metrics_0_docs] or the [source code][metrics_0_code]. __Usage:__ `node metrics.js --help` @@ -84,7 +83,6 @@ For more information, see https://cloud.google.com/monitoring/docs ### Listing resources - View the [documentation][list_1_docs] or the [source code][list_1_code]. `list_resources.js` is a command-line program to demonstrate connecting to the @@ -101,7 +99,6 @@ node list_resources my-cool-project ### Custom metrics - View the [documentation][metrics_2_docs] or the [source code][metrics_2_code]. `create_custom_metric.js` demonstrates how to create a custom metric, write a @@ -118,15 +115,14 @@ node create_custom_metric my-cool-project ## Running the tests -1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment - variables. +1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables. 1. Run the tests: - With `npm`: + With **npm**: npm test - With `yarn`: + With **yarn**: yarn test diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 32c9d40422c..d5ab478a9a2 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -24,7 +24,7 @@ "yargs": "7.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.7", + "@google-cloud/nodejs-repo-tools": "1.4.13", "ava": "0.19.1", "proxyquire": "1.7.11", "sinon": "2.1.0" From 05d2af207a5d0b52ef5e5b71246854e0a8c4be9a Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sat, 13 May 2017 15:17:42 -0400 Subject: [PATCH 037/422] monitoring @ 0.2.1 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d5b7d5e7f1b..c762b6c6fe5 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.2.0", + "version": "0.2.1", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From 2a0e12821bea7f649467a2436e5398f5e86de0d3 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 16 May 2017 09:33:07 -0700 Subject: [PATCH 038/422] Upgrade repo tools and regenerate READMEs. --- packages/google-cloud-monitoring/samples/README.md | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index b8a64bcf547..520c781ead0 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -28,7 +28,7 @@ yarn install -[prereq]: ../README.md#prerequisities +[prereq]: ../README.md#prerequisites [run]: ../README.md#how-to-run-a-sample ## Samples diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index d5ab478a9a2..1389e218570 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -24,7 +24,7 @@ "yargs": "7.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.13", + "@google-cloud/nodejs-repo-tools": "1.4.14", "ava": "0.19.1", "proxyquire": "1.7.11", "sinon": "2.1.0" From fa9c85e921df8540b7961f704ee7b50809381100 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sun, 4 Jun 2017 14:48:28 -0400 Subject: [PATCH 039/422] update deps --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c762b6c6fe5..e710a1e2c75 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -54,7 +54,7 @@ "dependencies": { "extend": "^3.0.0", "google-gax": "^0.13.0", - "google-proto-files": "^0.11.0" + "google-proto-files": "^0.12.0" }, "devDependencies": { "mocha": "^3.1.2" From d52574b1930be7f3729e897c6f91a853bda299c0 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sun, 4 Jun 2017 14:51:44 -0400 Subject: [PATCH 040/422] monitoring @ 0.2.2 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e710a1e2c75..e8d646162f5 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.2.1", + "version": "0.2.2", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From b656b122e1df2c3d174948d8287a9104f8182637 Mon Sep 17 00:00:00 2001 From: Song Wang Date: Thu, 15 Jun 2017 09:58:13 -0700 Subject: [PATCH 041/422] update gapic retry config (#2390) --- .../src/v3/group_service_client_config.json | 4 +--- .../src/v3/metric_service_client_config.json | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json index 825193b3a41..a57878c2ece 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json @@ -6,9 +6,7 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "non_idempotent": [ - "UNAVAILABLE" - ] + "non_idempotent": [] }, "retry_params": { "default": { diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json index b04f7227700..15f82ab1547 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json @@ -6,9 +6,7 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "non_idempotent": [ - "UNAVAILABLE" - ] + "non_idempotent": [] }, "retry_params": { "default": { From d05dceeeb397d7dc09a2d5120360620722c08659 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Mon, 19 Jun 2017 16:59:32 -0700 Subject: [PATCH 042/422] Add + run dependency updating (bash) script (#401) * Add + run dependency updating script * Address comments Change-Id: I67af9d3ab9e461b579dbaee92274b6163d73c23e * Run dependency script again Change-Id: Icbec4acb2cc6bcfa40e0a3a705c5a1059d64efa5 * Update license Change-Id: Ic1dd0a1bd34356e415bdbf005b81a71a8d2695c2 * Update (more) dependencies Change-Id: Idaed95b9cfe486797fa75946b6f55e7e702217b8 --- .../google-cloud-monitoring/samples/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 1389e218570..8f2c1b375ef 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -18,16 +18,16 @@ "test": "npm run system-test" }, "dependencies": { - "@google-cloud/monitoring": "0.2.0", - "async": "2.3.0", + "@google-cloud/monitoring": "0.2.2", + "async": "2.4.1", "googleapis": "19.0.0", - "yargs": "7.1.0" + "yargs": "8.0.2" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.14", + "@google-cloud/nodejs-repo-tools": "1.4.15", "ava": "0.19.1", - "proxyquire": "1.7.11", - "sinon": "2.1.0" + "proxyquire": "1.8.0", + "sinon": "2.3.4" }, "cloud-repo-tools": { "requiresKeyFile": true, From e2bb73e029fc38d87a534a94332ed43672507e36 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 5 Jul 2017 17:09:04 -0400 Subject: [PATCH 043/422] monitoring @ 0.2.3 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e8d646162f5..3805cca0d4c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "googlecloudplatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.2.2", + "version": "0.2.3", "author": "Google Inc.", "description": "Stackdriver Monitoring Client Library for Node.js", "contributors": [ From 4a8b39689bea7f527108685bc5e16f3112736188 Mon Sep 17 00:00:00 2001 From: Evawere Ogbe Date: Wed, 16 Aug 2017 06:11:29 -0700 Subject: [PATCH 044/422] Update monitoring client (#2526) --- packages/google-cloud-monitoring/README.md | 121 +-- packages/google-cloud-monitoring/package.json | 43 +- .../smoke-test/metric_service_smoke_test.js | 92 +++ packages/google-cloud-monitoring/src/index.js | 111 ++- .../src/v3/doc/doc_common.js | 415 ++++++++++ .../src/v3/doc/doc_google_api_distribution.js | 84 ++ .../src/v3/doc/doc_google_api_label.js | 38 + .../src/v3/doc/doc_google_api_metric.js | 159 ++++ .../doc/doc_google_api_monitored_resource.js | 94 +++ .../v3/doc/doc_google_protobuf_duration.js | 84 ++ .../v3/doc/doc_google_protobuf_timestamp.js | 88 ++ .../src/v3/doc/doc_group.js | 77 ++ .../src/v3/doc/doc_metric.js | 107 +++ .../src/v3/group_service_client.js | 130 ++- .../google-cloud-monitoring/src/v3/index.js | 7 +- .../src/v3/metric_service_client.js | 204 +++-- .../google-cloud-monitoring/test/gapic-v3.js | 766 ++++++++++++++++++ .../google-cloud-monitoring/test/index.js | 37 - 18 files changed, 2392 insertions(+), 265 deletions(-) create mode 100644 packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_common.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_api_label.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_api_monitored_resource.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_duration.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_timestamp.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_group.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_metric.js create mode 100644 packages/google-cloud-monitoring/test/gapic-v3.js delete mode 100644 packages/google-cloud-monitoring/test/index.js diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 52686636362..97d1438bd9a 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -1,68 +1,75 @@ -# @google-cloud/monitoring ([Alpha][versioning]) -> Google Stackdriver Monitoring Client Library for Node.js +# Node.js Clients for Stackdriver Monitoring API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning)) -*Looking for more Google APIs than just Monitoring? You might want to check out [`google-cloud`][google-cloud].* +[Stackdriver Monitoring API][Product Documentation]: Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages. -- [Official Documentation][cloud-monitoring-docs] +- [Client Library Documentation][] +- [Product Documentation][] -## This is an auto-generated API +## Quick Start +In order to use this library, you first need to go through the following steps: -It does not follow the conventions you're familiar with from other parts of our library. A handwritten layer is not yet available. +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +2. [Enable the Stackdriver Monitoring API.](https://console.cloud.google.com/apis/api/monitoring) +3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) -The example below shows you how to instantiate the generated client. For further documentation, please browse the [Monitoring .proto files][cloud-monitoring-protos] on GitHub. - - -```sh -$ npm install --save @google-cloud/monitoring -``` -```js -var monitoring = require('@google-cloud/monitoring').v3({ - projectId: 'grape-spaceship-123', - keyFilename: '/path/to/keyfile.json' -}); +### Installation ``` - - -## 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 Cloud services. - -### On Google Cloud Platform - -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 monitoring = require('@google-cloud/monitoring').v3(); -// ...you're good to go! +$ npm install --save @google-cloud/monitoring ``` -### Elsewhere - -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. -3. 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. - -``` js -var monitoring = require('@google-cloud/monitoring').v3({ - // 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! +### Preview +#### MetricServiceClient +```js + var monitoring = require('@google-cloud/monitoring'); + + var client = monitoring.metric({ + // optional auth parameters. + }); + + // Iterate over all elements. + var formattedName = client.projectPath(projectId); + + client.listMonitoredResourceDescriptors({name: formattedName}).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 formattedName = client.projectPath(projectId); + + + 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({name: formattedName}, options) + .then(callback) + .catch(function(err) { + console.error(err); + }); ``` +### Next Steps +- Read the [Client Library Documentation][] for Stackdriver Monitoring API to see other available methods on the client. +- Read the [Stackdriver Monitoring API Product documentation][Product Documentation] to learn more about the product and see How-to Guides. +- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/README.md) to see the full list of Cloud APIs that we cover. -[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 -[cloud-monitoring-docs]: https://cloud.google.com/monitoring/docs -[cloud-monitoring-protos]: https://github.com/googleapis/googleapis/tree/master/google/monitoring/v3 +[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/monitoring +[Product Documentation]: https://cloud.google.com/monitoring \ No newline at end of file diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 3805cca0d4c..cc473846f44 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,40 +1,13 @@ { - "repository": "googlecloudplatform/google-cloud-node", + "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/monitoring", "version": "0.2.3", - "author": "Google Inc.", - "description": "Stackdriver Monitoring 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" - } - ], + "author": "Google Inc", + "description": "Stackdriver Monitoring API client for Node.js", "main": "src/index.js", "files": [ "src", "AUTHORS", - "CONTRIBUTING", "COPYING" ], "keywords": [ @@ -48,19 +21,19 @@ "cloud", "google monitoring", "monitoring", - "stackdriver monitoring", - "stackdriver" + "Stackdriver Monitoring API" ], "dependencies": { - "extend": "^3.0.0", - "google-gax": "^0.13.0", + "extend": "^3.0", + "google-gax": "^0.13.2", "google-proto-files": "^0.12.0" }, "devDependencies": { - "mocha": "^3.1.2" + "mocha": "^3.2.0" }, "scripts": { "publish-module": "node ../../scripts/publish.js monitoring", + "smoke-test": "mocha smoke-test/*.js --timeout 5000", "test": "mocha test/*.js" }, "license": "Apache-2.0", diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js new file mode 100644 index 00000000000..546683030bc --- /dev/null +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -0,0 +1,92 @@ +/* + * 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'; + +describe('MetricServiceSmokeTest', function() { + 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 using promises', function(done) { + var monitoring = require('../src'); + + var client = monitoring.v3.metric({ + // optional auth parameters. + }); + + // Iterate over all elements. + var formattedName = client.projectPath(projectId); + + client.listMonitoredResourceDescriptors({name: formattedName}).then(function(responses) { + var resources = responses[0]; + for (var i = 0; i < resources.length; ++i) { + console.log(resources[i]); + } + }) + .then(done) + .catch(done); + }); + + it('successfully makes a call to the service using callbacks', function(done) { + var monitoring = require('../src'); + + var client = monitoring.v3.metric({ + // optional auth parameters. + }); + + // Or obtain the paged response. + var formattedName = client.projectPath(projectId); + + + 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) { + console.log(resources[i]) + } + if (nextRequest) { + // Fetch the next page. + return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + } + } + client.listMonitoredResourceDescriptors({name: formattedName}, options) + .then(callback) + .then(done) + .catch(done); + }); + + it('successfully makes a call to the service using streaming', function(done) { + var monitoring = require('../src'); + + var client = monitoring.v3.metric({ + // optional auth parameters. + }); + + var formattedName = client.projectPath(projectId); + client.listMonitoredResourceDescriptorsStream({name: formattedName}) + .on('data', function(element) { + console.log(element); + }) + .on('error', done) + .on('end', done); + }); +}); \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index 7029aef0c7c..b8978b9457b 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -1,11 +1,11 @@ -/*! - * Copyright 2016 Google Inc. All Rights Reserved. +/* + * 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 + * 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, @@ -16,39 +16,96 @@ /*! * @module monitoring + * @name Monitoring */ 'use strict'; +var extend = require('extend'); +var gapic = { + v3: require('./v3') +}; +var gaxGrpc = require('google-gax').grpc(); + +const VERSION = require('../package.json').version; + /** - * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects - * metrics, events, and metadata from Google Cloud Platform, Amazon Web Services - * (AWS), hosted uptime probes, application instrumentation, and a variety of - * common application components including Cassandra, Nginx, Apache Web Server, - * Elasticsearch and many others. Stackdriver ingests that data and generates - * insights via dashboards, charts, and alerts. + * Create a groupServiceClient with additional helpers for common + * tasks. + * + * The Group API lets you inspect and manage your + * [groups](https://cloud.google.comgoogle.monitoring.v3.Group). * - *

This is an auto-generated API

+ * A group is a named filter that is used to identify + * a collection of monitored resources. Groups are typically used to + * mirror the physical and/or logical topology of the environment. + * Because group membership is computed dynamically, monitored + * resources that are started in the future are automatically placed + * in matching groups. By using a group to name monitored resources in, + * for example, an alert policy, the target of that alert policy is + * updated automatically as monitored resources are added and removed + * from the infrastructure. * - * It does not follow the conventions you're familiar with from other parts of - * our library. A handwritten layer is not yet available. + * @param {object=} options - [Configuration object](#/docs). + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.servicePath - The domain name of the + * API remote host. + */ +function groupV3(options) { + // Define the header options. + options = extend({}, options, { + libName: 'gccl', + libVersion: VERSION + }); + + // Create the client with the provided options. + var client = gapic.v3(options).groupServiceClient(options); + return client; +} + +/** + * Create a metricServiceClient with additional helpers for common + * tasks. * - * The example below shows you how to instantiate the generated client. For - * further documentation, please browse the - * [Monitoring .proto files](https://github.com/googleapis/googleapis/tree/master/google/monitoring/v3) - * on GitHub. + * Manages metric descriptors, monitored resource descriptors, and + * time series data. * - * @constructor - * @alias module:monitoring + * @param {object=} options - [Configuration object](#/docs). + * @param {number=} options.port - The port on which to connect to + * the remote host. + * @param {string=} options.servicePath - The domain name of the + * API remote host. */ -function Monitoring() { - throw new Error([ - 'Cloud Monitoring must be accessed through the auto-generated client.', - 'See', - 'https://googlecloudplatform.github.io/google-cloud-node/#/docs/monitoring', - 'for more information.' - ].join(' ')); +function metricV3(options) { + // Define the header options. + options = extend({}, options, { + libName: 'gccl', + libVersion: VERSION + }); + + // Create the client with the provided options. + var client = gapic.v3(options).metricServiceClient(options); + return client; } -module.exports = Monitoring; -module.exports.v3 = require('./v3'); +var v3Protos = {}; + +extend(v3Protos, gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/monitoring/v3/group_service.proto' +}]).google.monitoring.v3); + +extend(v3Protos, gaxGrpc.load([{ + root: require('google-proto-files')('..'), + file: 'google/monitoring/v3/metric_service.proto' +}]).google.monitoring.v3); + +module.exports.group = groupV3; +module.exports.metric = metricV3; +module.exports.types = v3Protos; + +module.exports.v3 = {}; +module.exports.v3.group = groupV3; +module.exports.v3.metric = metricV3; +module.exports.v3.types = v3Protos; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/doc_common.js new file mode 100644 index 00000000000..aa8010c30a3 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/doc_common.js @@ -0,0 +1,415 @@ +/* + * 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 single strongly-typed value. + * + * @property {boolean} boolValue + * A Boolean value: `true` or `false`. + * + * @property {number} int64Value + * A 64-bit integer. Its range is approximately ±9.2x1018. + * + * @property {number} doubleValue + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately ±10±300 and it has 16 + * significant digits of precision. + * + * @property {string} stringValue + * A variable-length string value. + * + * @property {Object} distributionValue + * A distribution value. + * + * This object should have the same structure as [google.api.Distribution]{@link external:"google.api.Distribution"} + * + * @class + * @see [google.monitoring.v3.TypedValue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} + */ +var TypedValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A time interval extending just after a start time through an end time. + * If the start time is the same as the end time, then the interval + * represents a single point in time. + * + * @property {Object} endTime + * Required. The end of the time interval. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @property {Object} startTime + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @class + * @see [google.monitoring.v3.TimeInterval definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} + */ +var TimeInterval = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Describes how to combine multiple time series to provide different views of + * the data. Aggregation consists of an alignment step on individual time + * series (`per_series_aligner`) followed by an optional reduction of the data + * across different time series (`cross_series_reducer`). For more details, see + * [Aggregation](https://cloud.google.com/monitoring/api/learn_more#aggregation). + * + * @property {Object} alignmentPeriod + * The alignment period for per-{@link time series} + * alignment. If present, `alignmentPeriod` must be at least 60 + * seconds. After per-time series alignment, each time series will + * contain data points only on the period boundaries. If + * `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then + * this field is ignored. If `perSeriesAligner` is specified and + * does not equal `ALIGN_NONE`, then this field must be defined; + * otherwise an error is returned. + * + * This object should have the same structure as [google.protobuf.Duration]{@link external:"google.protobuf.Duration"} + * + * @property {number} perSeriesAligner + * The approach to be used to align individual time series. Not all + * alignment functions may be applied to all time series, depending + * on the metric type and value type of the original time + * series. Alignment may change the metric type or the value type of + * the time series. + * + * Time series data must be aligned in order to perform cross-time + * series reduction. If `crossSeriesReducer` is specified, then + * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + * and `alignmentPeriod` must be specified; otherwise, an error is + * returned. + * + * The number should be among the values of [Aligner]{@link Aligner} + * + * @property {number} crossSeriesReducer + * The approach to be used to combine time series. Not all reducer + * functions may be applied to all time series, depending on the + * metric type and the value type of the original time + * series. Reduction may change the metric type of value type of the + * time series. + * + * Time series data must be aligned in order to perform cross-time + * series reduction. If `crossSeriesReducer` is specified, then + * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + * and `alignmentPeriod` must be specified; otherwise, an error is + * returned. + * + * The number should be among the values of [Reducer]{@link Reducer} + * + * @property {string[]} groupByFields + * The set of fields to preserve when `crossSeriesReducer` is + * specified. The `groupByFields` determine how the time series are + * partitioned into subsets prior to applying the aggregation + * function. Each subset contains time series that have the same + * value for each of the grouping fields. Each individual time + * series is a member of exactly one subset. The + * `crossSeriesReducer` is applied to each subset of time series. + * It is not possible to reduce across different resource types, so + * this field implicitly contains `resource.type`. Fields not + * specified in `groupByFields` are aggregated away. If + * `groupByFields` is not specified and all the time series have + * the same resource type, then the time series are aggregated into + * a single output time series. If `crossSeriesReducer` is not + * defined, this field is ignored. + * + * @class + * @see [google.monitoring.v3.Aggregation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} + */ +var Aggregation = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The Aligner describes how to bring the data points in a single + * time series into temporal alignment. + * + * @enum {number} + */ + Aligner: { + + /** + * No alignment. Raw data is returned. Not valid if cross-time + * series reduction is requested. The value type of the result is + * the same as the value type of the input. + */ + ALIGN_NONE: 0, + + /** + * Align and convert to delta metric type. This alignment is valid + * for cumulative metrics and delta metrics. Aligning an existing + * delta metric to a delta metric requires that the alignment + * period be increased. The value type of the result is the same + * as the value type of the input. + */ + ALIGN_DELTA: 1, + + /** + * Align and convert to a rate. This alignment is valid for + * cumulative metrics and delta metrics with numeric values. The output is a + * gauge metric with value type + * {@link DOUBLE}. + */ + ALIGN_RATE: 2, + + /** + * Align by interpolating between adjacent points around the + * period boundary. This alignment is valid for gauge + * metrics with numeric values. The value type of the result is the same + * as the value type of the input. + */ + ALIGN_INTERPOLATE: 3, + + /** + * Align by shifting the oldest data point before the period + * boundary to the boundary. This alignment is valid for gauge + * metrics. The value type of the result is the same as the + * value type of the input. + */ + ALIGN_NEXT_OLDER: 4, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the minimum of all data points in the + * period. This alignment is valid for gauge and delta metrics with numeric + * values. The value type of the result is the same as the value + * type of the input. + */ + ALIGN_MIN: 10, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the maximum of all data points in the + * period. This alignment is valid for gauge and delta metrics with numeric + * values. The value type of the result is the same as the value + * type of the input. + */ + ALIGN_MAX: 11, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the average or arithmetic mean of all + * data points in the period. This alignment is valid for gauge and delta + * metrics with numeric values. The value type of the output is + * {@link DOUBLE}. + */ + ALIGN_MEAN: 12, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the count of all data points in the + * period. This alignment is valid for gauge and delta metrics with numeric + * or Boolean values. The value type of the output is + * {@link INT64}. + */ + ALIGN_COUNT: 13, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the sum of all data points in the + * period. This alignment is valid for gauge and delta metrics with numeric + * and distribution values. The value type of the output is the + * same as the value type of the input. + */ + ALIGN_SUM: 14, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the standard deviation of all data + * points in the period. This alignment is valid for gauge and delta metrics + * with numeric values. The value type of the output is + * {@link DOUBLE}. + */ + ALIGN_STDDEV: 15, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the count of True-valued data points in the + * period. This alignment is valid for gauge metrics with + * Boolean values. The value type of the output is + * {@link INT64}. + */ + ALIGN_COUNT_TRUE: 16, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the fraction of True-valued data points in the + * period. This alignment is valid for gauge metrics with Boolean values. + * The output value is in the range [0, 1] and has value type + * {@link DOUBLE}. + */ + ALIGN_FRACTION_TRUE: 17, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the 99th percentile of all data + * points in the period. This alignment is valid for gauge and delta metrics + * with distribution values. The output is a gauge metric with value type + * {@link DOUBLE}. + */ + ALIGN_PERCENTILE_99: 18, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the 95th percentile of all data + * points in the period. This alignment is valid for gauge and delta metrics + * with distribution values. The output is a gauge metric with value type + * {@link DOUBLE}. + */ + ALIGN_PERCENTILE_95: 19, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the 50th percentile of all data + * points in the period. This alignment is valid for gauge and delta metrics + * with distribution values. The output is a gauge metric with value type + * {@link DOUBLE}. + */ + ALIGN_PERCENTILE_50: 20, + + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the 5th percentile of all data + * points in the period. This alignment is valid for gauge and delta metrics + * with distribution values. The output is a gauge metric with value type + * {@link DOUBLE}. + */ + ALIGN_PERCENTILE_05: 21 + }, + + /** + * A Reducer describes how to aggregate data points from multiple + * time series into a single time series. + * + * @enum {number} + */ + Reducer: { + + /** + * No cross-time series reduction. The output of the aligner is + * returned. + */ + REDUCE_NONE: 0, + + /** + * Reduce by computing the mean across time series for each + * alignment period. This reducer is valid for delta and + * gauge metrics with numeric or distribution values. The value type of the + * output is {@link DOUBLE}. + */ + REDUCE_MEAN: 1, + + /** + * Reduce by computing the minimum across time series for each + * alignment period. This reducer is valid for delta and + * gauge metrics with numeric values. The value type of the output + * is the same as the value type of the input. + */ + REDUCE_MIN: 2, + + /** + * Reduce by computing the maximum across time series for each + * alignment period. This reducer is valid for delta and + * gauge metrics with numeric values. The value type of the output + * is the same as the value type of the input. + */ + REDUCE_MAX: 3, + + /** + * Reduce by computing the sum across time series for each + * alignment period. This reducer is valid for delta and + * gauge metrics with numeric and distribution values. The value type of + * the output is the same as the value type of the input. + */ + REDUCE_SUM: 4, + + /** + * Reduce by computing the standard deviation across time series + * for each alignment period. This reducer is valid for delta + * and gauge metrics with numeric or distribution values. The value type of + * the output is {@link DOUBLE}. + */ + REDUCE_STDDEV: 5, + + /** + * Reduce by computing the count of data points across time series + * for each alignment period. This reducer is valid for delta + * and gauge metrics of numeric, Boolean, distribution, and string value + * type. The value type of the output is + * {@link INT64}. + */ + REDUCE_COUNT: 6, + + /** + * Reduce by computing the count of True-valued data points across time + * series for each alignment period. This reducer is valid for delta + * and gauge metrics of Boolean value type. The value type of + * the output is {@link INT64}. + */ + REDUCE_COUNT_TRUE: 7, + + /** + * Reduce by computing the fraction of True-valued data points across time + * series for each alignment period. This reducer is valid for delta + * and gauge metrics of Boolean value type. The output value is in the + * range [0, 1] and has value type + * {@link DOUBLE}. + */ + REDUCE_FRACTION_TRUE: 8, + + /** + * Reduce by computing 99th percentile of data points across time series + * for each alignment period. This reducer is valid for gauge and delta + * metrics of numeric and distribution type. The value of the output is + * {@link DOUBLE} + */ + REDUCE_PERCENTILE_99: 9, + + /** + * Reduce by computing 95th percentile of data points across time series + * for each alignment period. This reducer is valid for gauge and delta + * metrics of numeric and distribution type. The value of the output is + * {@link DOUBLE} + */ + REDUCE_PERCENTILE_95: 10, + + /** + * Reduce by computing 50th percentile of data points across time series + * for each alignment period. This reducer is valid for gauge and delta + * metrics of numeric and distribution type. The value of the output is + * {@link DOUBLE} + */ + REDUCE_PERCENTILE_50: 11, + + /** + * Reduce by computing 5th percentile of data points across time series + * for each alignment period. This reducer is valid for gauge and delta + * metrics of numeric and distribution type. The value of the output is + * {@link DOUBLE} + */ + REDUCE_PERCENTILE_05: 12 + } +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js new file mode 100644 index 00000000000..b2e14518ae4 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.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. + */ + +/** + * 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. + * + * @external "google.api.Distribution" + * @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 [google.api.Distribution.Range]{@link external:"google.api.Distribution.Range"} + * + * @property {Object} bucketOptions + * Defines the histogram bucket boundaries. + * + * This object should have the same structure as [google.api.Distribution.BucketOptions]{@link external:"google.api.Distribution.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. + * + * @see [google.api.Distribution definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} + */ \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_label.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_label.js new file mode 100644 index 00000000000..64701d613ac --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js new file mode 100644 index 00000000000..ea7d0f941eb --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js @@ -0,0 +1,159 @@ +/* + * 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. + * + * @external "google.api.MetricDescriptor" + * @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 [google.api.LabelDescriptor]{@link external:"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 [google.api.MetricDescriptor.MetricKind]{@link external:"google.api.MetricDescriptor.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 [google.api.MetricDescriptor.ValueType]{@link external:"google.api.MetricDescriptor.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". + * + * @see [google.api.MetricDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} + */ + +/** + * A specific metric, identified by specifying values for all of the + * labels of a {@link `MetricDescriptor`}. + * + * @external "google.api.Metric" + * @property {string} type + * An existing metric type, see {@link 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. + * + * @see [google.api.Metric definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto} + */ \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_monitored_resource.js new file mode 100644 index 00000000000..bb2c3107f8f --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_duration.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_duration.js new file mode 100644 index 00000000000..b81fd71f130 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_timestamp.js new file mode 100644 index 00000000000..ed8fc627b92 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/doc_group.js new file mode 100644 index 00000000000..2d03ff78472 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/doc_group.js @@ -0,0 +1,77 @@ +/* + * 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 description of a dynamic collection of monitored resources. Each group + * has a filter that is matched against monitored resources and their associated + * metadata. If a group's filter matches an available monitored resource, then + * that resource is a member of that group. Groups can contain any number of + * monitored resources, and each monitored resource can be a member of any + * number of groups. + * + * Groups can be nested in parent-child hierarchies. The `parentName` field + * identifies an optional parent for each group. If a group has a parent, then + * the only monitored resources available to be matched by the group's filter + * are the resources contained in the parent group. In other words, a group + * contains the monitored resources that match its filter and the filters of all + * the group's ancestors. A group without a parent can contain any monitored + * resource. + * + * For example, consider an infrastructure running a set of instances with two + * user-defined tags: `"environment"` and `"role"`. A parent group has a filter, + * `environment="production"`. A child of that parent group has a filter, + * `role="transcoder"`. The parent group contains all instances in the + * production environment, regardless of their roles. The child group contains + * instances that have the transcoder role *and* are in the production + * environment. + * + * The monitored resources contained in a group can change at any moment, + * depending on what resources exist and what filters are associated with the + * group and its ancestors. + * + * @property {string} name + * Output only. The name of this group. The format is + * `"projects/{project_id_or_number}/groups/{group_id}"`. + * When creating a group, this field is ignored and a new name is created + * consisting of the project specified in the call to `CreateGroup` + * and a unique `{group_id}` that is generated automatically. + * + * @property {string} displayName + * A user-assigned name for this group, used only for display purposes. + * + * @property {string} parentName + * The name of the group's parent, if it has one. + * The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + * For groups with no parent, `parentName` is the empty string, `""`. + * + * @property {string} filter + * The filter used to determine which monitored resources belong to this group. + * + * @property {boolean} isCluster + * If true, the members of this group are considered to be a cluster. + * The system can perform additional analysis on groups that are clusters. + * + * @class + * @see [google.monitoring.v3.Group definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group.proto} + */ +var Group = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/doc_metric.js new file mode 100644 index 00000000000..0f4a2ef51e0 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/doc_metric.js @@ -0,0 +1,107 @@ +/* + * 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 single data point in a time series. + * + * @property {Object} interval + * The time interval to which the data point applies. For GAUGE metrics, only + * the end time of the interval is used. For DELTA metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * contiguous and non-overlapping intervals. For CUMULATIVE metrics, the + * start and end time should specify a non-zero interval, with subsequent + * points specifying 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. + * + * This object should have the same structure as [TimeInterval]{@link TimeInterval} + * + * @property {Object} value + * The value of the data point. + * + * This object should have the same structure as [TypedValue]{@link TypedValue} + * + * @class + * @see [google.monitoring.v3.Point definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} + */ +var Point = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A collection of data points that describes the time-varying values + * of a metric. A time series is identified by a combination of a + * fully-specified monitored resource and a fully-specified metric. + * This type is used for both listing and creating time series. + * + * @property {Object} metric + * The associated metric. A fully-specified metric used to identify the time + * series. + * + * This object should have the same structure as [google.api.Metric]{@link external:"google.api.Metric"} + * + * @property {Object} resource + * The associated resource. A fully-specified monitored resource used to + * identify the time series. + * + * This object should have the same structure as [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} + * + * @property {number} metricKind + * The metric kind of the time series. When listing time series, this metric + * kind might be different from the metric kind of the associated metric if + * this time series is an alignment or reduction of other time series. + * + * When creating a time series, this field is optional. If present, it must be + * the same as the metric kind of the associated metric. If the associated + * metric's descriptor must be auto-created, then this field specifies the + * metric kind of the new descriptor and must be either `GAUGE` (the default) + * or `CUMULATIVE`. + * + * The number should be among the values of [google.api.MetricDescriptor.MetricKind]{@link external:"google.api.MetricDescriptor.MetricKind"} + * + * @property {number} valueType + * The value type of the time series. When listing time series, this value + * type might be different from the value type of the associated metric if + * this time series is an alignment or reduction of other time series. + * + * When creating a time series, this field is optional. If present, it must be + * the same as the type of the data in the `points` field. + * + * The number should be among the values of [google.api.MetricDescriptor.ValueType]{@link external:"google.api.MetricDescriptor.ValueType"} + * + * @property {Object[]} points + * The data points of this time series. When listing time series, the order of + * the points is specified by the list method. + * + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * This object should have the same structure as [Point]{@link Point} + * + * @class + * @see [google.monitoring.v3.TimeSeries definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} + */ +var TimeSeries = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 1cab7077adf..4f11033ae72 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -1,11 +1,11 @@ /* - * Copyright 2016 Google Inc. All rights reserved. + * 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 + * 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, @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'monitoring.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; +var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; var PAGE_DESCRIPTORS = { listGroups: new gax.PageDescriptor( @@ -73,15 +73,6 @@ var ALL_SCOPES = [ * updated automatically as monitored resources are added and removed * from the infrastructure. * - * 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 groupServiceClient} - * - * @example - * var monitoringV3 = require('@google-cloud/monitoring').v3({ - * // optional auth parameters. - * }); - * var client = monitoringV3.groupServiceClient(); * * @class */ @@ -156,16 +147,6 @@ GroupServiceClient.prototype.projectPath = function(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. - */ -GroupServiceClient.prototype.matchProjectFromProjectName = function(projectName) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; - /** * Returns a fully-qualified group resource name string. * @param {String} project @@ -179,6 +160,16 @@ GroupServiceClient.prototype.groupPath = function(project, group) { }); }; +/** + * 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. + */ +GroupServiceClient.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; +}; + /** * Parses the groupName from a group resource. * @param {String} groupName @@ -201,7 +192,7 @@ GroupServiceClient.prototype.matchGroupFromGroupName = function(groupName) { /** * Get the project ID used by this class. - * @aram {function(Error, string)} callback - the callback to be called with + * @param {function(Error, string)} callback - the callback to be called with * the current project Id. */ GroupServiceClient.prototype.getProjectId = function(callback) { @@ -264,19 +255,29 @@ GroupServiceClient.prototype.getProjectId = function(callback) { * * @example * - * var client = monitoringV3.groupServiceClient(); - * var formattedName = client.projectPath("[PROJECT]"); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * // Iterate over all elements. + * var formattedName = client.projectPath("[PROJECT]"); + * * client.listGroups({name: formattedName}).then(function(responses) { * var resources = responses[0]; * for (var i = 0; i < resources.length; ++i) { * // doThingsWith(resources[i]) * } - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); * * // Or obtain the paged response. + * var formattedName = client.projectPath("[PROJECT]"); + * + * * var options = {autoPaginate: false}; * function callback(responses) { * // The actual resources in a response. @@ -358,12 +359,18 @@ GroupServiceClient.prototype.listGroups = function(request, options, callback) { * * @example * - * var client = monitoringV3.groupServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); - * client.listGroupsStream({name: formattedName}).on('data', function(element) { + * client.listGroupsStream({name: formattedName}) + * .on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { - * console.error(err); + * console.log(err); * }); */ GroupServiceClient.prototype.listGroupsStream = function(request, options) { @@ -395,12 +402,18 @@ GroupServiceClient.prototype.listGroupsStream = function(request, options) { * * @example * - * var client = monitoringV3.groupServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); * client.getGroup({name: formattedName}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -444,7 +457,12 @@ GroupServiceClient.prototype.getGroup = function(request, options, callback) { * * @example * - * var client = monitoringV3.groupServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); * var group = {}; * var request = { @@ -454,7 +472,8 @@ GroupServiceClient.prototype.getGroup = function(request, options, callback) { * client.createGroup(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -496,12 +515,18 @@ GroupServiceClient.prototype.createGroup = function(request, options, callback) * * @example * - * var client = monitoringV3.groupServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * var group = {}; * client.updateGroup({group: group}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -535,7 +560,12 @@ GroupServiceClient.prototype.updateGroup = function(request, options, callback) * * @example * - * var client = monitoringV3.groupServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); * client.deleteGroup({name: formattedName}).catch(function(err) { * console.error(err); @@ -607,19 +637,29 @@ GroupServiceClient.prototype.deleteGroup = function(request, options, callback) * * @example * - * var client = monitoringV3.groupServiceClient(); - * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * // Iterate over all elements. + * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + * * client.listGroupMembers({name: formattedName}).then(function(responses) { * var resources = responses[0]; * for (var i = 0; i < resources.length; ++i) { * // doThingsWith(resources[i]) * } - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); * * // Or obtain the paged response. + * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + * + * * var options = {autoPaginate: false}; * function callback(responses) { * // The actual resources in a response. @@ -701,12 +741,18 @@ GroupServiceClient.prototype.listGroupMembers = function(request, options, callb * * @example * - * var client = monitoringV3.groupServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.group({ + * // optional auth parameters. + * }); + * * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); - * client.listGroupMembersStream({name: formattedName}).on('data', function(element) { + * client.listGroupMembersStream({name: formattedName}) + * .on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { - * console.error(err); + * console.log(err); * }); */ GroupServiceClient.prototype.listGroupMembersStream = function(request, options) { diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index e26eedb2776..c639c388578 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -1,11 +1,11 @@ /* - * Copyright 2016 Google Inc. All rights reserved. + * 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 + * 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, @@ -31,7 +31,8 @@ function v3(options) { return result; } +v3.GAPIC_VERSION = '0.0.5'; v3.SERVICE_ADDRESS = groupServiceClient.SERVICE_ADDRESS; v3.ALL_SCOPES = groupServiceClient.ALL_SCOPES; -module.exports = v3; +module.exports = v3; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 62706b2ffbd..59d0eb01631 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -1,11 +1,11 @@ /* - * Copyright 2016 Google Inc. All rights reserved. + * 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 + * 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, @@ -35,7 +35,7 @@ var SERVICE_ADDRESS = 'monitoring.googleapis.com'; var DEFAULT_SERVICE_PORT = 443; -var CODE_GEN_NAME_VERSION = 'gapic/0.7.1'; +var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; var PAGE_DESCRIPTORS = { listMonitoredResourceDescriptors: new gax.PageDescriptor( @@ -67,15 +67,6 @@ var ALL_SCOPES = [ * Manages metric descriptors, monitored resource descriptors, and * time series data. * - * 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 metricServiceClient} - * - * @example - * var monitoringV3 = require('@google-cloud/monitoring').v3({ - * // optional auth parameters. - * }); - * var client = monitoringV3.metricServiceClient(); * * @class */ @@ -155,16 +146,6 @@ MetricServiceClient.prototype.projectPath = function(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. - */ -MetricServiceClient.prototype.matchProjectFromProjectName = function(projectName) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; - /** * Returns a fully-qualified metric_descriptor resource name string. * @param {String} project @@ -178,6 +159,29 @@ MetricServiceClient.prototype.metricDescriptorPath = function(project, metricDes }); }; +/** + * Returns a fully-qualified monitored_resource_descriptor resource name string. + * @param {String} project + * @param {String} monitoredResourceDescriptor + * @returns {String} + */ +MetricServiceClient.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { + return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.render({ + project: project, + monitored_resource_descriptor: monitoredResourceDescriptor + }); +}; + +/** + * 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. + */ +MetricServiceClient.prototype.matchProjectFromProjectName = function(projectName) { + return PROJECT_PATH_TEMPLATE.match(projectName).project; +}; + /** * Parses the metricDescriptorName from a metric_descriptor resource. * @param {String} metricDescriptorName @@ -198,19 +202,6 @@ MetricServiceClient.prototype.matchMetricDescriptorFromMetricDescriptorName = fu return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).metric_descriptor; }; -/** - * Returns a fully-qualified monitored_resource_descriptor resource name string. - * @param {String} project - * @param {String} monitoredResourceDescriptor - * @returns {String} - */ -MetricServiceClient.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { - return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.render({ - project: project, - monitored_resource_descriptor: monitoredResourceDescriptor - }); -}; - /** * Parses the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. * @param {String} monitoredResourceDescriptorName @@ -233,7 +224,7 @@ MetricServiceClient.prototype.matchMonitoredResourceDescriptorFromMonitoredResou /** * Get the project ID used by this class. - * @aram {function(Error, string)} callback - the callback to be called with + * @param {function(Error, string)} callback - the callback to be called with * the current project Id. */ MetricServiceClient.prototype.getProjectId = function(callback) { @@ -289,19 +280,29 @@ MetricServiceClient.prototype.getProjectId = function(callback) { * * @example * - * var client = monitoringV3.metricServiceClient(); - * var formattedName = client.projectPath("[PROJECT]"); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * // Iterate over all elements. + * var formattedName = client.projectPath("[PROJECT]"); + * * client.listMonitoredResourceDescriptors({name: formattedName}).then(function(responses) { * var resources = responses[0]; * for (var i = 0; i < resources.length; ++i) { * // doThingsWith(resources[i]) * } - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); * * // Or obtain the paged response. + * var formattedName = client.projectPath("[PROJECT]"); + * + * * var options = {autoPaginate: false}; * function callback(responses) { * // The actual resources in a response. @@ -376,12 +377,18 @@ MetricServiceClient.prototype.listMonitoredResourceDescriptors = function(reques * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); - * client.listMonitoredResourceDescriptorsStream({name: formattedName}).on('data', function(element) { + * client.listMonitoredResourceDescriptorsStream({name: formattedName}) + * .on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { - * console.error(err); + * console.log(err); * }); */ MetricServiceClient.prototype.listMonitoredResourceDescriptorsStream = function(request, options) { @@ -415,12 +422,18 @@ MetricServiceClient.prototype.listMonitoredResourceDescriptorsStream = function( * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); * client.getMonitoredResourceDescriptor({name: formattedName}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -484,19 +497,29 @@ MetricServiceClient.prototype.getMonitoredResourceDescriptor = function(request, * * @example * - * var client = monitoringV3.metricServiceClient(); - * var formattedName = client.projectPath("[PROJECT]"); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * // Iterate over all elements. + * var formattedName = client.projectPath("[PROJECT]"); + * * client.listMetricDescriptors({name: formattedName}).then(function(responses) { * var resources = responses[0]; * for (var i = 0; i < resources.length; ++i) { * // doThingsWith(resources[i]) * } - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); * * // Or obtain the paged response. + * var formattedName = client.projectPath("[PROJECT]"); + * + * * var options = {autoPaginate: false}; * function callback(responses) { * // The actual resources in a response. @@ -572,12 +595,18 @@ MetricServiceClient.prototype.listMetricDescriptors = function(request, options, * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); - * client.listMetricDescriptorsStream({name: formattedName}).on('data', function(element) { + * client.listMetricDescriptorsStream({name: formattedName}) + * .on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { - * console.error(err); + * console.log(err); * }); */ MetricServiceClient.prototype.listMetricDescriptorsStream = function(request, options) { @@ -611,12 +640,18 @@ MetricServiceClient.prototype.listMetricDescriptorsStream = function(request, op * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); * client.getMetricDescriptor({name: formattedName}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -660,7 +695,12 @@ MetricServiceClient.prototype.getMetricDescriptor = function(request, options, c * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); * var metricDescriptor = {}; * var request = { @@ -670,7 +710,8 @@ MetricServiceClient.prototype.getMetricDescriptor = function(request, options, c * client.createMetricDescriptor(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -707,7 +748,12 @@ MetricServiceClient.prototype.createMetricDescriptor = function(request, options * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); * client.deleteMetricDescriptor({name: formattedName}).catch(function(err) { * console.error(err); @@ -792,28 +838,47 @@ MetricServiceClient.prototype.deleteMetricDescriptor = function(request, options * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. * var formattedName = client.projectPath("[PROJECT]"); * var filter = ''; * var interval = {}; - * var view = monitoringV3.ListTimeSeriesRequest.TimeSeriesView.FULL; + * var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; * var request = { * name: formattedName, * filter: filter, * interval: interval, * view: view * }; - * // Iterate over all elements. + * * client.listTimeSeries(request).then(function(responses) { * var resources = responses[0]; * for (var i = 0; i < resources.length; ++i) { * // doThingsWith(resources[i]) * } - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); * * // Or obtain the paged response. + * var formattedName = client.projectPath("[PROJECT]"); + * var filter = ''; + * var interval = {}; + * var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; + * var request = { + * name: formattedName, + * filter: filter, + * interval: interval, + * view: view + * }; + * + * * var options = {autoPaginate: false}; * function callback(responses) { * // The actual resources in a response. @@ -908,21 +973,27 @@ MetricServiceClient.prototype.listTimeSeries = function(request, options, callba * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); * var filter = ''; * var interval = {}; - * var view = monitoringV3.ListTimeSeriesRequest.TimeSeriesView.FULL; + * var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; * var request = { * name: formattedName, * filter: filter, * interval: interval, * view: view * }; - * client.listTimeSeriesStream(request).on('data', function(element) { + * client.listTimeSeriesStream(request) + * .on('data', function(element) { * // doThingsWith(element) * }).on('error', function(err) { - * console.error(err); + * console.log(err); * }); */ MetricServiceClient.prototype.listTimeSeriesStream = function(request, options) { @@ -962,7 +1033,12 @@ MetricServiceClient.prototype.listTimeSeriesStream = function(request, options) * * @example * - * var client = monitoringV3.metricServiceClient(); + * var monitoring = require('@google-cloud/monitoring'); + * + * var client = monitoring.v3.metric({ + * // optional auth parameters. + * }); + * * var formattedName = client.projectPath("[PROJECT]"); * var timeSeries = []; * var request = { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js new file mode 100644 index 00000000000..838498b3bc8 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -0,0 +1,766 @@ +/* + * 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'; + +var assert = require('assert'); +var monitoring = require('../src'); + +var FAKE_STATUS_CODE = 1; +var error = new Error(); +error.code = FAKE_STATUS_CODE; + +describe('GroupServiceClient', function() { + describe('listGroups', function() { + it('invokes listGroups without error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var request = { + name : formattedName + }; + + // Mock response + var nextPageToken = ''; + var groupElement = {}; + var group = [groupElement]; + var expectedResponse = { + nextPageToken : nextPageToken, + group : group + }; + + // Mock Grpc layer + client._listGroups = function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.group); + }; + + client.listGroups(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.group); + done(); + }); + }); + + it('invokes listGroups with error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._listGroups = mockSimpleGrpcMethod(request, null, error); + + client.listGroups(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('getGroup', function() { + it('invokes getGroup without error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var request = { + name : formattedName + }; + + // Mock response + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var parentName = 'parentName1015022848'; + var filter = 'filter-1274492040'; + var isCluster = false; + var expectedResponse = { + name : name2, + displayName : displayName, + parentName : parentName, + filter : filter, + isCluster : isCluster + }; + + // Mock Grpc layer + client._getGroup = mockSimpleGrpcMethod(request, expectedResponse); + + client.getGroup(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getGroup with error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._getGroup = mockSimpleGrpcMethod(request, null, error); + + client.getGroup(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('createGroup', function() { + it('invokes createGroup without error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var group = {}; + var request = { + name : formattedName, + group : group + }; + + // Mock response + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var parentName = 'parentName1015022848'; + var filter = 'filter-1274492040'; + var isCluster = false; + var expectedResponse = { + name : name2, + displayName : displayName, + parentName : parentName, + filter : filter, + isCluster : isCluster + }; + + // Mock Grpc layer + client._createGroup = mockSimpleGrpcMethod(request, expectedResponse); + + client.createGroup(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createGroup with error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var group = {}; + var request = { + name : formattedName, + group : group + }; + + // Mock Grpc layer + client._createGroup = mockSimpleGrpcMethod(request, null, error); + + client.createGroup(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('updateGroup', function() { + it('invokes updateGroup without error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var group = {}; + var request = { + group : group + }; + + // Mock response + var name = 'name3373707'; + var displayName = 'displayName1615086568'; + var parentName = 'parentName1015022848'; + var filter = 'filter-1274492040'; + var isCluster = false; + var expectedResponse = { + name : name, + displayName : displayName, + parentName : parentName, + filter : filter, + isCluster : isCluster + }; + + // Mock Grpc layer + client._updateGroup = mockSimpleGrpcMethod(request, expectedResponse); + + client.updateGroup(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateGroup with error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var group = {}; + var request = { + group : group + }; + + // Mock Grpc layer + client._updateGroup = mockSimpleGrpcMethod(request, null, error); + + client.updateGroup(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('deleteGroup', function() { + it('invokes deleteGroup without error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._deleteGroup = mockSimpleGrpcMethod(request); + + client.deleteGroup(request, function(err) { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteGroup with error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._deleteGroup = mockSimpleGrpcMethod(request, null, error); + + client.deleteGroup(request, function(err) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listGroupMembers', function() { + it('invokes listGroupMembers without error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var request = { + name : formattedName + }; + + // Mock response + var nextPageToken = ''; + var totalSize = -705419236; + var membersElement = {}; + var members = [membersElement]; + var expectedResponse = { + nextPageToken : nextPageToken, + totalSize : totalSize, + members : members + }; + + // Mock Grpc layer + client._listGroupMembers = function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.members); + }; + + client.listGroupMembers(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.members); + done(); + }); + }); + + it('invokes listGroupMembers with error', function(done) { + var client = monitoring.v3.group(); + + // Mock request + var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._listGroupMembers = mockSimpleGrpcMethod(request, null, error); + + client.listGroupMembers(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + +}); +describe('MetricServiceClient', function() { + describe('listMonitoredResourceDescriptors', function() { + it('invokes listMonitoredResourceDescriptors without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var request = { + name : formattedName + }; + + // Mock response + var nextPageToken = ''; + var resourceDescriptorsElement = {}; + var resourceDescriptors = [resourceDescriptorsElement]; + var expectedResponse = { + nextPageToken : nextPageToken, + resourceDescriptors : resourceDescriptors + }; + + // Mock Grpc layer + client._listMonitoredResourceDescriptors = function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.resourceDescriptors); + }; + + client.listMonitoredResourceDescriptors(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.resourceDescriptors); + done(); + }); + }); + + it('invokes listMonitoredResourceDescriptors with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._listMonitoredResourceDescriptors = mockSimpleGrpcMethod(request, null, error); + + client.listMonitoredResourceDescriptors(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('getMonitoredResourceDescriptor', function() { + it('invokes getMonitoredResourceDescriptor without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + var request = { + name : formattedName + }; + + // Mock response + var name2 = 'name2-1052831874'; + var type = 'type3575610'; + var displayName = 'displayName1615086568'; + var description = 'description-1724546052'; + var expectedResponse = { + name : name2, + type : type, + displayName : displayName, + description : description + }; + + // Mock Grpc layer + client._getMonitoredResourceDescriptor = mockSimpleGrpcMethod(request, expectedResponse); + + client.getMonitoredResourceDescriptor(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getMonitoredResourceDescriptor with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._getMonitoredResourceDescriptor = mockSimpleGrpcMethod(request, null, error); + + client.getMonitoredResourceDescriptor(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listMetricDescriptors', function() { + it('invokes listMetricDescriptors without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var request = { + name : formattedName + }; + + // Mock response + var nextPageToken = ''; + var metricDescriptorsElement = {}; + var metricDescriptors = [metricDescriptorsElement]; + var expectedResponse = { + nextPageToken : nextPageToken, + metricDescriptors : metricDescriptors + }; + + // Mock Grpc layer + client._listMetricDescriptors = function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.metricDescriptors); + }; + + client.listMetricDescriptors(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.metricDescriptors); + done(); + }); + }); + + it('invokes listMetricDescriptors with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._listMetricDescriptors = mockSimpleGrpcMethod(request, null, error); + + client.listMetricDescriptors(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('getMetricDescriptor', function() { + it('invokes getMetricDescriptor without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var request = { + name : formattedName + }; + + // Mock response + var name2 = 'name2-1052831874'; + var type = 'type3575610'; + var unit = 'unit3594628'; + var description = 'description-1724546052'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name : name2, + type : type, + unit : unit, + description : description, + displayName : displayName + }; + + // Mock Grpc layer + client._getMetricDescriptor = mockSimpleGrpcMethod(request, expectedResponse); + + client.getMetricDescriptor(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getMetricDescriptor with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._getMetricDescriptor = mockSimpleGrpcMethod(request, null, error); + + client.getMetricDescriptor(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('createMetricDescriptor', function() { + it('invokes createMetricDescriptor without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var metricDescriptor = {}; + var request = { + name : formattedName, + metricDescriptor : metricDescriptor + }; + + // Mock response + var name2 = 'name2-1052831874'; + var type = 'type3575610'; + var unit = 'unit3594628'; + var description = 'description-1724546052'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name : name2, + type : type, + unit : unit, + description : description, + displayName : displayName + }; + + // Mock Grpc layer + client._createMetricDescriptor = mockSimpleGrpcMethod(request, expectedResponse); + + client.createMetricDescriptor(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createMetricDescriptor with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var metricDescriptor = {}; + var request = { + name : formattedName, + metricDescriptor : metricDescriptor + }; + + // Mock Grpc layer + client._createMetricDescriptor = mockSimpleGrpcMethod(request, null, error); + + client.createMetricDescriptor(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('deleteMetricDescriptor', function() { + it('invokes deleteMetricDescriptor without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._deleteMetricDescriptor = mockSimpleGrpcMethod(request); + + client.deleteMetricDescriptor(request, function(err) { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteMetricDescriptor with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var request = { + name : formattedName + }; + + // Mock Grpc layer + client._deleteMetricDescriptor = mockSimpleGrpcMethod(request, null, error); + + client.deleteMetricDescriptor(request, function(err) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listTimeSeries', function() { + it('invokes listTimeSeries without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var filter = 'filter-1274492040'; + var interval = {}; + var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; + var request = { + name : formattedName, + filter : filter, + interval : interval, + view : view + }; + + // Mock response + var nextPageToken = ''; + var timeSeriesElement = {}; + var timeSeries = [timeSeriesElement]; + var expectedResponse = { + nextPageToken : nextPageToken, + timeSeries : timeSeries + }; + + // Mock Grpc layer + client._listTimeSeries = function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.timeSeries); + }; + + client.listTimeSeries(request, function(err, response) { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.timeSeries); + done(); + }); + }); + + it('invokes listTimeSeries with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var filter = 'filter-1274492040'; + var interval = {}; + var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; + var request = { + name : formattedName, + filter : filter, + interval : interval, + view : view + }; + + // Mock Grpc layer + client._listTimeSeries = mockSimpleGrpcMethod(request, null, error); + + client.listTimeSeries(request, function(err, response) { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('createTimeSeries', function() { + it('invokes createTimeSeries without error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var timeSeries = []; + var request = { + name : formattedName, + timeSeries : timeSeries + }; + + // Mock Grpc layer + client._createTimeSeries = mockSimpleGrpcMethod(request); + + client.createTimeSeries(request, function(err) { + assert.ifError(err); + done(); + }); + }); + + it('invokes createTimeSeries with error', function(done) { + var client = monitoring.v3.metric(); + + // Mock request + var formattedName = client.projectPath("[PROJECT]"); + var timeSeries = []; + var request = { + name : formattedName, + timeSeries : timeSeries + }; + + // Mock Grpc layer + client._createTimeSeries = mockSimpleGrpcMethod(request, null, error); + + client.createTimeSeries(request, function(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/packages/google-cloud-monitoring/test/index.js b/packages/google-cloud-monitoring/test/index.js deleted file mode 100644 index 24b31285c0c..00000000000 --- a/packages/google-cloud-monitoring/test/index.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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 Monitoring = require('../src/index.js'); - -describe('Monitoring', function() { - describe('instantiation', function() { - it('should throw if invoked', function() { - var expectedMessage = [ - 'Cloud Monitoring must be accessed through the auto-generated client.', - ' See https://googlecloudplatform.github.io/google-cloud-node/#/docs/', - 'monitoring for more information.' - ].join(''); - - assert.throws(function() { - new Monitoring(); - }, new RegExp(expectedMessage)); - }); - }); -}); From e0b84db87b102506ff8a01a1d3f3ae5500f6ccce Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 16 Aug 2017 09:20:53 -0400 Subject: [PATCH 045/422] monitoring @ 0.3.0 tagged. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cc473846f44..a243c9f1a08 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/monitoring", - "version": "0.2.3", + "version": "0.3.0", "author": "Google Inc", "description": "Stackdriver Monitoring API client for Node.js", "main": "src/index.js", From 64e9c5bdbb80fe6748597a6b22d51df00c1b11d3 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Wed, 23 Aug 2017 14:19:35 -0700 Subject: [PATCH 046/422] Build updates. (#462) --- packages/google-cloud-monitoring/samples/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 8f2c1b375ef..6dfaeeb2261 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,8 +14,7 @@ "scripts": { "lint": "samples lint", "pretest": "npm run lint", - "system-test": "ava -T 3m --verbose system-test/*.test.js", - "test": "npm run system-test" + "test": "samples test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { "@google-cloud/monitoring": "0.2.2", From cdd3a05ef3e8ad7dafb4a1e8c0950b4ca8c4bfff Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Thu, 31 Aug 2017 15:21:55 -0700 Subject: [PATCH 047/422] Update dependencies (#468) * Fix docs-samples tests, round 1 * Fix circle.yml * Add RUN_ALL_BUILDS flag * More container builder bugfixes * Tweak env vars + remove manual proxy install * Env vars in bashrc don't evaluate dynamically, so avoid them * Add semicolons for command ordering * Add appengine/static-files test to circle.yaml * Fix failing container builder tests * Address comments --- .../google-cloud-monitoring/samples/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 6dfaeeb2261..d25a85639b7 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -17,16 +17,16 @@ "test": "samples test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.2.2", - "async": "2.4.1", - "googleapis": "19.0.0", + "@google-cloud/monitoring": "0.2.3", + "async": "2.5.0", + "googleapis": "20.1.0", "yargs": "8.0.2" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.15", - "ava": "0.19.1", + "@google-cloud/nodejs-repo-tools": "1.4.17", + "ava": "0.21.0", "proxyquire": "1.8.0", - "sinon": "2.3.4" + "sinon": "3.2.0" }, "cloud-repo-tools": { "requiresKeyFile": true, From aeb03b4f65349727f1728c3a42716126eb196e9c Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Sep 2017 16:53:41 -0700 Subject: [PATCH 048/422] 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. --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a243c9f1a08..e965ff1ac4e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -8,7 +8,7 @@ "files": [ "src", "AUTHORS", - "COPYING" + "LICENSE" ], "keywords": [ "google apis client", From 60c37eb670bed9123a7a80ac78c33f252c4d8614 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 29 Sep 2017 14:29:24 -0700 Subject: [PATCH 049/422] Update Monitoring samples. (#493) --- .../samples/package.json | 38 ++++--------------- .../samples/quickstart.js | 4 +- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index d25a85639b7..a69f0dd5b6e 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -12,21 +12,19 @@ "node": ">=4.3.2" }, "scripts": { - "lint": "samples lint", + "lint": "repo-tools lint", "pretest": "npm run lint", - "test": "samples test run --cmd ava -- -T 3m --verbose system-test/*.test.js" + "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.2.3", - "async": "2.5.0", - "googleapis": "20.1.0", - "yargs": "8.0.2" + "@google-cloud/monitoring": "0.3.0", + "yargs": "9.0.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "1.4.17", - "ava": "0.21.0", + "@google-cloud/nodejs-repo-tools": "2.0.4", + "ava": "0.22.0", "proxyquire": "1.8.0", - "sinon": "3.2.0" + "sinon": "4.0.0" }, "cloud-repo-tools": { "requiresKeyFile": true, @@ -39,28 +37,6 @@ "file": "metrics.js", "docs_link": "https://cloud.google.com/monitoring/docs", "usage": "node metrics.js --help" - }, - { - "id": "list", - "name": "Listing resources", - "file": "list_resources.js", - "docs_link": "https://cloud.google.com/monitoring/demos/#hello-world", - "description": "`list_resources.js` is a command-line program to demonstrate connecting to the\nGoogle Monitoring API to retrieve API data.", - "usage": { - "text": "node list_resources " - }, - "help": "node list_resources my-cool-project" - }, - { - "id": "metrics", - "name": "Custom metrics", - "file": "create_custom_metric.js", - "docs_link": "https://cloud.google.com/monitoring/demos/#custom_metrics", - "description": "`create_custom_metric.js` demonstrates how to create a custom metric, write a\ntimeseries value to it, and read it back.", - "usage": { - "text": "node create_custom_metric " - }, - "help": "node create_custom_metric my-cool-project" } ] } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index 0dff897ae30..ca66561fbbb 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -22,8 +22,8 @@ const Monitoring = require('@google-cloud/monitoring'); // Your Google Cloud Platform project ID const projectId = 'YOUR_PROJECT_ID'; -// Instantiates a client -const client = Monitoring.v3().metricServiceClient(); +// Creates a client +const client = Monitoring.v3.metric(); // Prepares an individual data point const dataPoint = { From 0d1408af5850b937bec57f683ed72a31948ec18b Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 11 Sep 2017 23:49:26 -0400 Subject: [PATCH 050/422] Add Uptime Check Config API samples. --- .../google-cloud-monitoring/samples/README.md | 53 ++++++++++--------- .../samples/package.json | 11 +++- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 520c781ead0..47cacb76888 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -1,8 +1,8 @@ Google Cloud Platform logo -# Stackdriver Monitoring Node.js Samples +# Stackdriver Monitoring: Node.js Samples -[![Build](https://storage.googleapis.com/cloud-docs-samples-badges/GoogleCloudPlatform/nodejs-docs-samples/nodejs-docs-samples-monitoring.svg)]() +[![Build](https://storage.googleapis.com/.svg)]() [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. @@ -11,8 +11,7 @@ * [Setup](#setup) * [Samples](#samples) * [Metrics](#metrics) - * [Listing resources](#listing-resources) - * [Custom metrics](#custom-metrics) + * [Uptime Config](#uptime-config) * [Running the tests](#running-the-tests) ## Setup @@ -59,6 +58,7 @@ Commands: get-resource [projectId] Get a monitored resource descriptor. Options: + --version Show version number [boolean] --help Show help [boolean] --projectId, -p [string] @@ -81,37 +81,38 @@ For more information, see https://cloud.google.com/monitoring/docs [metrics_0_docs]: https://cloud.google.com/monitoring/docs [metrics_0_code]: metrics.js -### Listing resources +### Uptime Config -View the [documentation][list_1_docs] or the [source code][list_1_code]. +View the [documentation][uptime_1_docs] or the [source code][uptime_1_code]. -`list_resources.js` is a command-line program to demonstrate connecting to the -Google Monitoring API to retrieve API data. +__Usage:__ `node uptime.js --help` -__Usage:__ `node list_resources ` - -``` -node list_resources my-cool-project ``` +Commands: + create [projectId] Creates an uptime check config. + list [projectId] Lists uptime check configs. + list-ips Lists uptime check config IPs. + get [projectId] Gets an uptime check config. + delete [projectId] Deletes an uptime check config. -[list_1_docs]: https://cloud.google.com/monitoring/demos/#hello-world -[list_1_code]: list_resources.js - -### Custom metrics - -View the [documentation][metrics_2_docs] or the [source code][metrics_2_code]. - -`create_custom_metric.js` demonstrates how to create a custom metric, write a -timeseries value to it, and read it back. +Options: + --version Show version number [boolean] + --help Show help [boolean] + --projectId, -p [string] -__Usage:__ `node create_custom_metric ` +Examples: + node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance. + node uptime.js list List all uptime check configs. + node uptime.js list-ips + node uptime.js get My-Uptime-Check + node uptime.js delete My-Uptime-Check +For more information, see https://cloud.google.com/monitoring/uptime-checks/ ``` -node create_custom_metric my-cool-project -``` -[metrics_2_docs]: https://cloud.google.com/monitoring/demos/#custom_metrics -[metrics_2_code]: create_custom_metric.js +[uptime_1_docs]: https://cloud.google.com/monitoring/docs +[uptime_1_code]: uptime.js + ## Running the tests diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index a69f0dd5b6e..f1278f12b51 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -21,10 +21,10 @@ "yargs": "9.0.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.0.4", + "@google-cloud/nodejs-repo-tools": "2.0.9", "ava": "0.22.0", "proxyquire": "1.8.0", - "sinon": "4.0.0" + "sinon": "4.0.1" }, "cloud-repo-tools": { "requiresKeyFile": true, @@ -37,6 +37,13 @@ "file": "metrics.js", "docs_link": "https://cloud.google.com/monitoring/docs", "usage": "node metrics.js --help" + }, + { + "id": "uptime", + "name": "Uptime Config", + "file": "uptime.js", + "docs_link": "https://cloud.google.com/monitoring/docs", + "usage": "node uptime.js --help" } ] } From 82bb6dd386e5f6b22d8f8236376a55b6316707a1 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Tue, 17 Oct 2017 11:22:07 -0700 Subject: [PATCH 051/422] Updated auto-gen client for monitoring. --- packages/google-cloud-monitoring/package.json | 5 +- .../protos/google/monitoring/v3/common.proto | 323 +++ .../protos/google/monitoring/v3/group.proto | 74 + .../google/monitoring/v3/group_service.proto | 206 ++ .../protos/google/monitoring/v3/metric.proto | 87 + .../google/monitoring/v3/metric_service.proto | 286 +++ .../smoke-test/metric_service_smoke_test.js | 106 +- packages/google-cloud-monitoring/src/index.js | 170 +- .../src/v3/doc/doc_google_api_distribution.js | 84 - .../src/v3/doc/doc_google_api_label.js | 38 - .../src/v3/doc/google/api/doc_distribution.js | 229 ++ .../src/v3/doc/google/api/doc_label.js | 62 + .../api/doc_metric.js} | 137 +- .../api/doc_monitored_resource.js} | 58 +- .../{ => google/monitoring/v3}/doc_common.js | 99 +- .../{ => google/monitoring/v3}/doc_group.js | 37 +- .../{ => google/monitoring/v3}/doc_metric.js | 54 +- .../protobuf/doc_duration.js} | 57 +- .../protobuf/doc_timestamp.js} | 67 +- .../src/v3/group_service_client.js | 1542 ++++++------ .../google-cloud-monitoring/src/v3/index.js | 53 +- .../src/v3/metric_service_client.js | 2111 +++++++++-------- .../google-cloud-monitoring/test/gapic-v3.js | 675 ++++-- 23 files changed, 4029 insertions(+), 2531 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/doc_google_api_label.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js rename packages/google-cloud-monitoring/src/v3/doc/{doc_google_api_metric.js => google/api/doc_metric.js} (63%) rename packages/google-cloud-monitoring/src/v3/doc/{doc_google_api_monitored_resource.js => google/api/doc_monitored_resource.js} (70%) rename packages/google-cloud-monitoring/src/v3/doc/{ => google/monitoring/v3}/doc_common.js (88%) rename packages/google-cloud-monitoring/src/v3/doc/{ => google/monitoring/v3}/doc_group.js (79%) rename packages/google-cloud-monitoring/src/v3/doc/{ => google/monitoring/v3}/doc_metric.js (73%) rename packages/google-cloud-monitoring/src/v3/doc/{doc_google_protobuf_duration.js => google/protobuf/doc_duration.js} (61%) rename packages/google-cloud-monitoring/src/v3/doc/{doc_google_protobuf_timestamp.js => google/protobuf/doc_timestamp.js} (54%) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e965ff1ac4e..0f003e8139f 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -25,8 +25,9 @@ ], "dependencies": { "extend": "^3.0", - "google-gax": "^0.13.2", - "google-proto-files": "^0.12.0" + "google-gax": "^0.14.2", + "lodash.merge": "^4.6.0", + "lodash.union": "^4.6.0" }, "devDependencies": { "mocha": "^3.2.0" diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto new file mode 100644 index 00000000000..c8f701eeaaf --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -0,0 +1,323 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/distribution.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.monitoring.v3"; + + +// A single strongly-typed value. +message TypedValue { + // The typed value field. + oneof value { + // A Boolean value: `true` or `false`. + bool bool_value = 1; + + // A 64-bit integer. Its range is approximately ±9.2x1018. + int64 int64_value = 2; + + // A 64-bit double-precision floating-point number. Its magnitude + // is approximately ±10±300 and it has 16 + // significant digits of precision. + double double_value = 3; + + // A variable-length string value. + string string_value = 4; + + // A distribution value. + google.api.Distribution distribution_value = 5; + } +} + +// A time interval extending just after a start time through an end time. +// If the start time is the same as the end time, then the interval +// represents a single point in time. +message TimeInterval { + // Required. The end of the time interval. + google.protobuf.Timestamp end_time = 2; + + // Optional. The beginning of the time interval. The default value + // for the start time is the end time. The start time must not be + // later than the end time. + google.protobuf.Timestamp start_time = 1; +} + +// Describes how to combine multiple time series to provide different views of +// the data. Aggregation consists of an alignment step on individual time +// series (`per_series_aligner`) followed by an optional reduction of the data +// across different time series (`cross_series_reducer`). For more details, see +// [Aggregation](/monitoring/api/learn_more#aggregation). +message Aggregation { + // The Aligner describes how to bring the data points in a single + // time series into temporal alignment. + enum Aligner { + // No alignment. Raw data is returned. Not valid if cross-time + // series reduction is requested. The value type of the result is + // the same as the value type of the input. + ALIGN_NONE = 0; + + // Align and convert to delta metric type. This alignment is valid + // for cumulative metrics and delta metrics. Aligning an existing + // delta metric to a delta metric requires that the alignment + // period be increased. The value type of the result is the same + // as the value type of the input. + ALIGN_DELTA = 1; + + // Align and convert to a rate. This alignment is valid for + // cumulative metrics and delta metrics with numeric values. The output is a + // gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_RATE = 2; + + // Align by interpolating between adjacent points around the + // period boundary. This alignment is valid for gauge + // metrics with numeric values. The value type of the result is the same + // as the value type of the input. + ALIGN_INTERPOLATE = 3; + + // Align by shifting the oldest data point before the period + // boundary to the boundary. This alignment is valid for gauge + // metrics. The value type of the result is the same as the + // value type of the input. + ALIGN_NEXT_OLDER = 4; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the minimum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // values. The value type of the result is the same as the value + // type of the input. + ALIGN_MIN = 10; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the maximum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // values. The value type of the result is the same as the value + // type of the input. + ALIGN_MAX = 11; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the average or arithmetic mean of all + // data points in the period. This alignment is valid for gauge and delta + // metrics with numeric values. The value type of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_MEAN = 12; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // or Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT = 13; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the sum of all data points in the + // period. This alignment is valid for gauge and delta metrics with numeric + // and distribution values. The value type of the output is the + // same as the value type of the input. + ALIGN_SUM = 14; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the standard deviation of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with numeric values. The value type of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_STDDEV = 15; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of True-valued data points in the + // period. This alignment is valid for gauge metrics with + // Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT_TRUE = 16; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the fraction of True-valued data points in the + // period. This alignment is valid for gauge metrics with Boolean values. + // The output value is in the range [0, 1] and has value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_FRACTION_TRUE = 17; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 99th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_99 = 18; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 95th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_95 = 19; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 50th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_50 = 20; + + // Align time series via aggregation. The resulting data point in + // the alignment period is the 5th percentile of all data + // points in the period. This alignment is valid for gauge and delta metrics + // with distribution values. The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENTILE_05 = 21; + } + + // A Reducer describes how to aggregate data points from multiple + // time series into a single time series. + enum Reducer { + // No cross-time series reduction. The output of the aligner is + // returned. + REDUCE_NONE = 0; + + // Reduce by computing the mean across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric or distribution values. The value type of the + // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_MEAN = 1; + + // Reduce by computing the minimum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric values. The value type of the output + // is the same as the value type of the input. + REDUCE_MIN = 2; + + // Reduce by computing the maximum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric values. The value type of the output + // is the same as the value type of the input. + REDUCE_MAX = 3; + + // Reduce by computing the sum across time series for each + // alignment period. This reducer is valid for delta and + // gauge metrics with numeric and distribution values. The value type of + // the output is the same as the value type of the input. + REDUCE_SUM = 4; + + // Reduce by computing the standard deviation across time series + // for each alignment period. This reducer is valid for delta + // and gauge metrics with numeric or distribution values. The value type of + // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_STDDEV = 5; + + // Reduce by computing the count of data points across time series + // for each alignment period. This reducer is valid for delta + // and gauge metrics of numeric, Boolean, distribution, and string value + // type. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT = 6; + + // Reduce by computing the count of True-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The value type of + // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT_TRUE = 7; + + // Reduce by computing the fraction of True-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The output value is in the + // range [0, 1] and has value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_FRACTION_TRUE = 8; + + // Reduce by computing 99th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_99 = 9; + + // Reduce by computing 95th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_95 = 10; + + // Reduce by computing 50th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_50 = 11; + + // Reduce by computing 5th percentile of data points across time series + // for each alignment period. This reducer is valid for gauge and delta + // metrics of numeric and distribution type. The value of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + REDUCE_PERCENTILE_05 = 12; + } + + // The alignment period for per-[time series][google.monitoring.v3.TimeSeries] + // alignment. If present, `alignmentPeriod` must be at least 60 + // seconds. After per-time series alignment, each time series will + // contain data points only on the period boundaries. If + // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then + // this field is ignored. If `perSeriesAligner` is specified and + // does not equal `ALIGN_NONE`, then this field must be defined; + // otherwise an error is returned. + google.protobuf.Duration alignment_period = 1; + + // The approach to be used to align individual time series. Not all + // alignment functions may be applied to all time series, depending + // on the metric type and value type of the original time + // series. Alignment may change the metric type or the value type of + // the time series. + // + // Time series data must be aligned in order to perform cross-time + // series reduction. If `crossSeriesReducer` is specified, then + // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + // and `alignmentPeriod` must be specified; otherwise, an error is + // returned. + Aligner per_series_aligner = 2; + + // The approach to be used to combine time series. Not all reducer + // functions may be applied to all time series, depending on the + // metric type and the value type of the original time + // series. Reduction may change the metric type of value type of the + // time series. + // + // Time series data must be aligned in order to perform cross-time + // series reduction. If `crossSeriesReducer` is specified, then + // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` + // and `alignmentPeriod` must be specified; otherwise, an error is + // returned. + Reducer cross_series_reducer = 4; + + // The set of fields to preserve when `crossSeriesReducer` is + // specified. The `groupByFields` determine how the time series are + // partitioned into subsets prior to applying the aggregation + // function. Each subset contains time series that have the same + // value for each of the grouping fields. Each individual time + // series is a member of exactly one subset. The + // `crossSeriesReducer` is applied to each subset of time series. + // It is not possible to reduce across different resource types, so + // this field implicitly contains `resource.type`. Fields not + // specified in `groupByFields` are aggregated away. If + // `groupByFields` is not specified and all the time series have + // the same resource type, then the time series are aggregated into + // a single output time series. If `crossSeriesReducer` is not + // defined, this field is ignored. + repeated string group_by_fields = 5; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto new file mode 100644 index 00000000000..b6a6cfc45c0 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -0,0 +1,74 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "GroupProto"; +option java_package = "com.google.monitoring.v3"; + + +// The description of a dynamic collection of monitored resources. Each group +// has a filter that is matched against monitored resources and their associated +// metadata. If a group's filter matches an available monitored resource, then +// that resource is a member of that group. Groups can contain any number of +// monitored resources, and each monitored resource can be a member of any +// number of groups. +// +// Groups can be nested in parent-child hierarchies. The `parentName` field +// identifies an optional parent for each group. If a group has a parent, then +// the only monitored resources available to be matched by the group's filter +// are the resources contained in the parent group. In other words, a group +// contains the monitored resources that match its filter and the filters of all +// the group's ancestors. A group without a parent can contain any monitored +// resource. +// +// For example, consider an infrastructure running a set of instances with two +// user-defined tags: `"environment"` and `"role"`. A parent group has a filter, +// `environment="production"`. A child of that parent group has a filter, +// `role="transcoder"`. The parent group contains all instances in the +// production environment, regardless of their roles. The child group contains +// instances that have the transcoder role *and* are in the production +// environment. +// +// The monitored resources contained in a group can change at any moment, +// depending on what resources exist and what filters are associated with the +// group and its ancestors. +message Group { + // Output only. The name of this group. The format is + // `"projects/{project_id_or_number}/groups/{group_id}"`. + // When creating a group, this field is ignored and a new name is created + // consisting of the project specified in the call to `CreateGroup` + // and a unique `{group_id}` that is generated automatically. + string name = 1; + + // A user-assigned name for this group, used only for display purposes. + string display_name = 2; + + // The name of the group's parent, if it has one. + // The format is `"projects/{project_id_or_number}/groups/{group_id}"`. + // For groups with no parent, `parentName` is the empty string, `""`. + string parent_name = 3; + + // The filter used to determine which monitored resources belong to this group. + string filter = 5; + + // If true, the members of this group are considered to be a cluster. + // The system can perform additional analysis on groups that are clusters. + bool is_cluster = 6; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto new file mode 100644 index 00000000000..3450580cd83 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -0,0 +1,206 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/api/monitored_resource.proto"; +import "google/monitoring/v3/common.proto"; +import "google/monitoring/v3/group.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "GroupServiceProto"; +option java_package = "com.google.monitoring.v3"; + + +// The Group API lets you inspect and manage your +// [groups](google.monitoring.v3.Group). +// +// A group is a named filter that is used to identify +// a collection of monitored resources. Groups are typically used to +// mirror the physical and/or logical topology of the environment. +// Because group membership is computed dynamically, monitored +// resources that are started in the future are automatically placed +// in matching groups. By using a group to name monitored resources in, +// for example, an alert policy, the target of that alert policy is +// updated automatically as monitored resources are added and removed +// from the infrastructure. +service GroupService { + // Lists the existing groups. + rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { + option (google.api.http) = { get: "/v3/{name=projects/*}/groups" }; + } + + // Gets a single group. + rpc GetGroup(GetGroupRequest) returns (Group) { + option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" }; + } + + // Creates a new group. + rpc CreateGroup(CreateGroupRequest) returns (Group) { + option (google.api.http) = { post: "/v3/{name=projects/*}/groups" body: "group" }; + } + + // Updates an existing group. + // You can change any group attributes except `name`. + rpc UpdateGroup(UpdateGroupRequest) returns (Group) { + option (google.api.http) = { put: "/v3/{group.name=projects/*/groups/*}" body: "group" }; + } + + // Deletes an existing group. + rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" }; + } + + // Lists the monitored resources that are members of a group. + rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) { + option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; + } +} + +// The `ListGroup` request. +message ListGroupsRequest { + // The project whose groups are to be listed. The format is + // `"projects/{project_id_or_number}"`. + string name = 7; + + // An optional filter consisting of a single group name. The filters limit the + // groups returned based on their parent-child relationship with the specified + // group. If no filter is specified, all groups are returned. + oneof filter { + // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + // Returns groups whose `parentName` field contains the group + // name. If no groups have this parent, the results are empty. + string children_of_group = 2; + + // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + // Returns groups that are ancestors of the specified group. + // The groups are returned in order, starting with the immediate parent and + // ending with the most distant ancestor. If the specified group has no + // immediate parent, the results are empty. + string ancestors_of_group = 3; + + // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + // Returns the descendants of the specified group. This is a superset of + // the results returned by the `childrenOfGroup` filter, and includes + // children-of-children, and so forth. + string descendants_of_group = 4; + } + + // A positive number that is the maximum number of results to return. + int32 page_size = 5; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 6; +} + +// The `ListGroups` response. +message ListGroupsResponse { + // The groups that match the specified filters. + repeated Group group = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `GetGroup` request. +message GetGroupRequest { + // The group to retrieve. The format is + // `"projects/{project_id_or_number}/groups/{group_id}"`. + string name = 3; +} + +// The `CreateGroup` request. +message CreateGroupRequest { + // The project in which to create the group. The format is + // `"projects/{project_id_or_number}"`. + string name = 4; + + // A group definition. It is an error to define the `name` field because + // the system assigns the name. + Group group = 2; + + // If true, validate this request but do not create the group. + bool validate_only = 3; +} + +// The `UpdateGroup` request. +message UpdateGroupRequest { + // The new definition of the group. All fields of the existing group, + // excepting `name`, are replaced with the corresponding fields of this group. + Group group = 2; + + // If true, validate this request but do not update the existing group. + bool validate_only = 3; +} + +// The `DeleteGroup` request. You can only delete a group if it has no children. +message DeleteGroupRequest { + // The group to delete. The format is + // `"projects/{project_id_or_number}/groups/{group_id}"`. + string name = 3; +} + +// The `ListGroupMembers` request. +message ListGroupMembersRequest { + // The group whose members are listed. The format is + // `"projects/{project_id_or_number}/groups/{group_id}"`. + string name = 7; + + // A positive number that is the maximum number of results to return. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; + + // An optional [list filter](/monitoring/api/learn_more#filtering) describing + // the members to be returned. The filter may reference the type, labels, and + // metadata of monitored resources that comprise the group. + // For example, to return only resources representing Compute Engine VM + // instances, use this filter: + // + // resource.type = "gce_instance" + string filter = 5; + + // An optional time interval for which results should be returned. Only + // members that were part of the group during the specified interval are + // included in the response. If no interval is provided then the group + // membership over the last minute is returned. + TimeInterval interval = 6; +} + +// The `ListGroupMembers` response. +message ListGroupMembersResponse { + // A set of monitored resources in the group. + repeated google.api.MonitoredResource members = 1; + + // If there are more results than have been returned, then this field is + // set to a non-empty value. To see the additional results, use that value as + // `pageToken` in the next call to this method. + string next_page_token = 2; + + // The total number of elements matching this request. + int32 total_size = 3; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto new file mode 100644 index 00000000000..73ae6037493 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -0,0 +1,87 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/metric.proto"; +import "google/api/monitored_resource.proto"; +import "google/monitoring/v3/common.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "MetricProto"; +option java_package = "com.google.monitoring.v3"; + + +// A single data point in a time series. +message Point { + // The time interval to which the data point applies. For GAUGE metrics, only + // the end time of the interval is used. For DELTA metrics, the start and end + // time should specify a non-zero interval, with subsequent points specifying + // contiguous and non-overlapping intervals. For CUMULATIVE metrics, the + // start and end time should specify a non-zero interval, with subsequent + // points specifying 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. + TimeInterval interval = 1; + + // The value of the data point. + TypedValue value = 2; +} + +// A collection of data points that describes the time-varying values +// of a metric. A time series is identified by a combination of a +// fully-specified monitored resource and a fully-specified metric. +// This type is used for both listing and creating time series. +message TimeSeries { + // The associated metric. A fully-specified metric used to identify the time + // series. + google.api.Metric metric = 1; + + // The associated resource. A fully-specified monitored resource used to + // identify the time series. + google.api.MonitoredResource resource = 2; + + // The metric kind of the time series. When listing time series, this metric + // kind might be different from the metric kind of the associated metric if + // this time series is an alignment or reduction of other time series. + // + // When creating a time series, this field is optional. If present, it must be + // the same as the metric kind of the associated metric. If the associated + // metric's descriptor must be auto-created, then this field specifies the + // metric kind of the new descriptor and must be either `GAUGE` (the default) + // or `CUMULATIVE`. + google.api.MetricDescriptor.MetricKind metric_kind = 3; + + // The value type of the time series. When listing time series, this value + // type might be different from the value type of the associated metric if + // this time series is an alignment or reduction of other time series. + // + // When creating a time series, this field is optional. If present, it must be + // the same as the type of the data in the `points` field. + google.api.MetricDescriptor.ValueType value_type = 4; + + // The data points of this time series. When listing time series, the order of + // the points is specified by the list method. + // + // When creating a time series, this field must contain exactly one point and + // the point's type must be the same as the value type of the associated + // metric. If the associated metric's descriptor must be auto-created, then + // the value type of the descriptor is determined by the point's type, which + // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + repeated Point points = 5; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto new file mode 100644 index 00000000000..0dd0b19d315 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -0,0 +1,286 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/api/metric.proto"; +import "google/api/monitored_resource.proto"; +import "google/monitoring/v3/common.proto"; +import "google/monitoring/v3/metric.proto"; +import "google/protobuf/empty.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "MetricServiceProto"; +option java_package = "com.google.monitoring.v3"; + + +// Manages metric descriptors, monitored resource descriptors, and +// time series data. +service MetricService { + // Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { + option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; + } + + // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { + option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" }; + } + + // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { + option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; + } + + // Gets a single metric descriptor. This method does not require a Stackdriver account. + rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { + option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; + } + + // Creates a new metric descriptor. + // User-created metric descriptors define + // [custom metrics](/monitoring/custom-metrics). + rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { + option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" }; + } + + // Deletes a metric descriptor. Only user-created + // [custom metrics](/monitoring/custom-metrics) can be deleted. + rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; + } + + // Lists time series that match a filter. This method does not require a Stackdriver account. + rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { + option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" }; + } + + // Creates or adds data to one or more time series. + // The response is empty if all time series in the request were written. + // If any time series could not be written, a corresponding failure message is + // included in the error response. + rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" }; + } +} + +// The `ListMonitoredResourceDescriptors` request. +message ListMonitoredResourceDescriptorsRequest { + // The project on which to execute the request. The format is + // `"projects/{project_id_or_number}"`. + string name = 5; + + // An optional [filter](/monitoring/api/v3/filters) describing + // the descriptors to be returned. The filter can reference + // the descriptor's type and labels. For example, the + // following filter returns only Google Compute Engine descriptors + // that have an `id` label: + // + // resource.type = starts_with("gce_") AND resource.label:id + string filter = 2; + + // A positive number that is the maximum number of results to return. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; +} + +// The `ListMonitoredResourcDescriptors` response. +message ListMonitoredResourceDescriptorsResponse { + // The monitored resource descriptors that are available to this project + // and that match `filter`, if present. + repeated google.api.MonitoredResourceDescriptor resource_descriptors = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `GetMonitoredResourceDescriptor` request. +message GetMonitoredResourceDescriptorRequest { + // The monitored resource descriptor to get. The format is + // `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. + // The `{resource_type}` is a predefined type, such as + // `cloudsql_database`. + string name = 3; +} + +// The `ListMetricDescriptors` request. +message ListMetricDescriptorsRequest { + // The project on which to execute the request. The format is + // `"projects/{project_id_or_number}"`. + string name = 5; + + // If this field is empty, all custom and + // system-defined metric descriptors are returned. + // Otherwise, the [filter](/monitoring/api/v3/filters) + // specifies which metric descriptors are to be + // returned. For example, the following filter matches all + // [custom metrics](/monitoring/custom-metrics): + // + // metric.type = starts_with("custom.googleapis.com/") + string filter = 2; + + // A positive number that is the maximum number of results to return. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; +} + +// The `ListMetricDescriptors` response. +message ListMetricDescriptorsResponse { + // The metric descriptors that are available to the project + // and that match the value of `filter`, if present. + repeated google.api.MetricDescriptor metric_descriptors = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `GetMetricDescriptor` request. +message GetMetricDescriptorRequest { + // The metric descriptor on which to execute the request. The format is + // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + // An example value of `{metric_id}` is + // `"compute.googleapis.com/instance/disk/read_bytes_count"`. + string name = 3; +} + +// The `CreateMetricDescriptor` request. +message CreateMetricDescriptorRequest { + // The project on which to execute the request. The format is + // `"projects/{project_id_or_number}"`. + string name = 3; + + // The new [custom metric](/monitoring/custom-metrics) + // descriptor. + google.api.MetricDescriptor metric_descriptor = 2; +} + +// The `DeleteMetricDescriptor` request. +message DeleteMetricDescriptorRequest { + // The metric descriptor on which to execute the request. The format is + // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + // An example of `{metric_id}` is: + // `"custom.googleapis.com/my_test_metric"`. + string name = 3; +} + +// The `ListTimeSeries` request. +message ListTimeSeriesRequest { + // Controls which fields are returned by `ListTimeSeries`. + enum TimeSeriesView { + // Returns the identity of the metric(s), the time series, + // and the time series data. + FULL = 0; + + // Returns the identity of the metric and the time series resource, + // but not the time series data. + HEADERS = 1; + } + + // The project on which to execute the request. The format is + // "projects/{project_id_or_number}". + string name = 10; + + // A [monitoring filter](/monitoring/api/v3/filters) that specifies which time + // series should be returned. The filter must specify a single metric type, + // and can additionally specify metric labels and other information. For + // example: + // + // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + // metric.label.instance_name = "my-instance-name" + string filter = 2; + + // The time interval for which results should be returned. Only time series + // that contain data points in the specified interval are included + // in the response. + TimeInterval interval = 4; + + // By default, the raw time series data is returned. + // Use this field to combine multiple time series for different + // views of the data. + Aggregation aggregation = 5; + + // Specifies the order in which the points of the time series should + // be returned. By default, results are not ordered. Currently, + // this field must be left blank. + string order_by = 6; + + // Specifies which information is returned about the time series. + TimeSeriesView view = 7; + + // A positive number that is the maximum number of results to return. + // When `view` field sets to `FULL`, it limits the number of `Points` server + // will return; if `view` field is `HEADERS`, it limits the number of + // `TimeSeries` server will return. + int32 page_size = 8; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 9; +} + +// The `ListTimeSeries` response. +message ListTimeSeriesResponse { + // One or more time series that match the filter included in the request. + repeated TimeSeries time_series = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `CreateTimeSeries` request. +message CreateTimeSeriesRequest { + // The project on which to execute the request. The format is + // `"projects/{project_id_or_number}"`. + string name = 3; + + // The new data to be added to a list of time series. + // Adds at most one data point to each of several time series. The new data + // point must be more recent than any other point in its time series. Each + // `TimeSeries` value must fully specify a unique time series by supplying + // all label values for the metric and the monitored resource. + repeated TimeSeries time_series = 2; +} + +// Describes the result of a failed request to write data to a time series. +message CreateTimeSeriesError { + // The time series, including the `Metric`, `MonitoredResource`, + // and `Point`s (including timestamp and value) that resulted + // in the error. This field provides all of the context that + // would be needed to retry the operation. + TimeSeries time_series = 1; + + // The status of the requested write operation. + google.rpc.Status status = 2; +} diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index 546683030bc..7abf92f6cc5 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -1,50 +1,50 @@ -/* - * 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. + 'use strict'; -describe('MetricServiceSmokeTest', function() { +describe('MetricServiceSmokeTest', () => { 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 using promises', function(done) { - var monitoring = require('../src'); + it('successfully makes a call to the service using promises', done => { + const monitoring = require('../src'); - var client = monitoring.v3.metric({ + var client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Iterate over all elements. var formattedName = client.projectPath(projectId); - client.listMonitoredResourceDescriptors({name: formattedName}).then(function(responses) { + client.listMonitoredResourceDescriptors({name: formattedName}) + .then(responses => { var resources = responses[0]; - for (var i = 0; i < resources.length; ++i) { - console.log(resources[i]); + for (let i = 0; i < resources.length; i += 1) { + console.log(resources[i]); } - }) - .then(done) - .catch(done); + }) + .then(done) + .catch(done); }); - it('successfully makes a call to the service using callbacks', function(done) { - var monitoring = require('../src'); + it('successfully makes a call to the service using callbacks', done => { + const monitoring = require('../src'); - var client = monitoring.v3.metric({ + var client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); @@ -53,40 +53,40 @@ describe('MetricServiceSmokeTest', function() { 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) { - console.log(resources[i]) - } - if (nextRequest) { - // Fetch the next page. - return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); - } + 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) { + console.log(resources[i]); + } + if (nextRequest) { + // Fetch the next page. + return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + } } client.listMonitoredResourceDescriptors({name: formattedName}, options) - .then(callback) - .then(done) - .catch(done); + .then(callback) + .then(done) + .catch(done); }); - it('successfully makes a call to the service using streaming', function(done) { - var monitoring = require('../src'); + it('successfully makes a call to the service using streaming', done => { + const monitoring = require('../src'); - var client = monitoring.v3.metric({ + var client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); var formattedName = client.projectPath(projectId); client.listMonitoredResourceDescriptorsStream({name: formattedName}) - .on('data', function(element) { + .on('data', element => { console.log(element); - }) - .on('error', done) - .on('end', done); + }) + .on('error', done) + .on('end', done); }); -}); \ No newline at end of file +}); diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index b8978b9457b..c876082b475 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -1,111 +1,91 @@ -/* - * 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. -/*! - * @module monitoring - * @name Monitoring +/** + * @namespace google + */ +/** + * @namespace google.cloud + */ +/** + * @namespace google.cloud.monitoring + */ +/** + * @namespace google.cloud.monitoring.v3 */ 'use strict'; -var extend = require('extend'); -var gapic = { - v3: require('./v3') -}; -var gaxGrpc = require('google-gax').grpc(); - -const VERSION = require('../package.json').version; +// Import the clients for each version supported by this package. +const gapic = Object.freeze({ + v3: require('./v3'), +}); /** - * Create a groupServiceClient with additional helpers for common - * tasks. + * The `@google-cloud/monitoring` package has the following named exports: * - * The Group API lets you inspect and manage your - * [groups](https://cloud.google.comgoogle.monitoring.v3.Group). + * - `GroupServiceClient` - Reference to + * {@link v3.GroupServiceClient} + * - `MetricServiceClient` - Reference to + * {@link v3.MetricServiceClient} + * - `v3` - This is used for selecting or pinning a + * particular backend service version. It exports: + * - `GroupServiceClient` - Reference to + * {@link v3.GroupServiceClient} + * - `MetricServiceClient` - Reference to + * {@link v3.MetricServiceClient} * - * A group is a named filter that is used to identify - * a collection of monitored resources. Groups are typically used to - * mirror the physical and/or logical topology of the environment. - * Because group membership is computed dynamically, monitored - * resources that are started in the future are automatically placed - * in matching groups. By using a group to name monitored resources in, - * for example, an alert policy, the target of that alert policy is - * updated automatically as monitored resources are added and removed - * from the infrastructure. + * @module {object} @google-cloud/monitoring + * @alias nodejs-monitoring * - * @param {object=} options - [Configuration object](#/docs). - * @param {number=} options.port - The port on which to connect to - * the remote host. - * @param {string=} options.servicePath - The domain name of the - * API remote host. - */ -function groupV3(options) { - // Define the header options. - options = extend({}, options, { - libName: 'gccl', - libVersion: VERSION - }); - - // Create the client with the provided options. - var client = gapic.v3(options).groupServiceClient(options); - return client; -} - -/** - * Create a metricServiceClient with additional helpers for common - * tasks. + * @example Install the client library with + * npm: + * npm install --save @google-cloud/monitoring + * + * @example Import the client library: + * const monitoring = require('@google-cloud/monitoring'); * - * Manages metric descriptors, monitored resource descriptors, and - * time series data. + * @example Create a client that uses + * Application Default Credentials + * (ADC): + * let client = new monitoring.GroupServiceClient(); * - * @param {object=} options - [Configuration object](#/docs). - * @param {number=} options.port - The port on which to connect to - * the remote host. - * @param {string=} options.servicePath - The domain name of the - * API remote host. + * @example Create a client with + * explicit credentials: + * let client = new monitoring.GroupServiceClient({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json', + * }); */ -function metricV3(options) { - // Define the header options. - options = extend({}, options, { - libName: 'gccl', - libVersion: VERSION - }); - - // Create the client with the provided options. - var client = gapic.v3(options).metricServiceClient(options); - return client; -} -var v3Protos = {}; - -extend(v3Protos, gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/monitoring/v3/group_service.proto' -}]).google.monitoring.v3); - -extend(v3Protos, gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/monitoring/v3/metric_service.proto' -}]).google.monitoring.v3); +/** + * @type {object} + * @property {constructor} GroupServiceClient + * Reference to {@link v3.GroupServiceClient} + * @property {constructor} MetricServiceClient + * Reference to {@link v3.MetricServiceClient} + */ +module.exports = gapic.v3; -module.exports.group = groupV3; -module.exports.metric = metricV3; -module.exports.types = v3Protos; +/** + * @type {object} + * @property {constructor} GroupServiceClient + * Reference to {@link v3.GroupServiceClient} + * @property {constructor} MetricServiceClient + * Reference to {@link v3.MetricServiceClient} + */ +module.exports.v3 = gapic.v3; -module.exports.v3 = {}; -module.exports.v3.group = groupV3; -module.exports.v3.metric = metricV3; -module.exports.v3.types = v3Protos; \ No newline at end of file +// Alias `module.exports` as `module.exports.default`, for future-proofing. +module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js deleted file mode 100644 index b2e14518ae4..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_distribution.js +++ /dev/null @@ -1,84 +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. - */ - -/** - * 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. - * - * @external "google.api.Distribution" - * @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 [google.api.Distribution.Range]{@link external:"google.api.Distribution.Range"} - * - * @property {Object} bucketOptions - * Defines the histogram bucket boundaries. - * - * This object should have the same structure as [google.api.Distribution.BucketOptions]{@link external:"google.api.Distribution.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. - * - * @see [google.api.Distribution definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/api/distribution.proto} - */ \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_label.js b/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_label.js deleted file mode 100644 index 64701d613ac..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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} - */ \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js new file mode 100644 index 00000000000..2ebda08c4d9 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js new file mode 100644 index 00000000000..602286cb52b --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js similarity index 63% rename from packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js rename to packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index ea7d0f941eb..7a7247a2397 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.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. /** * 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. * - * @external "google.api.MetricDescriptor" * @property {string} name * The resource name of the metric descriptor. Depending on the * implementation, the name typically includes: (1) the parent resource name @@ -52,19 +47,19 @@ * you can look at latencies for successful responses or just * for responses that failed. * - * 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} * * @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 [google.api.MetricDescriptor.MetricKind]{@link external:"google.api.MetricDescriptor.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 [google.api.MetricDescriptor.ValueType]{@link external:"google.api.MetricDescriptor.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 @@ -139,21 +134,109 @@ * 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 {@link `MetricDescriptor`}. + * labels of a `MetricDescriptor`. * - * @external "google.api.Metric" * @property {string} type - * An existing metric type, see {@link google.api.MetricDescriptor}. + * 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} - */ \ No newline at end of file + */ +var Metric = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js similarity index 70% rename from packages/google-cloud-monitoring/src/v3/doc/doc_google_api_monitored_resource.js rename to packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index bb2c3107f8f..31d25663448 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_google_api_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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} - */ \ No newline at end of file + */ +var MonitoredResource = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js similarity index 88% rename from packages/google-cloud-monitoring/src/v3/doc/doc_common.js rename to packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index aa8010c30a3..21ad4b6b5ec 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.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. - */ - -/* - * Note: this file is purely for documentation. Any contents are not expected - * to be loaded as the JS file. - */ +// 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 single strongly-typed value. @@ -39,9 +35,10 @@ * @property {Object} distributionValue * A distribution value. * - * This object should have the same structure as [google.api.Distribution]{@link external:"google.api.Distribution"} + * This object should have the same structure as [Distribution]{@link google.api.Distribution} * - * @class + * @typedef TypedValue + * @memberof google.monitoring.v3 * @see [google.monitoring.v3.TypedValue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} */ var TypedValue = { @@ -56,16 +53,17 @@ var TypedValue = { * @property {Object} endTime * Required. The end of the time interval. * - * 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} startTime * Optional. The beginning of the time interval. The default value * for the start time is the end time. The start time must not be * later than the end time. * - * 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 TimeInterval + * @memberof google.monitoring.v3 * @see [google.monitoring.v3.TimeInterval definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} */ var TimeInterval = { @@ -80,7 +78,7 @@ var TimeInterval = { * [Aggregation](https://cloud.google.com/monitoring/api/learn_more#aggregation). * * @property {Object} alignmentPeriod - * The alignment period for per-{@link time series} + * The alignment period for per-time series * alignment. If present, `alignmentPeriod` must be at least 60 * seconds. After per-time series alignment, each time series will * contain data points only on the period boundaries. If @@ -89,7 +87,7 @@ var TimeInterval = { * does not equal `ALIGN_NONE`, then this field must be defined; * otherwise an error is returned. * - * 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 {number} perSeriesAligner * The approach to be used to align individual time series. Not all @@ -104,7 +102,7 @@ var TimeInterval = { * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * - * The number should be among the values of [Aligner]{@link Aligner} + * The number should be among the values of [Aligner]{@link google.monitoring.v3.Aligner} * * @property {number} crossSeriesReducer * The approach to be used to combine time series. Not all reducer @@ -119,7 +117,7 @@ var TimeInterval = { * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * - * The number should be among the values of [Reducer]{@link Reducer} + * The number should be among the values of [Reducer]{@link google.monitoring.v3.Reducer} * * @property {string[]} groupByFields * The set of fields to preserve when `crossSeriesReducer` is @@ -137,7 +135,8 @@ var TimeInterval = { * a single output time series. If `crossSeriesReducer` is not * defined, this field is ignored. * - * @class + * @typedef Aggregation + * @memberof google.monitoring.v3 * @see [google.monitoring.v3.Aggregation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} */ var Aggregation = { @@ -148,6 +147,7 @@ var Aggregation = { * time series into temporal alignment. * * @enum {number} + * @memberof google.monitoring.v3 */ Aligner: { @@ -171,7 +171,7 @@ var Aggregation = { * Align and convert to a rate. This alignment is valid for * cumulative metrics and delta metrics with numeric values. The output is a * gauge metric with value type - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_RATE: 2, @@ -214,7 +214,7 @@ var Aggregation = { * the alignment period is the average or arithmetic mean of all * data points in the period. This alignment is valid for gauge and delta * metrics with numeric values. The value type of the output is - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_MEAN: 12, @@ -223,7 +223,7 @@ var Aggregation = { * the alignment period is the count of all data points in the * period. This alignment is valid for gauge and delta metrics with numeric * or Boolean values. The value type of the output is - * {@link INT64}. + * INT64. */ ALIGN_COUNT: 13, @@ -241,7 +241,7 @@ var Aggregation = { * the alignment period is the standard deviation of all data * points in the period. This alignment is valid for gauge and delta metrics * with numeric values. The value type of the output is - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_STDDEV: 15, @@ -250,7 +250,7 @@ var Aggregation = { * the alignment period is the count of True-valued data points in the * period. This alignment is valid for gauge metrics with * Boolean values. The value type of the output is - * {@link INT64}. + * INT64. */ ALIGN_COUNT_TRUE: 16, @@ -259,7 +259,7 @@ var Aggregation = { * the alignment period is the fraction of True-valued data points in the * period. This alignment is valid for gauge metrics with Boolean values. * The output value is in the range [0, 1] and has value type - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_FRACTION_TRUE: 17, @@ -268,7 +268,7 @@ var Aggregation = { * the alignment period is the 99th percentile of all data * points in the period. This alignment is valid for gauge and delta metrics * with distribution values. The output is a gauge metric with value type - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_PERCENTILE_99: 18, @@ -277,7 +277,7 @@ var Aggregation = { * the alignment period is the 95th percentile of all data * points in the period. This alignment is valid for gauge and delta metrics * with distribution values. The output is a gauge metric with value type - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_PERCENTILE_95: 19, @@ -286,7 +286,7 @@ var Aggregation = { * the alignment period is the 50th percentile of all data * points in the period. This alignment is valid for gauge and delta metrics * with distribution values. The output is a gauge metric with value type - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_PERCENTILE_50: 20, @@ -295,7 +295,7 @@ var Aggregation = { * the alignment period is the 5th percentile of all data * points in the period. This alignment is valid for gauge and delta metrics * with distribution values. The output is a gauge metric with value type - * {@link DOUBLE}. + * DOUBLE. */ ALIGN_PERCENTILE_05: 21 }, @@ -305,6 +305,7 @@ var Aggregation = { * time series into a single time series. * * @enum {number} + * @memberof google.monitoring.v3 */ Reducer: { @@ -318,7 +319,7 @@ var Aggregation = { * Reduce by computing the mean across time series for each * alignment period. This reducer is valid for delta and * gauge metrics with numeric or distribution values. The value type of the - * output is {@link DOUBLE}. + * output is DOUBLE. */ REDUCE_MEAN: 1, @@ -350,7 +351,7 @@ var Aggregation = { * Reduce by computing the standard deviation across time series * for each alignment period. This reducer is valid for delta * and gauge metrics with numeric or distribution values. The value type of - * the output is {@link DOUBLE}. + * the output is DOUBLE. */ REDUCE_STDDEV: 5, @@ -359,7 +360,7 @@ var Aggregation = { * for each alignment period. This reducer is valid for delta * and gauge metrics of numeric, Boolean, distribution, and string value * type. The value type of the output is - * {@link INT64}. + * INT64. */ REDUCE_COUNT: 6, @@ -367,7 +368,7 @@ var Aggregation = { * Reduce by computing the count of True-valued data points across time * series for each alignment period. This reducer is valid for delta * and gauge metrics of Boolean value type. The value type of - * the output is {@link INT64}. + * the output is INT64. */ REDUCE_COUNT_TRUE: 7, @@ -376,7 +377,7 @@ var Aggregation = { * series for each alignment period. This reducer is valid for delta * and gauge metrics of Boolean value type. The output value is in the * range [0, 1] and has value type - * {@link DOUBLE}. + * DOUBLE. */ REDUCE_FRACTION_TRUE: 8, @@ -384,7 +385,7 @@ var Aggregation = { * Reduce by computing 99th percentile of data points across time series * for each alignment period. This reducer is valid for gauge and delta * metrics of numeric and distribution type. The value of the output is - * {@link DOUBLE} + * DOUBLE */ REDUCE_PERCENTILE_99: 9, @@ -392,7 +393,7 @@ var Aggregation = { * Reduce by computing 95th percentile of data points across time series * for each alignment period. This reducer is valid for gauge and delta * metrics of numeric and distribution type. The value of the output is - * {@link DOUBLE} + * DOUBLE */ REDUCE_PERCENTILE_95: 10, @@ -400,7 +401,7 @@ var Aggregation = { * Reduce by computing 50th percentile of data points across time series * for each alignment period. This reducer is valid for gauge and delta * metrics of numeric and distribution type. The value of the output is - * {@link DOUBLE} + * DOUBLE */ REDUCE_PERCENTILE_50: 11, @@ -408,7 +409,7 @@ var Aggregation = { * Reduce by computing 5th percentile of data points across time series * for each alignment period. This reducer is valid for gauge and delta * metrics of numeric and distribution type. The value of the output is - * {@link DOUBLE} + * DOUBLE */ REDUCE_PERCENTILE_05: 12 } diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js similarity index 79% rename from packages/google-cloud-monitoring/src/v3/doc/doc_group.js rename to packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js index 2d03ff78472..4a7d944bc0d 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_group.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.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 description of a dynamic collection of monitored resources. Each group @@ -69,7 +65,8 @@ * If true, the members of this group are considered to be a cluster. * The system can perform additional analysis on groups that are clusters. * - * @class + * @typedef Group + * @memberof google.monitoring.v3 * @see [google.monitoring.v3.Group definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group.proto} */ var Group = { diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js similarity index 73% rename from packages/google-cloud-monitoring/src/v3/doc/doc_metric.js rename to packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index 0f4a2ef51e0..c884210a8b5 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.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 single data point in a time series. @@ -32,14 +28,15 @@ * event resets the cumulative value to zero and sets a new start time for the * following points. * - * This object should have the same structure as [TimeInterval]{@link TimeInterval} + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * * @property {Object} value * The value of the data point. * - * This object should have the same structure as [TypedValue]{@link TypedValue} + * This object should have the same structure as [TypedValue]{@link google.monitoring.v3.TypedValue} * - * @class + * @typedef Point + * @memberof google.monitoring.v3 * @see [google.monitoring.v3.Point definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} */ var Point = { @@ -56,13 +53,13 @@ var Point = { * The associated metric. A fully-specified metric used to identify the time * series. * - * This object should have the same structure as [google.api.Metric]{@link external:"google.api.Metric"} + * This object should have the same structure as [Metric]{@link google.api.Metric} * * @property {Object} resource * The associated resource. A fully-specified monitored resource used to * identify the time series. * - * 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 {number} metricKind * The metric kind of the time series. When listing time series, this metric @@ -75,7 +72,7 @@ var Point = { * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. * - * The number should be among the values of [google.api.MetricDescriptor.MetricKind]{@link external:"google.api.MetricDescriptor.MetricKind"} + * The number should be among the values of [MetricKind]{@link google.api.MetricKind} * * @property {number} valueType * The value type of the time series. When listing time series, this value @@ -85,7 +82,7 @@ var Point = { * When creating a time series, this field is optional. If present, it must be * the same as the type of the data in the `points` field. * - * The number should be among the values of [google.api.MetricDescriptor.ValueType]{@link external:"google.api.MetricDescriptor.ValueType"} + * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {Object[]} points * The data points of this time series. When listing time series, the order of @@ -97,9 +94,10 @@ var Point = { * the value type of the descriptor is determined by the point's type, which * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. * - * This object should have the same structure as [Point]{@link Point} + * This object should have the same structure as [Point]{@link google.monitoring.v3.Point} * - * @class + * @typedef TimeSeries + * @memberof google.monitoring.v3 * @see [google.monitoring.v3.TimeSeries definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} */ var TimeSeries = { diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_duration.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js similarity index 61% rename from packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_duration.js rename to packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js index b81fd71f130..6b107097540 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_duration.js +++ b/packages/google-cloud-monitoring/src/v3/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} - */ \ No newline at end of file + */ +var Duration = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js similarity index 54% rename from packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_timestamp.js rename to packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index ed8fc627b92..431e2fd5892 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/doc_google_protobuf_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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} - */ \ No newline at end of file + */ +var Timestamp = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 4f11033ae72..84324dea810 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -1,63 +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. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.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('./group_service_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); - -var SERVICE_ADDRESS = 'monitoring.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; - -var CODE_GEN_NAME_VERSION = 'gapic/0.0.5'; +'use strict'; -var PAGE_DESCRIPTORS = { - listGroups: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'group'), - listGroupMembers: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'members') -}; +const gapicConfig = require('./group_service_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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write' -]; +const VERSION = require('../../package.json').version; /** * The Group API lets you inspect and manage your @@ -73,727 +35,813 @@ var ALL_SCOPES = [ * updated automatically as monitored resources are added and removed * from the infrastructure. * - * * @class + * @memberof v3 */ -function GroupServiceClient(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( +class GroupServiceClient { + /** + * Construct an instance of GroupServiceClient. + * + * @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 + ); + + // 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/monitoring/v3/group_service.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}' + ), + groupPathTemplate: new gax.PathTemplate( + 'projects/{project}/groups/{group}' + ), + }; + + // 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 = { + listGroups: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'group' + ), + listGroupMembers: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'members' + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.GroupService', - configData, + gapicConfig, opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); - - var self = this; - - this.auth = gaxGrpc.auth; - var groupServiceStub = gaxGrpc.createStub( - grpcClients.google.monitoring.v3.GroupService, - opts); - var groupServiceStubMethods = [ - 'listGroups', - 'getGroup', - 'createGroup', - 'updateGroup', - 'deleteGroup', - 'listGroupMembers' - ]; - groupServiceStubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - groupServiceStub.then(function(groupServiceStub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return groupServiceStub[methodName].apply(groupServiceStub, args); - }; - }), - defaults[methodName], - PAGE_DESCRIPTORS[methodName]); - }); -} - -// Path templates - -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}'); - -var GROUP_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/groups/{group}'); - -/** - * Returns a fully-qualified project resource name string. - * @param {String} project - * @returns {String} - */ -GroupServiceClient.prototype.projectPath = function(project) { - return PROJECT_PATH_TEMPLATE.render({ - project: project - }); -}; - -/** - * Returns a fully-qualified group resource name string. - * @param {String} project - * @param {String} group - * @returns {String} - */ -GroupServiceClient.prototype.groupPath = function(project, group) { - return GROUP_PATH_TEMPLATE.render({ - project: project, - group: group - }); -}; - -/** - * 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. - */ -GroupServiceClient.prototype.matchProjectFromProjectName = function(projectName) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; - -/** - * Parses the groupName from a group resource. - * @param {String} groupName - * A fully-qualified path representing a group resources. - * @returns {String} - A string representing the project. - */ -GroupServiceClient.prototype.matchProjectFromGroupName = function(groupName) { - return GROUP_PATH_TEMPLATE.match(groupName).project; -}; - -/** - * Parses the groupName from a group resource. - * @param {String} groupName - * A fully-qualified path representing a group resources. - * @returns {String} - A string representing the group. - */ -GroupServiceClient.prototype.matchGroupFromGroupName = function(groupName) { - return GROUP_PATH_TEMPLATE.match(groupName).group; -}; - -/** - * Get the project ID used by this class. - * @param {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -GroupServiceClient.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; - -// Service calls - -/** - * Lists the existing groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project whose groups are to be listed. The format is - * `"projects/{project_id_or_number}"`. - * @param {string=} request.childrenOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups whose `parentName` field contains the group - * name. If no groups have this parent, the results are empty. - * @param {string=} request.ancestorsOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * @param {string=} request.descendantsOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `childrenOfGroup` filter, and includes - * children-of-children, and so forth. - * @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 [Group]{@link Group}. - * - * 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 [ListGroupsResponse]{@link ListGroupsResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Group]{@link Group}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Group]{@link Group} 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 [ListGroupsResponse]{@link ListGroupsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * var formattedName = client.projectPath("[PROJECT]"); - * - * client.listGroups({name: formattedName}).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 formattedName = client.projectPath("[PROJECT]"); - * - * - * 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.listGroups(nextRequest, options).then(callback); - * } - * } - * client.listGroups({name: formattedName}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -GroupServiceClient.prototype.listGroups = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + {'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.monitoring.v3.GroupService. + var groupServiceStub = gaxGrpc.createStub( + protos.google.monitoring.v3.GroupService, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var groupServiceStubMethods = [ + 'listGroups', + 'getGroup', + 'createGroup', + 'updateGroup', + 'deleteGroup', + 'listGroupMembers', + ]; + for (let methodName of groupServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + groupServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } } - if (options === undefined) { - options = {}; - } - - return this._listGroups(request, options, callback); -}; -/** - * Equivalent to {@link listGroups}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listGroups} 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.name - * The project whose groups are to be listed. The format is - * `"projects/{project_id_or_number}"`. - * @param {string=} request.childrenOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups whose `parentName` field contains the group - * name. If no groups have this parent, the results are empty. - * @param {string=} request.ancestorsOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * @param {string=} request.descendantsOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `childrenOfGroup` filter, and includes - * children-of-children, and so forth. - * @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 [Group]{@link Group} on 'data' event. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * client.listGroupsStream({name: formattedName}) - * .on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.log(err); - * }); - */ -GroupServiceClient.prototype.listGroupsStream = function(request, options) { - if (options === undefined) { - options = {}; + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; } - return PAGE_DESCRIPTORS.listGroups.createStream(this._listGroups, request, options); -}; - -/** - * Gets a single group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The group to retrieve. The format is - * `"projects/{project_id_or_number}/groups/{group_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 [Group]{@link Group}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Group]{@link Group}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); - * client.getGroup({name: formattedName}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -GroupServiceClient.prototype.getGroup = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * The port for this API service. + */ + static get port() { + return 443; } - return this._getGroup(request, options, callback); -}; - -/** - * Creates a new group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project in which to create the group. The format is - * `"projects/{project_id_or_number}"`. - * @param {Object} request.group - * A group definition. It is an error to define the `name` field because - * the system assigns the name. - * - * This object should have the same structure as [Group]{@link Group} - * @param {boolean=} request.validateOnly - * If true, validate this request but do not create the group. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 [Group]{@link Group}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Group]{@link Group}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * var group = {}; - * var request = { - * name: formattedName, - * group: group - * }; - * client.createGroup(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -GroupServiceClient.prototype.createGroup = 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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.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._createGroup(request, options, callback); -}; + // ------------------- + // -- Service calls -- + // ------------------- -/** - * Updates an existing group. - * You can change any group attributes except `name`. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.group - * The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. - * - * This object should have the same structure as [Group]{@link Group} - * @param {boolean=} request.validateOnly - * If true, validate this request but do not update the existing group. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 [Group]{@link Group}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Group]{@link Group}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * var group = {}; - * client.updateGroup({group: group}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -GroupServiceClient.prototype.updateGroup = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + /** + * Lists the existing groups. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project whose groups are to be listed. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.childrenOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups whose `parentName` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string=} request.ancestorsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string=} request.descendantsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `childrenOfGroup` filter, and includes + * children-of-children, and so forth. + * @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 [Group]{@link google.monitoring.v3.Group}. + * + * 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 [ListGroupsResponse]{@link google.monitoring.v3.ListGroupsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Group]{@link google.monitoring.v3.Group}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Group]{@link google.monitoring.v3.Group} 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 [ListGroupsResponse]{@link google.monitoring.v3.ListGroupsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * + * client.listGroups({name: formattedName}) + * .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 formattedName = 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.listGroups(nextRequest, options).then(callback); + * } + * } + * client.listGroups({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listGroups(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listGroups(request, options, callback); } - return this._updateGroup(request, options, callback); -}; + /** + * Equivalent to {@link listGroups}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listGroups} 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.name + * The project whose groups are to be listed. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.childrenOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups whose `parentName` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string=} request.ancestorsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string=} request.descendantsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `childrenOfGroup` filter, and includes + * children-of-children, and so forth. + * @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 [Group]{@link google.monitoring.v3.Group} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * client.listGroupsStream({name: formattedName}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listGroupsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listGroups.createStream( + this._innerApiCalls.listGroups, + request, + options + ); + }; -/** - * Deletes an existing group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The group to delete. The format is - * `"projects/{project_id_or_number}/groups/{group_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 monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); - * client.deleteGroup({name: formattedName}).catch(function(err) { - * console.error(err); - * }); - */ -GroupServiceClient.prototype.deleteGroup = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * Gets a single group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The group to retrieve. The format is + * `"projects/{project_id_or_number}/groups/{group_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 [Group]{@link google.monitoring.v3.Group}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Group]{@link google.monitoring.v3.Group}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * client.getGroup({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getGroup(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getGroup(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Creates a new group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project in which to create the group. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object} request.group + * A group definition. It is an error to define the `name` field because + * the system assigns the name. + * + * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} + * @param {boolean=} request.validateOnly + * If true, validate this request but do not create the group. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [Group]{@link google.monitoring.v3.Group}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Group]{@link google.monitoring.v3.Group}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * var group = {}; + * var request = { + * name: formattedName, + * group: group, + * }; + * client.createGroup(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createGroup(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createGroup(request, options, callback); } - return this._deleteGroup(request, options, callback); -}; + /** + * Updates an existing group. + * You can change any group attributes except `name`. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.group + * The new definition of the group. All fields of the existing group, + * excepting `name`, are replaced with the corresponding fields of this group. + * + * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} + * @param {boolean=} request.validateOnly + * If true, validate this request but do not update the existing group. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [Group]{@link google.monitoring.v3.Group}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Group]{@link google.monitoring.v3.Group}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * var group = {}; + * client.updateGroup({group: group}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateGroup(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.updateGroup(request, options, callback); + } -/** - * Lists the monitored resources that are members of a group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The group whose members are listed. The format is - * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter - * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing - * the members to be returned. The filter may reference the type, labels, and - * metadata of monitored resources that comprise the group. - * For example, to return only resources representing Compute Engine VM - * instances, use this filter: - * - * resource.type = "gce_instance" - * @param {Object=} request.interval - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * This object should have the same structure as [TimeInterval]{@link TimeInterval} - * @param {Object=} options - * Optional parameters. You can override the default settings for 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.MonitoredResource]{@link external:"google.api.MonitoredResource"}. - * - * 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 [ListGroupMembersResponse]{@link ListGroupMembersResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [google.api.MonitoredResource]{@link external:"google.api.MonitoredResource"} 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 [ListGroupMembersResponse]{@link ListGroupMembersResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); - * - * client.listGroupMembers({name: formattedName}).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 formattedName = client.groupPath("[PROJECT]", "[GROUP]"); - * - * - * 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.listGroupMembers(nextRequest, options).then(callback); - * } - * } - * client.listGroupMembers({name: formattedName}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -GroupServiceClient.prototype.listGroupMembers = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * Deletes an existing group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The group to delete. The format is + * `"projects/{project_id_or_number}/groups/{group_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 monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * client.deleteGroup({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteGroup(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteGroup(request, options, callback); } - if (options === undefined) { - options = {}; + + /** + * Lists the monitored resources that are members of a group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The group whose members are listed. The format is + * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter + * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing + * the members to be returned. The filter may reference the type, labels, and + * metadata of monitored resources that comprise the group. + * For example, to return only resources representing Compute Engine VM + * instances, use this filter: + * + * resource.type = "gce_instance" + * @param {Object=} request.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [MonitoredResource]{@link google.api.MonitoredResource}. + * + * 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 [ListGroupMembersResponse]{@link google.monitoring.v3.ListGroupMembersResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [MonitoredResource]{@link google.api.MonitoredResource}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [MonitoredResource]{@link google.api.MonitoredResource} 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 [ListGroupMembersResponse]{@link google.monitoring.v3.ListGroupMembersResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * + * client.listGroupMembers({name: formattedName}) + * .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 formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * + * + * 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.listGroupMembers(nextRequest, options).then(callback); + * } + * } + * client.listGroupMembers({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listGroupMembers(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listGroupMembers(request, options, callback); } - return this._listGroupMembers(request, options, callback); -}; + /** + * Equivalent to {@link listGroupMembers}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listGroupMembers} 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.name + * The group whose members are listed. The format is + * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter + * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing + * the members to be returned. The filter may reference the type, labels, and + * metadata of monitored resources that comprise the group. + * For example, to return only resources representing Compute Engine VM + * instances, use this filter: + * + * resource.type = "gce_instance" + * @param {Object=} request.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [MonitoredResource]{@link google.api.MonitoredResource} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.GroupServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * client.listGroupMembersStream({name: formattedName}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listGroupMembersStream(request, options) { + options = options || {}; + + return this._descriptors.page.listGroupMembers.createStream( + this._innerApiCalls.listGroupMembers, + request, + options + ); + }; -/** - * Equivalent to {@link listGroupMembers}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listGroupMembers} 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.name - * The group whose members are listed. The format is - * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter - * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing - * the members to be returned. The filter may reference the type, labels, and - * metadata of monitored resources that comprise the group. - * For example, to return only resources representing Compute Engine VM - * instances, use this filter: - * - * resource.type = "gce_instance" - * @param {Object=} request.interval - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * This object should have the same structure as [TimeInterval]{@link TimeInterval} - * @param {Object=} options - * Optional parameters. You can override the default settings for 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.MonitoredResource]{@link external:"google.api.MonitoredResource"} on 'data' event. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.group({ - * // optional auth parameters. - * }); - * - * var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); - * client.listGroupMembersStream({name: formattedName}) - * .on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.log(err); - * }); - */ -GroupServiceClient.prototype.listGroupMembersStream = function(request, options) { - if (options === undefined) { - options = {}; - } + // -------------------- + // -- Path templates -- + // -------------------- - return PAGE_DESCRIPTORS.listGroupMembers.createStream(this._listGroupMembers, request, options); -}; + /** + * Return a fully-qualified project resource name string. + * + * @param {String} project + * @returns {String} + */ + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); + } -function GroupServiceClientBuilder(gaxGrpc) { - if (!(this instanceof GroupServiceClientBuilder)) { - return new GroupServiceClientBuilder(gaxGrpc); + /** + * Return a fully-qualified group resource name string. + * + * @param {String} project + * @param {String} group + * @returns {String} + */ + groupPath(project, group) { + return this._pathTemplates.groupPathTemplate.render({ + project: project, + group: group, + }); } - var groupServiceClient = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/monitoring/v3/group_service.proto' - }]); - extend(this, groupServiceClient.google.monitoring.v3); + /** + * 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 projectPathTemplate.match(projectName).project; + } + /** + * Parse the groupName from a group resource. + * + * @param {String} groupName + * A fully-qualified path representing a group resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromGroupName(groupName) { + return groupPathTemplate.match(groupName).project; + } /** - * Build a new instance of {@link GroupServiceClient}. - * - * @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 groupName from a group resource. + * + * @param {String} groupName + * A fully-qualified path representing a group resources. + * @returns {String} - A string representing the group. */ - this.groupServiceClient = function(opts) { - return new GroupServiceClient(gaxGrpc, groupServiceClient, opts); - }; - extend(this.groupServiceClient, GroupServiceClient); + matchGroupFromGroupName(groupName) { + return groupPathTemplate.match(groupName).group; + } } -module.exports = GroupServiceClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file + + +module.exports = GroupServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index c639c388578..f568dc718c8 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -1,38 +1,21 @@ -/* - * 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'; - -var groupServiceClient = require('./group_service_client'); -var metricServiceClient = require('./metric_service_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 v3(options) { - options = extend({ - scopes: v3.ALL_SCOPES - }, options); - var gaxGrpc = gax.grpc(options); - var result = {}; - extend(result, groupServiceClient(gaxGrpc)); - extend(result, metricServiceClient(gaxGrpc)); - return result; -} +'use strict'; -v3.GAPIC_VERSION = '0.0.5'; -v3.SERVICE_ADDRESS = groupServiceClient.SERVICE_ADDRESS; -v3.ALL_SCOPES = groupServiceClient.ALL_SCOPES; +const GroupServiceClient = require('./group_service_client'); +const MetricServiceClient = require('./metric_service_client'); -module.exports = v3; \ No newline at end of file +module.exports.GroupServiceClient = GroupServiceClient; +module.exports.MetricServiceClient = MetricServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 59d0eb01631..5d1faaf29f6 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -1,1097 +1,1148 @@ -/* - * 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. - * - * EDITING INSTRUCTIONS - * This file was generated from the file - * https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.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('./metric_service_client_config'); -var extend = require('extend'); -var gax = require('google-gax'); - -var SERVICE_ADDRESS = 'monitoring.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.0.5'; +const gapicConfig = require('./metric_service_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); -var PAGE_DESCRIPTORS = { - listMonitoredResourceDescriptors: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'resourceDescriptors'), - listMetricDescriptors: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'metricDescriptors'), - listTimeSeries: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'timeSeries') -}; - -/** - * 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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write' -]; +const VERSION = require('../../package.json').version; /** * Manages metric descriptors, monitored resource descriptors, and * time series data. * - * * @class + * @memberof v3 */ -function MetricServiceClient(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 - ); +class MetricServiceClient { + /** + * Construct an instance of MetricServiceClient. + * + * @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 = {}; - var defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.MetricService', - configData, - opts.clientConfig, - {'x-goog-api-client': googleApiClient.join(' ')}); + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath: this.constructor.servicePath, + }, + opts + ); - var self = this; + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + var gaxGrpc = gax.grpc(opts); - this.auth = gaxGrpc.auth; - var metricServiceStub = gaxGrpc.createStub( - grpcClients.google.monitoring.v3.MetricService, - opts); - var metricServiceStubMethods = [ - 'listMonitoredResourceDescriptors', - 'getMonitoredResourceDescriptor', - 'listMetricDescriptors', - 'getMetricDescriptor', - 'createMetricDescriptor', - 'deleteMetricDescriptor', - 'listTimeSeries', - 'createTimeSeries' - ]; - metricServiceStubMethods.forEach(function(methodName) { - self['_' + methodName] = gax.createApiCall( - metricServiceStub.then(function(metricServiceStub) { - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return metricServiceStub[methodName].apply(metricServiceStub, args); - }; - }), - defaults[methodName], - PAGE_DESCRIPTORS[methodName]); - }); -} + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; -// Path templates + // 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}`); + } -var PROJECT_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}'); + // Load the applicable protos. + var protos = merge( + {}, + gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + 'google/monitoring/v3/metric_service.proto' + ) + ); -var METRIC_DESCRIPTOR_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/metricDescriptors/{metric_descriptor=**}'); + // 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}' + ), + metricDescriptorPathTemplate: new gax.PathTemplate( + 'projects/{project}/metricDescriptors/{metric_descriptor=**}' + ), + monitoredResourceDescriptorPathTemplate: new gax.PathTemplate( + 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), + }; -var MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE = new gax.PathTemplate( - 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); + // 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 = { + listMonitoredResourceDescriptors: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceDescriptors' + ), + listMetricDescriptors: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metricDescriptors' + ), + listTimeSeries: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'timeSeries' + ), + }; -/** - * Returns a fully-qualified project resource name string. - * @param {String} project - * @returns {String} - */ -MetricServiceClient.prototype.projectPath = function(project) { - return PROJECT_PATH_TEMPLATE.render({ - project: project - }); -}; + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.MetricService', + gapicConfig, + opts.clientConfig, + {'x-goog-api-client': clientHeader.join(' ')} + ); -/** - * Returns a fully-qualified metric_descriptor resource name string. - * @param {String} project - * @param {String} metricDescriptor - * @returns {String} - */ -MetricServiceClient.prototype.metricDescriptorPath = function(project, metricDescriptor) { - return METRIC_DESCRIPTOR_PATH_TEMPLATE.render({ - project: project, - metric_descriptor: metricDescriptor - }); -}; + // 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 = {}; -/** - * Returns a fully-qualified monitored_resource_descriptor resource name string. - * @param {String} project - * @param {String} monitoredResourceDescriptor - * @returns {String} - */ -MetricServiceClient.prototype.monitoredResourceDescriptorPath = function(project, monitoredResourceDescriptor) { - return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.render({ - project: project, - monitored_resource_descriptor: monitoredResourceDescriptor - }); -}; + // Put together the "service stub" for + // google.monitoring.v3.MetricService. + var metricServiceStub = gaxGrpc.createStub( + protos.google.monitoring.v3.MetricService, + opts + ); -/** - * 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. - */ -MetricServiceClient.prototype.matchProjectFromProjectName = function(projectName) { - return PROJECT_PATH_TEMPLATE.match(projectName).project; -}; + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var metricServiceStubMethods = [ + 'listMonitoredResourceDescriptors', + 'getMonitoredResourceDescriptor', + 'listMetricDescriptors', + 'getMetricDescriptor', + 'createMetricDescriptor', + 'deleteMetricDescriptor', + 'listTimeSeries', + 'createTimeSeries', + ]; + for (let methodName of metricServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + metricServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } -/** - * Parses the metricDescriptorName from a metric_descriptor resource. - * @param {String} metricDescriptorName - * A fully-qualified path representing a metric_descriptor resources. - * @returns {String} - A string representing the project. - */ -MetricServiceClient.prototype.matchProjectFromMetricDescriptorName = function(metricDescriptorName) { - return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).project; -}; + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } -/** - * Parses the metricDescriptorName from a metric_descriptor resource. - * @param {String} metricDescriptorName - * A fully-qualified path representing a metric_descriptor resources. - * @returns {String} - A string representing the metric_descriptor. - */ -MetricServiceClient.prototype.matchMetricDescriptorFromMetricDescriptorName = function(metricDescriptorName) { - return METRIC_DESCRIPTOR_PATH_TEMPLATE.match(metricDescriptorName).metric_descriptor; -}; + /** + * The port for this API service. + */ + static get port() { + return 443; + } -/** - * Parses the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. - * @param {String} monitoredResourceDescriptorName - * A fully-qualified path representing a monitored_resource_descriptor resources. - * @returns {String} - A string representing the project. - */ -MetricServiceClient.prototype.matchProjectFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { - return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).project; -}; + /** + * 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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; + } -/** - * Parses the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. - * @param {String} monitoredResourceDescriptorName - * A fully-qualified path representing a monitored_resource_descriptor resources. - * @returns {String} - A string representing the monitored_resource_descriptor. - */ -MetricServiceClient.prototype.matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName = function(monitoredResourceDescriptorName) { - return MONITORED_RESOURCE_DESCRIPTOR_PATH_TEMPLATE.match(monitoredResourceDescriptorName).monitored_resource_descriptor; -}; + /** + * 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); + } -/** - * Get the project ID used by this class. - * @param {function(Error, string)} callback - the callback to be called with - * the current project Id. - */ -MetricServiceClient.prototype.getProjectId = function(callback) { - return this.auth.getProjectId(callback); -}; + // ------------------- + // -- Service calls -- + // ------------------- -// Service calls + /** + * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing + * the descriptors to be returned. The filter can reference + * the descriptor's type and labels. For example, the + * following filter returns only Google Compute Engine descriptors + * that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label: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 [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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * + * client.listMonitoredResourceDescriptors({name: formattedName}) + * .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 formattedName = 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.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + * } + * } + * client.listMonitoredResourceDescriptors({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listMonitoredResourceDescriptors(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing - * the descriptors to be returned. The filter can reference - * the descriptor's type and labels. For example, the - * following filter returns only Google Compute Engine descriptors - * that have an `id` label: - * - * resource.type = starts_with("gce_") AND resource.label: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 [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 monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * var formattedName = client.projectPath("[PROJECT]"); - * - * client.listMonitoredResourceDescriptors({name: formattedName}).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 formattedName = client.projectPath("[PROJECT]"); - * - * - * 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({name: formattedName}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.listMonitoredResourceDescriptors = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - 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 {string} request.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing + * the descriptors to be returned. The filter can reference + * the descriptor's type and labels. For example, the + * following filter returns only Google Compute Engine descriptors + * that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label: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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * client.listMonitoredResourceDescriptorsStream({name: formattedName}) + * .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 {string} request.name - * The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing - * the descriptors to be returned. The filter can reference - * the descriptor's type and labels. For example, the - * following filter returns only Google Compute Engine descriptors - * that have an `id` label: - * - * resource.type = starts_with("gce_") AND resource.label: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 [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"} on 'data' event. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * client.listMonitoredResourceDescriptorsStream({name: formattedName}) - * .on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.log(err); - * }); - */ -MetricServiceClient.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); -}; + /** + * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The monitored resource descriptor to get. The format is + * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. + * The `{resource_type}` is a predefined type, such as + * `cloudsql_database`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + * client.getMonitoredResourceDescriptor({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getMonitoredResourceDescriptor(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The monitored resource descriptor to get. The format is - * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. - * The `{resource_type}` is a predefined type, such as - * `cloudsql_database`. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [google.api.MonitoredResourceDescriptor]{@link external:"google.api.MonitoredResourceDescriptor"}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); - * client.getMonitoredResourceDescriptor({name: formattedName}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.getMonitoredResourceDescriptor = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.getMonitoredResourceDescriptor(request, options, callback); } - return this._getMonitoredResourceDescriptor(request, options, callback); -}; + /** + * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. + * + * 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 [ListMetricDescriptorsResponse]{@link google.monitoring.v3.ListMetricDescriptorsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [MetricDescriptor]{@link google.api.MetricDescriptor}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [MetricDescriptor]{@link google.api.MetricDescriptor} 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 [ListMetricDescriptorsResponse]{@link google.monitoring.v3.ListMetricDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * + * client.listMetricDescriptors({name: formattedName}) + * .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 formattedName = 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.listMetricDescriptors(nextRequest, options).then(callback); + * } + * } + * client.listMetricDescriptors({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listMetricDescriptors(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * - * metric.type = starts_with("custom.googleapis.com/") - * @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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. - * - * 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 [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} 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 [ListMetricDescriptorsResponse]{@link ListMetricDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * var formattedName = client.projectPath("[PROJECT]"); - * - * client.listMetricDescriptors({name: formattedName}).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 formattedName = client.projectPath("[PROJECT]"); - * - * - * 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.listMetricDescriptors(nextRequest, options).then(callback); - * } - * } - * client.listMetricDescriptors({name: formattedName}, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.listMetricDescriptors = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.listMetricDescriptors(request, options, callback); } - return this._listMetricDescriptors(request, options, callback); -}; + /** + * Equivalent to {@link listMetricDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listMetricDescriptors} 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.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {string=} request.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @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 [MetricDescriptor]{@link google.api.MetricDescriptor} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * client.listMetricDescriptorsStream({name: formattedName}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listMetricDescriptorsStream(request, options) { + options = options || {}; -/** - * Equivalent to {@link listMetricDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listMetricDescriptors} 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.name - * The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * - * metric.type = starts_with("custom.googleapis.com/") - * @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.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} on 'data' event. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * client.listMetricDescriptorsStream({name: formattedName}) - * .on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.log(err); - * }); - */ -MetricServiceClient.prototype.listMetricDescriptorsStream = function(request, options) { - if (options === undefined) { - options = {}; - } + return this._descriptors.page.listMetricDescriptors.createStream( + this._innerApiCalls.listMetricDescriptors, + request, + options + ); + }; - return PAGE_DESCRIPTORS.listMetricDescriptors.createStream(this._listMetricDescriptors, request, options); -}; + /** + * Gets a single metric descriptor. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The metric descriptor on which to execute the request. The format is + * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + * An example value of `{metric_id}` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [MetricDescriptor]{@link google.api.MetricDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + * client.getMetricDescriptor({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getMetricDescriptor(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Gets a single metric descriptor. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The metric descriptor on which to execute the request. The format is - * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - * An example value of `{metric_id}` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); - * client.getMetricDescriptor({name: formattedName}).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.getMetricDescriptor = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.getMetricDescriptor(request, options, callback); } - return this._getMetricDescriptor(request, options, callback); -}; + /** + * Creates a new metric descriptor. + * User-created metric descriptors define + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object} request.metricDescriptor + * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) + * descriptor. + * + * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [MetricDescriptor]{@link google.api.MetricDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * var metricDescriptor = {}; + * var request = { + * name: formattedName, + * metricDescriptor: metricDescriptor, + * }; + * client.createMetricDescriptor(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createMetricDescriptor(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Creates a new metric descriptor. - * User-created metric descriptors define - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {Object} request.metricDescriptor - * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. - * - * This object should have the same structure as [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"} - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [google.api.MetricDescriptor]{@link external:"google.api.MetricDescriptor"}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * var metricDescriptor = {}; - * var request = { - * name: formattedName, - * metricDescriptor: metricDescriptor - * }; - * client.createMetricDescriptor(request).then(function(responses) { - * var response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.createMetricDescriptor = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.createMetricDescriptor(request, options, callback); } - return this._createMetricDescriptor(request, options, callback); -}; + /** + * Deletes a metric descriptor. Only user-created + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The metric descriptor on which to execute the request. The format is + * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + * An example of `{metric_id}` is: + * `"custom.googleapis.com/my_test_metric"`. + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + * client.deleteMetricDescriptor({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteMetricDescriptor(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Deletes a metric descriptor. Only user-created - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The metric descriptor on which to execute the request. The format is - * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - * An example of `{metric_id}` is: - * `"custom.googleapis.com/my_test_metric"`. - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); - * client.deleteMetricDescriptor({name: formattedName}).catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.deleteMetricDescriptor = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.deleteMetricDescriptor(request, options, callback); } - return this._deleteMetricDescriptor(request, options, callback); -}; + /** + * Lists time series that match a filter. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is + * "projects/{project_id_or_number}". + * @param {string} request.filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * series should be returned. The filter must specify a single metric type, + * and can additionally specify metric labels and other information. For + * example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.label.instance_name = "my-instance-name" + * @param {Object} request.interval + * The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} + * @param {number} request.view + * Specifies which information is returned about the time series. + * + * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} + * @param {Object=} request.aggregation + * By default, the raw time series data is returned. + * Use this field to combine multiple time series for different + * views of the data. + * + * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} + * @param {string=} request.orderBy + * Specifies the order in which the points of the time series should + * be returned. By default, results are not ordered. Currently, + * this field must be left blank. + * @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 [TimeSeries]{@link google.monitoring.v3.TimeSeries}. + * + * 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 [ListTimeSeriesResponse]{@link google.monitoring.v3.ListTimeSeriesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [TimeSeries]{@link google.monitoring.v3.TimeSeries}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [TimeSeries]{@link google.monitoring.v3.TimeSeries} 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 [ListTimeSeriesResponse]{@link google.monitoring.v3.ListTimeSeriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * var filter = ''; + * var interval = {}; + * var view = 'FULL'; + * var request = { + * name: formattedName, + * filter: filter, + * interval: interval, + * view: view, + * }; + * + * client.listTimeSeries(request) + * .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 formattedName = client.projectPath('[PROJECT]'); + * var filter = ''; + * var interval = {}; + * var view = 'FULL'; + * var request = { + * name: formattedName, + * filter: filter, + * interval: interval, + * view: view, + * }; + * + * + * 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.listTimeSeries(nextRequest, options).then(callback); + * } + * } + * client.listTimeSeries(request, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listTimeSeries(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; -/** - * Lists time series that match a filter. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project on which to execute the request. The format is - * "projects/{project_id_or_number}". - * @param {string} request.filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time - * series should be returned. The filter must specify a single metric type, - * and can additionally specify metric labels and other information. For - * example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.label.instance_name = "my-instance-name" - * @param {Object} request.interval - * The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. - * - * This object should have the same structure as [TimeInterval]{@link TimeInterval} - * @param {number} request.view - * Specifies which information is returned about the time series. - * - * The number should be among the values of [TimeSeriesView]{@link TimeSeriesView} - * @param {Object=} request.aggregation - * By default, the raw time series data is returned. - * Use this field to combine multiple time series for different - * views of the data. - * - * This object should have the same structure as [Aggregation]{@link Aggregation} - * @param {string=} request.orderBy - * Specifies the order in which the points of the time series should - * be returned. By default, results are not ordered. Currently, - * this field must be left blank. - * @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 [TimeSeries]{@link TimeSeries}. - * - * 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 [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [TimeSeries]{@link TimeSeries}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [TimeSeries]{@link TimeSeries} 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 [ListTimeSeriesResponse]{@link ListTimeSeriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * var formattedName = client.projectPath("[PROJECT]"); - * var filter = ''; - * var interval = {}; - * var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; - * var request = { - * name: formattedName, - * filter: filter, - * interval: interval, - * view: view - * }; - * - * client.listTimeSeries(request).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 formattedName = client.projectPath("[PROJECT]"); - * var filter = ''; - * var interval = {}; - * var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; - * var request = { - * name: formattedName, - * filter: filter, - * interval: interval, - * view: view - * }; - * - * - * 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.listTimeSeries(nextRequest, options).then(callback); - * } - * } - * client.listTimeSeries(request, options) - * .then(callback) - * .catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.listTimeSeries = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - if (options === undefined) { - options = {}; + return this._innerApiCalls.listTimeSeries(request, options, callback); } - return this._listTimeSeries(request, options, callback); -}; + /** + * Equivalent to {@link listTimeSeries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listTimeSeries} 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.name + * The project on which to execute the request. The format is + * "projects/{project_id_or_number}". + * @param {string} request.filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * series should be returned. The filter must specify a single metric type, + * and can additionally specify metric labels and other information. For + * example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.label.instance_name = "my-instance-name" + * @param {Object} request.interval + * The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} + * @param {number} request.view + * Specifies which information is returned about the time series. + * + * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} + * @param {Object=} request.aggregation + * By default, the raw time series data is returned. + * Use this field to combine multiple time series for different + * views of the data. + * + * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} + * @param {string=} request.orderBy + * Specifies the order in which the points of the time series should + * be returned. By default, results are not ordered. Currently, + * this field must be left blank. + * @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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * var filter = ''; + * var interval = {}; + * var view = 'FULL'; + * var request = { + * name: formattedName, + * filter: filter, + * interval: interval, + * view: view, + * }; + * client.listTimeSeriesStream(request) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listTimeSeriesStream(request, options) { + options = options || {}; -/** - * Equivalent to {@link listTimeSeries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listTimeSeries} 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.name - * The project on which to execute the request. The format is - * "projects/{project_id_or_number}". - * @param {string} request.filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time - * series should be returned. The filter must specify a single metric type, - * and can additionally specify metric labels and other information. For - * example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.label.instance_name = "my-instance-name" - * @param {Object} request.interval - * The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. - * - * This object should have the same structure as [TimeInterval]{@link TimeInterval} - * @param {number} request.view - * Specifies which information is returned about the time series. - * - * The number should be among the values of [TimeSeriesView]{@link TimeSeriesView} - * @param {Object=} request.aggregation - * By default, the raw time series data is returned. - * Use this field to combine multiple time series for different - * views of the data. - * - * This object should have the same structure as [Aggregation]{@link Aggregation} - * @param {string=} request.orderBy - * Specifies the order in which the points of the time series should - * be returned. By default, results are not ordered. Currently, - * this field must be left blank. - * @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 [TimeSeries]{@link TimeSeries} on 'data' event. - * - * @example - * - * var monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * var filter = ''; - * var interval = {}; - * var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; - * var request = { - * name: formattedName, - * filter: filter, - * interval: interval, - * view: view - * }; - * client.listTimeSeriesStream(request) - * .on('data', function(element) { - * // doThingsWith(element) - * }).on('error', function(err) { - * console.log(err); - * }); - */ -MetricServiceClient.prototype.listTimeSeriesStream = function(request, options) { - if (options === undefined) { - options = {}; + return this._descriptors.page.listTimeSeries.createStream( + this._innerApiCalls.listTimeSeries, + request, + options + ); + }; + + /** + * Creates or adds data to one or more time series. + * The response is empty if all time series in the request were written. + * If any time series could not be written, a corresponding failure message is + * included in the error response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * @param {Object[]} request.timeSeries + * The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.MetricServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * var timeSeries = []; + * var request = { + * name: formattedName, + * timeSeries: timeSeries, + * }; + * client.createTimeSeries(request).catch(err => { + * console.error(err); + * }); + */ + createTimeSeries(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createTimeSeries(request, options, callback); } - return PAGE_DESCRIPTORS.listTimeSeries.createStream(this._listTimeSeries, request, options); -}; + // -------------------- + // -- Path templates -- + // -------------------- -/** - * Creates or adds data to one or more time series. - * The response is empty if all time series in the request were written. - * If any time series could not be written, a corresponding failure message is - * included in the error response. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {Object[]} request.timeSeries - * The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * - * This object should have the same structure as [TimeSeries]{@link TimeSeries} - * @param {Object=} options - * Optional parameters. You can override the default settings for 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 monitoring = require('@google-cloud/monitoring'); - * - * var client = monitoring.v3.metric({ - * // optional auth parameters. - * }); - * - * var formattedName = client.projectPath("[PROJECT]"); - * var timeSeries = []; - * var request = { - * name: formattedName, - * timeSeries: timeSeries - * }; - * client.createTimeSeries(request).catch(function(err) { - * console.error(err); - * }); - */ -MetricServiceClient.prototype.createTimeSeries = function(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; + /** + * Return a fully-qualified project resource name string. + * + * @param {String} project + * @returns {String} + */ + projectPath(project) { + return this._pathTemplates.projectPathTemplate.render({ + project: project, + }); } - if (options === undefined) { - options = {}; + + /** + * Return a fully-qualified metric_descriptor resource name string. + * + * @param {String} project + * @param {String} metricDescriptor + * @returns {String} + */ + metricDescriptorPath(project, metricDescriptor) { + return this._pathTemplates.metricDescriptorPathTemplate.render({ + project: project, + metric_descriptor: metricDescriptor, + }); } - return this._createTimeSeries(request, options, callback); -}; + /** + * Return a fully-qualified monitored_resource_descriptor resource name string. + * + * @param {String} project + * @param {String} monitoredResourceDescriptor + * @returns {String} + */ + monitoredResourceDescriptorPath(project, monitoredResourceDescriptor) { + return this._pathTemplates.monitoredResourceDescriptorPathTemplate.render({ + project: project, + monitored_resource_descriptor: monitoredResourceDescriptor, + }); + } -function MetricServiceClientBuilder(gaxGrpc) { - if (!(this instanceof MetricServiceClientBuilder)) { - return new MetricServiceClientBuilder(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 projectPathTemplate.match(projectName).project; } - var metricServiceClient = gaxGrpc.load([{ - root: require('google-proto-files')('..'), - file: 'google/monitoring/v3/metric_service.proto' - }]); - extend(this, metricServiceClient.google.monitoring.v3); + /** + * Parse the metricDescriptorName from a metric_descriptor resource. + * + * @param {String} metricDescriptorName + * A fully-qualified path representing a metric_descriptor resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromMetricDescriptorName(metricDescriptorName) { + return metricDescriptorPathTemplate.match(metricDescriptorName).project; + } + + /** + * Parse the metricDescriptorName from a metric_descriptor resource. + * + * @param {String} metricDescriptorName + * A fully-qualified path representing a metric_descriptor resources. + * @returns {String} - A string representing the metric_descriptor. + */ + matchMetricDescriptorFromMetricDescriptorName(metricDescriptorName) { + return metricDescriptorPathTemplate.match(metricDescriptorName).metric_descriptor; + } + /** + * Parse the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. + * + * @param {String} monitoredResourceDescriptorName + * A fully-qualified path representing a monitored_resource_descriptor resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromMonitoredResourceDescriptorName(monitoredResourceDescriptorName) { + return monitoredResourceDescriptorPathTemplate.match(monitoredResourceDescriptorName).project; + } /** - * Build a new instance of {@link MetricServiceClient}. - * - * @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 monitoredResourceDescriptorName from a monitored_resource_descriptor resource. + * + * @param {String} monitoredResourceDescriptorName + * A fully-qualified path representing a monitored_resource_descriptor resources. + * @returns {String} - A string representing the monitored_resource_descriptor. */ - this.metricServiceClient = function(opts) { - return new MetricServiceClient(gaxGrpc, metricServiceClient, opts); - }; - extend(this.metricServiceClient, MetricServiceClient); + matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName(monitoredResourceDescriptorName) { + return monitoredResourceDescriptorPathTemplate.match(monitoredResourceDescriptorName).monitored_resource_descriptor; + } } -module.exports = MetricServiceClientBuilder; -module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS; -module.exports.ALL_SCOPES = ALL_SCOPES; \ No newline at end of file + + +module.exports = MetricServiceClient; diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 838498b3bc8..398ce6a3064 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -1,36 +1,39 @@ -/* - * 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. + 'use strict'; -var assert = require('assert'); -var monitoring = require('../src'); +const assert = require('assert'); + +const monitoringModule = require('../src'); var FAKE_STATUS_CODE = 1; var error = new Error(); error.code = FAKE_STATUS_CODE; -describe('GroupServiceClient', function() { - describe('listGroups', function() { - it('invokes listGroups without error', function(done) { - var client = monitoring.v3.group(); +describe('GroupServiceClient', () => { + describe('listGroups', () => { + it('invokes listGroups without error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -38,51 +41,62 @@ describe('GroupServiceClient', function() { var groupElement = {}; var group = [groupElement]; var expectedResponse = { - nextPageToken : nextPageToken, - group : group + nextPageToken: nextPageToken, + group: group, }; // Mock Grpc layer - client._listGroups = function(actualRequest, options, callback) { + client._innerApiCalls.listGroups = (actualRequest, options, callback) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.group); }; - client.listGroups(request, function(err, response) { + client.listGroups(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse.group); done(); }); }); - it('invokes listGroups with error', function(done) { - var client = monitoring.v3.group(); + it('invokes listGroups with error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._listGroups = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listGroups = mockSimpleGrpcMethod( + request, + null, + error + ); - client.listGroups(request, function(err, response) { + client.listGroups(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('getGroup', function() { - it('invokes getGroup without error', function(done) { - var client = monitoring.v3.group(); + describe('getGroup', () => { + it('invokes getGroup without error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -92,53 +106,67 @@ describe('GroupServiceClient', function() { var filter = 'filter-1274492040'; var isCluster = false; var expectedResponse = { - name : name2, - displayName : displayName, - parentName : parentName, - filter : filter, - isCluster : isCluster + name: name2, + displayName: displayName, + parentName: parentName, + filter: filter, + isCluster: isCluster, }; // Mock Grpc layer - client._getGroup = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.getGroup = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.getGroup(request, function(err, response) { + client.getGroup(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes getGroup with error', function(done) { - var client = monitoring.v3.group(); + it('invokes getGroup with error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._getGroup = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getGroup = mockSimpleGrpcMethod( + request, + null, + error + ); - client.getGroup(request, function(err, response) { + client.getGroup(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('createGroup', function() { - it('invokes createGroup without error', function(done) { - var client = monitoring.v3.group(); + describe('createGroup', () => { + it('invokes createGroup without error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var group = {}; var request = { - name : formattedName, - group : group + name: formattedName, + group: group, }; // Mock response @@ -148,53 +176,67 @@ describe('GroupServiceClient', function() { var filter = 'filter-1274492040'; var isCluster = false; var expectedResponse = { - name : name2, - displayName : displayName, - parentName : parentName, - filter : filter, - isCluster : isCluster + name: name2, + displayName: displayName, + parentName: parentName, + filter: filter, + isCluster: isCluster, }; // Mock Grpc layer - client._createGroup = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.createGroup = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.createGroup(request, function(err, response) { + client.createGroup(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes createGroup with error', function(done) { - var client = monitoring.v3.group(); + it('invokes createGroup with error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var group = {}; var request = { - name : formattedName, - group : group + name: formattedName, + group: group, }; // Mock Grpc layer - client._createGroup = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createGroup = mockSimpleGrpcMethod( + request, + null, + error + ); - client.createGroup(request, function(err, response) { + client.createGroup(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('updateGroup', function() { - it('invokes updateGroup without error', function(done) { - var client = monitoring.v3.group(); + describe('updateGroup', () => { + it('invokes updateGroup without error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var group = {}; var request = { - group : group + group: group, }; // Mock response @@ -204,75 +246,96 @@ describe('GroupServiceClient', function() { var filter = 'filter-1274492040'; var isCluster = false; var expectedResponse = { - name : name, - displayName : displayName, - parentName : parentName, - filter : filter, - isCluster : isCluster + name: name, + displayName: displayName, + parentName: parentName, + filter: filter, + isCluster: isCluster, }; // Mock Grpc layer - client._updateGroup = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.updateGroup(request, function(err, response) { + client.updateGroup(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes updateGroup with error', function(done) { - var client = monitoring.v3.group(); + it('invokes updateGroup with error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request var group = {}; var request = { - group : group + group: group, }; // Mock Grpc layer - client._updateGroup = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( + request, + null, + error + ); - client.updateGroup(request, function(err, response) { + client.updateGroup(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteGroup', function() { - it('invokes deleteGroup without error', function(done) { - var client = monitoring.v3.group(); + describe('deleteGroup', () => { + it('invokes deleteGroup without error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._deleteGroup = mockSimpleGrpcMethod(request); + client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod(request); - client.deleteGroup(request, function(err) { + client.deleteGroup(request, err => { assert.ifError(err); done(); }); }); - it('invokes deleteGroup with error', function(done) { - var client = monitoring.v3.group(); + it('invokes deleteGroup with error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._deleteGroup = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( + request, + null, + error + ); - client.deleteGroup(request, function(err) { + client.deleteGroup(request, err => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); done(); @@ -280,14 +343,17 @@ describe('GroupServiceClient', function() { }); }); - describe('listGroupMembers', function() { - it('invokes listGroupMembers without error', function(done) { - var client = monitoring.v3.group(); + describe('listGroupMembers', () => { + it('invokes listGroupMembers without error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -296,54 +362,65 @@ describe('GroupServiceClient', function() { var membersElement = {}; var members = [membersElement]; var expectedResponse = { - nextPageToken : nextPageToken, - totalSize : totalSize, - members : members + nextPageToken: nextPageToken, + totalSize: totalSize, + members: members, }; // Mock Grpc layer - client._listGroupMembers = function(actualRequest, options, callback) { + client._innerApiCalls.listGroupMembers = (actualRequest, options, callback) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.members); }; - client.listGroupMembers(request, function(err, response) { + client.listGroupMembers(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse.members); done(); }); }); - it('invokes listGroupMembers with error', function(done) { - var client = monitoring.v3.group(); + it('invokes listGroupMembers with error', done => { + var client = new monitoringModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.groupPath("[PROJECT]", "[GROUP]"); + var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._listGroupMembers = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listGroupMembers = mockSimpleGrpcMethod( + request, + null, + error + ); - client.listGroupMembers(request, function(err, response) { + client.listGroupMembers(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); }); -describe('MetricServiceClient', function() { - describe('listMonitoredResourceDescriptors', function() { - it('invokes listMonitoredResourceDescriptors without error', function(done) { - var client = monitoring.v3.metric(); +describe('MetricServiceClient', () => { + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -351,51 +428,62 @@ describe('MetricServiceClient', function() { var resourceDescriptorsElement = {}; var resourceDescriptors = [resourceDescriptorsElement]; var expectedResponse = { - nextPageToken : nextPageToken, - resourceDescriptors : resourceDescriptors + nextPageToken: nextPageToken, + resourceDescriptors: resourceDescriptors, }; // Mock Grpc layer - client._listMonitoredResourceDescriptors = function(actualRequest, options, callback) { + client._innerApiCalls.listMonitoredResourceDescriptors = (actualRequest, options, callback) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.resourceDescriptors); }; - client.listMonitoredResourceDescriptors(request, function(err, response) { + client.listMonitoredResourceDescriptors(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse.resourceDescriptors); done(); }); }); - it('invokes listMonitoredResourceDescriptors with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes listMonitoredResourceDescriptors with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._listMonitoredResourceDescriptors = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listMonitoredResourceDescriptors = mockSimpleGrpcMethod( + request, + null, + error + ); - client.listMonitoredResourceDescriptors(request, function(err, response) { + client.listMonitoredResourceDescriptors(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('getMonitoredResourceDescriptor', function() { - it('invokes getMonitoredResourceDescriptor without error', function(done) { - var client = monitoring.v3.metric(); + describe('getMonitoredResourceDescriptor', () => { + it('invokes getMonitoredResourceDescriptor without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + var formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -404,50 +492,64 @@ describe('MetricServiceClient', function() { var displayName = 'displayName1615086568'; var description = 'description-1724546052'; var expectedResponse = { - name : name2, - type : type, - displayName : displayName, - description : description + name: name2, + type: type, + displayName: displayName, + description: description, }; // Mock Grpc layer - client._getMonitoredResourceDescriptor = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.getMonitoredResourceDescriptor(request, function(err, response) { + client.getMonitoredResourceDescriptor(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes getMonitoredResourceDescriptor with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes getMonitoredResourceDescriptor with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.monitoredResourceDescriptorPath("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]"); + var formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._getMonitoredResourceDescriptor = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); - client.getMonitoredResourceDescriptor(request, function(err, response) { + client.getMonitoredResourceDescriptor(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('listMetricDescriptors', function() { - it('invokes listMetricDescriptors without error', function(done) { - var client = monitoring.v3.metric(); + describe('listMetricDescriptors', () => { + it('invokes listMetricDescriptors without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -455,51 +557,62 @@ describe('MetricServiceClient', function() { var metricDescriptorsElement = {}; var metricDescriptors = [metricDescriptorsElement]; var expectedResponse = { - nextPageToken : nextPageToken, - metricDescriptors : metricDescriptors + nextPageToken: nextPageToken, + metricDescriptors: metricDescriptors, }; // Mock Grpc layer - client._listMetricDescriptors = function(actualRequest, options, callback) { + client._innerApiCalls.listMetricDescriptors = (actualRequest, options, callback) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.metricDescriptors); }; - client.listMetricDescriptors(request, function(err, response) { + client.listMetricDescriptors(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse.metricDescriptors); done(); }); }); - it('invokes listMetricDescriptors with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes listMetricDescriptors with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._listMetricDescriptors = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listMetricDescriptors = mockSimpleGrpcMethod( + request, + null, + error + ); - client.listMetricDescriptors(request, function(err, response) { + client.listMetricDescriptors(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('getMetricDescriptor', function() { - it('invokes getMetricDescriptor without error', function(done) { - var client = monitoring.v3.metric(); + describe('getMetricDescriptor', () => { + it('invokes getMetricDescriptor without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); var request = { - name : formattedName + name: formattedName, }; // Mock response @@ -509,53 +622,67 @@ describe('MetricServiceClient', function() { var description = 'description-1724546052'; var displayName = 'displayName1615086568'; var expectedResponse = { - name : name2, - type : type, - unit : unit, - description : description, - displayName : displayName + name: name2, + type: type, + unit: unit, + description: description, + displayName: displayName, }; // Mock Grpc layer - client._getMetricDescriptor = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.getMetricDescriptor(request, function(err, response) { + client.getMetricDescriptor(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes getMetricDescriptor with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes getMetricDescriptor with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._getMetricDescriptor = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); - client.getMetricDescriptor(request, function(err, response) { + client.getMetricDescriptor(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('createMetricDescriptor', function() { - it('invokes createMetricDescriptor without error', function(done) { - var client = monitoring.v3.metric(); + describe('createMetricDescriptor', () => { + it('invokes createMetricDescriptor without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var metricDescriptor = {}; var request = { - name : formattedName, - metricDescriptor : metricDescriptor + name: formattedName, + metricDescriptor: metricDescriptor, }; // Mock response @@ -565,77 +692,98 @@ describe('MetricServiceClient', function() { var description = 'description-1724546052'; var displayName = 'displayName1615086568'; var expectedResponse = { - name : name2, - type : type, - unit : unit, - description : description, - displayName : displayName + name: name2, + type: type, + unit: unit, + description: description, + displayName: displayName, }; // Mock Grpc layer - client._createMetricDescriptor = mockSimpleGrpcMethod(request, expectedResponse); + client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse + ); - client.createMetricDescriptor(request, function(err, response) { + client.createMetricDescriptor(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); done(); }); }); - it('invokes createMetricDescriptor with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes createMetricDescriptor with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var metricDescriptor = {}; var request = { - name : formattedName, - metricDescriptor : metricDescriptor + name: formattedName, + metricDescriptor: metricDescriptor, }; // Mock Grpc layer - client._createMetricDescriptor = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); - client.createMetricDescriptor(request, function(err, response) { + client.createMetricDescriptor(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('deleteMetricDescriptor', function() { - it('invokes deleteMetricDescriptor without error', function(done) { - var client = monitoring.v3.metric(); + describe('deleteMetricDescriptor', () => { + it('invokes deleteMetricDescriptor without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._deleteMetricDescriptor = mockSimpleGrpcMethod(request); + client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod(request); - client.deleteMetricDescriptor(request, function(err) { + client.deleteMetricDescriptor(request, err => { assert.ifError(err); done(); }); }); - it('invokes deleteMetricDescriptor with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes deleteMetricDescriptor with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.metricDescriptorPath("[PROJECT]", "[METRIC_DESCRIPTOR]"); + var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); var request = { - name : formattedName + name: formattedName, }; // Mock Grpc layer - client._deleteMetricDescriptor = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); - client.deleteMetricDescriptor(request, function(err) { + client.deleteMetricDescriptor(request, err => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); done(); @@ -643,20 +791,23 @@ describe('MetricServiceClient', function() { }); }); - describe('listTimeSeries', function() { - it('invokes listTimeSeries without error', function(done) { - var client = monitoring.v3.metric(); + describe('listTimeSeries', () => { + it('invokes listTimeSeries without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var filter = 'filter-1274492040'; var interval = {}; - var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; + var view = 'FULL'; var request = { - name : formattedName, - filter : filter, - interval : interval, - view : view + name: formattedName, + filter: filter, + interval: interval, + view: view, }; // Mock response @@ -664,85 +815,103 @@ describe('MetricServiceClient', function() { var timeSeriesElement = {}; var timeSeries = [timeSeriesElement]; var expectedResponse = { - nextPageToken : nextPageToken, - timeSeries : timeSeries + nextPageToken: nextPageToken, + timeSeries: timeSeries, }; // Mock Grpc layer - client._listTimeSeries = function(actualRequest, options, callback) { + client._innerApiCalls.listTimeSeries = (actualRequest, options, callback) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.timeSeries); }; - client.listTimeSeries(request, function(err, response) { + client.listTimeSeries(request, (err, response) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse.timeSeries); done(); }); }); - it('invokes listTimeSeries with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes listTimeSeries with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var filter = 'filter-1274492040'; var interval = {}; - var view = monitoring.v3.types.ListTimeSeriesRequest.TimeSeriesView.FULL; + var view = 'FULL'; var request = { - name : formattedName, - filter : filter, - interval : interval, - view : view + name: formattedName, + filter: filter, + interval: interval, + view: view, }; // Mock Grpc layer - client._listTimeSeries = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listTimeSeries = mockSimpleGrpcMethod( + request, + null, + error + ); - client.listTimeSeries(request, function(err, response) { + client.listTimeSeries(request, (err, response) => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); done(); }); }); }); - describe('createTimeSeries', function() { - it('invokes createTimeSeries without error', function(done) { - var client = monitoring.v3.metric(); + describe('createTimeSeries', () => { + it('invokes createTimeSeries without error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var timeSeries = []; var request = { - name : formattedName, - timeSeries : timeSeries + name: formattedName, + timeSeries: timeSeries, }; // Mock Grpc layer - client._createTimeSeries = mockSimpleGrpcMethod(request); + client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod(request); - client.createTimeSeries(request, function(err) { + client.createTimeSeries(request, err => { assert.ifError(err); done(); }); }); - it('invokes createTimeSeries with error', function(done) { - var client = monitoring.v3.metric(); + it('invokes createTimeSeries with error', done => { + var client = new monitoringModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); // Mock request - var formattedName = client.projectPath("[PROJECT]"); + var formattedName = client.projectPath('[PROJECT]'); var timeSeries = []; var request = { - name : formattedName, - timeSeries : timeSeries + name: formattedName, + timeSeries: timeSeries, }; // Mock Grpc layer - client._createTimeSeries = mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( + request, + null, + error + ); - client.createTimeSeries(request, function(err) { + client.createTimeSeries(request, err => { assert(err instanceof Error); assert.equal(err.code, FAKE_STATUS_CODE); done(); From 341e6c94efc61ee3f1e487b2ed13caaa181a4c3f Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 19 Oct 2017 07:09:30 -0700 Subject: [PATCH 052/422] Add Uptime Check Service, Migrate Repository (#2) --- .../google-cloud-monitoring/.appveyor.yml | 23 + .../.circleci/config.yml | 216 +++++ .../.circleci/key.json.enc | Bin 0 -> 2368 bytes .../.cloud-repo-tools.json | 23 + .../google-cloud-monitoring/.eslintignore | 3 + .../google-cloud-monitoring/.eslintrc.yml | 13 + packages/google-cloud-monitoring/.gitignore | 10 + packages/google-cloud-monitoring/.jsdoc.js | 45 + packages/google-cloud-monitoring/.mailmap | 6 + packages/google-cloud-monitoring/.nycrc | 26 + .../google-cloud-monitoring/.prettierignore | 3 + packages/google-cloud-monitoring/.prettierrc | 8 + .../CODE_OF_CONDUCT.md | 43 + packages/google-cloud-monitoring/CONTRIBUTORS | 17 + packages/google-cloud-monitoring/LICENSE | 202 +++++ packages/google-cloud-monitoring/README.md | 214 +++-- packages/google-cloud-monitoring/package.json | 58 +- .../protos/google/monitoring/v3/uptime.proto | 215 +++++ .../google/monitoring/v3/uptime_service.proto | 193 +++++ .../samples/.eslintrc.yml | 3 + .../google-cloud-monitoring/samples/README.md | 46 +- .../samples/package.json | 30 +- .../samples/quickstart.js | 37 +- packages/google-cloud-monitoring/src/index.js | 21 +- .../v3/doc/google/monitoring/v3/doc_uptime.js | 304 +++++++ .../v3/doc/google/protobuf/doc_field_mask.js | 230 +++++ .../src/v3/group_service_client.js | 21 +- .../google-cloud-monitoring/src/v3/index.js | 2 + .../src/v3/metric_service_client.js | 67 +- .../src/v3/uptime_check_service_client.js | 816 ++++++++++++++++++ .../uptime_check_service_client_config.json | 56 ++ .../system-test/.eslintrc.yml | 6 + .../metric_service_smoke_test.js | 18 +- .../test/.eslintrc.yml | 5 + .../google-cloud-monitoring/test/gapic-v3.js | 444 +++++++++- 35 files changed, 3207 insertions(+), 217 deletions(-) create mode 100644 packages/google-cloud-monitoring/.appveyor.yml create mode 100644 packages/google-cloud-monitoring/.circleci/config.yml create mode 100644 packages/google-cloud-monitoring/.circleci/key.json.enc create mode 100644 packages/google-cloud-monitoring/.cloud-repo-tools.json create mode 100644 packages/google-cloud-monitoring/.eslintignore create mode 100644 packages/google-cloud-monitoring/.eslintrc.yml create mode 100644 packages/google-cloud-monitoring/.gitignore create mode 100644 packages/google-cloud-monitoring/.jsdoc.js create mode 100644 packages/google-cloud-monitoring/.mailmap create mode 100644 packages/google-cloud-monitoring/.nycrc create mode 100644 packages/google-cloud-monitoring/.prettierignore create mode 100644 packages/google-cloud-monitoring/.prettierrc create mode 100644 packages/google-cloud-monitoring/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-monitoring/CONTRIBUTORS create mode 100644 packages/google-cloud-monitoring/LICENSE create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto create mode 100644 packages/google-cloud-monitoring/samples/.eslintrc.yml create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js create mode 100644 packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json create mode 100644 packages/google-cloud-monitoring/system-test/.eslintrc.yml rename packages/google-cloud-monitoring/{smoke-test => system-test}/metric_service_smoke_test.js (85%) create mode 100644 packages/google-cloud-monitoring/test/.eslintrc.yml diff --git a/packages/google-cloud-monitoring/.appveyor.yml b/packages/google-cloud-monitoring/.appveyor.yml new file mode 100644 index 00000000000..babe1d587f4 --- /dev/null +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml new file mode 100644 index 00000000000..9cd58f00c87 --- /dev/null +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -0,0 +1,216 @@ +--- +# "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 + npm link + - run: + name: Link the module being tested to the samples. + command: | + cd samples/ + npm link @google-cloud/monitoring + npm install + 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 link @google-cloud/monitoring + npm install + cd .. + - run: + name: Run sample tests. + command: npm run samples-test + environment: + GCLOUD_PROJECT: long-door-651 + GOOGLE_APPLICATION_CREDENTIALS: /var/monitoring/.circleci/key.json + - run: + name: Remove unencrypted key. + command: rm .circleci/key.json + when: always + working_directory: /var/monitoring/ + + 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: Install modules and dependencies. + command: npm install + - run: + name: Run system tests. + command: npm run system-test + environment: + GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json + SMOKE_TEST_PROJECT: long-door-651 + - 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/packages/google-cloud-monitoring/.circleci/key.json.enc b/packages/google-cloud-monitoring/.circleci/key.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..72559a5251f74245329170fdba83bacccfde04a0 GIT binary patch literal 2368 zcmV-G3BUGJVQh3|WM5xs5Wvrzg%}{96+WNJ3%jnaHc{Bf3ni3RHL&RHZCPQ@0t8^NE9HF?F4{5|Cgu4${N^_(v;fshb(f_!+d z8}i^b_#J&=)GK6Wrp9&h*tAec7G1tf$9*Pk9QR0h#x1zx=Mb*1)x|ODr>NYB__Di-l96C(=)CY7YdjMOE zK%c!mIFu#!BVN*<*#AQ1wvhJ$BbAkWDYuU8ouB!O)3tj~OwB<`fO`6zN`dH$S6hw=fK$SSn zb7U5fGZ09+3)LO}5pNRo!&daxH85Ko^S<0Fr$I#9zVLxb(H@DVJYP_n7ok=aN3DTx z)hanYF^l4-(tp-xTZ%D-vq~WQw5$=5*4q#`f zhJ4ojED~0$&0?D(*|EPRgMVWFc|Xkp>ez8kb1G>mDl54#3H^cb87U=Hi>D*ZG@(UgZ2oB5)}Dk}ZL%pJsZgs~nO` z$&8Ln41#K|sVjmK*7LI0XgNumH6XjT11sEj1_e-j=(D-J5Xzb1Q^1s1IyQ#|ffEHN zreaR07gJ6jbweYJ?HKN>?WX_-to8@*TWLNAOXex z7ms9@o5SNTpKWYU@R~wzhu`l^eMQgVXh`L!Z47K?EEz>A^frb+wwnWavcuX(prB17 zb6?>kh2Oc8(9?Q1xIb{hULg1cKeB1LTAi#>>+>itj(3J!Zu-P9f+Fx*XBY#QCV%)S zhaSP)osbK=PR_&=C519Ncp>S-Gm0p%NCqgU>%Tj$$0_^_Knz>A;X0I87#dd9NWJ-B z6k_Y?DWBa?{!dYk9109?+#HY0cCX#0RZ@2C6QWhO;2OqXuT!IPylSGo;xyixI5?aS zkiMC95lQWV`U^5P?YJL+42x)H51aCn02Kp@!sLfQ(h8hoo<_*rb8D*ARLNs3QtiaU zq0Xr7*f(9#Y;^1NY#wnygjh%6M7JgZ*T)fcJ((MYQ#E$Gd-M;t!DcpUEQ2#!n>lfI zZ@eC;DsuBdEI8JuthPzBnen&`zJD%O#kIzj>NE=L>8ts(ih0HAt6w+cjfJhnIDr7w zw|0C1ADp9PJObz=Fh%PzFqu_;<&c|m>HEwF1}h~L+Zk6SxGli4)t)N+lcAGp1BLii z5>&`2k8>7B=qpx%SV&*+NBvByxUrBJ=qfB`pm63%cpYtO$s#@!#C??_3U$Z82DhO zyMjhGNysi;q>S3#u!|?*ZqsXeT7%z#b2xMBF9Byy0pnj`tBnX=22hJ(QdsAo2nEe)x}mXzjp_>c^Pw6hsgsMJ;&pSs#lgHzA3$RE z5Yi#jwfNNdRif_Pyqo<<&j?G2@Ulscw4a2{ z&?sP#DIzqTR&3NA${w(L98gAJOP4B9-kf}jS9Wzco$*$tOF~bhQvWnZ78NHZvnKR;wP}Xv zHjh9Oi30z<3Wt;7h!%W?mhFr4T!}^Zgv;J^iFWd6hB%v6|9rE{hL|$6a;fu2#iahq zso=_+Q`x)y^D+>r^jL|-!7yI$sH)AJ(Q|Kb{%!SW%rrj)t*@oEyxkHFMsNdNuIUe< zZ`H9ho3sFBbV(4pdcF2%1;wGSNN+>YDEp%<8eag;JwBtll7FkvHVVqK%vK=&*(pmAX z!>3^y?B>5B=Cktk^j9CblQGw6X`i%vR}y>lOGHR9ll;)RfYz|`@=$dtN0nAaix(`; zy*l~km=wMi*nK9$&>`qdNY~Wa<~C*l9BQSkdZ0bYRT^q?@e8r7h(nGeDSgjhhEG^! z1Yj!~ofjGSA-{mywmG}^-!>hw=26e}m>rXgTR&&0WqSXzfVV7lxjU0q_T_5mbD`WS z59&E15HWD$xN5Hly{diEFPY5-v&}TMu00 Bill Prin +Jason Dobry Jason Dobry +Jason Dobry Jason Dobry +Luke Sneeringer Luke Sneeringer +Stephen Sawchuk Stephen Sawchuk +Stephen Sawchuk Stephen Sawchuk diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc new file mode 100644 index 00000000000..a1a8e6920ce --- /dev/null +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.prettierignore b/packages/google-cloud-monitoring/.prettierignore new file mode 100644 index 00000000000..f6fac98b0a8 --- /dev/null +++ b/packages/google-cloud-monitoring/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/packages/google-cloud-monitoring/.prettierrc b/packages/google-cloud-monitoring/.prettierrc new file mode 100644 index 00000000000..df6eac07446 --- /dev/null +++ b/packages/google-cloud-monitoring/.prettierrc @@ -0,0 +1,8 @@ +--- +bracketSpacing: false +printWidth: 80 +semi: true +singleQuote: true +tabWidth: 2 +trailingComma: es5 +useTabs: false diff --git a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md b/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/CONTRIBUTORS b/packages/google-cloud-monitoring/CONTRIBUTORS new file mode 100644 index 00000000000..7d15cc106b7 --- /dev/null +++ b/packages/google-cloud-monitoring/CONTRIBUTORS @@ -0,0 +1,17 @@ +# The names of individuals who have contributed to this project. +# +# Names are formatted as: +# name +# +Ace Nassri +Bill Prin +Dave Gramlich +Ernest Landrito +Evawere Ogbe +Jason Dobry +Jun Mukai +Luke Sneeringer +Song Wang +Stephen Sawchuk +Takashi Matsuo +Tim Swast diff --git a/packages/google-cloud-monitoring/LICENSE b/packages/google-cloud-monitoring/LICENSE new file mode 100644 index 00000000000..7a4a3ea2424 --- /dev/null +++ b/packages/google-cloud-monitoring/LICENSE @@ -0,0 +1,202 @@ + + 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 [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. + 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. \ No newline at end of file diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 97d1438bd9a..6db486fe0fd 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -1,75 +1,157 @@ -# Node.js Clients for Stackdriver Monitoring API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-node#versioning)) +Google Cloud Platform logo -[Stackdriver Monitoring API][Product Documentation]: Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages. +# Stackdriver Monitoring: Node.js Client -- [Client Library Documentation][] -- [Product Documentation][] +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-monitoring.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-monitoring) +[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-monitoring?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-monitoring) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) -## Quick Start -In order to use this library, you first need to go through the following steps: +> Node.js idiomatic client for [Monitoring][product-docs]. -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -2. [Enable the Stackdriver Monitoring API.](https://console.cloud.google.com/apis/api/monitoring) -3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) +[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. -### Installation -``` -$ npm install --save @google-cloud/monitoring -``` +* [Monitoring Node.js Client API Reference][client-docs] +* [Monitoring Documentation][product-docs] + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [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) + +## Quickstart + +### Before you begin + +1. Select or create a Cloud Platform project. + + [Go to the projects page][projects] + +1. Enable billing for your project. + + [Enable billing][billing] + +1. Enable the Stackdriver Monitoring API. + + [Enable the API][enable_api] + +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +[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=monitoring.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started + +### Installing the client library + + npm install --save @google-cloud/monitoring + +### Using the client library -### Preview -#### MetricServiceClient -```js - var monitoring = require('@google-cloud/monitoring'); - - var client = monitoring.metric({ - // optional auth parameters. - }); - - // Iterate over all elements. - var formattedName = client.projectPath(projectId); - - client.listMonitoredResourceDescriptors({name: formattedName}).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 formattedName = client.projectPath(projectId); - - - 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({name: formattedName}, options) - .then(callback) - .catch(function(err) { - console.error(err); - }); +```javascript +// Imports the Google Cloud client library +const Monitoring = require('@google-cloud/monitoring'); + +// Your Google Cloud Platform project ID +const projectId = 'YOUR_PROJECT_ID'; + +// Creates a client +const client = new Monitoring.MetricServiceClient(); + +// Prepares an individual data point +const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000, + }, + }, + value: { + // The amount of sales + doubleValue: 123.45, + }, +}; + +// Prepares the time series request +const request = { + name: client.projectPath(projectId), + timeSeries: [ + { + // Ties the data point to a custom metric + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh', + }, + }, + resource: { + type: 'global', + labels: { + project_id: projectId, + }, + }, + points: [dataPoint], + }, + ], +}; + +// Writes time series data +client + .createTimeSeries(request) + .then(results => { + console.log(`Done writing time series data.`, results[0]); + }) + .catch(err => { + console.error('ERROR:', err); + }); ``` -### Next Steps -- Read the [Client Library Documentation][] for Stackdriver Monitoring API to see other available methods on the client. -- Read the [Stackdriver Monitoring API Product documentation][Product Documentation] to learn more about the product and see How-to Guides. -- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/README.md) to see the full list of Cloud APIs that we cover. +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/blob/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | +| Uptime Config | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | + +The [Monitoring 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 in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + +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) -[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-node/#/docs/monitoring -[Product Documentation]: https://cloud.google.com/monitoring \ No newline at end of file +[client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ +[product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 0f003e8139f..e2b75a0a4fd 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,9 +1,13 @@ { - "repository": "GoogleCloudPlatform/google-cloud-node", "name": "@google-cloud/monitoring", + "description": "Stackdriver Monitoring API client for Node.js", "version": "0.3.0", + "license": "Apache-2.0", "author": "Google Inc", - "description": "Stackdriver Monitoring API client for Node.js", + "engines": { + "node": ">=4.0.0" + }, + "repository": "googleapis/nodejs-monitoring", "main": "src/index.js", "files": [ "src", @@ -23,6 +27,32 @@ "monitoring", "Stackdriver Monitoring API" ], + "contributors": [ + "Ace Nassri ", + "Bill Prin ", + "Dave Gramlich ", + "Ernest Landrito ", + "Evawere Ogbe ", + "Jason Dobry ", + "Jun Mukai ", + "Luke Sneeringer ", + "Song Wang ", + "Stephen Sawchuk ", + "Takashi Matsuo ", + "Tim Swast ", + "greenkeeper[bot] " + ], + "scripts": { + "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", + "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/", + "prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", + "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", + "system-test": "mocha system-test/*.js --timeout 5000", + "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", + "test": "repo-tools test run --cmd npm -- run cover" + }, "dependencies": { "extend": "^3.0", "google-gax": "^0.14.2", @@ -30,15 +60,19 @@ "lodash.union": "^4.6.0" }, "devDependencies": { - "mocha": "^3.2.0" - }, - "scripts": { - "publish-module": "node ../../scripts/publish.js monitoring", - "smoke-test": "mocha smoke-test/*.js --timeout 5000", - "test": "mocha test/*.js" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=4.0.0" + "@google-cloud/nodejs-repo-tools": "^2.0.10", + "async": "^2.5.0", + "codecov": "^2.3.1", + "eslint": "^4.9.0", + "eslint-config-prettier": "^2.6.0", + "eslint-plugin-node": "^5.2.0", + "eslint-plugin-prettier": "^2.3.1", + "ink-docstrap": "^1.3.0", + "intelli-espower-loader": "^1.0.1", + "jsdoc": "^3.5.5", + "mocha": "^4.0.1", + "nyc": "^11.2.1", + "power-assert": "^1.4.4", + "prettier": "^1.7.4" } } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto new file mode 100644 index 00000000000..bee8d40b5eb --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -0,0 +1,215 @@ +// 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.monitoring.v3; + +import "google/api/monitored_resource.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "UptimeProto"; +option java_package = "com.google.monitoring.v3"; + + +// This message configures which resources and services to monitor for +// availability. +message UptimeCheckConfig { + // The resource submessage for group checks. It can be used instead of a + // monitored resource, when multiple resources are being monitored. + message ResourceGroup { + // The group of resources being monitored. Should be only the + // group_id, not projects//groups/. + string group_id = 1; + + // The resource type of the group members. + GroupResourceType resource_type = 2; + } + + // Information involved in an HTTP/HTTPS uptime check request. + message HttpCheck { + // A type of authentication to perform against the specified resource or URL + // that uses username and password. + // Currently, only Basic authentication is supported in Uptime Monitoring. + message BasicAuthentication { + // The username to authenticate. + string username = 1; + + // The password to authenticate. + string password = 2; + } + + // If true, use HTTPS instead of HTTP to run the check. + bool use_ssl = 1; + + // The path to the page to run the check against. Will be combined with the + // host (specified within the MonitoredResource) and port to construct the + // full URL. Optional (defaults to "/"). + string path = 2; + + // The port to the page to run the check against. Will be combined with host + // (specified within the MonitoredResource) and path to construct the full + // URL. Optional (defaults to 80 without SSL, or 443 with SSL). + int32 port = 3; + + // The authentication information. Optional when creating an HTTP check; + // defaults to empty. + BasicAuthentication auth_info = 4; + + // Boolean specifiying whether to encrypt the header information. + // Encryption should be specified for any headers related to authentication + // that you do not wish to be seen when retrieving the configuration. The + // server will be responsible for encrypting the headers. + // On Get/List calls, if mask_headers is set to True then the headers + // will be obscured with ******. + bool mask_headers = 5; + + // The list of headers to send as part of the uptime check request. + // If two headers have the same key and different values, they should + // be entered as a single header, with the value being a comma-separated + // list of all the desired values as described at + // https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). + // Entering two separate headers with the same key in a Create call will + // cause the first to be overwritten by the second. + map headers = 6; + } + + // Information required for a TCP uptime check request. + message TcpCheck { + // The port to the page to run the check against. Will be combined with host + // (specified within the MonitoredResource) to construct the full URL. + // Required. + int32 port = 1; + } + + // Used to perform string matching. Currently, this matches on the exact + // content. In the future, it can be expanded to allow for regular expressions + // and more complex matching. + message ContentMatcher { + // String content to match + string content = 1; + } + + // A unique resource name for this UptimeCheckConfig. The format is: + // + // + // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // + // This field should be omitted when creating the uptime check configuration; + // on create, the resource name is assigned by the server and included in the + // response. + string name = 1; + + // A human-friendly name for the uptime check configuration. The display name + // should be unique within a Stackdriver Account in order to make it easier + // to identify; however, uniqueness is not enforced. Required. + string display_name = 2; + + // The resource the check is checking. Required. + oneof resource { + // The monitored resource associated with the configuration. + google.api.MonitoredResource monitored_resource = 3; + + // The group resource associated with the configuration. + ResourceGroup resource_group = 4; + } + + // The type of uptime check request. + oneof check_request_type { + // Contains information needed to make an HTTP or HTTPS check. + HttpCheck http_check = 5; + + // Contains information needed to make a TCP check. + TcpCheck tcp_check = 6; + } + + // How often the uptime check is performed. + // Currently, only 1, 5, 10, and 15 minutes are supported. Required. + google.protobuf.Duration period = 7; + + // The maximum amount of time to wait for the request to complete (must be + // between 1 and 60 seconds). Required. + google.protobuf.Duration timeout = 8; + + // The expected content on the page the check is run against. + // Currently, only the first entry in the list is supported, and other entries + // will be ignored. The server will look for an exact match of the string in + // the page response's content. This field is optional and should only be + // specified if a content match is required. + repeated ContentMatcher content_matchers = 9; + + // The list of regions from which the check will be run. + // If this field is specified, enough regions to include a minimum of + // 3 locations must be provided, or an error message is returned. + // Not specifying this field will result in uptime checks running from all + // regions. + repeated UptimeCheckRegion selected_regions = 10; +} + +// Contains the region, location, and list of IP +// addresses where checkers in the location run from. +message UptimeCheckIp { + // A broad region category in which the IP address is located. + UptimeCheckRegion region = 1; + + // A more specific location within the region that typically encodes + // a particular city/town/metro (and its containing state/province or country) + // within the broader umbrella region category. + string location = 2; + + // The IP address from which the uptime check originates. This is a full + // IP address (not an IP address range). Most IP addresses, as of this + // publication, are in IPv4 format; however, one should not rely on the + // IP addresses being in IPv4 format indefinitely and should support + // interpreting this field in either IPv4 or IPv6 format. + string ip_address = 3; +} + +// The regions from which an uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + +// The supported resource types that can be used as values of +// group_resource.resource_type. gae_app and uptime_url are not allowed +// because group checks on App Engine modules and URLs are not allowed. +enum GroupResourceType { + // Default value (not valid). + RESOURCE_TYPE_UNSPECIFIED = 0; + + // A group of instances (could be either GCE or AWS_EC2). + INSTANCE = 1; + + // A group of AWS load balancers. + AWS_ELB_LOAD_BALANCER = 2; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto new file mode 100644 index 00000000000..66982c32039 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -0,0 +1,193 @@ +// 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.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/monitoring/v3/uptime.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "UptimeServiceProto"; +option java_package = "com.google.monitoring.v3"; + + +// The UptimeCheckService API is used to manage (list, create, delete, edit) +// uptime check configurations in the Stackdriver Monitoring product. An uptime +// check is a piece of configuration that determines which resources and +// services to monitor for availability. These configurations can also be +// configured interactively by navigating to the [Cloud Console] +// (http://console.cloud.google.com), selecting the appropriate project, +// clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, +// and then clicking on "Uptime". +service UptimeCheckService { + // Lists the existing valid uptime check configurations for the project, + // leaving out any invalid configurations. + rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*}/uptimeCheckConfigs" + }; + } + + // Gets a single uptime check configuration. + rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { + option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + } + + // Creates a new uptime check configuration. + rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { + option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + } + + // Updates an uptime check configuration. You can either replace the entire + // configuration with a new one or replace only certain fields in the current + // configuration by specifying the fields to be updated via `"updateMask"`. + // Returns the updated configuration. + rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { + option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + } + + // Deletes an uptime check configuration. Note that this method will fail + // if the uptime check configuration is referenced by an alert policy or + // other dependent configs that would be rendered invalid by the deletion. + rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + } + + // Returns the list of IPs that checkers run from + rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) + returns (ListUptimeCheckIpsResponse) { + option (google.api.http) = { + get: "/v3/uptimeCheckIps" + }; + } +} + +// The protocol for the `ListUptimeCheckConfigs` request. +message ListUptimeCheckConfigsRequest { + // The project whose uptime check configurations are listed. The format is + // + // `projects/[PROJECT_ID]`. + string parent = 1; + + // The maximum number of results to return in a single response. The server + // may further constrain the maximum number of results returned in a single + // page. If the page_size is <=0, the server will decide the number of results + // to be returned. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return more results from the previous method call. + string page_token = 4; +} + +// The protocol for the `ListUptimeCheckConfigs` response. +message ListUptimeCheckConfigsResponse { + // The returned uptime check configurations. + repeated UptimeCheckConfig uptime_check_configs = 1; + + // This field represents the pagination token to retrieve the next page of + // results. If the value is empty, it means no further results for the + // request. To retrieve the next page of results, the value of the + // next_page_token is passed to the subsequent List method call (in the + // request message's page_token field). + string next_page_token = 2; +} + +// The protocol for the `GetUptimeCheckConfig` request. +message GetUptimeCheckConfigRequest { + // The uptime check configuration to retrieve. The format is + // + // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + string name = 1; +} + +// The protocol for the `CreateUptimeCheckConfig` request. +message CreateUptimeCheckConfigRequest { + // The project in which to create the uptime check. The format is: + // + // `projects/[PROJECT_ID]`. + string parent = 1; + + // The new uptime check configuration. + UptimeCheckConfig uptime_check_config = 2; +} + +// The protocol for the `UpdateUptimeCheckConfig` request. +message UpdateUptimeCheckConfigRequest { + // The uptime check configuration to update. The format is + // + // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + string name = 1; + + // Optional. If present, only the listed fields in the current uptime check + // configuration are updated with values from the new configuration. If this + // field is empty, then the current configuration is completely replaced with + // the new configuration. + google.protobuf.FieldMask update_mask = 2; + + // Required. If an `"updateMask"` has been specified, this field gives + // the values for the set of fields mentioned in the `"updateMask"`. If an + // `"updateMask"` has not been given, this uptime check configuration replaces + // the current configuration. If a field is mentioned in `"updateMask`" but + // the corresonding field is omitted in this partial uptime check + // configuration, it has the effect of deleting/clearing the field from the + // configuration on the server. + UptimeCheckConfig uptime_check_config = 3; +} + +// The protocol for the `DeleteUptimeCheckConfig` request. +message DeleteUptimeCheckConfigRequest { + // The uptime check configuration to delete. The format is + // + // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + string name = 1; +} + +// The protocol for the `ListUptimeCheckIps` request. +message ListUptimeCheckIpsRequest { + // The maximum number of results to return in a single response. The server + // may further constrain the maximum number of results returned in a single + // page. If the page_size is <=0, the server will decide the number of results + // to be returned. + // NOTE: this field is not yet implemented + int32 page_size = 2; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return more results from the previous method call. + // NOTE: this field is not yet implemented + string page_token = 3; +} + +// The protocol for the `ListUptimeCheckIps` response. +message ListUptimeCheckIpsResponse { + // The returned list of IP addresses (including region and location) that the + // checkers run from. + repeated UptimeCheckIp uptime_check_ips = 1; + + // This field represents the pagination token to retrieve the next page of + // results. If the value is empty, it means no further results for the + // request. To retrieve the next page of results, the value of the + // next_page_token is passed to the subsequent List method call (in the + // request message's page_token field). + // NOTE: this field is not yet implemented + string next_page_token = 2; +} diff --git a/packages/google-cloud-monitoring/samples/.eslintrc.yml b/packages/google-cloud-monitoring/samples/.eslintrc.yml new file mode 100644 index 00000000000..282535f55f6 --- /dev/null +++ b/packages/google-cloud-monitoring/samples/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +rules: + no-console: off diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 47cacb76888..9fb9892c045 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -8,33 +8,22 @@ ## Table of Contents -* [Setup](#setup) +* [Before you begin](#before-you-begin) * [Samples](#samples) * [Metrics](#metrics) * [Uptime Config](#uptime-config) -* [Running the tests](#running-the-tests) -## Setup +## Before you begin -1. Read [Prerequisites][prereq] and [How to run a sample][run] first. -1. Install dependencies: - - With **npm**: - - npm install - - With **yarn**: - - yarn install - -[prereq]: ../README.md#prerequisites -[run]: ../README.md#how-to-run-a-sample +Before running the samples, make sure you've followed the steps in the +[Before you begin section](../README.md#before-you-begin) of the client +library's README. ## Samples ### Metrics -View the [documentation][metrics_0_docs] or the [source code][metrics_0_code]. +View the [source code][metrics_0_code]. __Usage:__ `node metrics.js --help` @@ -60,7 +49,7 @@ Commands: Options: --version Show version number [boolean] --help Show help [boolean] - --projectId, -p [string] + --projectId, -p [string] [default: "nodejs-docs-samples"] Examples: node metrics.js create @@ -83,7 +72,7 @@ For more information, see https://cloud.google.com/monitoring/docs ### Uptime Config -View the [documentation][uptime_1_docs] or the [source code][uptime_1_code]. +View the [source code][uptime_1_code]. __Usage:__ `node uptime.js --help` @@ -98,11 +87,13 @@ Commands: Options: --version Show version number [boolean] --help Show help [boolean] - --projectId, -p [string] + --projectId, -p [string] [default: "nodejs-docs-samples"] Examples: node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance. node uptime.js list List all uptime check configs. + node uptime.js list "resource.type = gce_instance AND List all uptime check configs for a specific GCE + resource.label.instance_id = mongodb" instance. node uptime.js list-ips node uptime.js get My-Uptime-Check node uptime.js delete My-Uptime-Check @@ -112,18 +103,3 @@ For more information, see https://cloud.google.com/monitoring/uptime-checks/ [uptime_1_docs]: https://cloud.google.com/monitoring/docs [uptime_1_code]: uptime.js - - -## Running the tests - -1. Set the **GCLOUD_PROJECT** and **GOOGLE_APPLICATION_CREDENTIALS** environment variables. - -1. Run the tests: - - With **npm**: - - npm test - - With **yarn**: - - yarn test diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index f1278f12b51..3d503b18cf7 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -4,16 +4,11 @@ "private": true, "license": "Apache-2.0", "author": "Google Inc.", - "repository": { - "type": "git", - "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git" - }, + "repository": "googleapis/nodejs-monitoring", "engines": { "node": ">=4.3.2" }, "scripts": { - "lint": "repo-tools lint", - "pretest": "npm run lint", "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { @@ -21,30 +16,9 @@ "yargs": "9.0.1" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.0.9", + "@google-cloud/nodejs-repo-tools": "2.0.10", "ava": "0.22.0", "proxyquire": "1.8.0", "sinon": "4.0.1" - }, - "cloud-repo-tools": { - "requiresKeyFile": true, - "requiresProjectId": true, - "product": "monitoring", - "samples": [ - { - "id": "metrics", - "name": "Metrics", - "file": "metrics.js", - "docs_link": "https://cloud.google.com/monitoring/docs", - "usage": "node metrics.js --help" - }, - { - "id": "uptime", - "name": "Uptime Config", - "file": "uptime.js", - "docs_link": "https://cloud.google.com/monitoring/docs", - "usage": "node uptime.js --help" - } - ] } } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index ca66561fbbb..31c0e6a9bce 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -17,25 +17,25 @@ // [START monitoring_quickstart] // Imports the Google Cloud client library -const Monitoring = require('@google-cloud/monitoring'); +const monitoring = require('@google-cloud/monitoring'); // Your Google Cloud Platform project ID const projectId = 'YOUR_PROJECT_ID'; // Creates a client -const client = Monitoring.v3.metric(); +const client = new monitoring.MetricServiceClient(); // Prepares an individual data point const dataPoint = { interval: { endTime: { - seconds: Date.now() / 1000 - } + seconds: Date.now() / 1000, + }, }, value: { // The amount of sales - doubleValue: 123.45 - } + doubleValue: 123.45, + }, }; // Prepares the time series request @@ -47,28 +47,27 @@ const request = { metric: { type: 'custom.googleapis.com/stores/daily_sales', labels: { - store_id: 'Pittsburgh' - } + store_id: 'Pittsburgh', + }, }, resource: { type: 'global', labels: { - project_id: projectId - } + project_id: projectId, + }, }, - points: [ - dataPoint - ] - } - ] + points: [dataPoint], + }, + ], }; // Writes time series data -client.createTimeSeries(request) - .then((results) => { - console.log(`Done writing time series data.`); +client + .createTimeSeries(request) + .then(results => { + console.log(`Done writing time series data.`, results[0]); }) - .catch((err) => { + .catch(err => { console.error('ERROR:', err); }); // [END monitoring_quickstart] diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index c876082b475..34906dcb9a3 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -16,13 +16,16 @@ * @namespace google */ /** - * @namespace google.cloud + * @namespace google.api */ /** - * @namespace google.cloud.monitoring + * @namespace google.protobuf */ /** - * @namespace google.cloud.monitoring.v3 + * @namespace google.monitoring + */ +/** + * @namespace google.monitoring.v3 */ 'use strict'; @@ -39,12 +42,16 @@ const gapic = Object.freeze({ * {@link v3.GroupServiceClient} * - `MetricServiceClient` - Reference to * {@link v3.MetricServiceClient} + * - `UptimeCheckServiceClient` - Reference to + * {@link v3.UptimeCheckServiceClient} * - `v3` - This is used for selecting or pinning a * particular backend service version. It exports: * - `GroupServiceClient` - Reference to * {@link v3.GroupServiceClient} * - `MetricServiceClient` - Reference to * {@link v3.MetricServiceClient} + * - `UptimeCheckServiceClient` - Reference to + * {@link v3.UptimeCheckServiceClient} * * @module {object} @google-cloud/monitoring * @alias nodejs-monitoring @@ -59,11 +66,11 @@ const gapic = Object.freeze({ * @example Create a client that uses * Application Default Credentials * (ADC): - * let client = new monitoring.GroupServiceClient(); + * const client = new monitoring.GroupServiceClient(); * * @example Create a client with * explicit credentials: - * let client = new monitoring.GroupServiceClient({ + * const client = new monitoring.GroupServiceClient({ * projectId: 'your-project-id', * keyFilename: '/path/to/keyfile.json', * }); @@ -75,6 +82,8 @@ const gapic = Object.freeze({ * Reference to {@link v3.GroupServiceClient} * @property {constructor} MetricServiceClient * Reference to {@link v3.MetricServiceClient} + * @property {constructor} UptimeCheckServiceClient + * Reference to {@link v3.UptimeCheckServiceClient} */ module.exports = gapic.v3; @@ -84,6 +93,8 @@ module.exports = gapic.v3; * Reference to {@link v3.GroupServiceClient} * @property {constructor} MetricServiceClient * Reference to {@link v3.MetricServiceClient} + * @property {constructor} UptimeCheckServiceClient + * Reference to {@link v3.UptimeCheckServiceClient} */ module.exports.v3 = gapic.v3; diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js new file mode 100644 index 00000000000..386313024c8 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -0,0 +1,304 @@ +// 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. + +/** + * This message configures which resources and services to monitor for + * availability. + * + * @property {string} name + * A unique resource name for this UptimeCheckConfig. The format is: + * + * + * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * + * This field should be omitted when creating the uptime check configuration; + * on create, the resource name is assigned by the server and included in the + * response. + * + * @property {string} displayName + * A human-friendly name for the uptime check configuration. The display name + * should be unique within a Stackdriver Account in order to make it easier + * to identify; however, uniqueness is not enforced. Required. + * + * @property {Object} monitoredResource + * The monitored resource associated with the configuration. + * + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} + * + * @property {Object} resourceGroup + * The group resource associated with the configuration. + * + * This object should have the same structure as [ResourceGroup]{@link google.monitoring.v3.ResourceGroup} + * + * @property {Object} httpCheck + * Contains information needed to make an HTTP or HTTPS check. + * + * This object should have the same structure as [HttpCheck]{@link google.monitoring.v3.HttpCheck} + * + * @property {Object} tcpCheck + * Contains information needed to make a TCP check. + * + * This object should have the same structure as [TcpCheck]{@link google.monitoring.v3.TcpCheck} + * + * @property {Object} period + * How often the uptime check is performed. + * Currently, only 1, 5, 10, and 15 minutes are supported. Required. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {Object} timeout + * The maximum amount of time to wait for the request to complete (must be + * between 1 and 60 seconds). Required. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {Object[]} contentMatchers + * The expected content on the page the check is run against. + * Currently, only the first entry in the list is supported, and other entries + * will be ignored. The server will look for an exact match of the string in + * the page response's content. This field is optional and should only be + * specified if a content match is required. + * + * This object should have the same structure as [ContentMatcher]{@link google.monitoring.v3.ContentMatcher} + * + * @property {number[]} selectedRegions + * The list of regions from which the check will be run. + * If this field is specified, enough regions to include a minimum of + * 3 locations must be provided, or an error message is returned. + * Not specifying this field will result in uptime checks running from all + * regions. + * + * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} + * + * @typedef UptimeCheckConfig + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ +var UptimeCheckConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * The resource submessage for group checks. It can be used instead of a + * monitored resource, when multiple resources are being monitored. + * + * @property {string} groupId + * The group of resources being monitored. Should be only the + * group_id, not projects//groups/. + * + * @property {number} resourceType + * The resource type of the group members. + * + * The number should be among the values of [GroupResourceType]{@link google.monitoring.v3.GroupResourceType} + * + * @typedef ResourceGroup + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig.ResourceGroup definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ + ResourceGroup: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Information involved in an HTTP/HTTPS uptime check request. + * + * @property {boolean} useSsl + * If true, use HTTPS instead of HTTP to run the check. + * + * @property {string} path + * The path to the page to run the check against. Will be combined with the + * host (specified within the MonitoredResource) and port to construct the + * full URL. Optional (defaults to "/"). + * + * @property {number} port + * The port to the page to run the check against. Will be combined with host + * (specified within the MonitoredResource) and path to construct the full + * URL. Optional (defaults to 80 without SSL, or 443 with SSL). + * + * @property {Object} authInfo + * The authentication information. Optional when creating an HTTP check; + * defaults to empty. + * + * This object should have the same structure as [BasicAuthentication]{@link google.monitoring.v3.BasicAuthentication} + * + * @property {boolean} maskHeaders + * Boolean specifiying whether to encrypt the header information. + * Encryption should be specified for any headers related to authentication + * that you do not wish to be seen when retrieving the configuration. The + * server will be responsible for encrypting the headers. + * On Get/List calls, if mask_headers is set to True then the headers + * will be obscured with ******. + * + * @property {Object.} headers + * The list of headers to send as part of the uptime check request. + * If two headers have the same key and different values, they should + * be entered as a single header, with the value being a comma-separated + * list of all the desired values as described at + * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). + * Entering two separate headers with the same key in a Create call will + * cause the first to be overwritten by the second. + * + * @typedef HttpCheck + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig.HttpCheck definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ + HttpCheck: { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * A type of authentication to perform against the specified resource or URL + * that uses username and password. + * Currently, only Basic authentication is supported in Uptime Monitoring. + * + * @property {string} username + * The username to authenticate. + * + * @property {string} password + * The password to authenticate. + * + * @typedef BasicAuthentication + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ + BasicAuthentication: { + // This is for documentation. Actual contents will be loaded by gRPC. + } + }, + + /** + * Information required for a TCP uptime check request. + * + * @property {number} port + * The port to the page to run the check against. Will be combined with host + * (specified within the MonitoredResource) to construct the full URL. + * Required. + * + * @typedef TcpCheck + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig.TcpCheck definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ + TcpCheck: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Used to perform string matching. Currently, this matches on the exact + * content. In the future, it can be expanded to allow for regular expressions + * and more complex matching. + * + * @property {string} content + * String content to match + * + * @typedef ContentMatcher + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig.ContentMatcher definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ + ContentMatcher: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * Contains the region, location, and list of IP + * addresses where checkers in the location run from. + * + * @property {number} region + * A broad region category in which the IP address is located. + * + * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} + * + * @property {string} location + * A more specific location within the region that typically encodes + * a particular city/town/metro (and its containing state/province or country) + * within the broader umbrella region category. + * + * @property {string} ipAddress + * The IP address from which the uptime check originates. This is a full + * IP address (not an IP address range). Most IP addresses, as of this + * publication, are in IPv4 format; however, one should not rely on the + * IP addresses being in IPv4 format indefinitely and should support + * interpreting this field in either IPv4 or IPv6 format. + * + * @typedef UptimeCheckIp + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckIp definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ +var UptimeCheckIp = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The regions from which an uptime check can be run. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ +var UptimeCheckRegion = { + + /** + * Default value if no region is specified. Will result in uptime checks + * running from all regions. + */ + REGION_UNSPECIFIED: 0, + + /** + * Allows checks to run from locations within the United States of America. + */ + USA: 1, + + /** + * Allows checks to run from locations within the continent of Europe. + */ + EUROPE: 2, + + /** + * Allows checks to run from locations within the continent of South + * America. + */ + SOUTH_AMERICA: 3, + + /** + * Allows checks to run from locations within the Asia Pacific area (ex: + * Singapore). + */ + ASIA_PACIFIC: 4 +}; + +/** + * The supported resource types that can be used as values of + * group_resource.resource_type. gae_app and uptime_url are not allowed + * because group checks on App Engine modules and URLs are not allowed. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ +var GroupResourceType = { + + /** + * Default value (not valid). + */ + RESOURCE_TYPE_UNSPECIFIED: 0, + + /** + * A group of instances (could be either GCE or AWS_EC2). + */ + INSTANCE: 1, + + /** + * A group of AWS load balancers. + */ + AWS_ELB_LOAD_BALANCER: 2 +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js new file mode 100644 index 00000000000..26059a71abc --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 84324dea810..a27b500554f 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -111,9 +111,7 @@ class GroupServiceClient { // 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}'), groupPathTemplate: new gax.PathTemplate( 'projects/{project}/groups/{group}' ), @@ -123,11 +121,7 @@ class GroupServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listGroups: new gax.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'group' - ), + listGroups: new gax.PageDescriptor('pageToken', 'nextPageToken', 'group'), listGroupMembers: new gax.PageDescriptor( 'pageToken', 'nextPageToken', @@ -399,7 +393,7 @@ class GroupServiceClient { request, options ); - }; + } /** * Gets a single group. @@ -777,7 +771,7 @@ class GroupServiceClient { request, options ); - }; + } // -------------------- // -- Path templates -- @@ -817,7 +811,7 @@ class GroupServiceClient { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return projectPathTemplate.match(projectName).project; + return this._pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -828,7 +822,7 @@ class GroupServiceClient { * @returns {String} - A string representing the project. */ matchProjectFromGroupName(groupName) { - return groupPathTemplate.match(groupName).project; + return this._pathTemplates.groupPathTemplate.match(groupName).project; } /** @@ -839,9 +833,8 @@ class GroupServiceClient { * @returns {String} - A string representing the group. */ matchGroupFromGroupName(groupName) { - return groupPathTemplate.match(groupName).group; + return this._pathTemplates.groupPathTemplate.match(groupName).group; } } - module.exports = GroupServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index f568dc718c8..70e4ac17e91 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -16,6 +16,8 @@ const GroupServiceClient = require('./group_service_client'); const MetricServiceClient = require('./metric_service_client'); +const UptimeCheckServiceClient = require('./uptime_check_service_client'); module.exports.GroupServiceClient = GroupServiceClient; module.exports.MetricServiceClient = MetricServiceClient; +module.exports.UptimeCheckServiceClient = UptimeCheckServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 5d1faaf29f6..269105d1d6d 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -101,9 +101,7 @@ class MetricServiceClient { // 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}'), metricDescriptorPathTemplate: new gax.PathTemplate( 'projects/{project}/metricDescriptors/{metric_descriptor=**}' ), @@ -320,7 +318,11 @@ class MetricServiceClient { } options = options || {}; - return this._innerApiCalls.listMonitoredResourceDescriptors(request, options, callback); + return this._innerApiCalls.listMonitoredResourceDescriptors( + request, + options, + callback + ); } /** @@ -385,7 +387,7 @@ class MetricServiceClient { request, options ); - }; + } /** * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. @@ -433,7 +435,11 @@ class MetricServiceClient { } options = options || {}; - return this._innerApiCalls.getMonitoredResourceDescriptor(request, options, callback); + return this._innerApiCalls.getMonitoredResourceDescriptor( + request, + options, + callback + ); } /** @@ -537,7 +543,11 @@ class MetricServiceClient { } options = options || {}; - return this._innerApiCalls.listMetricDescriptors(request, options, callback); + return this._innerApiCalls.listMetricDescriptors( + request, + options, + callback + ); } /** @@ -603,7 +613,7 @@ class MetricServiceClient { request, options ); - }; + } /** * Gets a single metric descriptor. This method does not require a Stackdriver account. @@ -710,7 +720,11 @@ class MetricServiceClient { } options = options || {}; - return this._innerApiCalls.createMetricDescriptor(request, options, callback); + return this._innerApiCalls.createMetricDescriptor( + request, + options, + callback + ); } /** @@ -752,7 +766,11 @@ class MetricServiceClient { } options = options || {}; - return this._innerApiCalls.deleteMetricDescriptor(request, options, callback); + return this._innerApiCalls.deleteMetricDescriptor( + request, + options, + callback + ); } /** @@ -987,7 +1005,7 @@ class MetricServiceClient { request, options ); - }; + } /** * Creates or adds data to one or more time series. @@ -1096,7 +1114,7 @@ class MetricServiceClient { * @returns {String} - A string representing the project. */ matchProjectFromProjectName(projectName) { - return projectPathTemplate.match(projectName).project; + return this._pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1107,7 +1125,9 @@ class MetricServiceClient { * @returns {String} - A string representing the project. */ matchProjectFromMetricDescriptorName(metricDescriptorName) { - return metricDescriptorPathTemplate.match(metricDescriptorName).project; + return this._pathTemplates.metricDescriptorPathTemplate.match( + metricDescriptorName + ).project; } /** @@ -1118,7 +1138,9 @@ class MetricServiceClient { * @returns {String} - A string representing the metric_descriptor. */ matchMetricDescriptorFromMetricDescriptorName(metricDescriptorName) { - return metricDescriptorPathTemplate.match(metricDescriptorName).metric_descriptor; + return this._pathTemplates.metricDescriptorPathTemplate.match( + metricDescriptorName + ).metric_descriptor; } /** @@ -1128,8 +1150,12 @@ class MetricServiceClient { * A fully-qualified path representing a monitored_resource_descriptor resources. * @returns {String} - A string representing the project. */ - matchProjectFromMonitoredResourceDescriptorName(monitoredResourceDescriptorName) { - return monitoredResourceDescriptorPathTemplate.match(monitoredResourceDescriptorName).project; + matchProjectFromMonitoredResourceDescriptorName( + monitoredResourceDescriptorName + ) { + return this._pathTemplates.monitoredResourceDescriptorPathTemplate.match( + monitoredResourceDescriptorName + ).project; } /** @@ -1139,10 +1165,13 @@ class MetricServiceClient { * A fully-qualified path representing a monitored_resource_descriptor resources. * @returns {String} - A string representing the monitored_resource_descriptor. */ - matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName(monitoredResourceDescriptorName) { - return monitoredResourceDescriptorPathTemplate.match(monitoredResourceDescriptorName).monitored_resource_descriptor; + matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName( + monitoredResourceDescriptorName + ) { + return this._pathTemplates.monitoredResourceDescriptorPathTemplate.match( + monitoredResourceDescriptorName + ).monitored_resource_descriptor; } } - module.exports = MetricServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js new file mode 100644 index 00000000000..0899994005f --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -0,0 +1,816 @@ +// 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 gapicConfig = require('./uptime_check_service_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); + +const VERSION = require('../../package.json').version; + +/** + * The UptimeCheckService API is used to manage (list, create, delete, edit) + * uptime check configurations in the Stackdriver Monitoring product. An uptime + * check is a piece of configuration that determines which resources and + * services to monitor for availability. These configurations can also be + * configured interactively by navigating to the [Cloud Console] + * (http://console.cloud.google.com), selecting the appropriate project, + * clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, + * and then clicking on "Uptime". + * + * @class + * @memberof v3 + */ +class UptimeCheckServiceClient { + /** + * Construct an instance of UptimeCheckServiceClient. + * + * @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 + ); + + // 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/monitoring/v3/uptime_service.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}'), + uptimeCheckConfigPathTemplate: new gax.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listUptimeCheckConfigs: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'uptimeCheckConfigs' + ), + listUptimeCheckIps: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'uptimeCheckIps' + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.UptimeCheckService', + 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.monitoring.v3.UptimeCheckService. + var uptimeCheckServiceStub = gaxGrpc.createStub( + protos.google.monitoring.v3.UptimeCheckService, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var uptimeCheckServiceStubMethods = [ + 'listUptimeCheckConfigs', + 'getUptimeCheckConfig', + 'createUptimeCheckConfig', + 'updateUptimeCheckConfig', + 'deleteUptimeCheckConfig', + 'listUptimeCheckIps', + ]; + for (let methodName of uptimeCheckServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + uptimeCheckServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.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 the existing valid uptime check configurations for the project, + * leaving out any invalid configurations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The project whose uptime check configurations are listed. The format is + * + * `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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * + * 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 [ListUptimeCheckConfigsResponse]{@link google.monitoring.v3.ListUptimeCheckConfigsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} 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 [ListUptimeCheckConfigsResponse]{@link google.monitoring.v3.ListUptimeCheckConfigsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedParent = client.projectPath('[PROJECT]'); + * + * client.listUptimeCheckConfigs({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.listUptimeCheckConfigs(nextRequest, options).then(callback); + * } + * } + * client.listUptimeCheckConfigs({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listUptimeCheckConfigs(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listUptimeCheckConfigs( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listUptimeCheckConfigs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listUptimeCheckConfigs} 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 + * The project whose uptime check configurations are listed. The format is + * + * `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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * client.listUptimeCheckConfigsStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listUptimeCheckConfigsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listUptimeCheckConfigs.createStream( + this._innerApiCalls.listUptimeCheckConfigs, + request, + options + ); + } + + /** + * Gets a single uptime check configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The uptime check configuration to retrieve. The format is + * + * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + * client.getUptimeCheckConfig({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getUptimeCheckConfig(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getUptimeCheckConfig(request, options, callback); + } + + /** + * Creates a new uptime check configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The project in which to create the uptime check. The format is: + * + * `projects/[PROJECT_ID]`. + * @param {Object} request.uptimeCheckConfig + * The new uptime check configuration. + * + * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} + * @param {Object=} options + * Optional parameters. You can override the default settings for 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedParent = client.projectPath('[PROJECT]'); + * var uptimeCheckConfig = {}; + * var request = { + * parent: formattedParent, + * uptimeCheckConfig: uptimeCheckConfig, + * }; + * client.createUptimeCheckConfig(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createUptimeCheckConfig(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createUptimeCheckConfig( + request, + options, + callback + ); + } + + /** + * Updates an uptime check configuration. You can either replace the entire + * configuration with a new one or replace only certain fields in the current + * configuration by specifying the fields to be updated via `"updateMask"`. + * Returns the updated configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The uptime check configuration to update. The format is + * + * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * @param {Object} request.uptimeCheckConfig + * Required. If an `"updateMask"` has been specified, this field gives + * the values for the set of fields mentioned in the `"updateMask"`. If an + * `"updateMask"` has not been given, this uptime check configuration replaces + * the current configuration. If a field is mentioned in `"updateMask`" but + * the corresonding field is omitted in this partial uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * + * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} + * @param {Object=} request.updateMask + * Optional. If present, only the listed fields in the current uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * + * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * var name = ''; + * var uptimeCheckConfig = {}; + * var request = { + * name: name, + * uptimeCheckConfig: uptimeCheckConfig, + * }; + * client.updateUptimeCheckConfig(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateUptimeCheckConfig(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.updateUptimeCheckConfig( + request, + options, + callback + ); + } + + /** + * Deletes an uptime check configuration. Note that this method will fail + * if the uptime check configuration is referenced by an alert policy or + * other dependent configs that would be rendered invalid by the deletion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The uptime check configuration to delete. The format is + * + * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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 monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + * client.deleteUptimeCheckConfig({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteUptimeCheckConfig(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteUptimeCheckConfig( + request, + options, + callback + ); + } + + /** + * Returns the list of IPs that checkers run from + * + * @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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. + * + * 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 [ListUptimeCheckIpsResponse]{@link google.monitoring.v3.ListUptimeCheckIpsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} 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 [ListUptimeCheckIpsResponse]{@link google.monitoring.v3.ListUptimeCheckIpsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * client.listUptimeCheckIps({}) + * .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.listUptimeCheckIps(nextRequest, options).then(callback); + * } + * } + * client.listUptimeCheckIps({}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listUptimeCheckIps(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listUptimeCheckIps(request, options, callback); + } + + /** + * Equivalent to {@link listUptimeCheckIps}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listUptimeCheckIps} 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.UptimeCheckServiceClient({ + * // optional auth parameters. + * }); + * + * + * client.listUptimeCheckIpsStream({}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listUptimeCheckIpsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listUptimeCheckIps.createStream( + this._innerApiCalls.listUptimeCheckIps, + request, + options + ); + } + + // -------------------- + // -- 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 uptime_check_config resource name string. + * + * @param {String} project + * @param {String} uptimeCheckConfig + * @returns {String} + */ + uptimeCheckConfigPath(project, uptimeCheckConfig) { + return this._pathTemplates.uptimeCheckConfigPathTemplate.render({ + project: project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * 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 uptimeCheckConfigName from a uptime_check_config resource. + * + * @param {String} uptimeCheckConfigName + * A fully-qualified path representing a uptime_check_config resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromUptimeCheckConfigName(uptimeCheckConfigName) { + return this._pathTemplates.uptimeCheckConfigPathTemplate.match( + uptimeCheckConfigName + ).project; + } + + /** + * Parse the uptimeCheckConfigName from a uptime_check_config resource. + * + * @param {String} uptimeCheckConfigName + * A fully-qualified path representing a uptime_check_config resources. + * @returns {String} - A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromUptimeCheckConfigName(uptimeCheckConfigName) { + return this._pathTemplates.uptimeCheckConfigPathTemplate.match( + uptimeCheckConfigName + ).uptime_check_config; + } +} + +module.exports = UptimeCheckServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json new file mode 100644 index 00000000000..11705881bb1 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.monitoring.v3.UptimeCheckService": { + "retry_codes": { + "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, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListUptimeCheckConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetUptimeCheckConfig": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateUptimeCheckConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUptimeCheckConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteUptimeCheckConfig": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListUptimeCheckIps": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/system-test/.eslintrc.yml b/packages/google-cloud-monitoring/system-test/.eslintrc.yml new file mode 100644 index 00000000000..2e6882e46d2 --- /dev/null +++ b/packages/google-cloud-monitoring/system-test/.eslintrc.yml @@ -0,0 +1,6 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off + no-console: off diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js similarity index 85% rename from packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js rename to packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js index 7abf92f6cc5..a8744152f19 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js @@ -16,7 +16,7 @@ describe('MetricServiceSmokeTest', () => { if (!process.env.SMOKE_TEST_PROJECT) { - throw new Error("Usage: SMOKE_TEST_PROJECT= node #{$0}"); + throw new Error('Usage: SMOKE_TEST_PROJECT= node #{$0}'); } var projectId = process.env.SMOKE_TEST_PROJECT; @@ -30,7 +30,8 @@ describe('MetricServiceSmokeTest', () => { // Iterate over all elements. var formattedName = client.projectPath(projectId); - client.listMonitoredResourceDescriptors({name: formattedName}) + client + .listMonitoredResourceDescriptors({name: formattedName}) .then(responses => { var resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { @@ -51,7 +52,6 @@ describe('MetricServiceSmokeTest', () => { // Or obtain the paged response. var formattedName = client.projectPath(projectId); - var options = {autoPaginate: false}; var callback = responses => { // The actual resources in a response. @@ -65,10 +65,13 @@ describe('MetricServiceSmokeTest', () => { } if (nextRequest) { // Fetch the next page. - return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + return client + .listMonitoredResourceDescriptors(nextRequest, options) + .then(callback); } - } - client.listMonitoredResourceDescriptors({name: formattedName}, options) + }; + client + .listMonitoredResourceDescriptors({name: formattedName}, options) .then(callback) .then(done) .catch(done); @@ -82,7 +85,8 @@ describe('MetricServiceSmokeTest', () => { }); var formattedName = client.projectPath(projectId); - client.listMonitoredResourceDescriptorsStream({name: formattedName}) + client + .listMonitoredResourceDescriptorsStream({name: formattedName}) .on('data', element => { console.log(element); }) diff --git a/packages/google-cloud-monitoring/test/.eslintrc.yml b/packages/google-cloud-monitoring/test/.eslintrc.yml new file mode 100644 index 00000000000..73f7bbc946f --- /dev/null +++ b/packages/google-cloud-monitoring/test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + node/no-unpublished-require: off diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 398ce6a3064..54ba2b0cda3 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -368,7 +368,11 @@ describe('GroupServiceClient', () => { }; // Mock Grpc layer - client._innerApiCalls.listGroupMembers = (actualRequest, options, callback) => { + client._innerApiCalls.listGroupMembers = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.members); }; @@ -407,7 +411,6 @@ describe('GroupServiceClient', () => { }); }); }); - }); describe('MetricServiceClient', () => { describe('listMonitoredResourceDescriptors', () => { @@ -433,7 +436,11 @@ describe('MetricServiceClient', () => { }; // Mock Grpc layer - client._innerApiCalls.listMonitoredResourceDescriptors = (actualRequest, options, callback) => { + client._innerApiCalls.listMonitoredResourceDescriptors = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.resourceDescriptors); }; @@ -481,7 +488,10 @@ describe('MetricServiceClient', () => { }); // Mock request - var formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + var formattedName = client.monitoredResourceDescriptorPath( + '[PROJECT]', + '[MONITORED_RESOURCE_DESCRIPTOR]' + ); var request = { name: formattedName, }; @@ -518,7 +528,10 @@ describe('MetricServiceClient', () => { }); // Mock request - var formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + var formattedName = client.monitoredResourceDescriptorPath( + '[PROJECT]', + '[MONITORED_RESOURCE_DESCRIPTOR]' + ); var request = { name: formattedName, }; @@ -562,7 +575,11 @@ describe('MetricServiceClient', () => { }; // Mock Grpc layer - client._innerApiCalls.listMetricDescriptors = (actualRequest, options, callback) => { + client._innerApiCalls.listMetricDescriptors = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.metricDescriptors); }; @@ -610,7 +627,10 @@ describe('MetricServiceClient', () => { }); // Mock request - var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + var formattedName = client.metricDescriptorPath( + '[PROJECT]', + '[METRIC_DESCRIPTOR]' + ); var request = { name: formattedName, }; @@ -649,7 +669,10 @@ describe('MetricServiceClient', () => { }); // Mock request - var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + var formattedName = client.metricDescriptorPath( + '[PROJECT]', + '[METRIC_DESCRIPTOR]' + ); var request = { name: formattedName, }; @@ -750,13 +773,18 @@ describe('MetricServiceClient', () => { }); // Mock request - var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + var formattedName = client.metricDescriptorPath( + '[PROJECT]', + '[METRIC_DESCRIPTOR]' + ); var request = { name: formattedName, }; // Mock Grpc layer - client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod(request); + client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( + request + ); client.deleteMetricDescriptor(request, err => { assert.ifError(err); @@ -771,7 +799,10 @@ describe('MetricServiceClient', () => { }); // Mock request - var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + var formattedName = client.metricDescriptorPath( + '[PROJECT]', + '[METRIC_DESCRIPTOR]' + ); var request = { name: formattedName, }; @@ -820,7 +851,11 @@ describe('MetricServiceClient', () => { }; // Mock Grpc layer - client._innerApiCalls.listTimeSeries = (actualRequest, options, callback) => { + client._innerApiCalls.listTimeSeries = ( + actualRequest, + options, + callback + ) => { assert.deepStrictEqual(actualRequest, request); callback(null, expectedResponse.timeSeries); }; @@ -918,7 +953,392 @@ describe('MetricServiceClient', () => { }); }); }); +}); +describe('UptimeCheckServiceClient', () => { + describe('listUptimeCheckConfigs', () => { + it('invokes listUptimeCheckConfigs without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + 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 uptimeCheckConfigsElement = {}; + var uptimeCheckConfigs = [uptimeCheckConfigsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + uptimeCheckConfigs: uptimeCheckConfigs, + }; + + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckConfigs = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.uptimeCheckConfigs); + }; + + client.listUptimeCheckConfigs(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.uptimeCheckConfigs); + done(); + }); + }); + + it('invokes listUptimeCheckConfigs with error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + 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.listUptimeCheckConfigs = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listUptimeCheckConfigs(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getUptimeCheckConfig', () => { + it('invokes getUptimeCheckConfig without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.uptimeCheckConfigPath( + '[PROJECT]', + '[UPTIME_CHECK_CONFIG]' + ); + var request = { + name: formattedName, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name: name2, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getUptimeCheckConfig(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getUptimeCheckConfig with error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.uptimeCheckConfigPath( + '[PROJECT]', + '[UPTIME_CHECK_CONFIG]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getUptimeCheckConfig(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createUptimeCheckConfig', () => { + it('invokes createUptimeCheckConfig without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var uptimeCheckConfig = {}; + var request = { + parent: formattedParent, + uptimeCheckConfig: uptimeCheckConfig, + }; + + // Mock response + var name = 'name3373707'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name: name, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createUptimeCheckConfig(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createUptimeCheckConfig with error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedParent = client.projectPath('[PROJECT]'); + var uptimeCheckConfig = {}; + var request = { + parent: formattedParent, + uptimeCheckConfig: uptimeCheckConfig, + }; + + // Mock Grpc layer + client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createUptimeCheckConfig(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateUptimeCheckConfig', () => { + it('invokes updateUptimeCheckConfig without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + var name = 'name3373707'; + var uptimeCheckConfig = {}; + var request = { + name: name, + uptimeCheckConfig: uptimeCheckConfig, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name: name2, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateUptimeCheckConfig(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateUptimeCheckConfig with error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var name = 'name3373707'; + var uptimeCheckConfig = {}; + var request = { + name: name, + uptimeCheckConfig: uptimeCheckConfig, + }; + + // Mock Grpc layer + client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateUptimeCheckConfig(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteUptimeCheckConfig', () => { + it('invokes deleteUptimeCheckConfig without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.uptimeCheckConfigPath( + '[PROJECT]', + '[UPTIME_CHECK_CONFIG]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( + request + ); + + client.deleteUptimeCheckConfig(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteUptimeCheckConfig with error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.uptimeCheckConfigPath( + '[PROJECT]', + '[UPTIME_CHECK_CONFIG]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteUptimeCheckConfig(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('listUptimeCheckIps', () => { + it('invokes listUptimeCheckIps without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var request = {}; + + // Mock response + var nextPageToken = ''; + var uptimeCheckIpsElement = {}; + var uptimeCheckIps = [uptimeCheckIpsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + uptimeCheckIps: uptimeCheckIps, + }; + + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckIps = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.uptimeCheckIps); + }; + + client.listUptimeCheckIps(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.uptimeCheckIps); + done(); + }); + }); + + it('invokes listUptimeCheckIps with error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var request = {}; + + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckIps = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listUptimeCheckIps(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); }); function mockSimpleGrpcMethod(expectedRequest, response, error) { From e5934ddfd895f8f94abc9b05d14ccd74631ed576 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 19 Oct 2017 13:02:24 -0700 Subject: [PATCH 053/422] Version 0.4.0 (#5) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e2b75a0a4fd..e9a4afdd42f 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.3.0", + "version": "0.4.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From da021c080f3e62d37c578e33af8f7167f5ef6ae9 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 19 Oct 2017 14:21:38 -0700 Subject: [PATCH 054/422] Pin monitoring version for samples. (#6) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 3d503b18cf7..42308f8b4fa 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -12,7 +12,7 @@ "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.3.0", + "@google-cloud/monitoring": "0.4.0", "yargs": "9.0.1" }, "devDependencies": { From df3404befc1d88ac8dc70b5d61026918535d1ca0 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 23 Oct 2017 07:05:48 -0700 Subject: [PATCH 055/422] Fix docs, upgrade tools, and regenerate. (#9) --- packages/google-cloud-monitoring/README.md | 4 ++-- packages/google-cloud-monitoring/package.json | 5 ++--- packages/google-cloud-monitoring/samples/README.md | 4 ++-- packages/google-cloud-monitoring/src/index.js | 14 +++++++------- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 6db486fe0fd..f693edbb7a8 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -62,13 +62,13 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ```javascript // Imports the Google Cloud client library -const Monitoring = require('@google-cloud/monitoring'); +const monitoring = require('@google-cloud/monitoring'); // Your Google Cloud Platform project ID const projectId = 'YOUR_PROJECT_ID'; // Creates a client -const client = new Monitoring.MetricServiceClient(); +const client = new monitoring.MetricServiceClient(); // Prepares an individual data point const dataPoint = { diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e9a4afdd42f..2427a7da9d5 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -39,8 +39,7 @@ "Song Wang ", "Stephen Sawchuk ", "Takashi Matsuo ", - "Tim Swast ", - "greenkeeper[bot] " + "Tim Swast " ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", @@ -60,7 +59,7 @@ "lodash.union": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.0.10", + "@google-cloud/nodejs-repo-tools": "^2.0.11", "async": "^2.5.0", "codecov": "^2.3.1", "eslint": "^4.9.0", diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 9fb9892c045..68b929a5c9f 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -49,7 +49,7 @@ Commands: Options: --version Show version number [boolean] --help Show help [boolean] - --projectId, -p [string] [default: "nodejs-docs-samples"] + --projectId, -p [string] Examples: node metrics.js create @@ -87,7 +87,7 @@ Commands: Options: --version Show version number [boolean] --help Show help [boolean] - --projectId, -p [string] [default: "nodejs-docs-samples"] + --projectId, -p [string] Examples: node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance. diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index 34906dcb9a3..87f805eeb37 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -56,24 +56,24 @@ const gapic = Object.freeze({ * @module {object} @google-cloud/monitoring * @alias nodejs-monitoring * - * @example Install the client library with - * npm: + * @example Install the client library with npm: * npm install --save @google-cloud/monitoring * * @example Import the client library: * const monitoring = require('@google-cloud/monitoring'); * - * @example Create a client that uses - * Application Default Credentials - * (ADC): + * @example Create a client that uses Application Default Credentials (ADC): * const client = new monitoring.GroupServiceClient(); * - * @example Create a client with - * explicit credentials: + * @example Create a client with explicit credentials: * const client = new monitoring.GroupServiceClient({ * projectId: 'your-project-id', * keyFilename: '/path/to/keyfile.json', * }); + * + * @example include:samples/quickstart.js + * region_tag:monitoring_quickstart + * Full quickstart example: */ /** From 9c2c5d82900d7854c6a9bc275d89dfc52bfa64d4 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 23 Oct 2017 10:44:02 -0400 Subject: [PATCH 056/422] =?UTF-8?q?Update=20codecov=20to=20the=20latest=20?= =?UTF-8?q?version=20=F0=9F=9A=80=20(#10)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2427a7da9d5..d9bad83692a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -61,7 +61,7 @@ "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.0.11", "async": "^2.5.0", - "codecov": "^2.3.1", + "codecov": "^3.0.0", "eslint": "^4.9.0", "eslint-config-prettier": "^2.6.0", "eslint-plugin-node": "^5.2.0", From 40fbc2e1f7bd46cb8eab94c899e998aafc3d15a7 Mon Sep 17 00:00:00 2001 From: djbelcher Date: Thu, 26 Oct 2017 18:02:01 -0700 Subject: [PATCH 057/422] Added missing 'protos' directory to package.json. (#12) --- packages/google-cloud-monitoring/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d9bad83692a..aee4e0053ff 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -11,6 +11,7 @@ "main": "src/index.js", "files": [ "src", + "protos", "AUTHORS", "LICENSE" ], From 1197ab7a14c1f12f3988ed75c09d290b0c980faf Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 27 Oct 2017 10:52:12 -0400 Subject: [PATCH 058/422] 0.4.1 (#13) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index aee4e0053ff..b8af61633ec 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.4.0", + "version": "0.4.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { From 7a17eba1eadbb53ec2a7ecded75a5f7a43f4817c Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 30 Oct 2017 06:19:08 -0700 Subject: [PATCH 059/422] Upgrade repo-tools and regenerate scaffolding. (#14) --- packages/google-cloud-monitoring/CONTRIBUTORS | 3 +++ packages/google-cloud-monitoring/README.md | 19 +++++++++++-------- packages/google-cloud-monitoring/package.json | 7 +++++-- .../google-cloud-monitoring/samples/README.md | 9 ++++++++- .../samples/package.json | 12 ++++++------ 5 files changed, 33 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-monitoring/CONTRIBUTORS b/packages/google-cloud-monitoring/CONTRIBUTORS index 7d15cc106b7..929c465352b 100644 --- a/packages/google-cloud-monitoring/CONTRIBUTORS +++ b/packages/google-cloud-monitoring/CONTRIBUTORS @@ -12,6 +12,9 @@ Jason Dobry Jun Mukai Luke Sneeringer Song Wang +Stephen Stephen Sawchuk Takashi Matsuo Tim Swast +djbelcher +greenkeeper[bot] diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index f693edbb7a8..1fbf1ae4917 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -1,6 +1,6 @@ Google Cloud Platform logo -# Stackdriver Monitoring: Node.js Client +# [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-monitoring.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-monitoring) @@ -11,7 +11,9 @@ [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. + * [Monitoring Node.js Client API Reference][client-docs] +* [github.com/googleapis/nodejs-monitoring](https://github.com/googleapis/nodejs-monitoring) * [Monitoring Documentation][product-docs] Read more about the client libraries for Cloud APIs, including the older @@ -119,13 +121,13 @@ client ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/blob/master/samples) directory. The samples' `README.md` +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/tree/master/samples) directory. The samples' `README.md` has instructions for running the samples. -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | -| Uptime Config | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) | +| Uptime Config | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | The [Monitoring Node.js Client API Reference][client-docs] documentation also contains samples. @@ -145,13 +147,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-monitoring/blob/master/.github/CONTRIBUTING.md). ## License Apache Version 2.0 -See [LICENSE](LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ [product-docs]: https://cloud.google.com/monitoring/docs +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b8af61633ec..cf7f140da6e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -38,9 +38,12 @@ "Jun Mukai ", "Luke Sneeringer ", "Song Wang ", + "Stephen ", "Stephen Sawchuk ", "Takashi Matsuo ", - "Tim Swast " + "Tim Swast ", + "djbelcher ", + "greenkeeper[bot] " ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", @@ -60,7 +63,7 @@ "lodash.union": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.0.11", + "@google-cloud/nodejs-repo-tools": "^2.1.0", "async": "^2.5.0", "codecov": "^3.0.0", "eslint": "^4.9.0", diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 68b929a5c9f..36355ab7cad 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -2,7 +2,7 @@ # Stackdriver Monitoring: Node.js Samples -[![Build](https://storage.googleapis.com/.svg)]() +[![Open in Cloud Shell][shell_img]][shell_link] [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. @@ -25,6 +25,8 @@ library's README. View the [source code][metrics_0_code]. +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) + __Usage:__ `node metrics.js --help` ``` @@ -74,6 +76,8 @@ For more information, see https://cloud.google.com/monitoring/docs View the [source code][uptime_1_code]. +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) + __Usage:__ `node uptime.js --help` ``` @@ -103,3 +107,6 @@ For more information, see https://cloud.google.com/monitoring/uptime-checks/ [uptime_1_docs]: https://cloud.google.com/monitoring/docs [uptime_1_code]: uptime.js + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/README.md diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 42308f8b4fa..c867c228a35 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -6,19 +6,19 @@ "author": "Google Inc.", "repository": "googleapis/nodejs-monitoring", "engines": { - "node": ">=4.3.2" + "node": ">=4.0.0" }, "scripts": { "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.4.0", - "yargs": "9.0.1" + "@google-cloud/monitoring": "0.4.1", + "yargs": "10.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.0.10", - "ava": "0.22.0", + "@google-cloud/nodejs-repo-tools": "2.1.0", + "ava": "0.23.0", "proxyquire": "1.8.0", - "sinon": "4.0.1" + "sinon": "4.0.2" } } From 608f30507785bfde8d46c71e83b6df3e0cd44fa7 Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 10 Nov 2017 10:31:29 -0500 Subject: [PATCH 060/422] Test on Node 9. (#17) --- packages/google-cloud-monitoring/.appveyor.yml | 3 --- packages/google-cloud-monitoring/.circleci/config.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/.appveyor.yml b/packages/google-cloud-monitoring/.appveyor.yml index babe1d587f4..24082152655 100644 --- a/packages/google-cloud-monitoring/.appveyor.yml +++ b/packages/google-cloud-monitoring/.appveyor.yml @@ -1,8 +1,5 @@ environment: matrix: - - nodejs_version: 4 - - nodejs_version: 6 - - nodejs_version: 7 - nodejs_version: 8 install: diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 9cd58f00c87..13f6f73c24f 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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 43f30aeaf71712b3e803c4d2c78b7595e22c6c26 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 18 Jan 2018 08:17:54 -0500 Subject: [PATCH 061/422] =?UTF-8?q?Update=20mocha=20to=20the=20latest=20ve?= =?UTF-8?q?rsion=20=F0=9F=9A=80=20(#20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cf7f140da6e..83faf2027df 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -73,7 +73,7 @@ "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^4.0.1", + "mocha": "^5.0.0", "nyc": "^11.2.1", "power-assert": "^1.4.4", "prettier": "^1.7.4" From 83e5607fab2aef1b23d2c8ad39880d427d5384c9 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Feb 2018 10:13:28 -0500 Subject: [PATCH 062/422] =?UTF-8?q?Update=20eslint-plugin-node=20to=20the?= =?UTF-8?q?=20latest=20version=20=F0=9F=9A=80=20(#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 83faf2027df..90ba8896bfe 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -68,7 +68,7 @@ "codecov": "^3.0.0", "eslint": "^4.9.0", "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": "^1.3.0", "intelli-espower-loader": "^1.0.1", From e47cbad8f8ac1b2a2927efbec262cac4748ad79f Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 22 Feb 2018 16:10:20 -0800 Subject: [PATCH 063/422] chore: removing node7 job from CircleCI (#23) * chore: removing node7 job from CircleCI * chore: rename reference --- .../.circleci/config.yml | 61 +++++++------------ 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 13f6f73c24f..0214c3350a6 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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' steps: - checkout - run: @@ -105,24 +95,19 @@ jobs: when: always node6: docker: - - image: node:6 - <<: *unit_tests - node7: - docker: - - image: node:7 - <<: *unit_tests + - image: 'node:6' + steps: *unit_tests node8: docker: - - image: node:8 - <<: *unit_tests + - image: 'node:8' + steps: *unit_tests node9: docker: - - image: node:9 - <<: *unit_tests - + - image: 'node:9' + steps: *unit_tests lint: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -140,10 +125,9 @@ jobs: - run: name: Run linting. command: npm run lint - docs: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -152,10 +136,9 @@ jobs: - run: name: Build documentation. command: npm run docs - sample_tests: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -187,10 +170,9 @@ jobs: command: rm .circleci/key.json when: always working_directory: /var/monitoring/ - system_tests: docker: - - image: node:8 + - image: 'node:8' steps: - checkout - run: @@ -212,15 +194,14 @@ jobs: name: Remove unencrypted key. command: rm .circleci/key.json when: always - publish_npm: docker: - - image: node:8 + - image: 'node:8' 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 7d5253b88bcb5a0b3558f73ee3958c0a52c7a2df Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 5 Mar 2018 16:22:26 -0500 Subject: [PATCH 064/422] fix(package): update google-gax to version 0.15.0 (#24) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 90ba8896bfe..c68e3513c10 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -58,7 +58,7 @@ }, "dependencies": { "extend": "^3.0", - "google-gax": "^0.14.2", + "google-gax": "^0.15.0", "lodash.merge": "^4.6.0", "lodash.union": "^4.6.0" }, From 5924eae0fd867ff4180571e595a476d740f497e1 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 14 Mar 2018 16:37:12 -0400 Subject: [PATCH 065/422] fix(package): update google-gax to version 0.16.0 (#25) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c68e3513c10..fd5518820d8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -58,7 +58,7 @@ }, "dependencies": { "extend": "^3.0", - "google-gax": "^0.15.0", + "google-gax": "^0.16.0", "lodash.merge": "^4.6.0", "lodash.union": "^4.6.0" }, From a9b0c0b19090b98dc248fe653660d092102be7f8 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 16 Mar 2018 12:45:14 -0700 Subject: [PATCH 066/422] Upgrade repo-tools and regenerate scaffolding. (#26) --- packages/google-cloud-monitoring/.gitignore | 1 - packages/google-cloud-monitoring/CONTRIBUTORS | 1 + packages/google-cloud-monitoring/README.md | 2 +- .../google-cloud-monitoring/package-lock.json | 12731 ++++++++++++++++ packages/google-cloud-monitoring/package.json | 3 +- .../google-cloud-monitoring/samples/README.md | 52 +- .../samples/package.json | 2 +- 7 files changed, 12764 insertions(+), 28 deletions(-) create mode 100644 packages/google-cloud-monitoring/package-lock.json diff --git a/packages/google-cloud-monitoring/.gitignore b/packages/google-cloud-monitoring/.gitignore index 6b80718f261..b7d407606fb 100644 --- a/packages/google-cloud-monitoring/.gitignore +++ b/packages/google-cloud-monitoring/.gitignore @@ -7,4 +7,3 @@ out/ system-test/secrets.js system-test/*key.json *.lock -*-lock.js* diff --git a/packages/google-cloud-monitoring/CONTRIBUTORS b/packages/google-cloud-monitoring/CONTRIBUTORS index 929c465352b..ad74b859d25 100644 --- a/packages/google-cloud-monitoring/CONTRIBUTORS +++ b/packages/google-cloud-monitoring/CONTRIBUTORS @@ -4,6 +4,7 @@ # name # Ace Nassri +Alexander Fenster Bill Prin Dave Gramlich Ernest Landrito diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 1fbf1ae4917..2f4511938dd 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -157,4 +157,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENS [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ [product-docs]: https://cloud.google.com/monitoring/docs -[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json new file mode 100644 index 00000000000..fb4e8299172 --- /dev/null +++ b/packages/google-cloud-monitoring/package-lock.json @@ -0,0 +1,12731 @@ +{ + "name": "@google-cloud/monitoring", + "version": "0.4.1", + "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.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.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/nodejs-repo-tools": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.3.tgz", + "integrity": "sha512-O6OVc8lKiLL8Qtoc1lVAynf5pJT550fHZcW33a7oQ7TMNkrTHPgeoYw4esi4KSbDRn8gV+cfefnkgqxXmr+KzA==", + "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-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": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "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.0", + "arr-flatten": "1.1.0", + "array-union": "1.0.2", + "array-uniq": "1.0.3", + "arrify": "1.0.1", + "auto-bind": "1.1.0", + "ava-init": "0.2.1", + "babel-core": "6.26.0", + "babel-generator": "6.26.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "bluebird": "3.5.1", + "caching-transform": "1.0.1", + "chalk": "2.2.0", + "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.0.10", + "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.1.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.1.2", + "pretty-ms": "3.0.1", + "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.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" + } + }, + "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.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" + } + }, + "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" + } + }, + "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 + }, + "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" + } + }, + "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" + } + }, + "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 + }, + "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" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "dev": true + }, + "lolex": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", + "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", + "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" + } + }, + "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" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "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 + }, + "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.4.0", + "lodash.get": "4.4.2", + "lolex": "2.3.2", + "nise": "1.2.0", + "supports-color": "5.3.0", + "type-detect": "4.0.8" + } + }, + "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-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" + } + }, + "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" + } + }, + "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 + }, + "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 + }, + "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" + } + }, + "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" + } + }, + "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" + } + } + } + }, + "@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" + } + }, + "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 + }, + "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 + }, + "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": "7.0.46", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.46.tgz", + "integrity": "sha512-u+JAi1KtmaUoU/EHJkxoiuvzyo91FCE41Z9TZWWcOUU3P8oUdlDLdrGzCGWySPgbRMD17B0B+1aaJLYI9egQ6A==" + }, + "acorn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", + "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", + "dev": true + }, + "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.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", + "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz", + "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=", + "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" + } + }, + "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-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.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "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.3.11", + "normalize-path": "2.1.1" + } + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "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": "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" + } + }, + "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.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "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.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + }, + "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.1.0", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.1.0.tgz", + "integrity": "sha1-k7hk3H7gGjJigXddXHXKCnUeWWE=", + "dev": true + }, + "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.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.0", + "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.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "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.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.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.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.3.2", + "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.3.2.tgz", + "integrity": "sha1-VRa4/NsmyfDh2BYHSfbkxl5xJx4=", + "dev": true, + "requires": { + "babel-generator": "6.26.0", + "babylon": "6.18.0", + "call-matcher": "1.0.1", + "core-js": "2.5.1", + "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.1", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + } + }, + "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.1", + "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.9", + "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.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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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.10.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", + "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", + "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.0" + } + }, + "boxen": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", + "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", + "dev": true, + "requires": { + "ansi-align": "2.0.0", + "camelcase": "4.1.0", + "chalk": "2.2.0", + "cli-boxes": "1.0.0", + "string-width": "2.1.1", + "term-size": "1.2.0", + "widest-line": "1.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.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "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" + } + }, + "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=" + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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.1", + "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" + } + }, + "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.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "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.2", + "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" + } + }, + "ci-info": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", + "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "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.5", + "mime-types": "2.1.17" + } + }, + "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.13.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.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.1.0" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "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.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "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=" + }, + "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.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "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.0", + "md5-hex": "2.0.0", + "semver": "5.4.1", + "well-known-symbols": "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.1.0", + "unique-string": "1.0.0", + "write-file-atomic": "2.3.0", + "xdg-basedir": "3.0.0" + } + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "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.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + }, + "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.1.1", + "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.0" + } + } + } + }, + "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.35" + } + }, + "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": "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" + } + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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" + } + } + } + }, + "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.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "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" + }, + "dependencies": { + "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" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, + "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.6.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz", + "integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=", + "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==", + "dev": true, + "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.3", + "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.1", + "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.1" + } + }, + "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" + } + }, + "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.35", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.35.tgz", + "integrity": "sha1-GO6FjOajxFx9eekcFfzKnsVoSU8=", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "es6-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz", + "integrity": "sha1-7sXHJurO9Rt/a3PCDbbhsTsGnJg=", + "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.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.0.0", + "es5-ext": "0.10.35", + "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.35", + "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.35" + } + }, + "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.35", + "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.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", + "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "dev": true, + "requires": { + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.5.7" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": 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.0", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.9.0.tgz", + "integrity": "sha1-doedJ0BoJhsZH+Dy9Wx0wvQgjos=", + "dev": true, + "requires": { + "ajv": "5.2.3", + "babel-code-frame": "6.26.0", + "chalk": "2.2.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.0.0", + "eslint-scope": "3.7.1", + "espree": "3.5.1", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.5", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.0.0", + "js-yaml": "3.10.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "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", + "require-uncached": "1.0.3", + "semver": "5.4.1", + "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 + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "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" + } + } + } + }, + "eslint-config-prettier": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.6.0.tgz", + "integrity": "sha1-8h2w67Q4rWePuYlGCXxLsZi+/Mw=", + "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.4.1" + }, + "dependencies": { + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, + "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.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz", + "integrity": "sha512-AV8shBlGN9tRZffj5v/f4uiQWlP3qiQ+lh+BhTqRLuKSyczx+HRWVkVZaf7dOmguxghAH1wftnou/JUEEChhGg==", + "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.0", + "estraverse": "4.2.0" + } + }, + "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.0", + "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.0", + "espower-source": "2.2.0", + "minimatch": "3.0.4", + "source-map-support": "0.4.18", + "xtend": "4.0.1" + } + }, + "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.1.2", + "acorn-es7-plugin": "1.1.7", + "convert-source-map": "1.5.0", + "empower-assert": "1.0.1", + "escodegen": "1.9.0", + "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" + } + }, + "espree": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz", + "integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=", + "dev": true, + "requires": { + "acorn": "5.1.2", + "acorn-jsx": "3.0.1" + } + }, + "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.1" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "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.35" + } + }, + "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": "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" + } + }, + "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" + } + }, + "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.0.5", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz", + "integrity": "sha512-Msjo64WT5W+NhOpQXh0nOHm+n0RfU1QUwDnKYvJ8dEJ8zlwLrqXNTv5mSUTJpepf41PDJGyhueTw2vNZW+Fr/w==", + "dev": true, + "requires": { + "iconv-lite": "0.4.19", + "jschardet": "1.5.1", + "tmp": "0.0.33" + } + }, + "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" + } + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "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" + } + } + } + }, + "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" + } + }, + "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": { + "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-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==" + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + }, + "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-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "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-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" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "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" + } + } + } + }, + "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": "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" + } + }, + "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.1.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.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "formidable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", + "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=", + "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.3" + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", + "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.7.0", + "node-pre-gyp": "0.6.36" + }, + "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, + "optional": 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 + }, + "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, + "optional": 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.36", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "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, + "optional": 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 + }, + "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" + } + }, + "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" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.0.tgz", + "integrity": "sha1-ENNAOeDfBCcuJizyQiT3IJQ0308=", + "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": "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" + } + }, + "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.4", + "protobufjs": "6.8.0", + "through2": "2.0.3" + }, + "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" + } + }, + "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.5", + "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.5.0", + "gcp-metadata": "0.6.3", + "google-auth-library": "1.3.2", + "request": "2.83.0" + } + }, + "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.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.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.5", + "pify": "3.0.0", + "slash": "1.0.0" + } + } + } + }, + "grpc": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.9.1.tgz", + "integrity": "sha512-WNW3MWMuAoo63AwIlzFE3T0KzzvNBSvOkg67Hm8WhvHNkXFBlIk1QyJRE3Ocm0O5eIwS7JU8Ssota53QR1zllg==", + "requires": { + "lodash": "4.17.4", + "nan": "2.7.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" + } + }, + "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" + } + }, + "mime": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + }, + "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==" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, + "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 + }, + "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.2.3", + "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.1", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.1.tgz", + "integrity": "sha512-JkaetveU7hFbqnAC1EV1sF4rlojU2D4Usc5CmS69l6NfmPDnpnFUegzFg33eDkkpNCxZ0mQp65HwUDrNFS/8MA==", + "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.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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": { + "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" + } + } + } + }, + "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 + }, + "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.0", + "sntp": "2.0.2" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "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.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "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.6.2", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "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.13.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.0.2", + "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.0", + "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.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", + "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==" + }, + "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.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true + }, + "ink-docstrap": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.0.tgz", + "integrity": "sha1-6QBeW7kCXMmpvo5ErYf4rViIyB0=", + "dev": true, + "requires": { + "moment": "2.19.1", + "sanitize-html": "1.14.1" + } + }, + "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.2.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.0.5", + "figures": "2.0.0", + "lodash": "4.17.4", + "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-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": "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.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "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-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" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "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.10.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.0.10", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true, + "requires": { + "ci-info": "1.1.1" + } + }, + "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" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "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" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "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": "1.0.0", + "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", + "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": "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" + } + }, + "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": "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" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "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": "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" + } + }, + "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.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true, + "requires": { + "tryit": "1.0.3" + } + }, + "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": "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" + } + }, + "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.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "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 + }, + "jschardet": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", + "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", + "dev": 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.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-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=", + "requires": { + "jsonify": "0.0.0" + } + }, + "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=" + }, + "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.26", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.26.tgz", + "integrity": "sha512-IIG0FXHB/XpUZ7vGbktoc2EGsF+fLHJ1tU+vaqoKkVRBwH2FDxLTmkGkSp0XHRp6Y3KGZPIldH1YW8lOluGYrA==", + "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": "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" + } + }, + "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" + } + }, + "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.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "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.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.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.0", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", + "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=" + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" + }, + "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.1", + "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", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "dev": true, + "requires": { + "pify": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "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": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "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=", + "requires": { + "object-visit": "1.0.1" + } + }, + "marked": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", + "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=", + "dev": true + }, + "matcher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.0.0.tgz", + "integrity": "sha1-qvDEgW62m5IJRnQXViXzRmsOPhk=", + "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.1.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" + } + }, + "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" + } + }, + "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==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "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" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "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.8" + } + }, + "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": { + "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 + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "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" + } + } + } + }, + "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.19.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz", + "integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc=", + "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.7.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + }, + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "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 + }, + "nise": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.2.0.tgz", + "integrity": "sha512-q9jXh3UNsMV28KeqI43ILz5+c3l+RiNW8mhurEwCKckuHQbL+hTJIKKTiUlCPKlgQ/OukFvSnKB/Jk3+sFbkGA==", + "dev": true, + "requires": { + "formatio": "1.2.0", + "just-extend": "1.1.26", + "lolex": "1.6.0", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" + }, + "dependencies": { + "lolex": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "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==", + "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", + "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.2.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.2.1.tgz", + "integrity": "sha1-rYUK/p261/SXByi0suR/7Rw4chw=", + "dev": true, + "requires": { + "archy": "1.0.0", + "arrify": "1.0.1", + "caching-transform": "1.0.1", + "convert-source-map": "1.5.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.6", + "glob": "7.1.2", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.0.7", + "istanbul-lib-instrument": "1.8.0", + "istanbul-lib-report": "1.1.1", + "istanbul-lib-source-maps": "1.2.1", + "istanbul-reports": "1.1.2", + "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.1", + "signal-exit": "3.0.2", + "spawn-wrap": "1.3.8", + "test-exclude": "4.1.1", + "yargs": "8.0.2", + "yargs-parser": "5.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.1", + "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 + }, + "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.0", + "bundled": true, + "dev": true + }, + "core-js": { + "version": "2.5.1", + "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.8", + "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.10", + "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.5", + "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.0.7", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.8.0", + "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.1", + "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.1", + "bundled": true, + "dev": true, + "requires": { + "debug": "2.6.8", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.1", + "source-map": "0.5.7" + } + }, + "istanbul-reports": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "4.0.10" + } + }, + "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.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.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, + "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.0", + "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.1", + "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.3.8", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "1.5.6", + "mkdirp": "0.5.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.1", + "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": "8.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.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": "7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "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" + } + } + } + }, + "load-json-file": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "path-type": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "yargs-parser": { + "version": "7.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.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==" + } + } + } + } + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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": { + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", + "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.1.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.1.0", + "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", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "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.1", + "registry-url": "3.1.0", + "semver": "5.4.1" + }, + "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" + } + }, + "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": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "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": "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" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "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" + } + }, + "pkg-conf": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", + "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "load-json-file": "2.0.0" + } + }, + "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=" + }, + "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.1", + "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.1", + "espurify": "1.7.0", + "estraverse": "4.2.0" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + } + } + }, + "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.1", + "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.1", + "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.1", + "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.1", + "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.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz", + "integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o=", + "dev": true + }, + "pretty-ms": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.0.1.tgz", + "integrity": "sha1-fBi3PCKKm49u3Cg1oSy49+2F+fQ=", + "dev": true, + "requires": { + "parse-ms": "1.0.1", + "plur": "2.1.2" + } + }, + "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": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "protobufjs": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", + "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "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": "7.0.46", + "long": "3.2.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" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "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": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "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=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", + "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "dev": 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", + "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" + } + }, + "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.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "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" + } + }, + "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.3", + "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.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "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-quote": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/regexp-quote/-/regexp-quote-0.0.0.tgz", + "integrity": "sha1-Hg9GUMhi3L/tVP1CsUjpuxch/PI=", + "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.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true, + "requires": { + "rc": "1.2.2", + "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.2" + } + }, + "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.2" + } + }, + "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.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "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", + "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", + "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.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.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==" + }, + "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.14.1", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.14.1.tgz", + "integrity": "sha1-cw/6Ikm98YMz7/5FsoYXPJxa0Lg=", + "dev": true, + "requires": { + "htmlparser2": "3.9.2", + "regexp-quote": "0.0.0", + "xtend": "4.0.1" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "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.4.1" + } + }, + "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 + }, + "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 + }, + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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" + } + }, + "sntp": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", + "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", + "requires": { + "hoek": "4.2.0" + } + }, + "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.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" + } + }, + "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": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "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=", + "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=", + "dev": true + }, + "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 + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "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-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-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.1", + "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 + }, + "superagent": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.0.tgz", + "integrity": "sha512-71XGWgtn70TNwgmgYa69dPOYg55aU9FCahjUNY03rOrKvaTCaU3b9MeZmqonmf9Od96SCxr3vGfEAnhM7dtxCw==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "cookiejar": "2.1.1", + "debug": "3.1.0", + "extend": "3.0.1", + "form-data": "2.3.1", + "formidable": "1.1.1", + "methods": "1.1.2", + "mime": "1.4.1", + "qs": "6.5.1", + "readable-stream": "2.3.3" + } + }, + "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.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.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + }, + "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 + }, + "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.2.3", + "ajv-keywords": "2.1.0", + "chalk": "2.2.0", + "lodash": "4.17.4", + "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.3", + "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-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" + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "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 + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "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-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.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=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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.2.2", + "chalk": "2.2.0", + "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" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "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.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "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=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "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": "1.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", + "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "dev": true, + "requires": { + "string-width": "1.0.2" + } + }, + "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.1.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 + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "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" + } + } + } +} diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index fd5518820d8..a575dd85e61 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -30,6 +30,7 @@ ], "contributors": [ "Ace Nassri ", + "Alexander Fenster ", "Bill Prin ", "Dave Gramlich ", "Ernest Landrito ", @@ -63,7 +64,7 @@ "lodash.union": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.1.0", + "@google-cloud/nodejs-repo-tools": "^2.2.3", "async": "^2.5.0", "codecov": "^3.0.0", "eslint": "^4.9.0", diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 36355ab7cad..37d70aa3edf 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -30,28 +30,30 @@ View the [source code][metrics_0_code]. __Usage:__ `node metrics.js --help` ``` +metrics.js + Commands: - create [projectId] Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric - descriptor. - list [projectId] Lists metric descriptors. - get [projectId] Get a metric descriptor. - delete [projectId] Deletes a custom metric descriptor. - write [projectId] Writes example time series data to - 'custom.googleapis.com/stores/daily_sales'. - read [projectId] Reads time series data that matches the given filter. - read-fields [projectId] Reads headers of time series data that matches - 'compute.googleapis.com/instance/cpu/utilization'. - read-aggregate [projectId] Aggregates time series data that matches - 'compute.googleapis.com/instance/cpu/utilization'. - read-reduce [projectId] Reduces time series data that matches - 'compute.googleapis.com/instance/cpu/utilization'. - list-resources [projectId] Lists monitored resource descriptors. - get-resource [projectId] Get a monitored resource descriptor. + metrics.js create [projectId] Creates an example 'custom.googleapis.com/stores/daily_sales' + custom metric descriptor. + metrics.js list [projectId] Lists metric descriptors. + metrics.js get [projectId] Get a metric descriptor. + metrics.js delete [projectId] Deletes a custom metric descriptor. + metrics.js write [projectId] Writes example time series data to + 'custom.googleapis.com/stores/daily_sales'. + metrics.js read [projectId] Reads time series data that matches the given filter. + metrics.js read-fields [projectId] Reads headers of time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + metrics.js read-aggregate [projectId] Aggregates time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + metrics.js read-reduce [projectId] Reduces time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + metrics.js list-resources [projectId] Lists monitored resource descriptors. + metrics.js get-resource [projectId] Get a monitored resource descriptor. Options: --version Show version number [boolean] - --help Show help [boolean] --projectId, -p [string] + --help Show help [boolean] Examples: node metrics.js create @@ -81,17 +83,19 @@ View the [source code][uptime_1_code]. __Usage:__ `node uptime.js --help` ``` +uptime.js + Commands: - create [projectId] Creates an uptime check config. - list [projectId] Lists uptime check configs. - list-ips Lists uptime check config IPs. - get [projectId] Gets an uptime check config. - delete [projectId] Deletes an uptime check config. + uptime.js create [projectId] Creates an uptime check config. + uptime.js list [projectId] Lists uptime check configs. + uptime.js list-ips Lists uptime check config IPs. + uptime.js get [projectId] Gets an uptime check config. + uptime.js delete [projectId] Deletes an uptime check config. Options: --version Show version number [boolean] - --help Show help [boolean] --projectId, -p [string] + --help Show help [boolean] Examples: node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance. @@ -108,5 +112,5 @@ For more information, see https://cloud.google.com/monitoring/uptime-checks/ [uptime_1_docs]: https://cloud.google.com/monitoring/docs [uptime_1_code]: uptime.js -[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_img]: //gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/README.md diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index c867c228a35..c6afe67e773 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -16,7 +16,7 @@ "yargs": "10.0.3" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.1.0", + "@google-cloud/nodejs-repo-tools": "2.2.3", "ava": "0.23.0", "proxyquire": "1.8.0", "sinon": "4.0.2" From 3b69ddd12fa9ccccf8f275a15644f4a32f7d7e04 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Tue, 20 Mar 2018 07:49:55 +1300 Subject: [PATCH 067/422] v0.5.0 (#27) --- packages/google-cloud-monitoring/package-lock.json | 2 +- packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index fb4e8299172..d45366c7666 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring", - "version": "0.4.1", + "version": "0.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a575dd85e61..f676c61f551 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.4.1", + "version": "0.5.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From 1642b97f7fd51337f99ae548281513908e7d98a5 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 19 Mar 2018 18:31:49 -0700 Subject: [PATCH 068/422] chore: setup nighty build in CircleCI (#28) * chore: setup nighty build in CircleCI * chore: setup nighty build in CircleCI --- .../.circleci/config.yml | 48 +++++++------ .../.circleci/get_workflow_name.py | 67 +++++++++++++++++++ 2 files changed, 96 insertions(+), 19 deletions(-) create mode 100644 packages/google-cloud-monitoring/.circleci/get_workflow_name.py diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 0214c3350a6..5553088d5fb 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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,15 +64,34 @@ 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' - 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 @@ -96,20 +102,21 @@ jobs: node6: docker: - image: 'node:6' - steps: *unit_tests + steps: *unit_tests_steps node8: docker: - image: 'node:8' - steps: *unit_tests + steps: *unit_tests_steps node9: docker: - image: 'node:9' - steps: *unit_tests + steps: *unit_tests_steps lint: docker: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Install modules and dependencies. command: | @@ -130,6 +137,7 @@ jobs: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Install modules and dependencies. command: npm install @@ -141,6 +149,7 @@ jobs: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -175,6 +184,7 @@ jobs: - image: 'node:8' steps: - checkout + - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/packages/google-cloud-monitoring/.circleci/get_workflow_name.py b/packages/google-cloud-monitoring/.circleci/get_workflow_name.py new file mode 100644 index 00000000000..ff6b58fd24f --- /dev/null +++ b/packages/google-cloud-monitoring/.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 addf9c00d895b3f1002d44a5d8ca80e62166120d Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 21 Mar 2018 07:48:59 -0700 Subject: [PATCH 069/422] chore: make samples depend on the current version (#30) --- .../google-cloud-monitoring/package-lock.json | 6546 ++++++++++------- .../samples/package.json | 2 +- 2 files changed, 3909 insertions(+), 2639 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index d45366c7666..82b9b581b67 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -57,7 +57,7 @@ "dev": true, "requires": { "@ava/babel-plugin-throws-helper": "2.0.0", - "babel-plugin-espower": "2.3.2" + "babel-plugin-espower": "2.4.0" } }, "@ava/write-file-atomic": { @@ -81,9 +81,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.3.tgz", - "integrity": "sha512-O6OVc8lKiLL8Qtoc1lVAynf5pJT550fHZcW33a7oQ7TMNkrTHPgeoYw4esi4KSbDRn8gV+cfefnkgqxXmr+KzA==", + "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", @@ -101,115 +101,12 @@ "yargs-parser": "9.0.2" }, "dependencies": { - "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": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "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.0", - "arr-flatten": "1.1.0", - "array-union": "1.0.2", - "array-uniq": "1.0.3", - "arrify": "1.0.1", - "auto-bind": "1.1.0", - "ava-init": "0.2.1", - "babel-core": "6.26.0", - "babel-generator": "6.26.0", - "babel-plugin-syntax-object-rest-spread": "6.13.0", - "bluebird": "3.5.1", - "caching-transform": "1.0.1", - "chalk": "2.2.0", - "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.0.10", - "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.1.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.1.2", - "pretty-ms": "3.0.1", - "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.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" - } - }, - "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.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", @@ -221,84 +118,12 @@ "wrap-ansi": "2.1.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" - } - }, - "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 - }, - "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" - } - }, - "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" - } - }, "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 }, - "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" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "lolex": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.3.2.tgz", - "integrity": "sha512-A5pN2tkFj7H0dGIAM6MFvHKMJcPnjZsOMvR7ujCjfgW5TbV6H9vb1PgxLtHvjqNZTHsUolz+6/WEO0N1xNx2ng==", - "dev": true - }, "nyc": { "version": "11.4.1", "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", @@ -1904,57 +1729,6 @@ "mem": "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" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "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 - }, - "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.4.0", - "lodash.get": "4.4.2", - "lolex": "2.3.2", - "nise": "1.2.0", - "supports-color": "5.3.0", - "type-detect": "4.0.8" - } - }, - "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-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" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -1974,44 +1748,6 @@ "ansi-regex": "3.0.0" } }, - "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 - }, - "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 - }, - "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" - } - }, "yargs": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", @@ -2031,15 +1767,6 @@ "y18n": "3.2.1", "yargs-parser": "9.0.2" } - }, - "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" - } } } }, @@ -2072,18 +1799,6 @@ "strip-ansi": "0.1.1" } }, - "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 - }, - "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 - }, "pretty-ms": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-0.2.2.tgz", @@ -2185,15 +1900,14 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "7.0.46", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.46.tgz", - "integrity": "sha512-u+JAi1KtmaUoU/EHJkxoiuvzyo91FCE41Z9TZWWcOUU3P8oUdlDLdrGzCGWySPgbRMD17B0B+1aaJLYI9egQ6A==" + "version": "8.9.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz", + "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==" }, "acorn": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", - "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", - "dev": true + "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", @@ -2218,20 +1932,20 @@ } }, "ajv": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", - "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "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", - "json-schema-traverse": "0.3.1", - "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" } }, "ajv-keywords": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz", - "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=", + "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": { @@ -2243,6 +1957,17 @@ "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": { @@ -2293,18 +2018,24 @@ } } }, + "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.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "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" + "color-convert": "1.9.1" } }, "anymatch": { @@ -2315,12 +2046,103 @@ "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.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "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" @@ -2333,13 +2155,9 @@ "dev": true }, "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" - } + "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", @@ -2394,10 +2212,9 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true + "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", @@ -2429,11 +2246,11 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { - "lodash": "4.17.4" + "lodash": "4.17.5" } }, "async-each": { @@ -2453,35 +2270,186 @@ "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=" }, "auto-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.1.0.tgz", - "integrity": "sha1-k7hk3H7gGjJigXddXHXKCnUeWWE=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.0.tgz", + "integrity": "sha512-Zw7pZp7tztvKnWWtoII4AmqH5a2PV3ZN5F0BPRTGcc1kpRm4b6QXQnPU7Znbl6BfPfqOVOV29g4JeMqZQaqqOA==", "dev": true }, - "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==", + "ava": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-0.25.0.tgz", + "integrity": "sha512-4lGNJCf6xL8SvsKVEKxEE46se7JAUIAZoKHw9itTQuwcsydhpAMkBs5gOOiWiwt0JKNIuXWc2/r4r8ZdcNrBEw==", "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": { + "@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 + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "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" + } + }, + "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=", @@ -2535,7 +2503,7 @@ "dev": true, "requires": { "babel-code-frame": "6.26.0", - "babel-generator": "6.26.0", + "babel-generator": "6.26.1", "babel-helpers": "6.24.1", "babel-messages": "6.23.0", "babel-register": "6.26.0", @@ -2544,32 +2512,21 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "debug": "2.6.9", "json5": "0.5.1", - "lodash": "4.17.4", + "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.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "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", @@ -2577,7 +2534,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.4", + "lodash": "4.17.5", "source-map": "0.5.7", "trim-right": "1.0.1" }, @@ -2665,7 +2622,7 @@ "requires": { "babel-runtime": "6.26.0", "babel-types": "6.26.0", - "lodash": "4.17.4" + "lodash": "4.17.5" } }, "babel-helper-remap-async-to-generator": { @@ -2710,15 +2667,15 @@ } }, "babel-plugin-espower": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-2.3.2.tgz", - "integrity": "sha1-VRa4/NsmyfDh2BYHSfbkxl5xJx4=", + "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.0", + "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.1", + "core-js": "2.5.3", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -2865,11 +2822,22 @@ "requires": { "babel-core": "6.26.0", "babel-runtime": "6.26.0", - "core-js": "2.5.1", + "core-js": "2.5.3", "home-or-tmp": "2.0.0", - "lodash": "4.17.4", + "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": { @@ -2878,8 +2846,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -2892,7 +2860,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.4" + "lodash": "4.17.5" } }, "babel-traverse": { @@ -2908,19 +2876,8 @@ "babylon": "6.18.0", "debug": "2.6.9", "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" - } - } + "invariant": "2.2.4", + "lodash": "4.17.5" } }, "babel-types": { @@ -2931,7 +2888,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.4", + "lodash": "4.17.5", "to-fast-properties": "1.0.3" } }, @@ -2967,11 +2924,6 @@ "requires": { "is-descriptor": "1.0.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, @@ -2990,9 +2942,9 @@ } }, "binary-extensions": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", - "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", "dev": true }, "bluebird": { @@ -3006,22 +2958,22 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } }, "boxen": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", - "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", + "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.2.0", + "chalk": "2.3.2", "cli-boxes": "1.0.0", "string-width": "2.1.1", "term-size": "1.2.0", - "widest-line": "1.0.0" + "widest-line": "2.0.0" }, "dependencies": { "ansi-regex": { @@ -3064,25 +3016,57 @@ } }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "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": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", "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", + "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", @@ -3106,6 +3090,13 @@ "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { "long": "3.2.0" + }, + "dependencies": { + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + } } }, "cache-base": { @@ -3122,13 +3113,6 @@ "to-object-path": "0.3.0", "union-value": "1.0.0", "unset-value": "1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "cacheable-request": { @@ -3185,7 +3169,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.1", + "core-js": "2.5.3", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3263,16 +3247,22 @@ } }, "chalk": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", - "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "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.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "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", @@ -3281,19 +3271,45 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.2", + "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.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", - "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", + "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": { @@ -3367,11 +3383,6 @@ "kind-of": "5.1.0" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", @@ -3492,23 +3503,15 @@ "dev": true, "requires": { "pinkie-promise": "1.0.0" - }, - "dependencies": { - "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" - } - } + } + }, + "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": { @@ -3574,8 +3577,8 @@ "dev": 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" } }, "har-schema": { @@ -3620,7 +3623,7 @@ "requires": { "assert-plus": "0.2.0", "jsprim": "1.4.1", - "sshpk": "1.13.1" + "sshpk": "1.14.1" } }, "performance-now": { @@ -3644,7 +3647,7 @@ "aws-sign2": "0.6.0", "aws4": "1.6.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", @@ -3654,15 +3657,15 @@ "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", "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.1.0" + "uuid": "3.2.1" } }, "sntp": { @@ -3686,9 +3689,9 @@ } }, "color-convert": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", - "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "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" @@ -3712,9 +3715,9 @@ "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" }, "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "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" } @@ -3748,13 +3751,13 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.5", "typedarray": "0.0.6" } }, @@ -3771,10 +3774,21 @@ "js-string-escape": "1.0.1", "lodash.clonedeep": "4.5.0", "lodash.flattendeep": "4.4.0", - "lodash.merge": "4.6.0", + "lodash.merge": "4.6.1", "md5-hex": "2.0.0", - "semver": "5.4.1", + "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": { @@ -3785,16 +3799,16 @@ "requires": { "dot-prop": "4.2.0", "graceful-fs": "4.1.11", - "make-dir": "1.1.0", + "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.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "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": { @@ -3825,9 +3839,9 @@ } }, "core-js": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", - "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + "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", @@ -3849,7 +3863,7 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -3867,7 +3881,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } } } @@ -3893,7 +3907,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.35" + "es5-ext": "0.10.41" } }, "dashdash": { @@ -3905,18 +3919,15 @@ } }, "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" - } + "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==", + "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" } @@ -3974,13 +3985,6 @@ "requires": { "is-descriptor": "1.0.2", "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "del": { @@ -4011,9 +4015,30 @@ "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", @@ -4029,9 +4054,9 @@ } }, "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "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": { @@ -4046,31 +4071,15 @@ "requires": { "arrify": "1.0.1", "path-type": "3.0.0" - }, - "dependencies": { - "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" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } } }, "doctrine": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", - "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "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", - "isarray": "1.0.0" + "esutils": "2.0.2" } }, "dom-serializer": { @@ -4107,9 +4116,9 @@ } }, "domutils": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.6.2.tgz", - "integrity": "sha1-GVjMC0yUJuntNn+xyOhUiRsPo/8=", + "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", @@ -4138,7 +4147,7 @@ "requires": { "end-of-stream": "1.4.1", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.5", "stream-shift": "1.0.0" } }, @@ -4170,7 +4179,7 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.3", "empower-core": "0.6.2" } }, @@ -4189,7 +4198,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.1" + "core-js": "2.5.3" } }, "end-of-stream": { @@ -4222,19 +4231,20 @@ } }, "es5-ext": { - "version": "0.10.35", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.35.tgz", - "integrity": "sha1-GO6FjOajxFx9eekcFfzKnsVoSU8=", + "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" + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" } }, "es6-error": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz", - "integrity": "sha1-7sXHJurO9Rt/a3PCDbbhsTsGnJg=", + "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": { @@ -4244,7 +4254,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.35", + "es5-ext": "0.10.41", "es6-symbol": "3.1.1" } }, @@ -4255,7 +4265,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.35", + "es5-ext": "0.10.41", "es6-iterator": "2.0.3", "es6-set": "0.1.5", "es6-symbol": "3.1.1", @@ -4269,7 +4279,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.35", + "es5-ext": "0.10.41", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" @@ -4282,7 +4292,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.35" + "es5-ext": "0.10.41" } }, "es6-weak-map": { @@ -4292,7 +4302,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.35", + "es5-ext": "0.10.41", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1" } @@ -4322,16 +4332,16 @@ "dev": true }, "escodegen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", - "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "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.5.7" + "source-map": "0.6.1" }, "dependencies": { "esprima": { @@ -4339,6 +4349,13 @@ "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 } } }, @@ -4350,40 +4367,40 @@ "requires": { "es6-map": "0.1.5", "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, "eslint": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.9.0.tgz", - "integrity": "sha1-doedJ0BoJhsZH+Dy9Wx0wvQgjos=", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.0.tgz", + "integrity": "sha512-r83L5CuqaocDvfwdojbz68b6tCUk8KJkqfppO+gmSAQqYCzTr0bCSMu6A6yFCLKG65j5eKcKUw4Cw4Yl4gfWkg==", "dev": true, "requires": { - "ajv": "5.2.3", + "ajv": "5.5.2", "babel-code-frame": "6.26.0", - "chalk": "2.2.0", - "concat-stream": "1.6.0", + "chalk": "2.3.2", + "concat-stream": "1.6.1", "cross-spawn": "5.1.0", "debug": "3.1.0", - "doctrine": "2.0.0", + "doctrine": "2.1.0", "eslint-scope": "3.7.1", - "espree": "3.5.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", "esquery": "1.0.0", - "estraverse": "4.2.0", "esutils": "2.0.2", "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.5", + "globals": "11.3.0", + "ignore": "3.3.7", "imurmurhash": "0.1.4", "inquirer": "3.3.0", - "is-resolvable": "1.0.0", - "js-yaml": "3.10.0", - "json-stable-stringify": "1.0.1", + "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.4", + "lodash": "4.17.5", "minimatch": "3.0.4", "mkdirp": "0.5.1", "natural-compare": "1.4.0", @@ -4391,8 +4408,9 @@ "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.4.1", + "semver": "5.5.0", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", "table": "4.0.2", @@ -4414,6 +4432,12 @@ "ms": "2.0.0" } }, + "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", @@ -4426,9 +4450,9 @@ } }, "eslint-config-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.6.0.tgz", - "integrity": "sha1-8h2w67Q4rWePuYlGCXxLsZi+/Mw=", + "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" @@ -4450,20 +4474,14 @@ "requires": { "ignore": "3.3.7", "minimatch": "3.0.4", - "resolve": "1.5.0", - "semver": "5.4.1" + "resolve": "1.6.0", + "semver": "5.5.0" }, "dependencies": { - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", - "dev": true - }, "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" @@ -4472,9 +4490,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz", - "integrity": "sha512-AV8shBlGN9tRZffj5v/f4uiQWlP3qiQ+lh+BhTqRLuKSyczx+HRWVkVZaf7dOmguxghAH1wftnou/JUEEChhGg==", + "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", @@ -4487,10 +4505,16 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.2.0", + "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", @@ -4499,7 +4523,7 @@ "requires": { "array-find": "1.0.0", "escallmatch": "1.5.0", - "escodegen": "1.9.0", + "escodegen": "1.9.1", "escope": "3.6.0", "espower-location-detector": "1.0.0", "espurify": "1.7.0", @@ -4515,11 +4539,22 @@ "integrity": "sha1-7bRsPFmga6yOpzppXIblxaC8gto=", "dev": true, "requires": { - "convert-source-map": "1.5.0", + "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": { @@ -4528,7 +4563,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" @@ -4540,27 +4575,43 @@ "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", "dev": true, "requires": { - "acorn": "5.1.2", + "acorn": "5.5.3", "acorn-es7-plugin": "1.1.7", - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "empower-assert": "1.0.1", - "escodegen": "1.9.0", + "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.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz", - "integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=", + "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.1.2", + "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": { @@ -4574,7 +4625,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.1" + "core-js": "2.5.3" } }, "esquery": { @@ -4587,13 +4638,12 @@ } }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "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", - "object-assign": "4.1.1" + "estraverse": "4.2.0" } }, "estraverse": { @@ -4614,7 +4664,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.35" + "es5-ext": "0.10.41" } }, "execa": { @@ -4633,12 +4683,86 @@ } }, "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { - "is-posix-bracket": "0.1.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": { + "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": { @@ -4648,6 +4772,48 @@ "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": { @@ -4675,23 +4841,47 @@ } }, "external-editor": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz", - "integrity": "sha512-Msjo64WT5W+NhOpQXh0nOHm+n0RfU1QUwDnKYvJ8dEJ8zlwLrqXNTv5mSUTJpepf41PDJGyhueTw2vNZW+Fr/w==", + "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", - "jschardet": "1.5.1", "tmp": "0.0.33" } }, "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "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", + "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": { @@ -4700,9 +4890,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + "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", @@ -4720,282 +4910,13 @@ "is-glob": "4.0.0", "merge2": "1.2.1", "micromatch": "3.1.9" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "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" - } - } - } - }, - "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" - } - }, - "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": { - "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-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==" - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "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-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" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - }, - "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" - } - } } }, + "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", @@ -5038,16 +4959,24 @@ } }, "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, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "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", + "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": { @@ -5057,7 +4986,7 @@ "dev": true, "requires": { "commondir": "1.0.1", - "make-dir": "1.1.0", + "make-dir": "1.2.0", "pkg-dir": "2.0.0" } }, @@ -5094,6 +5023,16 @@ "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", "requires": { "debug": "3.1.0" + }, + "dependencies": { + "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" + } + } } }, "for-in": { @@ -5121,28 +5060,19 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "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.5", - "mime-types": "2.1.17" - } - }, - "formatio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", - "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true, - "requires": { - "samsam": "1.3.0" + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "formidable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", - "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=", + "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": { @@ -5160,7 +5090,18 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.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": { @@ -5169,14 +5110,14 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", + "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.7.0", - "node-pre-gyp": "0.6.36" + "nan": "2.10.0", + "node-pre-gyp": "0.6.39" }, "dependencies": { "abbrev": { @@ -5334,7 +5275,6 @@ "version": "2.0.5", "bundled": true, "dev": true, - "optional": true, "requires": { "boom": "2.10.1" } @@ -5382,6 +5322,12 @@ "dev": true, "optional": true }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, "ecc-jsbn": { "version": "0.1.1", "bundled": true, @@ -5523,7 +5469,6 @@ "version": "3.1.3", "bundled": true, "dev": true, - "optional": true, "requires": { "boom": "2.10.1", "cryptiles": "2.0.5", @@ -5695,11 +5640,13 @@ "optional": true }, "node-pre-gyp": { - "version": "0.6.36", + "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", @@ -5907,7 +5854,6 @@ "version": "1.0.9", "bundled": true, "dev": true, - "optional": true, "requires": { "hoek": "2.16.3" } @@ -6079,6 +6025,16 @@ "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" + } + }, "get-caller-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", @@ -6137,29 +6093,65 @@ "requires": { "glob-parent": "2.0.0", "is-glob": "2.0.1" - } - }, - "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" - } - }, - "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.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.0.tgz", - "integrity": "sha1-ENNAOeDfBCcuJizyQiT3IJQ0308=", + }, + "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.4" + "ini": "1.3.5" } }, "globals": { @@ -6169,16 +6161,42 @@ "dev": true }, "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, + "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", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "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": { @@ -6193,873 +6211,840 @@ "google-proto-files": "0.15.1", "grpc": "1.9.1", "is-stream-ended": "0.1.3", - "lodash": "4.17.4", - "protobufjs": "6.8.0", + "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": { - "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" - } - }, "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "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", - "fast-glob": "2.2.0", "glob": "7.1.2", - "ignore": "3.3.5", + "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 }, - "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==", + "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": { - "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" + "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 }, - "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==", + "ajv": { + "version": "4.11.8", + "bundled": true, "requires": { - "async": "2.5.0", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.3.2", - "request": "2.83.0" + "co": "4.6.0", + "json-stable-stringify": "1.0.1" } }, - "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==", + "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": { - "node-forge": "0.7.4", - "pify": "3.0.0" + "tweetnacl": "0.14.5" } }, - "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==", + "block-stream": { + "version": "0.0.9", + "bundled": 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=", - "requires": { - "array-union": "1.0.2", - "dir-glob": "2.0.0", - "glob": "7.1.2", - "ignore": "3.3.5", - "pify": "3.0.0", - "slash": "1.0.0" - } - } + "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" } }, - "grpc": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.9.1.tgz", - "integrity": "sha512-WNW3MWMuAoo63AwIlzFE3T0KzzvNBSvOkg67Hm8WhvHNkXFBlIk1QyJRE3Ocm0O5eIwS7JU8Ssota53QR1zllg==", + "dashdash": { + "version": "1.14.1", + "bundled": true, "requires": { - "lodash": "4.17.4", - "nan": "2.7.0", - "node-pre-gyp": "0.6.39", - "protobufjs": "5.0.2" + "assert-plus": "1.0.0" }, "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", + } + } + }, + "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 - }, - "util-deprecate": { - "version": "1.0.2", + } + } + }, + "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 - }, - "uuid": { - "version": "3.2.1", + } + } + }, + "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 - }, - "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", + } + } + }, + "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 } } }, - "gtoken": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.2.0.tgz", - "integrity": "sha512-tvQs8B1z5+I1FzMPZnq/OCuxTWFOkvy7cUJcpNdBOK2L7yEtPZTVCPtZU181sSDF+isUPebSqFTNTkIejFASAQ==", + "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": { - "axios": "0.18.0", - "google-p12-pem": "1.0.2", - "jws": "3.1.4", - "mime": "2.2.0", - "pify": "3.0.0" + "punycode": "1.4.1" } }, - "lru-cache": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "safe-buffer": "5.1.1" } }, - "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true }, - "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==" + "uid-number": { + "version": "0.0.6", + "bundled": true }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "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 } } }, - "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 + "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", @@ -7100,7 +7085,7 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "5.2.3", + "ajv": "5.5.2", "har-schema": "2.0.0" } }, @@ -7126,9 +7111,9 @@ "dev": true }, "has-symbol-support-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.1.tgz", - "integrity": "sha512-JkaetveU7hFbqnAC1EV1sF4rlojU2D4Usc5CmS69l6NfmPDnpnFUegzFg33eDkkpNCxZ0mQp65HwUDrNFS/8MA==", + "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": { @@ -7137,7 +7122,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": { @@ -7148,13 +7133,6 @@ "get-value": "2.0.6", "has-values": "1.0.0", "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "has-values": { @@ -7166,24 +7144,6 @@ "kind-of": "4.0.0" }, "dependencies": { - "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" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -7207,8 +7167,8 @@ "requires": { "boom": "4.3.1", "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.0.2" + "hoek": "4.2.1", + "sntp": "2.1.0" } }, "he": { @@ -7218,9 +7178,9 @@ "dev": true }, "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + "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", @@ -7233,9 +7193,9 @@ } }, "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==", + "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": { @@ -7246,10 +7206,10 @@ "requires": { "domelementtype": "1.3.0", "domhandler": "2.4.1", - "domutils": "1.6.2", + "domutils": "1.7.0", "entities": "1.1.1", "inherits": "2.0.3", - "readable-stream": "2.3.3" + "readable-stream": "2.3.5" } }, "http-cache-semantics": { @@ -7265,7 +7225,7 @@ "requires": { "assert-plus": "1.0.0", "jsprim": "1.4.1", - "sshpk": "1.13.1" + "sshpk": "1.14.1" } }, "hullabaloo-config-manager": { @@ -7275,14 +7235,14 @@ "dev": true, "requires": { "dot-prop": "4.2.0", - "es6-error": "4.0.2", + "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.0", + "lodash.merge": "4.6.1", "md5-hex": "2.0.0", "package-hash": "2.0.0", "pkg-dir": "2.0.0", @@ -7297,9 +7257,9 @@ "dev": true }, "ignore": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", - "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==" + "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", @@ -7355,19 +7315,19 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "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": "1.3.0", - "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.0.tgz", - "integrity": "sha1-6QBeW7kCXMmpvo5ErYf4rViIyB0=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz", + "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", "dev": true, "requires": { - "moment": "2.19.1", - "sanitize-html": "1.14.1" + "moment": "2.21.0", + "sanitize-html": "1.18.2" } }, "inquirer": { @@ -7377,12 +7337,12 @@ "dev": true, "requires": { "ansi-escapes": "3.0.0", - "chalk": "2.2.0", + "chalk": "2.3.2", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.0.5", + "external-editor": "2.1.0", "figures": "2.0.0", - "lodash": "4.17.4", + "lodash": "4.17.5", "mute-stream": "0.0.7", "run-async": "2.3.0", "rx-lite": "4.0.8", @@ -7392,12 +7352,6 @@ "through": "2.3.8" }, "dependencies": { - "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": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -7451,9 +7405,9 @@ } }, "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "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" @@ -7476,13 +7430,6 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } } }, "is-arrayish": { @@ -7497,7 +7444,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.10.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -7515,12 +7462,12 @@ } }, "is-ci": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", - "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "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.1" + "ci-info": "1.1.3" } }, "is-data-descriptor": { @@ -7529,13 +7476,6 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } } }, "is-descriptor": { @@ -7546,13 +7486,6 @@ "is-accessor-descriptor": "1.0.0", "is-data-descriptor": "1.0.0", "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } } }, "is-dotfile": { @@ -7582,10 +7515,9 @@ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "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 + "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", @@ -7611,12 +7543,11 @@ "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, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { - "is-extglob": "1.0.0" + "is-extglob": "2.1.1" } }, "is-installed-globally": { @@ -7625,8 +7556,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": { @@ -7636,12 +7567,21 @@ "dev": true }, "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, + "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": { @@ -7657,12 +7597,12 @@ "dev": true }, "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "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": "0.2.4" + "symbol-observable": "1.2.0" } }, "is-odd": { @@ -7692,13 +7632,13 @@ "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", "dev": true, "requires": { - "is-path-inside": "1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", - "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "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" @@ -7716,13 +7656,6 @@ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "is-posix-bracket": { @@ -7750,13 +7683,10 @@ "dev": true }, "is-resolvable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", - "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", - "dev": true, - "requires": { - "tryit": "1.0.3" - } + "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", @@ -7781,9 +7711,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": { @@ -7809,13 +7739,9 @@ "dev": true }, "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" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isstream": { "version": "0.1.2", @@ -7851,12 +7777,12 @@ "dev": true }, "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "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.9", + "argparse": "1.0.10", "esprima": "4.0.0" } }, @@ -7875,12 +7801,6 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, - "jschardet": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.1.tgz", - "integrity": "sha512-vE2hT1D0HLZCLLclfBSfkfTTedhVj0fubHpJBHKwwUWX0nSbhPAfk+SG9rTX95BYNmau8rGFfCeaT6T5OW1C2A==", - "dev": true - }, "jsdoc": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", @@ -7893,7 +7813,7 @@ "escape-string-regexp": "1.0.5", "js2xmlparser": "3.0.0", "klaw": "2.0.0", - "marked": "0.3.6", + "marked": "0.3.17", "mkdirp": "0.5.1", "requizzle": "0.2.1", "strip-json-comments": "2.0.1", @@ -7921,6 +7841,12 @@ "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", @@ -7935,10 +7861,17 @@ "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", @@ -7962,7 +7895,8 @@ "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true }, "jsprim": { "version": "1.4.1", @@ -7976,9 +7910,9 @@ } }, "just-extend": { - "version": "1.1.26", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.26.tgz", - "integrity": "sha512-IIG0FXHB/XpUZ7vGbktoc2EGsF+fLHJ1tU+vaqoKkVRBwH2FDxLTmkGkSp0XHRp6Y3KGZPIldH1YW8lOluGYrA==", + "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": { @@ -8012,12 +7946,9 @@ } }, "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" - } + "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", @@ -8081,6 +8012,14 @@ "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": { @@ -8094,9 +8033,9 @@ } }, "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" }, "lodash.clonedeep": { "version": "4.5.0", @@ -8122,6 +8061,12 @@ "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", @@ -8146,25 +8091,43 @@ "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.0", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", - "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=" + "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.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" }, + "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=" + "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", @@ -8198,30 +8161,21 @@ "dev": true }, "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==", - "dev": true, + "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.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", - "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "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" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "map-cache": { @@ -8244,15 +8198,15 @@ } }, "marked": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", - "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=", + "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.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.0.0.tgz", - "integrity": "sha1-qvDEgW62m5IJRnQXViXzRmsOPhk=", + "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" @@ -8279,7 +8233,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "1.2.0" } }, "meow": { @@ -8349,6 +8303,27 @@ "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", @@ -8408,49 +8383,47 @@ "dev": true }, "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", "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.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": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", + "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" }, "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + "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.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "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.30.0" + "mime-db": "1.33.0" } }, "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "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": { @@ -8464,7 +8437,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -8519,17 +8492,14 @@ "supports-color": "4.4.0" }, "dependencies": { - "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 - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } }, "supports-color": { "version": "4.4.0", @@ -8549,9 +8519,9 @@ "dev": true }, "moment": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz", - "integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc=", + "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": { @@ -8598,9 +8568,9 @@ "dev": true }, "nan": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + "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", @@ -8619,23 +8589,6 @@ "regex-not": "1.0.2", "snapdragon": "0.8.2", "to-regex": "3.0.2" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } } }, "natural-compare": { @@ -8644,37 +8597,40 @@ "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.2.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.2.0.tgz", - "integrity": "sha512-q9jXh3UNsMV28KeqI43ILz5+c3l+RiNW8mhurEwCKckuHQbL+hTJIKKTiUlCPKlgQ/OukFvSnKB/Jk3+sFbkGA==", + "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": { - "formatio": "1.2.0", - "just-extend": "1.1.26", - "lolex": "1.6.0", + "@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" - }, - "dependencies": { - "lolex": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", - "dev": true - } } }, + "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.5.0", + "hosted-git-info": "2.6.0", "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -8720,38 +8676,38 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.2.1.tgz", - "integrity": "sha1-rYUK/p261/SXByi0suR/7Rw4chw=", + "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.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.6", "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.0.7", - "istanbul-lib-instrument": "1.8.0", - "istanbul-lib-report": "1.1.1", - "istanbul-lib-source-maps": "1.2.1", - "istanbul-reports": "1.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.0.4", + "merge-source-map": "1.1.0", "micromatch": "2.3.11", "mkdirp": "0.5.1", "resolve-from": "2.0.0", - "rimraf": "2.6.1", + "rimraf": "2.6.2", "signal-exit": "3.0.2", - "spawn-wrap": "1.3.8", - "test-exclude": "4.1.1", - "yargs": "8.0.2", - "yargs-parser": "5.0.0" + "spawn-wrap": "1.4.2", + "test-exclude": "4.2.1", + "yargs": "11.1.0", + "yargs-parser": "8.1.0" }, "dependencies": { "align-text": { @@ -8805,6 +8761,11 @@ "bundled": true, "dev": true }, + "arr-union": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, "array-unique": { "version": "0.2.1", "bundled": true, @@ -8815,11 +8776,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.0.3", + "bundled": true, + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "bundled": true, @@ -8831,7 +8802,7 @@ } }, "babel-generator": { - "version": "6.26.0", + "version": "6.26.1", "bundled": true, "dev": true, "requires": { @@ -8840,7 +8811,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.4", + "lodash": "4.17.5", "source-map": "0.5.7", "trim-right": "1.0.1" } @@ -8858,8 +8829,8 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" + "core-js": "2.5.3", + "regenerator-runtime": "0.11.1" } }, "babel-template": { @@ -8871,7 +8842,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.4" + "lodash": "4.17.5" } }, "babel-traverse": { @@ -8884,10 +8855,10 @@ "babel-runtime": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "debug": "2.6.8", + "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "invariant": "2.2.3", + "lodash": "4.17.5" } }, "babel-types": { @@ -8897,7 +8868,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.4", + "lodash": "4.17.5", "to-fast-properties": "1.0.3" } }, @@ -8911,8 +8882,37 @@ "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.8", + "version": "1.1.11", "bundled": true, "dev": true, "requires": { @@ -8935,6 +8935,29 @@ "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, @@ -8973,6 +8996,83 @@ "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, @@ -8997,23 +9097,42 @@ "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.0", + "version": "1.5.1", + "bundled": true, + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", "bundled": true, "dev": true }, "core-js": { - "version": "2.5.1", + "version": "2.5.3", "bundled": true, "dev": true }, @@ -9022,12 +9141,12 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "which": "1.3.0" } }, "debug": { - "version": "2.6.8", + "version": "2.6.9", "bundled": true, "dev": true, "requires": { @@ -9044,6 +9163,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, @@ -9052,6 +9176,22 @@ "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, @@ -9097,7 +9237,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -9120,6 +9260,25 @@ "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, @@ -9185,6 +9344,14 @@ "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, @@ -9200,6 +9367,11 @@ "bundled": true, "dev": true }, + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, "glob": { "version": "7.1.2", "bundled": true, @@ -9241,7 +9413,7 @@ "dev": true }, "handlebars": { - "version": "4.0.10", + "version": "4.0.11", "bundled": true, "dev": true, "requires": { @@ -9256,26 +9428,80 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "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" } } } }, - "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", + "version": "2.6.0", "bundled": true, "dev": true }, @@ -9299,7 +9525,7 @@ "dev": true }, "invariant": { - "version": "2.2.2", + "version": "2.2.3", "bundled": true, "dev": true, "requires": { @@ -9311,13 +9537,28 @@ "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.5", + "version": "1.1.6", "bundled": true, "dev": true }, @@ -9329,6 +9570,38 @@ "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, @@ -9361,12 +9634,9 @@ } }, "is-fullwidth-code-point": { - "version": "1.0.0", + "version": "2.0.0", "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } + "dev": true }, "is-glob": { "version": "2.0.1", @@ -9384,6 +9654,36 @@ "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, @@ -9404,6 +9704,11 @@ "bundled": true, "dev": true }, + "is-windows": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, "isarray": { "version": "1.0.0", "bundled": true, @@ -9423,12 +9728,12 @@ } }, "istanbul-lib-coverage": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "dev": true }, "istanbul-lib-hook": { - "version": "1.0.7", + "version": "1.1.0", "bundled": true, "dev": true, "requires": { @@ -9436,25 +9741,25 @@ } }, "istanbul-lib-instrument": { - "version": "1.8.0", + "version": "1.10.1", "bundled": true, "dev": true, "requires": { - "babel-generator": "6.26.0", + "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.1.1", - "semver": "5.4.1" + "istanbul-lib-coverage": "1.2.0", + "semver": "5.5.0" } }, "istanbul-lib-report": { - "version": "1.1.1", + "version": "1.1.3", "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-coverage": "1.2.0", "mkdirp": "0.5.1", "path-parse": "1.0.5", "supports-color": "3.2.3" @@ -9471,23 +9776,33 @@ } }, "istanbul-lib-source-maps": { - "version": "1.2.1", + "version": "1.2.3", "bundled": true, "dev": true, "requires": { - "debug": "2.6.8", - "istanbul-lib-coverage": "1.1.1", + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", "mkdirp": "0.5.1", - "rimraf": "2.6.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.2", + "version": "1.3.0", "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.10" + "handlebars": "4.0.11" } }, "js-tokens": { @@ -9505,7 +9820,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "1.1.6" } }, "lazy-cache": { @@ -9551,7 +9866,7 @@ } }, "lodash": { - "version": "4.17.4", + "version": "4.17.5", "bundled": true, "dev": true }, @@ -9569,7 +9884,7 @@ } }, "lru-cache": { - "version": "4.1.1", + "version": "4.1.2", "bundled": true, "dev": true, "requires": { @@ -9577,6 +9892,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.1" + } + }, "md5-hex": { "version": "1.3.0", "bundled": true, @@ -9595,15 +9923,22 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "1.2.0" } }, "merge-source-map": { - "version": "1.0.4", + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } } }, "micromatch": { @@ -9627,7 +9962,7 @@ } }, "mimic-fn": { - "version": "1.1.0", + "version": "1.2.0", "bundled": true, "dev": true }, @@ -9636,7 +9971,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -9644,6 +9979,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, @@ -9657,15 +10011,51 @@ "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.5.0", + "hosted-git-info": "2.6.0", "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -9676,24 +10066,92 @@ "remove-trailing-separator": "1.1.0" } }, - "npm-run-path": { - "version": "2.0.2", + "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": { - "path-key": "2.0.1" + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } } }, - "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, @@ -9703,6 +10161,21 @@ "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, @@ -9741,18 +10214,26 @@ "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", "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "1.2.0" } }, + "p-try": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "parse-glob": { "version": "3.0.4", "bundled": true, @@ -9772,6 +10253,11 @@ "error-ex": "1.3.1" } }, + "pascalcase": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "path-exists": { "version": "2.1.0", "bundled": true, @@ -9805,64 +10291,307 @@ "pinkie-promise": "2.0.1" } }, - "pify": { - "version": "2.3.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.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 }, - "pinkie": { - "version": "2.0.4", + "set-blocking": { + "version": "2.0.0", "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", + "set-value": { + "version": "2.0.0", "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { - "find-up": { - "version": "1.1.2", + "extend-shallow": { + "version": "2.0.1", "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "is-extendable": "0.1.1" } } } }, - "preserve": { - "version": "0.2.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 }, - "pseudomap": { - "version": "1.0.2", + "signal-exit": { + "version": "3.0.2", "bundled": true, "dev": true }, - "randomatic": { - "version": "1.1.7", + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "snapdragon": { + "version": "0.8.2", "bundled": true, "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.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.1", + "use": "3.1.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", + "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": { @@ -9874,260 +10603,559 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "1.1.6" } } } }, - "kind-of": { - "version": "4.0.0", + "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-buffer": "1.1.5" + "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 } } }, - "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", + "snapdragon-node": { + "version": "2.1.1", "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { - "find-up": { - "version": "1.1.2", + "define-property": { + "version": "1.0.0", "bundled": true, "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "is-descriptor": "1.0.2" } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true } } }, - "regenerator-runtime": { - "version": "0.11.0", + "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 }, - "regex-cache": { - "version": "0.4.4", + "source-map-resolve": { + "version": "0.5.1", "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "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" } }, - "remove-trailing-separator": { - "version": "1.1.0", + "source-map-url": { + "version": "0.4.0", "bundled": true, "dev": true }, - "repeat-element": { - "version": "1.1.2", + "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 }, - "repeat-string": { - "version": "1.6.1", + "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 }, - "repeating": { - "version": "2.0.1", + "split-string": { + "version": "3.1.0", "bundled": true, "dev": true, "requires": { - "is-finite": "1.0.2" + "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 + } } }, - "require-directory": { + "string-width": { "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" + "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" + } + } } }, - "rimraf": { - "version": "2.6.1", + "strip-ansi": { + "version": "3.0.1", "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "ansi-regex": "2.1.1" } }, - "semver": { - "version": "5.4.1", - "bundled": true, - "dev": true - }, - "set-blocking": { + "strip-bom": { "version": "2.0.0", "bundled": true, - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "is-utf8": "0.2.1" } }, - "shebang-regex": { + "strip-eof": { "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.3.8", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.1", - "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", + "supports-color": { + "version": "2.0.0", "bundled": true, "dev": true }, - "string-width": { - "version": "2.1.1", + "test-exclude": { + "version": "4.2.1", "bundled": true, "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "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": { - "ansi-regex": { + "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 }, - "is-fullwidth-code-point": { - "version": "2.0.0", + "kind-of": { + "version": "6.0.2", "bundled": true, "dev": true }, - "strip-ansi": { - "version": "4.0.0", + "micromatch": { + "version": "3.1.9", "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "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" } } } }, - "strip-ansi": { - "version": "3.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": { - "ansi-regex": "2.1.1" + "kind-of": "3.2.2" } }, - "strip-bom": { - "version": "2.0.0", + "to-regex": { + "version": "3.0.2", "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.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.1.1", + "to-regex-range": { + "version": "2.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" + "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" + } + } } }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, "trim-right": { "version": "1.0.1", "bundled": true, @@ -10164,13 +11192,106 @@ "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.1", + "version": "3.0.3", "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "which": { @@ -10206,6 +11327,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.1" + } + }, "string-width": { "version": "1.0.2", "bundled": true, @@ -10244,97 +11373,54 @@ "dev": true }, "yargs": { - "version": "8.0.2", + "version": "11.1.0", "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", + "cliui": "4.0.0", "decamelize": "1.2.0", + "find-up": "2.1.0", "get-caller-file": "1.0.2", "os-locale": "2.1.0", - "read-pkg-up": "2.0.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": "7.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.0.0", "bundled": true, "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", "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" - } - } - } - }, - "load-json-file": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, - "path-type": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" } }, - "read-pkg-up": { - "version": "2.0.0", + "strip-ansi": { + "version": "4.0.0", "bundled": true, "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "ansi-regex": "3.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, "yargs-parser": { - "version": "7.0.0", + "version": "9.0.2", "bundled": true, "dev": true, "requires": { @@ -10344,15 +11430,15 @@ } }, "yargs-parser": { - "version": "5.0.0", + "version": "8.1.0", "bundled": true, "dev": true, "requires": { - "camelcase": "3.0.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { - "version": "3.0.0", + "version": "4.1.0", "bundled": true, "dev": true } @@ -10421,6 +11507,14 @@ "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" + } } } }, @@ -10435,13 +11529,6 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "object.omit": { @@ -10460,13 +11547,6 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - } } }, "observable-to-promise": { @@ -10476,14 +11556,25 @@ "dev": true, "requires": { "is-observable": "0.2.0", - "symbol-observable": "1.0.4" + "symbol-observable": "1.2.0" }, "dependencies": { - "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", - "dev": true + "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 + } + } } } }, @@ -10501,7 +11592,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "1.2.0" } }, "optimist": { @@ -10586,10 +11677,13 @@ "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=", - "dev": true + "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", @@ -10597,9 +11691,24 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.1.0" + "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", @@ -10619,9 +11728,9 @@ "dev": true, "requires": { "got": "6.7.1", - "registry-auth-token": "3.3.1", + "registry-auth-token": "3.3.2", "registry-url": "3.1.0", - "semver": "5.4.1" + "semver": "5.5.0" }, "dependencies": { "got": { @@ -10655,6 +11764,23 @@ "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": { @@ -10667,9 +11793,9 @@ } }, "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-0.1.2.tgz", + "integrity": "sha1-3T+iXtbC78e93hKtm0bBY6opIk4=", "dev": true }, "pascalcase": { @@ -10729,12 +11855,11 @@ } }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "requires": { - "pify": "2.3.0" + "pify": "3.0.0" } }, "performance-now": { @@ -10743,34 +11868,57 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "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": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "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": "2.0.4" + "pinkie": "1.0.0" } }, "pkg-conf": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", - "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", + "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": "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.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": { @@ -10802,6 +11950,25 @@ "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.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.20.tgz", + "integrity": "sha512-Opr6usW30Iy0xEDrJywDckRxtylfO7gTGs3Kfb2LdLQlGsUg89fTy0R3Vm1Dub2YHO7MK58avr0p70+uFFHb7A==", + "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", @@ -10819,7 +11986,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.1", + "core-js": "2.5.3", "power-assert-context-traversal": "1.1.1" } }, @@ -10830,16 +11997,9 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.1", + "core-js": "2.5.3", "espurify": "1.7.0", "estraverse": "4.2.0" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" - } } }, "power-assert-context-traversal": { @@ -10847,7 +12007,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.1", + "core-js": "2.5.3", "estraverse": "4.2.0" } }, @@ -10856,7 +12016,7 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.1", + "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", @@ -10884,7 +12044,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.1", + "core-js": "2.5.3", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -10896,7 +12056,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.1", + "core-js": "2.5.3", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -10937,19 +12097,27 @@ "dev": true }, "prettier": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz", - "integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o=", + "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.0.1", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.0.1.tgz", - "integrity": "sha1-fBi3PCKKm49u3Cg1oSy49+2F+fQ=", + "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": { @@ -10959,9 +12127,9 @@ "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "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", @@ -10970,9 +12138,9 @@ "dev": true }, "protobufjs": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", - "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "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", @@ -10985,8 +12153,8 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "7.0.46", - "long": "3.2.0" + "@types/node": "8.9.5", + "long": "4.0.0" } }, "proxyquire": { @@ -11036,26 +12204,6 @@ "kind-of": "4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "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=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -11068,13 +12216,13 @@ } }, "rc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", - "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "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.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" }, @@ -11096,6 +12244,23 @@ "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": { @@ -11109,14 +12274,14 @@ } }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "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": "1.0.7", + "process-nextick-args": "2.0.0", "safe-buffer": "5.1.1", "string_decoder": "1.0.3", "util-deprecate": "1.0.2" @@ -11130,7 +12295,7 @@ "requires": { "graceful-fs": "4.1.11", "minimatch": "3.0.4", - "readable-stream": "2.3.3", + "readable-stream": "2.3.5", "set-immediate-shim": "1.0.1" } }, @@ -11162,9 +12327,9 @@ "dev": true }, "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "dev": true }, "regex-cache": { @@ -11185,10 +12350,10 @@ "safe-regex": "1.1.0" } }, - "regexp-quote": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/regexp-quote/-/regexp-quote-0.0.0.tgz", - "integrity": "sha1-Hg9GUMhi3L/tVP1CsUjpuxch/PI=", + "regexpp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.0.1.tgz", + "integrity": "sha512-8Ph721maXiOYSLtaDGKVmDn5wdsNaF6Px85qFNeMPQq0r8K5Y10tgP6YuR65Ws35n4DvzFcCxEnRNBIXQunzLw==", "dev": true }, "regexpu-core": { @@ -11203,12 +12368,12 @@ } }, "registry-auth-token": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", - "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "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.2", + "rc": "1.2.6", "safe-buffer": "5.1.1" } }, @@ -11218,7 +12383,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.2" + "rc": "1.2.6" } }, "regjsgen": { @@ -11242,7 +12407,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.0.2" + "es6-error": "4.1.1" } }, "remove-trailing-separator": { @@ -11271,32 +12436,32 @@ } }, "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "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.5", + "combined-stream": "1.0.6", "extend": "3.0.1", "forever-agent": "0.6.1", - "form-data": "2.3.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": "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.1.0" + "uuid": "3.2.1" } }, "require-directory": { @@ -11470,20 +12635,27 @@ "dev": true }, "sanitize-html": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.14.1.tgz", - "integrity": "sha1-cw/6Ikm98YMz7/5FsoYXPJxa0Lg=", + "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", - "regexp-quote": "0.0.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.1", + "postcss": "6.0.20", + "srcset": "1.0.0", "xtend": "4.0.1" } }, "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "semver-diff": { @@ -11492,7 +12664,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.4.1" + "semver": "5.5.0" } }, "serialize-error": { @@ -11555,6 +12727,21 @@ "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.2", + "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", @@ -11598,14 +12785,6 @@ "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", @@ -11692,11 +12871,6 @@ "requires": { "is-descriptor": "1.0.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, @@ -11706,14 +12880,24 @@ "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.0.2", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", - "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } }, "sort-keys": { @@ -11743,12 +12927,20 @@ } }, "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==", + "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.5.7" + "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": { @@ -11757,24 +12949,35 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "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-license-ids": "1.2.2" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, - "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=", + "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": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "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-string": { @@ -11791,10 +12994,20 @@ "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.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "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", @@ -11922,7 +13135,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.1", + "core-js": "2.5.3", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -11977,21 +13190,38 @@ "dev": true }, "superagent": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.0.tgz", - "integrity": "sha512-71XGWgtn70TNwgmgYa69dPOYg55aU9FCahjUNY03rOrKvaTCaU3b9MeZmqonmf9Od96SCxr3vGfEAnhM7dtxCw==", + "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.1", - "formidable": "1.1.1", + "form-data": "2.3.2", + "formidable": "1.2.1", "methods": "1.1.2", - "mime": "1.4.1", + "mime": "1.6.0", "qs": "6.5.1", - "readable-stream": "2.3.3" + "readable-stream": "2.3.5" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } } }, "supertap": { @@ -12002,7 +13232,7 @@ "requires": { "arrify": "1.0.1", "indent-string": "3.2.0", - "js-yaml": "3.10.0", + "js-yaml": "3.11.0", "serialize-error": "2.1.0", "strip-ansi": "4.0.0" }, @@ -12031,22 +13261,30 @@ "dev": true, "requires": { "methods": "1.1.2", - "superagent": "3.8.0" + "superagent": "3.8.2" } }, "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "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": "2.0.0" + "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": "0.2.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "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": { @@ -12055,10 +13293,10 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "5.2.3", - "ajv-keywords": "2.1.0", - "chalk": "2.2.0", - "lodash": "4.17.4", + "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" }, @@ -12134,7 +13372,7 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.3", + "readable-stream": "2.3.5", "xtend": "4.0.1" } }, @@ -12171,6 +13409,16 @@ "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": { @@ -12191,22 +13439,12 @@ "requires": { "is-number": "3.0.0", "repeat-string": "1.6.1" - }, - "dependencies": { - "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" - } - } } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "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" } @@ -12234,12 +13472,6 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "tryit": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", - "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -12263,6 +13495,12 @@ "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", @@ -12471,11 +13709,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" } } }, @@ -12491,8 +13724,8 @@ "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", "dev": true, "requires": { - "boxen": "1.2.2", - "chalk": "2.2.0", + "boxen": "1.3.0", + "chalk": "2.3.2", "configstore": "3.1.1", "import-lazy": "2.1.0", "is-installed-globally": "0.1.0", @@ -12534,13 +13767,6 @@ "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "requires": { "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" - } } }, "util-deprecate": { @@ -12549,18 +13775,18 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "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.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "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": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "verror": { @@ -12595,12 +13821,45 @@ "dev": true }, "widest-line": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", - "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "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": "1.0.2" + "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": { @@ -12656,7 +13915,7 @@ "requires": { "detect-indent": "5.0.0", "graceful-fs": "4.1.11", - "make-dir": "1.1.0", + "make-dir": "1.2.0", "pify": "3.0.0", "sort-keys": "2.0.0", "write-file-atomic": "2.3.0" @@ -12667,12 +13926,6 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true } } }, @@ -12726,6 +13979,23 @@ "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/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index c6afe67e773..6a0fe3d803c 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -12,7 +12,7 @@ "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.4.1", + "@google-cloud/monitoring": "0.5.0", "yargs": "10.0.3" }, "devDependencies": { From b274e81fc7d2d4e6f7731e050d9a8218629e60c2 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 27 Mar 2018 18:10:04 -0700 Subject: [PATCH 070/422] chore: workaround for repo-tools EPERM (#32) --- .../.circleci/config.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 5553088d5fb..9e8215a7d30 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -91,7 +91,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 @@ -121,6 +126,10 @@ jobs: 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 npm link - run: name: Link the module being tested to the samples. @@ -140,7 +149,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 5175b923adaa2ac254636b6dd69ede734a8c5885 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 28 Mar 2018 18:43:22 -0700 Subject: [PATCH 071/422] chore: one more workaround for repo-tools EPERM (#33) --- packages/google-cloud-monitoring/.circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 9e8215a7d30..a4c90983a4c 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -174,6 +174,10 @@ jobs: name: Install and link the module. 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 npm link - run: name: Link the module being tested to the samples. @@ -207,7 +211,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 f83d92ef8dab35ca0efc58eb6f823dffed4f1085 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 30 Mar 2018 09:47:33 -0700 Subject: [PATCH 072/422] chore: revert version back, was bumped by mistake (#35) --- .../.circleci/config.yml | 2 +- .../google-cloud-monitoring/package-lock.json | 232 ++++++++++-------- packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 127 insertions(+), 111 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index a4c90983a4c..d7c00eac0ff 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -135,7 +135,7 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm link @google-cloud/monitoring + npm link ../ npm install cd .. - run: diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 82b9b581b67..d459a241226 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring", - "version": "0.5.0", + "version": "0.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -81,9 +81,9 @@ } }, "@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.2.6", + "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.6.tgz", + "integrity": "sha512-bDEgNBAJ8kfYWrpifg+D7rXs8NUBUUeu2I6NWkcL9IOXg86rblu7xnhFHRxBMcvytJ+7WY4pvkCLxO1v3QBsXg==", "dev": true, "requires": { "ava": "0.25.0", @@ -1900,9 +1900,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.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.1.tgz", + "integrity": "sha512-X/pIUOcgpX7xxKsmdPCMKeDBefsGH/4D/IuJ1gIHbqgWI0qEy/yMKeqaN/sT+rzV9UpAXAfd0kLOVExRmZrXIg==" }, "acorn": { "version": "4.0.13", @@ -2019,9 +2019,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": { @@ -2265,9 +2265,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.0", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", + "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==" }, "auto-bind": { "version": "1.2.0", @@ -2286,7 +2286,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", @@ -2363,7 +2363,7 @@ "supports-color": "5.3.0", "trim-off-newlines": "1.0.1", "unique-temp-dir": "1.0.0", - "update-notifier": "2.3.0" + "update-notifier": "2.4.0" }, "dependencies": { "ansi-regex": { @@ -2675,7 +2675,7 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.3", + "core-js": "2.5.4", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -2822,7 +2822,7 @@ "requires": { "babel-core": "6.26.0", "babel-runtime": "6.26.0", - "core-js": "2.5.3", + "core-js": "2.5.4", "home-or-tmp": "2.0.0", "lodash": "4.17.5", "mkdirp": "0.5.1", @@ -2846,7 +2846,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.4", "regenerator-runtime": "0.11.1" } }, @@ -3078,6 +3078,12 @@ "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==", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -3128,6 +3134,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": { @@ -3169,7 +3183,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.4", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3751,11 +3765,12 @@ "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==", "dev": true, "requires": { + "buffer-from": "1.0.0", "inherits": "2.0.3", "readable-stream": "2.3.5", "typedarray": "0.0.6" @@ -3792,9 +3807,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", @@ -3839,9 +3854,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.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", + "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=" }, "core-util-is": { "version": "1.0.2", @@ -3907,7 +3922,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "dashdash": { @@ -3995,7 +4010,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", @@ -4179,7 +4194,7 @@ "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.4", "empower-core": "0.6.2" } }, @@ -4198,7 +4213,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.3" + "core-js": "2.5.4" } }, "end-of-stream": { @@ -4231,9 +4246,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", @@ -4254,7 +4269,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-symbol": "3.1.1" } }, @@ -4265,7 +4280,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", @@ -4279,7 +4294,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" @@ -4292,7 +4307,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "es6-weak-map": { @@ -4302,7 +4317,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" } @@ -4372,15 +4387,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", @@ -4392,7 +4407,7 @@ "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "11.3.0", + "globals": "11.4.0", "ignore": "3.3.7", "imurmurhash": "0.1.4", "inquirer": "3.3.0", @@ -4408,7 +4423,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", @@ -4433,9 +4448,9 @@ } }, "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", + "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==", "dev": true }, "strip-ansi": { @@ -4563,7 +4578,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" @@ -4625,7 +4640,7 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.3" + "core-js": "2.5.4" } }, "esquery": { @@ -4664,7 +4679,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "execa": { @@ -4909,7 +4924,7 @@ "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": { @@ -6231,7 +6246,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": { @@ -6264,7 +6279,7 @@ "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", @@ -7042,7 +7057,7 @@ "axios": "0.18.0", "google-p12-pem": "1.0.2", "jws": "3.1.4", - "mime": "2.2.0", + "mime": "2.2.1", "pify": "3.0.0" } }, @@ -7336,7 +7351,7 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.0.0", + "ansi-escapes": "3.1.0", "chalk": "2.3.2", "cli-cursor": "2.1.0", "cli-width": "2.2.0", @@ -7627,9 +7642,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" @@ -7711,9 +7726,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": { @@ -7813,7 +7828,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", @@ -7842,9 +7857,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": { @@ -8155,9 +8170,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": { @@ -8198,9 +8213,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": { @@ -8383,9 +8398,9 @@ "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", @@ -8403,9 +8418,9 @@ } }, "mime": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.0.tgz", - "integrity": "sha512-0Qz9uF1ATtl8RKJG4VRfOymh7PyEor6NbrI/61lRfuRe4vx9SNATrvAeTj2EWVRKjEQGskrzWkJBBY5NbaVHIA==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.1.tgz", + "integrity": "sha512-8QKdX8CfqnkIn19mnv3Zq78RugzDXZNrcewbZrjf8h0R6aN5Daizum/OoXxqVVhkFW3Ow4LFSn5iOi7qJJOMoA==" }, "mime-db": { "version": "1.33.0", @@ -8475,9 +8490,9 @@ } }, "mocha": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", - "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.5.tgz", + "integrity": "sha512-3MM3UjZ5p8EJrYpG7s+29HAI9G7sTzKEe4+w37Dg0QP7qL4XGsV+Q2xet2cE37AqdgN1OtYQB6Vl98YiPV3PgA==", "dev": true, "requires": { "browser-stdout": "1.3.1", @@ -11745,7 +11760,7 @@ "is-redirect": "1.0.0", "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", + "lowercase-keys": "1.0.1", "safe-buffer": "5.1.1", "timed-out": "4.0.1", "unzip-response": "2.0.1", @@ -11916,7 +11931,7 @@ "dev": true, "requires": { "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" + "json-parse-better-errors": "1.0.2" } } } @@ -11951,9 +11966,9 @@ "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.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", + "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", "dev": true, "requires": { "chalk": "2.3.2", @@ -11970,9 +11985,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", @@ -11986,7 +12001,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.4", "power-assert-context-traversal": "1.1.1" } }, @@ -11997,7 +12012,7 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.3", + "core-js": "2.5.4", "espurify": "1.7.0", "estraverse": "4.2.0" } @@ -12007,7 +12022,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.4", "estraverse": "4.2.0" } }, @@ -12016,7 +12031,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.4", "power-assert-context-formatter": "1.1.1", "power-assert-context-reducer-ast": "1.1.2", "power-assert-renderer-assertion": "1.1.1", @@ -12044,7 +12059,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.4", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -12056,7 +12071,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.4", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -12153,7 +12168,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.1", "long": "4.0.0" } }, @@ -12351,9 +12366,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": { @@ -12549,7 +12564,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.0" + "lowercase-keys": "1.0.1" } }, "restore-cursor": { @@ -12647,7 +12662,7 @@ "lodash.isplainobject": "4.0.6", "lodash.isstring": "4.0.1", "lodash.mergewith": "4.6.1", - "postcss": "6.0.20", + "postcss": "6.0.21", "srcset": "1.0.0", "xtend": "4.0.1" } @@ -12919,7 +12934,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.0", "decode-uri-component": "0.2.0", "resolve-url": "0.2.1", "source-map-url": "0.4.0", @@ -13135,7 +13150,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.4", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -13719,15 +13734,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.4.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.4.0.tgz", + "integrity": "sha1-+bTHAPv9TsEsgRWHJYd31WPYyGY=", "dev": true, "requires": { "boxen": "1.3.0", "chalk": "2.3.2", - "configstore": "3.1.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", diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f676c61f551..a575dd85e61 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.5.0", + "version": "0.4.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 6a0fe3d803c..c6afe67e773 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -12,7 +12,7 @@ "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.5.0", + "@google-cloud/monitoring": "0.4.1", "yargs": "10.0.3" }, "devDependencies": { From 560fc17e00544d5ea4ad5b836e7cee5e6065e8cd Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 30 Mar 2018 10:08:26 -0700 Subject: [PATCH 073/422] Fixes #29 (#34) * Fixes #29 * prettier and resolving conflicts * prettier and resolving conflicts --- packages/google-cloud-monitoring/package-lock.json | 8 ++++---- packages/google-cloud-monitoring/samples/package.json | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index d459a241226..2bd1f57e370 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -7057,7 +7057,7 @@ "axios": "0.18.0", "google-p12-pem": "1.0.2", "jws": "3.1.4", - "mime": "2.2.1", + "mime": "2.2.2", "pify": "3.0.0" } }, @@ -8418,9 +8418,9 @@ } }, "mime": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.1.tgz", - "integrity": "sha512-8QKdX8CfqnkIn19mnv3Zq78RugzDXZNrcewbZrjf8h0R6aN5Daizum/OoXxqVVhkFW3Ow4LFSn5iOi7qJJOMoA==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.2.tgz", + "integrity": "sha512-A7PDg4s48MkqFEcYg2b069m3DXOEq7hx+9q9rIFrSSYfzsh35GX+LOVMQ8Au0ko7d8bSQCIAuzkjp0vCtwENlQ==" }, "mime-db": { "version": "1.33.0", diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index c6afe67e773..b4b4b6dbf5c 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -13,12 +13,12 @@ }, "dependencies": { "@google-cloud/monitoring": "0.4.1", - "yargs": "10.0.3" + "yargs": "11.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.2.3", - "ava": "0.23.0", - "proxyquire": "1.8.0", - "sinon": "4.0.2" + "@google-cloud/nodejs-repo-tools": "2.2.6", + "ava": "0.25.0", + "proxyquire": "2.0.1", + "sinon": "4.5.0" } } From 5e3b6f37b8bf1db771502f2cbe5fde9de18a9d1f Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 30 Mar 2018 11:25:55 -0700 Subject: [PATCH 074/422] feat: update GAPIC v3 generated code (#36) * feat: new GAPIC v3 code * update GAPIC v3 code * prettier --- .../protos/google/monitoring/v3/alert.proto | 344 +++++++ .../google/monitoring/v3/alert_service.proto | 197 ++++ .../protos/google/monitoring/v3/common.proto | 96 +- .../protos/google/monitoring/v3/group.proto | 1 + .../google/monitoring/v3/group_service.proto | 1 + .../protos/google/monitoring/v3/metric.proto | 1 + .../google/monitoring/v3/metric_service.proto | 1 + .../monitoring/v3/mutation_record.proto | 36 + .../google/monitoring/v3/notification.proto | 163 +++ .../monitoring/v3/notification_service.proto | 335 ++++++ .../protos/google/monitoring/v3/uptime.proto | 23 + .../google/monitoring/v3/uptime_service.proto | 17 +- packages/google-cloud-monitoring/src/index.js | 37 +- .../src/v3/alert_policy_service_client.js | 759 ++++++++++++++ .../alert_policy_service_client_config.json | 51 + .../src/v3/doc/google/api/doc_distribution.js | 4 +- .../src/v3/doc/google/api/doc_label.js | 4 +- .../src/v3/doc/google/api/doc_metric.js | 4 +- .../doc/google/api/doc_monitored_resource.js | 4 +- .../v3/doc/google/monitoring/v3/doc_alert.js | 417 ++++++++ .../v3/doc/google/monitoring/v3/doc_common.js | 136 ++- .../v3/doc/google/monitoring/v3/doc_group.js | 4 +- .../v3/doc/google/monitoring/v3/doc_metric.js | 4 +- .../monitoring/v3/doc_mutation_record.js | 35 + .../google/monitoring/v3/doc_notification.js | 185 ++++ .../v3/doc/google/monitoring/v3/doc_uptime.js | 36 +- .../v3/doc/google/protobuf/doc_duration.js | 4 +- .../v3/doc/google/protobuf/doc_field_mask.js | 4 +- .../v3/doc/google/protobuf/doc_timestamp.js | 4 +- .../v3/doc/google/protobuf/doc_wrappers.js | 160 +++ .../src/v3/group_service_client.js | 88 +- .../google-cloud-monitoring/src/v3/index.js | 8 +- .../src/v3/metric_service_client.js | 94 +- .../v3/notification_channel_service_client.js | 970 ++++++++++++++++++ ...ication_channel_service_client_config.json | 61 ++ .../src/v3/uptime_check_service_client.js | 77 +- .../system-test/metric_service_smoke_test.js | 10 +- .../google-cloud-monitoring/test/gapic-v3.js | 813 ++++++++++++++- 38 files changed, 4973 insertions(+), 215 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto create mode 100644 packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js create mode 100644 packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto new file mode 100644 index 00000000000..18d87174d00 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -0,0 +1,344 @@ +// 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.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/monitoring/v3/common.proto"; +import "google/monitoring/v3/mutation_record.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "AlertProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// A description of the conditions under which some aspect of your system is +// considered to be "unhealthy" and the ways to notify people or services about +// this state. For an overview of alert policies, see +// [Introduction to Alerting](/monitoring/alerts/). +message AlertPolicy { + // A content string and a MIME type that describes the content string's + // format. + message Documentation { + // The text of the documentation, interpreted according to `mime_type`. + // The content may not exceed 8,192 Unicode characters and may not exceed + // more than 10,240 bytes when encoded in UTF-8 format, whichever is + // smaller. + string content = 1; + + // The format of the `content` field. Presently, only the value + // `"text/markdown"` is supported. See + // [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. + string mime_type = 2; + } + + // A condition is a true/false test that determines when an alerting policy + // should open an incident. If a condition evaluates to true, it signifies + // that something is wrong. + message Condition { + // Specifies how many time series must fail a predicate to trigger a + // condition. If not specified, then a `{count: 1}` trigger is used. + message Trigger { + // A type of trigger. + oneof type { + // The absolute number of time series that must fail + // the predicate for the condition to be triggered. + int32 count = 1; + + // The percentage of time series that must fail the + // predicate for the condition to be triggered. + double percent = 2; + } + } + + // A condition type that compares a collection of time series + // against a threshold. + message MetricThreshold { + // A [filter](/monitoring/api/v3/filters) that + // identifies which time series should be compared with the threshold. + // + // The filter is similar to the one that is specified in the + // [`MetricService.ListTimeSeries` + // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that + // call is useful to verify the time series that will be retrieved / + // processed) and must specify the metric type and optionally may contain + // restrictions on resource type, resource labels, and metric labels. + // This field may not exceed 2048 Unicode characters in length. + string filter = 2; + + // Specifies the alignment of data points in individual time series as + // well as how to combine the retrieved time series together (such as + // when aggregating multiple streams on each resource to a single + // stream for each resource or when aggregating streams across all + // members of a group of resrouces). Multiple aggregations + // are applied in the order specified. + // + // This field is similar to the one in the + // [`MetricService.ListTimeSeries` request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this field. + repeated Aggregation aggregations = 8; + + // A [filter](/monitoring/api/v3/filters) that identifies a time + // series that should be used as the denominator of a ratio that will be + // compared with the threshold. If a `denominator_filter` is specified, + // the time series specified by the `filter` field will be used as the + // numerator. + // + // The filter is similar to the one that is specified in the + // [`MetricService.ListTimeSeries` + // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that + // call is useful to verify the time series that will be retrieved / + // processed) and must specify the metric type and optionally may contain + // restrictions on resource type, resource labels, and metric labels. + // This field may not exceed 2048 Unicode characters in length. + string denominator_filter = 9; + + // Specifies the alignment of data points in individual time series + // selected by `denominatorFilter` as + // well as how to combine the retrieved time series together (such as + // when aggregating multiple streams on each resource to a single + // stream for each resource or when aggregating streams across all + // members of a group of resources). + // + // When computing ratios, the `aggregations` and + // `denominator_aggregations` fields must use the same alignment period + // and produce time series that have the same periodicity and labels. + // + // This field is similar to the one in the + // [`MetricService.ListTimeSeries` + // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It + // is advisable to use the `ListTimeSeries` method when debugging this + // field. + repeated Aggregation denominator_aggregations = 10; + + // The comparison to apply between the time series (indicated by `filter` + // and `aggregation`) and the threshold (indicated by `threshold_value`). + // The comparison is applied on each time series, with the time series + // on the left-hand side and the threshold on the right-hand side. + // + // Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. + ComparisonType comparison = 4; + + // A value against which to compare the time series. + double threshold_value = 5; + + // The amount of time that a time series must violate the + // threshold to be considered failing. Currently, only values + // that are a multiple of a minute--e.g. 60, 120, or 300 + // seconds--are supported. If an invalid value is given, an + // error will be returned. The `Duration.nanos` field is + // ignored. When choosing a duration, it is useful to keep in mind the + // frequency of the underlying time series data (which may also be + // affected by any alignments specified in the `aggregation` field); + // a good duration is long enough so that a single outlier does not + // generate spurious alerts, but short enough that unhealthy states + // are detected and alerted on quickly. + google.protobuf.Duration duration = 6; + + // The number/percent of time series for which the comparison must hold + // in order for the condition to trigger. If unspecified, then the + // condition will trigger if the comparison is true for any of the + // time series that have been identified by `filter` and `aggregations`, + // or by the ratio, if `denominator_filter` and `denominator_aggregations` + // are specified. + Trigger trigger = 7; + } + + // A condition type that checks that monitored resources + // are reporting data. The configuration defines a metric and + // a set of monitored resources. The predicate is considered in violation + // when a time series for the specified metric of a monitored + // resource does not include any data in the specified `duration`. + message MetricAbsence { + // A [filter](/monitoring/api/v3/filters) that + // identifies which time series should be compared with the threshold. + // + // The filter is similar to the one that is specified in the + // [`MetricService.ListTimeSeries` + // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that + // call is useful to verify the time series that will be retrieved / + // processed) and must specify the metric type and optionally may contain + // restrictions on resource type, resource labels, and metric labels. + // This field may not exceed 2048 Unicode characters in length. + string filter = 1; + + // Specifies the alignment of data points in individual time series as + // well as how to combine the retrieved time series together (such as + // when aggregating multiple streams on each resource to a single + // stream for each resource or when aggregating streams across all + // members of a group of resrouces). Multiple aggregations + // are applied in the order specified. + // + // This field is similar to the + // one in the [`MetricService.ListTimeSeries` request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this field. + repeated Aggregation aggregations = 5; + + // The amount of time that a time series must fail to report new + // data to be considered failing. Currently, only values that + // are a multiple of a minute--e.g. 60, 120, or 300 + // seconds--are supported. If an invalid value is given, an + // error will be returned. The `Duration.nanos` field is + // ignored. + google.protobuf.Duration duration = 2; + + // The number/percent of time series for which the comparison must hold + // in order for the condition to trigger. If unspecified, then the + // condition will trigger if the comparison is true for any of the + // time series that have been identified by `filter` and `aggregations`. + Trigger trigger = 3; + } + + // Required if the condition exists. The unique resource name for this + // condition. Its syntax is: + // + // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + // + // `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the + // condition is created as part of a new or updated alerting policy. + // + // When calling the + // [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + // method, do not include the `name` field in the conditions of the + // requested alerting policy. Stackdriver Monitoring creates the + // condition identifiers and includes them in the new policy. + // + // When calling the + // [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] + // method to update a policy, including a condition `name` causes the + // existing condition to be updated. Conditions without names are added to + // the updated policy. Existing conditions are deleted if they are not + // updated. + // + // Best practice is to preserve `[CONDITION_ID]` if you make only small + // changes, such as those to condition thresholds, durations, or trigger + // values. Otherwise, treat the change as a new condition and let the + // existing condition be deleted. + string name = 12; + + // A short name or phrase used to identify the condition in dashboards, + // notifications, and incidents. To avoid confusion, don't use the same + // display name for multiple conditions in the same policy. + string display_name = 6; + + // Only one of the following condition types will be specified. + oneof condition { + // A condition that compares a time series against a threshold. + MetricThreshold condition_threshold = 1; + + // A condition that checks that a time series continues to + // receive new data points. + MetricAbsence condition_absent = 2; + } + } + + // Operators for combining conditions. + enum ConditionCombinerType { + // An unspecified combiner. + COMBINE_UNSPECIFIED = 0; + + // Combine conditions using the logical `AND` operator. An + // incident is created only if all conditions are met + // simultaneously. This combiner is satisfied if all conditions are + // met, even if they are met on completely different resources. + AND = 1; + + // Combine conditions using the logical `OR` operator. An incident + // is created if any of the listed conditions is met. + OR = 2; + + // Combine conditions using logical `AND` operator, but unlike the regular + // `AND` option, an incident is created only if all conditions are met + // simultaneously on at least one resource. + AND_WITH_MATCHING_RESOURCE = 3; + } + + // Required if the policy exists. The resource name for this policy. The + // syntax is: + // + // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // + // `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy + // is created. When calling the + // [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + // method, do not include the `name` field in the alerting policy passed as + // part of the request. + string name = 1; + + // A short name or phrase used to identify the policy in dashboards, + // notifications, and incidents. To avoid confusion, don't use the same + // display name for multiple policies in the same project. The name is + // limited to 512 Unicode characters. + string display_name = 2; + + // Documentation that is included with notifications and incidents related to + // this policy. Best practice is for the documentation to include information + // to help responders understand, mitigate, escalate, and correct the + // underlying problems detected by the alerting policy. Notification channels + // that have limited capacity might not show this documentation. + Documentation documentation = 13; + + // User-supplied key/value data to be used for organizing and + // identifying the `AlertPolicy` objects. + // + // The field can contain up to 64 entries. Each key and value is limited to + // 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + // values can contain only lowercase letters, numerals, underscores, and + // dashes. Keys must begin with a letter. + map user_labels = 16; + + // A list of conditions for the policy. The conditions are combined by AND or + // OR according to the `combiner` field. If the combined conditions evaluate + // to true, then an incident is created. A policy can have from one to six + // conditions. + repeated Condition conditions = 12; + + // How to combine the results of multiple conditions + // to determine if an incident should be opened. + ConditionCombinerType combiner = 6; + + // Whether or not the policy is enabled. On write, the default interpretation + // if unset is that the policy is enabled. On read, clients should not make + // any assumption about the state if it has not been populated. The + // field should always be populated on List and Get operations, unless + // a field projection has been specified that strips it out. + google.protobuf.BoolValue enabled = 17; + + // Identifies the notification channels to which notifications should be sent + // when incidents are opened or closed or when new violations occur on + // an already opened incident. Each element of this array corresponds to + // the `name` field in each of the + // [`NotificationChannel`][google.monitoring.v3.NotificationChannel] + // objects that are returned from the [`ListNotificationChannels`] + // [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + // method. The syntax of the entries in this field is: + // + // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + repeated string notification_channels = 14; + + // A read-only record of the creation of the alerting policy. If provided + // in a call to create or update, this field will be ignored. + MutationRecord creation_record = 10; + + // A read-only record of the most recent change to the alerting policy. If + // provided in a call to create or update, this field will be ignored. + MutationRecord mutation_record = 11; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto new file mode 100644 index 00000000000..ca2839f97c1 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -0,0 +1,197 @@ +// 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.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/monitoring/v3/alert.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "AlertServiceProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// The AlertPolicyService API is used to manage (list, create, delete, +// edit) alert policies in Stackdriver Monitoring. An alerting policy is +// a description of the conditions under which some aspect of your +// system is considered to be "unhealthy" and the ways to notify +// people or services about this state. In addition to using this API, alert +// policies can also be managed through +// [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs/), +// which can be reached by clicking the "Monitoring" tab in +// [Cloud Console](https://console.cloud.google.com/). +service AlertPolicyService { + // Lists the existing alerting policies for the project. + rpc ListAlertPolicies(ListAlertPoliciesRequest) returns (ListAlertPoliciesResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*}/alertPolicies" + }; + } + + // Gets a single alerting policy. + rpc GetAlertPolicy(GetAlertPolicyRequest) returns (AlertPolicy) { + option (google.api.http) = { + get: "/v3/{name=projects/*/alertPolicies/*}" + }; + } + + // Creates a new alerting policy. + rpc CreateAlertPolicy(CreateAlertPolicyRequest) returns (AlertPolicy) { + option (google.api.http) = { + post: "/v3/{name=projects/*}/alertPolicies" + body: "alert_policy" + }; + } + + // Deletes an alerting policy. + rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/alertPolicies/*}" + }; + } + + // Updates an alerting policy. You can either replace the entire policy with + // a new one or replace only certain fields in the current alerting policy by + // specifying the fields to be updated via `updateMask`. Returns the + // updated alerting policy. + rpc UpdateAlertPolicy(UpdateAlertPolicyRequest) returns (AlertPolicy) { + option (google.api.http) = { + patch: "/v3/{alert_policy.name=projects/*/alertPolicies/*}" + body: "alert_policy" + }; + } +} + +// The protocol for the `CreateAlertPolicy` request. +message CreateAlertPolicyRequest { + // The project in which to create the alerting policy. The format is + // `projects/[PROJECT_ID]`. + // + // Note that this field names the parent container in which the alerting + // policy will be written, not the name of the created policy. The alerting + // policy that is returned will have a name that contains a normalized + // representation of this name as a prefix but adds a suffix of the form + // `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. + string name = 3; + + // The requested alerting policy. You should omit the `name` field in this + // policy. The name will be returned in the new policy, including + // a new [ALERT_POLICY_ID] value. + AlertPolicy alert_policy = 2; +} + +// The protocol for the `GetAlertPolicy` request. +message GetAlertPolicyRequest { + // The alerting policy to retrieve. The format is + // + // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + string name = 3; +} + +// The protocol for the `ListAlertPolicies` request. +message ListAlertPoliciesRequest { + // The project whose alert policies are to be listed. The format is + // + // projects/[PROJECT_ID] + // + // Note that this field names the parent container in which the alerting + // policies to be listed are stored. To retrieve a single alerting policy + // by name, use the + // [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + // operation, instead. + string name = 4; + + // If provided, this field specifies the criteria that must be met by + // alert policies to be included in the response. + // + // For more details, see [sorting and + // filtering](/monitoring/api/v3/sorting-and-filtering). + string filter = 5; + + // A comma-separated list of fields by which to sort the result. Supports + // the same set of field references as the `filter` field. Entries can be + // prefixed with a minus sign to sort by the field in descending order. + // + // For more details, see [sorting and + // filtering](/monitoring/api/v3/sorting-and-filtering). + string order_by = 6; + + // The maximum number of results to return in a single response. + int32 page_size = 2; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return more results from the previous method call. + string page_token = 3; +} + +// The protocol for the `ListAlertPolicies` response. +message ListAlertPoliciesResponse { + // The returned alert policies. + repeated AlertPolicy alert_policies = 3; + + // If there might be more results than were returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The protocol for the `UpdateAlertPolicy` request. +message UpdateAlertPolicyRequest { + // Optional. A list of alerting policy field names. If this field is not + // empty, each listed field in the existing alerting policy is set to the + // value of the corresponding field in the supplied policy (`alert_policy`), + // or to the field's default value if the field is not in the supplied + // alerting policy. Fields not listed retain their previous value. + // + // Examples of valid field masks include `display_name`, `documentation`, + // `documentation.content`, `documentation.mime_type`, `user_labels`, + // `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + // + // If this field is empty, then the supplied alerting policy replaces the + // existing policy. It is the same as deleting the existing policy and + // adding the supplied policy, except for the following: + // + // + The new policy will have the same `[ALERT_POLICY_ID]` as the former + // policy. This gives you continuity with the former policy in your + // notifications and incidents. + // + Conditions in the new policy will keep their former `[CONDITION_ID]` if + // the supplied condition includes the `name` field with that + // `[CONDITION_ID]`. If the supplied condition omits the `name` field, + // then a new `[CONDITION_ID]` is created. + google.protobuf.FieldMask update_mask = 2; + + // Required. The updated alerting policy or the updated values for the + // fields listed in `update_mask`. + // If `update_mask` is not empty, any fields in this policy that are + // not in `update_mask` are ignored. + AlertPolicy alert_policy = 3; +} + +// The protocol for the `DeleteAlertPolicy` request. +message DeleteAlertPolicyRequest { + // The alerting policy to delete. The format is: + // + // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // + // For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + string name = 3; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index c8f701eeaaf..84d8423fd69 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -1,4 +1,4 @@ -// Copyright 2016 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. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.monitoring.v3; +import "google/api/annotations.proto"; import "google/api/distribution.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -25,6 +26,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A single strongly-typed value. @@ -65,8 +67,9 @@ message TimeInterval { // Describes how to combine multiple time series to provide different views of // the data. Aggregation consists of an alignment step on individual time -// series (`per_series_aligner`) followed by an optional reduction of the data -// across different time series (`cross_series_reducer`). For more details, see +// series (`alignment_period` and `per_series_aligner`) followed by an optional +// reduction step of the data across the aligned time series +// (`cross_series_reducer` and `group_by_fields`). For more details, see // [Aggregation](/monitoring/api/learn_more#aggregation). message Aggregation { // The Aligner describes how to bring the data points in a single @@ -82,12 +85,23 @@ message Aggregation { // delta metric to a delta metric requires that the alignment // period be increased. The value type of the result is the same // as the value type of the input. + // + // One can think of this aligner as a rate but without time units; that + // is, the output is conceptually (second_point - first_point). ALIGN_DELTA = 1; // Align and convert to a rate. This alignment is valid for // cumulative metrics and delta metrics with numeric values. The output is a // gauge metric with value type // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // + // One can think of this aligner as conceptually providing the slope of + // the line that passes through the value at the start and end of the + // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), + // and the output unit is one that has a "/time" dimension. + // + // If, by rate, you are looking for percentage change, see the + // `ALIGN_PERCENT_CHANGE` aligner option. ALIGN_RATE = 2; // Align by interpolating between adjacent points around the @@ -151,6 +165,13 @@ message Aggregation { // [INT64][google.api.MetricDescriptor.ValueType.INT64]. ALIGN_COUNT_TRUE = 16; + // Align time series via aggregation. The resulting data point in + // the alignment period is the count of False-valued data points in the + // period. This alignment is valid for gauge metrics with + // Boolean values. The value type of the output is + // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + ALIGN_COUNT_FALSE = 24; + // Align time series via aggregation. The resulting data point in // the alignment period is the fraction of True-valued data points in the // period. This alignment is valid for gauge metrics with Boolean values. @@ -185,6 +206,23 @@ message Aggregation { // with distribution values. The output is a gauge metric with value type // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. ALIGN_PERCENTILE_05 = 21; + + // Align and convert to a percentage change. This alignment is valid for + // gauge and delta metrics with numeric values. This alignment conceptually + // computes the equivalent of "((current - previous)/previous)*100" + // where previous value is determined based on the alignmentPeriod. + // In the event that previous is 0 the calculated value is infinity with the + // exception that if both (current - previous) and previous are 0 the + // calculated value is 0. + // A 10 minute moving mean is computed at each point of the time window + // prior to the above calculation to smooth the metric and prevent false + // positives from very short lived spikes. + // Only applicable for data that is >= 0. Any values < 0 are treated as + // no data. While delta metrics are accepted by this alignment special care + // should be taken that the values for the metric will always be positive. + // The output is a gauge metric with value type + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + ALIGN_PERCENT_CHANGE = 23; } // A Reducer describes how to aggregate data points from multiple @@ -237,6 +275,12 @@ message Aggregation { // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. REDUCE_COUNT_TRUE = 7; + // Reduce by computing the count of False-valued data points across time + // series for each alignment period. This reducer is valid for delta + // and gauge metrics of Boolean value type. The value type of + // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + REDUCE_COUNT_FALSE = 15; + // Reduce by computing the fraction of True-valued data points across time // series for each alignment period. This reducer is valid for delta // and gauge metrics of Boolean value type. The output value is in the @@ -321,3 +365,49 @@ message Aggregation { // defined, this field is ignored. repeated string group_by_fields = 5; } + +// Specifies an ordering relationship on two arguments, here called left and +// right. +enum ComparisonType { + // No ordering relationship is specified. + COMPARISON_UNSPECIFIED = 0; + + // The left argument is greater than the right argument. + COMPARISON_GT = 1; + + // The left argument is greater than or equal to the right argument. + COMPARISON_GE = 2; + + // The left argument is less than the right argument. + COMPARISON_LT = 3; + + // The left argument is less than or equal to the right argument. + COMPARISON_LE = 4; + + // The left argument is equal to the right argument. + COMPARISON_EQ = 5; + + // The left argument is not equal to the right argument. + COMPARISON_NE = 6; +} + +// The tier of service for a Stackdriver account. Please see the +// [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers) +// for more details. +enum ServiceTier { + // An invalid sentinel value, used to indicate that a tier has not + // been provided explicitly. + SERVICE_TIER_UNSPECIFIED = 0; + + // The Stackdriver Basic tier, a free tier of service that provides basic + // features, a moderate allotment of logs, and access to built-in metrics. + // A number of features are not available in this tier. For more details, + // see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + SERVICE_TIER_BASIC = 1; + + // The Stackdriver Premium tier, a higher, more expensive tier of service + // that provides access to all Stackdriver features, lets you use Stackdriver + // with AWS accounts, and has a larger allotments for logs and metrics. For + // more details, see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + SERVICE_TIER_PREMIUM = 2; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index b6a6cfc45c0..0c98bebead9 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -21,6 +21,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "GroupProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The description of a dynamic collection of monitored resources. Each group diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 3450580cd83..3d7493cf0ad 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -27,6 +27,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "GroupServiceProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The Group API lets you inspect and manage your diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 73ae6037493..80c59d50b0e 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -25,6 +25,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "MetricProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A single data point in a time series. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 0dd0b19d315..de11cbde96f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -29,6 +29,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // Manages metric descriptors, monitored resource descriptors, and diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto new file mode 100644 index 00000000000..a3ba28a1d15 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto @@ -0,0 +1,36 @@ +// 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.monitoring.v3; + +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "MutationRecordProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// Describes a change made to a configuration. +message MutationRecord { + // When the change occurred. + google.protobuf.Timestamp mutate_time = 1; + + // The email address of the user making the change. + string mutated_by = 2; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto new file mode 100644 index 00000000000..8cbca33f246 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -0,0 +1,163 @@ +// 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.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/api/label.proto"; +import "google/monitoring/v3/common.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "NotificationProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// A description of a notification channel. The descriptor includes +// the properties of the channel and the set of labels or fields that +// must be specified to configure channels of a given type. +message NotificationChannelDescriptor { + // The full REST resource name for this descriptor. The syntax is: + // + // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] + // + // In the above, `[TYPE]` is the value of the `type` field. + string name = 6; + + // The type of notification channel, such as "email", "sms", etc. + // Notification channel types are globally unique. + string type = 1; + + // A human-readable name for the notification channel type. This + // form of the name is suitable for a user interface. + string display_name = 2; + + // A human-readable description of the notification channel + // type. The description may include a description of the properties + // of the channel and pointers to external documentation. + string description = 3; + + // The set of labels that must be defined to identify a particular + // channel of the corresponding type. Each label includes a + // description for how that field should be populated. + repeated google.api.LabelDescriptor labels = 4; + + // The tiers that support this notification channel; the project service tier + // must be one of the supported_tiers. + repeated ServiceTier supported_tiers = 5; +} + +// A `NotificationChannel` is a medium through which an alert is +// delivered when a policy violation is detected. Examples of channels +// include email, SMS, and third-party messaging applications. Fields +// containing sensitive information like authentication tokens or +// contact info are only partially populated on retrieval. +message NotificationChannel { + // Indicates whether the channel has been verified or not. It is illegal + // to specify this field in a + // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel] + // or an + // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] + // operation. + enum VerificationStatus { + // Sentinel value used to indicate that the state is unknown, omitted, or + // is not applicable (as in the case of channels that neither support + // nor require verification in order to function). + VERIFICATION_STATUS_UNSPECIFIED = 0; + + // The channel has yet to be verified and requires verification to function. + // Note that this state also applies to the case where the verification + // process has been initiated by sending a verification code but where + // the verification code has not been submitted to complete the process. + UNVERIFIED = 1; + + // It has been proven that notifications can be received on this + // notification channel and that someone on the project has access + // to messages that are delivered to that channel. + VERIFIED = 2; + } + + // The type of the notification channel. This field matches the + // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. + string type = 1; + + // The full REST resource name for this channel. The syntax is: + // + // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // + // The `[CHANNEL_ID]` is automatically assigned by the server on creation. + string name = 6; + + // An optional human-readable name for this notification channel. It is + // recommended that you specify a non-empty and unique name in order to + // make it easier to identify the channels in your project, though this is + // not enforced. The display name is limited to 512 Unicode characters. + string display_name = 3; + + // An optional human-readable description of this notification channel. This + // description may provide additional details, beyond the display + // name, for the channel. This may not exceeed 1024 Unicode characters. + string description = 4; + + // Configuration fields that define the channel and its behavior. The + // permissible and required labels are specified in the + // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the + // `NotificationChannelDescriptor` corresponding to the `type` field. + map labels = 5; + + // User-supplied key/value data that does not need to conform to + // the corresponding `NotificationChannelDescriptor`'s schema, unlike + // the `labels` field. This field is intended to be used for organizing + // and identifying the `NotificationChannel` objects. + // + // The field can contain up to 64 entries. Each key and value is limited to + // 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + // values can contain only lowercase letters, numerals, underscores, and + // dashes. Keys must begin with a letter. + map user_labels = 8; + + // Indicates whether this channel has been verified or not. On a + // [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + // or + // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + // operation, this field is expected to be populated. + // + // If the value is `UNVERIFIED`, then it indicates that the channel is + // non-functioning (it both requires verification and lacks verification); + // otherwise, it is assumed that the channel works. + // + // If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that + // the channel is of a type that does not require verification or that + // this specific channel has been exempted from verification because it was + // created prior to verification being required for channels of this type. + // + // This field cannot be modified using a standard + // [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] + // operation. To change the value of this field, you must call + // [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. + VerificationStatus verification_status = 9; + + // Whether notifications are forwarded to the described channel. This makes + // it possible to disable delivery of notifications to a particular channel + // without removing the channel from all alerting policies that reference + // the channel. This is a more convenient approach when the change is + // temporary and you want to receive notifications from the same set + // of alerting policies on the channel at some point in the future. + google.protobuf.BoolValue enabled = 11; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto new file mode 100644 index 00000000000..aa5d294bef5 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -0,0 +1,335 @@ +// 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.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/monitoring/v3/notification.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "NotificationServiceProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// The Notification Channel API provides access to configuration that +// controls how messages related to incidents are sent. +service NotificationChannelService { + // Lists the descriptors for supported channel types. The use of descriptors + // makes it possible for new channel types to be dynamically added. + rpc ListNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest) returns (ListNotificationChannelDescriptorsResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*}/notificationChannelDescriptors" + }; + } + + // Gets a single channel descriptor. The descriptor indicates which fields + // are expected / permitted for a notification channel of the given type. + rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) returns (NotificationChannelDescriptor) { + option (google.api.http) = { + get: "/v3/{name=projects/*/notificationChannelDescriptors/*}" + }; + } + + // Lists the notification channels that have been created for the project. + rpc ListNotificationChannels(ListNotificationChannelsRequest) returns (ListNotificationChannelsResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*}/notificationChannels" + }; + } + + // Gets a single notification channel. The channel includes the relevant + // configuration details with which the channel was created. However, the + // response may truncate or omit passwords, API keys, or other private key + // matter and thus the response may not be 100% identical to the information + // that was supplied in the call to the create method. + rpc GetNotificationChannel(GetNotificationChannelRequest) returns (NotificationChannel) { + option (google.api.http) = { + get: "/v3/{name=projects/*/notificationChannels/*}" + }; + } + + // Creates a new notification channel, representing a single notification + // endpoint such as an email address, SMS number, or pagerduty service. + rpc CreateNotificationChannel(CreateNotificationChannelRequest) returns (NotificationChannel) { + option (google.api.http) = { + post: "/v3/{name=projects/*}/notificationChannels" + body: "notification_channel" + }; + } + + // Updates a notification channel. Fields not specified in the field mask + // remain unchanged. + rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) returns (NotificationChannel) { + option (google.api.http) = { + patch: "/v3/{notification_channel.name=projects/*/notificationChannels/*}" + body: "notification_channel" + }; + } + + // Deletes a notification channel. + rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/notificationChannels/*}" + }; + } + + // Causes a verification code to be delivered to the channel. The code + // can then be supplied in `VerifyNotificationChannel` to verify the channel. + rpc SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode" + body: "*" + }; + } + + // Requests a verification code for an already verified channel that can then + // be used in a call to VerifyNotificationChannel() on a different channel + // with an equivalent identity in the same or in a different project. This + // makes it possible to copy a channel between projects without requiring + // manual reverification of the channel. If the channel is not in the + // verified state, this method will fail (in other words, this may only be + // used if the SendNotificationChannelVerificationCode and + // VerifyNotificationChannel paths have already been used to put the given + // channel into the verified state). + // + // There is no guarantee that the verification codes returned by this method + // will be of a similar structure or form as the ones that are delivered + // to the channel via SendNotificationChannelVerificationCode; while + // VerifyNotificationChannel() will recognize both the codes delivered via + // SendNotificationChannelVerificationCode() and returned from + // GetNotificationChannelVerificationCode(), it is typically the case that + // the verification codes delivered via + // SendNotificationChannelVerificationCode() will be shorter and also + // have a shorter expiration (e.g. codes such as "G-123456") whereas + // GetVerificationCode() will typically return a much longer, websafe base + // 64 encoded string that has a longer expiration time. + rpc GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest) returns (GetNotificationChannelVerificationCodeResponse) { + option (google.api.http) = { + post: "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode" + body: "*" + }; + } + + // Verifies a `NotificationChannel` by proving receipt of the code + // delivered to the channel as a result of calling + // `SendNotificationChannelVerificationCode`. + rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) returns (NotificationChannel) { + option (google.api.http) = { + post: "/v3/{name=projects/*/notificationChannels/*}:verify" + body: "*" + }; + } +} + +// The `ListNotificationChannelDescriptors` request. +message ListNotificationChannelDescriptorsRequest { + // The REST resource name of the parent from which to retrieve + // the notification channel descriptors. The expected syntax is: + // + // projects/[PROJECT_ID] + // + // Note that this names the parent container in which to look for the + // descriptors; to retrieve a single descriptor by name, use the + // [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + // operation, instead. + string name = 4; + + // The maximum number of results to return in a single response. If + // not set to a positive number, a reasonable value will be chosen by the + // service. + int32 page_size = 2; + + // If non-empty, `page_token` must contain a value returned as the + // `next_page_token` in a previous response to request the next set + // of results. + string page_token = 3; +} + +// The `ListNotificationChannelDescriptors` response. +message ListNotificationChannelDescriptorsResponse { + // The monitored resource descriptors supported for the specified + // project, optionally filtered. + repeated NotificationChannelDescriptor channel_descriptors = 1; + + // If not empty, indicates that there may be more results that match + // the request. Use the value in the `page_token` field in a + // subsequent request to fetch the next set of results. If empty, + // all results have been returned. + string next_page_token = 2; +} + +// The `GetNotificationChannelDescriptor` response. +message GetNotificationChannelDescriptorRequest { + // The channel type for which to execute the request. The format is + // `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. + string name = 3; +} + +// The `CreateNotificationChannel` request. +message CreateNotificationChannelRequest { + // The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID] + // + // Note that this names the container into which the channel will be + // written. This does not name the newly created channel. The resulting + // channel's name will have a normalized version of this field as a prefix, + // but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + string name = 3; + + // The definition of the `NotificationChannel` to create. + NotificationChannel notification_channel = 2; +} + +// The `ListNotificationChannels` request. +message ListNotificationChannelsRequest { + // The project on which to execute the request. The format is + // `projects/[PROJECT_ID]`. That is, this names the container + // in which to look for the notification channels; it does not name a + // specific channel. To query a specific channel by REST resource name, use + // the + // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation. + string name = 5; + + // If provided, this field specifies the criteria that must be met by + // notification channels to be included in the response. + // + // For more details, see [sorting and + // filtering](/monitoring/api/v3/sorting-and-filtering). + string filter = 6; + + // A comma-separated list of fields by which to sort the result. Supports + // the same set of fields as in `filter`. Entries can be prefixed with + // a minus sign to sort in descending rather than ascending order. + // + // For more details, see [sorting and + // filtering](/monitoring/api/v3/sorting-and-filtering). + string order_by = 7; + + // The maximum number of results to return in a single response. If + // not set to a positive number, a reasonable value will be chosen by the + // service. + int32 page_size = 3; + + // If non-empty, `page_token` must contain a value returned as the + // `next_page_token` in a previous response to request the next set + // of results. + string page_token = 4; +} + +// The `ListNotificationChannels` response. +message ListNotificationChannelsResponse { + // The notification channels defined for the specified project. + repeated NotificationChannel notification_channels = 3; + + // If not empty, indicates that there may be more results that match + // the request. Use the value in the `page_token` field in a + // subsequent request to fetch the next set of results. If empty, + // all results have been returned. + string next_page_token = 2; +} + +// The `GetNotificationChannel` request. +message GetNotificationChannelRequest { + // The channel for which to execute the request. The format is + // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + string name = 3; +} + +// The `UpdateNotificationChannel` request. +message UpdateNotificationChannelRequest { + // The fields to update. + google.protobuf.FieldMask update_mask = 2; + + // A description of the changes to be applied to the specified + // notification channel. The description must provide a definition for + // fields to be updated; the names of these fields should also be + // included in the `update_mask`. + NotificationChannel notification_channel = 3; +} + +// The `DeleteNotificationChannel` request. +message DeleteNotificationChannelRequest { + // The channel for which to execute the request. The format is + // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + string name = 3; + + // If true, the notification channel will be deleted regardless of its + // use in alert policies (the policies will be updated to remove the + // channel). If false, channels that are still referenced by an existing + // alerting policy will fail to be deleted in a delete operation. + bool force = 5; +} + +// The `SendNotificationChannelVerificationCode` request. +message SendNotificationChannelVerificationCodeRequest { + // The notification channel to which to send a verification code. + string name = 1; +} + +// The `GetNotificationChannelVerificationCode` request. +message GetNotificationChannelVerificationCodeRequest { + // The notification channel for which a verification code is to be generated + // and retrieved. This must name a channel that is already verified; if + // the specified channel is not verified, the request will fail. + string name = 1; + + // The desired expiration time. If specified, the API will guarantee that + // the returned code will not be valid after the specified timestamp; + // however, the API cannot guarantee that the returned code will be + // valid for at least as long as the requested time (the API puts an upper + // bound on the amount of time for which a code may be valid). If omitted, + // a default expiration will be used, which may be less than the max + // permissible expiration (so specifying an expiration may extend the + // code's lifetime over omitting an expiration, even though the API does + // impose an upper limit on the maximum expiration that is permitted). + google.protobuf.Timestamp expire_time = 2; +} + +// The `GetNotificationChannelVerificationCode` request. +message GetNotificationChannelVerificationCodeResponse { + // The verification code, which may be used to verify other channels + // that have an equivalent identity (i.e. other channels of the same + // type with the same fingerprint such as other email channels with + // the same email address or other sms channels with the same number). + string code = 1; + + // The expiration time associated with the code that was returned. If + // an expiration was provided in the request, this is the minimum of the + // requested expiration in the request and the max permitted expiration. + google.protobuf.Timestamp expire_time = 2; +} + +// The `VerifyNotificationChannel` request. +message VerifyNotificationChannelRequest { + // The notification channel to verify. + string name = 1; + + // The verification code that was delivered to the channel as + // a result of invoking the `SendNotificationChannelVerificationCode` API + // method or that was retrieved from a verified channel via + // `GetNotificationChannelVerificationCode`. For example, one might have + // "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + // guaranteed that the code is valid UTF-8; one should not + // make any assumptions regarding the structure or format of the code). + string code = 2; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index bee8d40b5eb..24dd1d73d64 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -24,6 +24,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // This message configures which resources and services to monitor for @@ -104,6 +105,25 @@ message UptimeCheckConfig { string content = 1; } + // Nimbus InternalCheckers. + message InternalChecker { + // The GCP project ID. Not necessarily the same as the project_id for the config. + string project_id = 1; + + // The internal network to perform this uptime check on. + string network = 2; + + // The GCP zone the uptime check should egress from. Only respected for + // internal uptime checks, where internal_network is specified. + string gcp_zone = 3; + + // The checker ID. + string checker_id = 4; + + // The checker's human-readable name. + string display_name = 5; + } + // A unique resource name for this UptimeCheckConfig. The format is: // // @@ -158,6 +178,9 @@ message UptimeCheckConfig { // Not specifying this field will result in uptime checks running from all // regions. repeated UptimeCheckRegion selected_regions = 10; + + // The internal checkers that this check will egress from. + repeated InternalChecker internal_checkers = 14; } // Contains the region, location, and list of IP diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index 66982c32039..c3e04133fb2 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -26,6 +26,7 @@ option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitor option java_multiple_files = true; option java_outer_classname = "UptimeServiceProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The UptimeCheckService API is used to manage (list, create, delete, edit) @@ -40,9 +41,7 @@ service UptimeCheckService { // Lists the existing valid uptime check configurations for the project, // leaving out any invalid configurations. rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { - option (google.api.http) = { - get: "/v3/{parent=projects/*}/uptimeCheckConfigs" - }; + option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; } // Gets a single uptime check configuration. @@ -71,11 +70,8 @@ service UptimeCheckService { } // Returns the list of IPs that checkers run from - rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) - returns (ListUptimeCheckIpsResponse) { - option (google.api.http) = { - get: "/v3/uptimeCheckIps" - }; + rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { + option (google.api.http) = { get: "/v3/uptimeCheckIps" }; } } @@ -132,11 +128,6 @@ message CreateUptimeCheckConfigRequest { // The protocol for the `UpdateUptimeCheckConfig` request. message UpdateUptimeCheckConfigRequest { - // The uptime check configuration to update. The format is - // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; - // Optional. If present, only the listed fields in the current uptime check // configuration are updated with values from the new configuration. If this // field is empty, then the current configuration is completely replaced with diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index 87f805eeb37..9cee6f734ac 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/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, @@ -16,16 +16,13 @@ * @namespace google */ /** - * @namespace google.api + * @namespace google.cloud */ /** - * @namespace google.protobuf + * @namespace google.cloud.monitoring */ /** - * @namespace google.monitoring - */ -/** - * @namespace google.monitoring.v3 + * @namespace google.cloud.monitoring.v3 */ 'use strict'; @@ -38,18 +35,26 @@ const gapic = Object.freeze({ /** * The `@google-cloud/monitoring` package has the following named exports: * + * - `AlertPolicyServiceClient` - Reference to + * {@link v3.AlertPolicyServiceClient} * - `GroupServiceClient` - Reference to * {@link v3.GroupServiceClient} * - `MetricServiceClient` - Reference to * {@link v3.MetricServiceClient} + * - `NotificationChannelServiceClient` - Reference to + * {@link v3.NotificationChannelServiceClient} * - `UptimeCheckServiceClient` - Reference to * {@link v3.UptimeCheckServiceClient} * - `v3` - This is used for selecting or pinning a * particular backend service version. It exports: + * - `AlertPolicyServiceClient` - Reference to + * {@link v3.AlertPolicyServiceClient} * - `GroupServiceClient` - Reference to * {@link v3.GroupServiceClient} * - `MetricServiceClient` - Reference to * {@link v3.MetricServiceClient} + * - `NotificationChannelServiceClient` - Reference to + * {@link v3.NotificationChannelServiceClient} * - `UptimeCheckServiceClient` - Reference to * {@link v3.UptimeCheckServiceClient} * @@ -63,25 +68,25 @@ const gapic = Object.freeze({ * const monitoring = require('@google-cloud/monitoring'); * * @example Create a client that uses Application Default Credentials (ADC): - * const client = new monitoring.GroupServiceClient(); + * const client = new monitoring.AlertPolicyServiceClient(); * * @example Create a client with explicit credentials: - * const client = new monitoring.GroupServiceClient({ + * const client = new monitoring.AlertPolicyServiceClient({ * projectId: 'your-project-id', * keyFilename: '/path/to/keyfile.json', * }); - * - * @example include:samples/quickstart.js - * region_tag:monitoring_quickstart - * Full quickstart example: */ /** * @type {object} + * @property {constructor} AlertPolicyServiceClient + * Reference to {@link v3.AlertPolicyServiceClient} * @property {constructor} GroupServiceClient * Reference to {@link v3.GroupServiceClient} * @property {constructor} MetricServiceClient * Reference to {@link v3.MetricServiceClient} + * @property {constructor} NotificationChannelServiceClient + * Reference to {@link v3.NotificationChannelServiceClient} * @property {constructor} UptimeCheckServiceClient * Reference to {@link v3.UptimeCheckServiceClient} */ @@ -89,10 +94,14 @@ module.exports = gapic.v3; /** * @type {object} + * @property {constructor} AlertPolicyServiceClient + * Reference to {@link v3.AlertPolicyServiceClient} * @property {constructor} GroupServiceClient * Reference to {@link v3.GroupServiceClient} * @property {constructor} MetricServiceClient * Reference to {@link v3.MetricServiceClient} + * @property {constructor} NotificationChannelServiceClient + * Reference to {@link v3.NotificationChannelServiceClient} * @property {constructor} UptimeCheckServiceClient * Reference to {@link v3.UptimeCheckServiceClient} */ diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js new file mode 100644 index 00000000000..755bde74bbe --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -0,0 +1,759 @@ +// 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 gapicConfig = require('./alert_policy_service_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); + +const VERSION = require('../../package.json').version; + +/** + * The AlertPolicyService API is used to manage (list, create, delete, + * edit) alert policies in Stackdriver Monitoring. An alerting policy is + * a description of the conditions under which some aspect of your + * system is considered to be "unhealthy" and the ways to notify + * people or services about this state. In addition to using this API, alert + * policies can also be managed through + * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs/), + * which can be reached by clicking the "Monitoring" tab in + * [Cloud Console](https://console.cloud.google.com/). + * + * @class + * @memberof v3 + */ +class AlertPolicyServiceClient { + /** + * Construct an instance of AlertPolicyServiceClient. + * + * @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.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 + ); + + // 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/monitoring/v3/alert_service.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}'), + alertPolicyPathTemplate: new gax.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + alertPolicyConditionPathTemplate: new gax.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + }; + + // 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 = { + listAlertPolicies: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'alertPolicies' + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.AlertPolicyService', + 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.monitoring.v3.AlertPolicyService. + var alertPolicyServiceStub = gaxGrpc.createStub( + protos.google.monitoring.v3.AlertPolicyService, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var alertPolicyServiceStubMethods = [ + 'listAlertPolicies', + 'getAlertPolicy', + 'createAlertPolicy', + 'deleteAlertPolicy', + 'updateAlertPolicy', + ]; + for (let methodName of alertPolicyServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + alertPolicyServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.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 the existing alerting policies for the project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project whose alert policies are to be listed. The format is + * + * projects/[PROJECT_ID] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * GetAlertPolicy + * operation, instead. + * @param {string} [request.filter] + * If provided, this field specifies the criteria that must be met by + * alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} [request.orderBy] + * A comma-separated list of fields by which to sort the result. Supports + * the same set of field references as the `filter` field. Entries can be + * prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * + * 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 [ListAlertPoliciesResponse]{@link google.monitoring.v3.ListAlertPoliciesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} 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 [ListAlertPoliciesResponse]{@link google.monitoring.v3.ListAlertPoliciesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.AlertPolicyServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * + * client.listAlertPolicies({name: formattedName}) + * .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 formattedName = 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.listAlertPolicies(nextRequest, options).then(callback); + * } + * } + * client.listAlertPolicies({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listAlertPolicies(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listAlertPolicies(request, options, callback); + } + + /** + * Equivalent to {@link listAlertPolicies}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listAlertPolicies} 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.name + * The project whose alert policies are to be listed. The format is + * + * projects/[PROJECT_ID] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * GetAlertPolicy + * operation, instead. + * @param {string} [request.filter] + * If provided, this field specifies the criteria that must be met by + * alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} [request.orderBy] + * A comma-separated list of fields by which to sort the result. Supports + * the same set of field references as the `filter` field. Entries can be + * prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.AlertPolicyServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * client.listAlertPoliciesStream({name: formattedName}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listAlertPoliciesStream(request, options) { + options = options || {}; + + return this._descriptors.page.listAlertPolicies.createStream( + this._innerApiCalls.listAlertPolicies, + request, + options + ); + } + + /** + * Gets a single alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The alerting policy to retrieve. The format is + * + * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.AlertPolicyServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + * client.getAlertPolicy({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getAlertPolicy(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getAlertPolicy(request, options, callback); + } + + /** + * Creates a new alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project in which to create the alerting policy. The format is + * `projects/[PROJECT_ID]`. + * + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. The alerting + * policy that is returned will have a name that contains a normalized + * representation of this name as a prefix but adds a suffix of the form + * `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. + * @param {Object} request.alertPolicy + * The requested alerting policy. You should omit the `name` field in this + * policy. The name will be returned in the new policy, including + * a new [ALERT_POLICY_ID] value. + * + * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.AlertPolicyServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * var alertPolicy = {}; + * var request = { + * name: formattedName, + * alertPolicy: alertPolicy, + * }; + * client.createAlertPolicy(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createAlertPolicy(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createAlertPolicy(request, options, callback); + } + + /** + * Deletes an alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The alerting policy to delete. The format is: + * + * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + * + * For more information, see AlertPolicy. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.AlertPolicyServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + * client.deleteAlertPolicy({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteAlertPolicy(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteAlertPolicy(request, options, callback); + } + + /** + * Updates an alerting policy. You can either replace the entire policy with + * a new one or replace only certain fields in the current alerting policy by + * specifying the fields to be updated via `updateMask`. Returns the + * updated alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.alertPolicy + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * + * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} + * @param {Object} [request.updateMask] + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * + * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.AlertPolicyServiceClient({ + * // optional auth parameters. + * }); + * + * var alertPolicy = {}; + * client.updateAlertPolicy({alertPolicy: alertPolicy}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateAlertPolicy(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.updateAlertPolicy(request, options, callback); + } + + // -------------------- + // -- 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 alert_policy resource name string. + * + * @param {String} project + * @param {String} alertPolicy + * @returns {String} + */ + alertPolicyPath(project, alertPolicy) { + return this._pathTemplates.alertPolicyPathTemplate.render({ + project: project, + alert_policy: alertPolicy, + }); + } + + /** + * Return a fully-qualified alert_policy_condition resource name string. + * + * @param {String} project + * @param {String} alertPolicy + * @param {String} condition + * @returns {String} + */ + alertPolicyConditionPath(project, alertPolicy, condition) { + return this._pathTemplates.alertPolicyConditionPathTemplate.render({ + project: project, + alert_policy: alertPolicy, + condition: condition, + }); + } + + /** + * 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 alertPolicyName from a alert_policy resource. + * + * @param {String} alertPolicyName + * A fully-qualified path representing a alert_policy resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromAlertPolicyName(alertPolicyName) { + return this._pathTemplates.alertPolicyPathTemplate.match(alertPolicyName) + .project; + } + + /** + * Parse the alertPolicyName from a alert_policy resource. + * + * @param {String} alertPolicyName + * A fully-qualified path representing a alert_policy resources. + * @returns {String} - A string representing the alert_policy. + */ + matchAlertPolicyFromAlertPolicyName(alertPolicyName) { + return this._pathTemplates.alertPolicyPathTemplate.match(alertPolicyName) + .alert_policy; + } + + /** + * Parse the alertPolicyConditionName from a alert_policy_condition resource. + * + * @param {String} alertPolicyConditionName + * A fully-qualified path representing a alert_policy_condition resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromAlertPolicyConditionName(alertPolicyConditionName) { + return this._pathTemplates.alertPolicyConditionPathTemplate.match( + alertPolicyConditionName + ).project; + } + + /** + * Parse the alertPolicyConditionName from a alert_policy_condition resource. + * + * @param {String} alertPolicyConditionName + * A fully-qualified path representing a alert_policy_condition resources. + * @returns {String} - A string representing the alert_policy. + */ + matchAlertPolicyFromAlertPolicyConditionName(alertPolicyConditionName) { + return this._pathTemplates.alertPolicyConditionPathTemplate.match( + alertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the alertPolicyConditionName from a alert_policy_condition resource. + * + * @param {String} alertPolicyConditionName + * A fully-qualified path representing a alert_policy_condition resources. + * @returns {String} - A string representing the condition. + */ + matchConditionFromAlertPolicyConditionName(alertPolicyConditionName) { + return this._pathTemplates.alertPolicyConditionPathTemplate.match( + alertPolicyConditionName + ).condition; + } +} + +module.exports = AlertPolicyServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json new file mode 100644 index 00000000000..d6101ccaae8 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json @@ -0,0 +1,51 @@ +{ + "interfaces": { + "google.monitoring.v3.AlertPolicyService": { + "retry_codes": { + "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, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListAlertPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetAlertPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateAlertPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAlertPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateAlertPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js index 2ebda08c4d9..7629c3a8f76 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js index 602286cb52b..0ccae3a5932 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 7a7247a2397..a877b0212c3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/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, diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 31d25663448..8e1750cb22d 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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, diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js new file mode 100644 index 00000000000..b60323bc92a --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -0,0 +1,417 @@ +// 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 description of the conditions under which some aspect of your system is + * considered to be "unhealthy" and the ways to notify people or services about + * this state. For an overview of alert policies, see + * [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/). + * + * @property {string} name + * Required if the policy exists. The resource name for this policy. The + * syntax is: + * + * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + * + * `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy + * is created. When calling the + * alertPolicies.create + * method, do not include the `name` field in the alerting policy passed as + * part of the request. + * + * @property {string} displayName + * A short name or phrase used to identify the policy in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple policies in the same project. The name is + * limited to 512 Unicode characters. + * + * @property {Object} documentation + * Documentation that is included with notifications and incidents related to + * this policy. Best practice is for the documentation to include information + * to help responders understand, mitigate, escalate, and correct the + * underlying problems detected by the alerting policy. Notification channels + * that have limited capacity might not show this documentation. + * + * This object should have the same structure as [Documentation]{@link google.monitoring.v3.Documentation} + * + * @property {Object.} userLabels + * User-supplied key/value data to be used for organizing and + * identifying the `AlertPolicy` objects. + * + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * @property {Object[]} conditions + * A list of conditions for the policy. The conditions are combined by AND or + * OR according to the `combiner` field. If the combined conditions evaluate + * to true, then an incident is created. A policy can have from one to six + * conditions. + * + * This object should have the same structure as [Condition]{@link google.monitoring.v3.Condition} + * + * @property {number} combiner + * How to combine the results of multiple conditions + * to determine if an incident should be opened. + * + * The number should be among the values of [ConditionCombinerType]{@link google.monitoring.v3.ConditionCombinerType} + * + * @property {Object} enabled + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * + * This object should have the same structure as [BoolValue]{@link google.protobuf.BoolValue} + * + * @property {string[]} notificationChannels + * Identifies the notification channels to which notifications should be sent + * when incidents are opened or closed or when new violations occur on + * an already opened incident. Each element of this array corresponds to + * the `name` field in each of the + * `NotificationChannel` + * objects that are returned from the [`ListNotificationChannels`] + * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * method. The syntax of the entries in this field is: + * + * projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + * + * @property {Object} creationRecord + * A read-only record of the creation of the alerting policy. If provided + * in a call to create or update, this field will be ignored. + * + * This object should have the same structure as [MutationRecord]{@link google.monitoring.v3.MutationRecord} + * + * @property {Object} mutationRecord + * A read-only record of the most recent change to the alerting policy. If + * provided in a call to create or update, this field will be ignored. + * + * This object should have the same structure as [MutationRecord]{@link google.monitoring.v3.MutationRecord} + * + * @typedef AlertPolicy + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.AlertPolicy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} + */ +var AlertPolicy = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * A content string and a MIME type that describes the content string's + * format. + * + * @property {string} content + * The text of the documentation, interpreted according to `mime_type`. + * The content may not exceed 8,192 Unicode characters and may not exceed + * more than 10,240 bytes when encoded in UTF-8 format, whichever is + * smaller. + * + * @property {string} mimeType + * The format of the `content` field. Presently, only the value + * `"text/markdown"` is supported. See + * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. + * + * @typedef Documentation + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.AlertPolicy.Documentation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} + */ + Documentation: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * A condition is a true/false test that determines when an alerting policy + * should open an incident. If a condition evaluates to true, it signifies + * that something is wrong. + * + * @property {string} name + * Required if the condition exists. The unique resource name for this + * condition. Its syntax is: + * + * projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + * + * `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the + * condition is created as part of a new or updated alerting policy. + * + * When calling the + * alertPolicies.create + * method, do not include the `name` field in the conditions of the + * requested alerting policy. Stackdriver Monitoring creates the + * condition identifiers and includes them in the new policy. + * + * When calling the + * alertPolicies.update + * method to update a policy, including a condition `name` causes the + * existing condition to be updated. Conditions without names are added to + * the updated policy. Existing conditions are deleted if they are not + * updated. + * + * Best practice is to preserve `[CONDITION_ID]` if you make only small + * changes, such as those to condition thresholds, durations, or trigger + * values. Otherwise, treat the change as a new condition and let the + * existing condition be deleted. + * + * @property {string} displayName + * A short name or phrase used to identify the condition in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple conditions in the same policy. + * + * @property {Object} conditionThreshold + * A condition that compares a time series against a threshold. + * + * This object should have the same structure as [MetricThreshold]{@link google.monitoring.v3.MetricThreshold} + * + * @property {Object} conditionAbsent + * A condition that checks that a time series continues to + * receive new data points. + * + * This object should have the same structure as [MetricAbsence]{@link google.monitoring.v3.MetricAbsence} + * + * @typedef Condition + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.AlertPolicy.Condition definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} + */ + Condition: { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Specifies how many time series must fail a predicate to trigger a + * condition. If not specified, then a `{count: 1}` trigger is used. + * + * @property {number} count + * The absolute number of time series that must fail + * the predicate for the condition to be triggered. + * + * @property {number} percent + * The percentage of time series that must fail the + * predicate for the condition to be triggered. + * + * @typedef Trigger + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.AlertPolicy.Condition.Trigger definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} + */ + Trigger: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * A condition type that compares a collection of time series + * against a threshold. + * + * @property {string} filter + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * + * The filter is similar to the one that is specified in the + * [`MetricService.ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that + * call is useful to verify the time series that will be retrieved / + * processed) and must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * + * @property {Object[]} aggregations + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resrouces). Multiple aggregations + * are applied in the order specified. + * + * This field is similar to the one in the + * [`MetricService.ListTimeSeries` request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this field. + * + * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} + * + * @property {string} denominatorFilter + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies a time + * series that should be used as the denominator of a ratio that will be + * compared with the threshold. If a `denominator_filter` is specified, + * the time series specified by the `filter` field will be used as the + * numerator. + * + * The filter is similar to the one that is specified in the + * [`MetricService.ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that + * call is useful to verify the time series that will be retrieved / + * processed) and must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * + * @property {Object[]} denominatorAggregations + * Specifies the alignment of data points in individual time series + * selected by `denominatorFilter` as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). + * + * When computing ratios, the `aggregations` and + * `denominator_aggregations` fields must use the same alignment period + * and produce time series that have the same periodicity and labels. + * + * This field is similar to the one in the + * [`MetricService.ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It + * is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} + * + * @property {number} comparison + * The comparison to apply between the time series (indicated by `filter` + * and `aggregation`) and the threshold (indicated by `threshold_value`). + * The comparison is applied on each time series, with the time series + * on the left-hand side and the threshold on the right-hand side. + * + * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. + * + * The number should be among the values of [ComparisonType]{@link google.monitoring.v3.ComparisonType} + * + * @property {number} thresholdValue + * A value against which to compare the time series. + * + * @property {Object} duration + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g. 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. The `Duration.nanos` field is + * ignored. When choosing a duration, it is useful to keep in mind the + * frequency of the underlying time series data (which may also be + * affected by any alignments specified in the `aggregation` field); + * a good duration is long enough so that a single outlier does not + * generate spurious alerts, but short enough that unhealthy states + * are detected and alerted on quickly. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {Object} trigger + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * This object should have the same structure as [Trigger]{@link google.monitoring.v3.Trigger} + * + * @typedef MetricThreshold + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.AlertPolicy.Condition.MetricThreshold definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} + */ + MetricThreshold: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * A condition type that checks that monitored resources + * are reporting data. The configuration defines a metric and + * a set of monitored resources. The predicate is considered in violation + * when a time series for the specified metric of a monitored + * resource does not include any data in the specified `duration`. + * + * @property {string} filter + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * + * The filter is similar to the one that is specified in the + * [`MetricService.ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that + * call is useful to verify the time series that will be retrieved / + * processed) and must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * + * @property {Object[]} aggregations + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resrouces). Multiple aggregations + * are applied in the order specified. + * + * This field is similar to the + * one in the [`MetricService.ListTimeSeries` request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this field. + * + * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} + * + * @property {Object} duration + * The amount of time that a time series must fail to report new + * data to be considered failing. Currently, only values that + * are a multiple of a minute--e.g. 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. The `Duration.nanos` field is + * ignored. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {Object} trigger + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`. + * + * This object should have the same structure as [Trigger]{@link google.monitoring.v3.Trigger} + * + * @typedef MetricAbsence + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.AlertPolicy.Condition.MetricAbsence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} + */ + MetricAbsence: { + // This is for documentation. Actual contents will be loaded by gRPC. + } + }, + + /** + * Operators for combining conditions. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ + ConditionCombinerType: { + + /** + * An unspecified combiner. + */ + COMBINE_UNSPECIFIED: 0, + + /** + * Combine conditions using the logical `AND` operator. An + * incident is created only if all conditions are met + * simultaneously. This combiner is satisfied if all conditions are + * met, even if they are met on completely different resources. + */ + AND: 1, + + /** + * Combine conditions using the logical `OR` operator. An incident + * is created if any of the listed conditions is met. + */ + OR: 2, + + /** + * Combine conditions using logical `AND` operator, but unlike the regular + * `AND` option, an incident is created only if all conditions are met + * simultaneously on at least one resource. + */ + AND_WITH_MATCHING_RESOURCE: 3 + } +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index 21ad4b6b5ec..08d9aa4fba7 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.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, @@ -73,8 +73,9 @@ var TimeInterval = { /** * Describes how to combine multiple time series to provide different views of * the data. Aggregation consists of an alignment step on individual time - * series (`per_series_aligner`) followed by an optional reduction of the data - * across different time series (`cross_series_reducer`). For more details, see + * series (`alignment_period` and `per_series_aligner`) followed by an optional + * reduction step of the data across the aligned time series + * (`cross_series_reducer` and `group_by_fields`). For more details, see * [Aggregation](https://cloud.google.com/monitoring/api/learn_more#aggregation). * * @property {Object} alignmentPeriod @@ -164,6 +165,9 @@ var Aggregation = { * delta metric to a delta metric requires that the alignment * period be increased. The value type of the result is the same * as the value type of the input. + * + * One can think of this aligner as a rate but without time units; that + * is, the output is conceptually (second_point - first_point). */ ALIGN_DELTA: 1, @@ -172,6 +176,14 @@ var Aggregation = { * cumulative metrics and delta metrics with numeric values. The output is a * gauge metric with value type * DOUBLE. + * + * One can think of this aligner as conceptually providing the slope of + * the line that passes through the value at the start and end of the + * window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), + * and the output unit is one that has a "/time" dimension. + * + * If, by rate, you are looking for percentage change, see the + * `ALIGN_PERCENT_CHANGE` aligner option. */ ALIGN_RATE: 2, @@ -254,6 +266,15 @@ var Aggregation = { */ ALIGN_COUNT_TRUE: 16, + /** + * Align time series via aggregation. The resulting data point in + * the alignment period is the count of False-valued data points in the + * period. This alignment is valid for gauge metrics with + * Boolean values. The value type of the output is + * INT64. + */ + ALIGN_COUNT_FALSE: 24, + /** * Align time series via aggregation. The resulting data point in * the alignment period is the fraction of True-valued data points in the @@ -297,7 +318,26 @@ var Aggregation = { * with distribution values. The output is a gauge metric with value type * DOUBLE. */ - ALIGN_PERCENTILE_05: 21 + ALIGN_PERCENTILE_05: 21, + + /** + * Align and convert to a percentage change. This alignment is valid for + * gauge and delta metrics with numeric values. This alignment conceptually + * computes the equivalent of "((current - previous)/previous)*100" + * where previous value is determined based on the alignmentPeriod. + * In the event that previous is 0 the calculated value is infinity with the + * exception that if both (current - previous) and previous are 0 the + * calculated value is 0. + * A 10 minute moving mean is computed at each point of the time window + * prior to the above calculation to smooth the metric and prevent false + * positives from very short lived spikes. + * Only applicable for data that is >= 0. Any values < 0 are treated as + * no data. While delta metrics are accepted by this alignment special care + * should be taken that the values for the metric will always be positive. + * The output is a gauge metric with value type + * DOUBLE. + */ + ALIGN_PERCENT_CHANGE: 23 }, /** @@ -372,6 +412,14 @@ var Aggregation = { */ REDUCE_COUNT_TRUE: 7, + /** + * Reduce by computing the count of False-valued data points across time + * series for each alignment period. This reducer is valid for delta + * and gauge metrics of Boolean value type. The value type of + * the output is INT64. + */ + REDUCE_COUNT_FALSE: 15, + /** * Reduce by computing the fraction of True-valued data points across time * series for each alignment period. This reducer is valid for delta @@ -413,4 +461,82 @@ var Aggregation = { */ REDUCE_PERCENTILE_05: 12 } +}; + +/** + * Specifies an ordering relationship on two arguments, here called left and + * right. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ +var ComparisonType = { + + /** + * No ordering relationship is specified. + */ + COMPARISON_UNSPECIFIED: 0, + + /** + * The left argument is greater than the right argument. + */ + COMPARISON_GT: 1, + + /** + * The left argument is greater than or equal to the right argument. + */ + COMPARISON_GE: 2, + + /** + * The left argument is less than the right argument. + */ + COMPARISON_LT: 3, + + /** + * The left argument is less than or equal to the right argument. + */ + COMPARISON_LE: 4, + + /** + * The left argument is equal to the right argument. + */ + COMPARISON_EQ: 5, + + /** + * The left argument is not equal to the right argument. + */ + COMPARISON_NE: 6 +}; + +/** + * The tier of service for a Stackdriver account. Please see the + * [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers) + * for more details. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ +var ServiceTier = { + + /** + * An invalid sentinel value, used to indicate that a tier has not + * been provided explicitly. + */ + SERVICE_TIER_UNSPECIFIED: 0, + + /** + * The Stackdriver Basic tier, a free tier of service that provides basic + * features, a moderate allotment of logs, and access to built-in metrics. + * A number of features are not available in this tier. For more details, + * see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + */ + SERVICE_TIER_BASIC: 1, + + /** + * The Stackdriver Premium tier, a higher, more expensive tier of service + * that provides access to all Stackdriver features, lets you use Stackdriver + * with AWS accounts, and has a larger allotments for logs and metrics. For + * more details, see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + */ + SERVICE_TIER_PREMIUM: 2 }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js index 4a7d944bc0d..27e6f4c0f31 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index c884210a8b5..8ea16bf4459 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/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, diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js new file mode 100644 index 00000000000..2bd28743359 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js @@ -0,0 +1,35 @@ +// 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. + +/** + * Describes a change made to a configuration. + * + * @property {Object} mutateTime + * When the change occurred. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {string} mutatedBy + * The email address of the user making the change. + * + * @typedef MutationRecord + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.MutationRecord definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/mutation_record.proto} + */ +var MutationRecord = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js new file mode 100644 index 00000000000..f592f06c8ea --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js @@ -0,0 +1,185 @@ +// 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 description of a notification channel. The descriptor includes + * the properties of the channel and the set of labels or fields that + * must be specified to configure channels of a given type. + * + * @property {string} name + * The full REST resource name for this descriptor. The syntax is: + * + * projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] + * + * In the above, `[TYPE]` is the value of the `type` field. + * + * @property {string} type + * The type of notification channel, such as "email", "sms", etc. + * Notification channel types are globally unique. + * + * @property {string} displayName + * A human-readable name for the notification channel type. This + * form of the name is suitable for a user interface. + * + * @property {string} description + * A human-readable description of the notification channel + * type. The description may include a description of the properties + * of the channel and pointers to external documentation. + * + * @property {Object[]} labels + * The set of labels that must be defined to identify a particular + * channel of the corresponding type. Each label includes a + * description for how that field should be populated. + * + * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} + * + * @property {number[]} supportedTiers + * The tiers that support this notification channel; the project service tier + * must be one of the supported_tiers. + * + * The number should be among the values of [ServiceTier]{@link google.monitoring.v3.ServiceTier} + * + * @typedef NotificationChannelDescriptor + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.NotificationChannelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} + */ +var NotificationChannelDescriptor = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A `NotificationChannel` is a medium through which an alert is + * delivered when a policy violation is detected. Examples of channels + * include email, SMS, and third-party messaging applications. Fields + * containing sensitive information like authentication tokens or + * contact info are only partially populated on retrieval. + * + * @property {string} type + * The type of the notification channel. This field matches the + * value of the NotificationChannelDescriptor.type field. + * + * @property {string} name + * The full REST resource name for this channel. The syntax is: + * + * projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + * + * The `[CHANNEL_ID]` is automatically assigned by the server on creation. + * + * @property {string} displayName + * An optional human-readable name for this notification channel. It is + * recommended that you specify a non-empty and unique name in order to + * make it easier to identify the channels in your project, though this is + * not enforced. The display name is limited to 512 Unicode characters. + * + * @property {string} description + * An optional human-readable description of this notification channel. This + * description may provide additional details, beyond the display + * name, for the channel. This may not exceeed 1024 Unicode characters. + * + * @property {Object.} labels + * Configuration fields that define the channel and its behavior. The + * permissible and required labels are specified in the + * NotificationChannelDescriptor.labels of the + * `NotificationChannelDescriptor` corresponding to the `type` field. + * + * @property {Object.} userLabels + * User-supplied key/value data that does not need to conform to + * the corresponding `NotificationChannelDescriptor`'s schema, unlike + * the `labels` field. This field is intended to be used for organizing + * and identifying the `NotificationChannel` objects. + * + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * @property {number} verificationStatus + * Indicates whether this channel has been verified or not. On a + * `ListNotificationChannels` + * or + * `GetNotificationChannel` + * operation, this field is expected to be populated. + * + * If the value is `UNVERIFIED`, then it indicates that the channel is + * non-functioning (it both requires verification and lacks verification); + * otherwise, it is assumed that the channel works. + * + * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that + * the channel is of a type that does not require verification or that + * this specific channel has been exempted from verification because it was + * created prior to verification being required for channels of this type. + * + * This field cannot be modified using a standard + * `UpdateNotificationChannel` + * operation. To change the value of this field, you must call + * `VerifyNotificationChannel`. + * + * The number should be among the values of [VerificationStatus]{@link google.monitoring.v3.VerificationStatus} + * + * @property {Object} enabled + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * + * This object should have the same structure as [BoolValue]{@link google.protobuf.BoolValue} + * + * @typedef NotificationChannel + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.NotificationChannel definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} + */ +var NotificationChannel = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Indicates whether the channel has been verified or not. It is illegal + * to specify this field in a + * `CreateNotificationChannel` + * or an + * `UpdateNotificationChannel` + * operation. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ + VerificationStatus: { + + /** + * Sentinel value used to indicate that the state is unknown, omitted, or + * is not applicable (as in the case of channels that neither support + * nor require verification in order to function). + */ + VERIFICATION_STATUS_UNSPECIFIED: 0, + + /** + * The channel has yet to be verified and requires verification to function. + * Note that this state also applies to the case where the verification + * process has been initiated by sending a verification code but where + * the verification code has not been submitted to complete the process. + */ + UNVERIFIED: 1, + + /** + * It has been proven that notifications can be received on this + * notification channel and that someone on the project has access + * to messages that are delivered to that channel. + */ + VERIFIED: 2 + } +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 386313024c8..27cf5252fa3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.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, @@ -84,6 +84,11 @@ * * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * + * @property {Object[]} internalCheckers + * The internal checkers that this check will egress from. + * + * This object should have the same structure as [InternalChecker]{@link google.monitoring.v3.InternalChecker} + * * @typedef UptimeCheckConfig * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UptimeCheckConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} @@ -208,6 +213,33 @@ var UptimeCheckConfig = { */ ContentMatcher: { // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Nimbus InternalCheckers. + * + * @property {string} projectId + * The GCP project ID. Not necessarily the same as the project_id for the config. + * + * @property {string} network + * The internal network to perform this uptime check on. + * + * @property {string} gcpZone + * The GCP zone the uptime check should egress from. Only respected for + * internal uptime checks, where internal_network is specified. + * + * @property {string} checkerId + * The checker ID. + * + * @property {string} displayName + * The checker's human-readable name. + * + * @typedef InternalChecker + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UptimeCheckConfig.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ + InternalChecker: { + // This is for documentation. Actual contents will be loaded by gRPC. } }; diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js index 6b107097540..3ea5c376abb 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js index 26059a71abc..c82c2b33949 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index 431e2fd5892..a02db52bdeb 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js new file mode 100644 index 00000000000..791b600ab1d --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js @@ -0,0 +1,160 @@ +// 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. + +/** + * Wrapper message for `double`. + * + * The JSON representation for `DoubleValue` is JSON number. + * + * @property {number} value + * The double value. + * + * @typedef DoubleValue + * @memberof google.protobuf + * @see [google.protobuf.DoubleValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var DoubleValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `float`. + * + * The JSON representation for `FloatValue` is JSON number. + * + * @property {number} value + * The float value. + * + * @typedef FloatValue + * @memberof google.protobuf + * @see [google.protobuf.FloatValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var FloatValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `int64`. + * + * The JSON representation for `Int64Value` is JSON string. + * + * @property {number} value + * The int64 value. + * + * @typedef Int64Value + * @memberof google.protobuf + * @see [google.protobuf.Int64Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var Int64Value = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `uint64`. + * + * The JSON representation for `UInt64Value` is JSON string. + * + * @property {number} value + * The uint64 value. + * + * @typedef UInt64Value + * @memberof google.protobuf + * @see [google.protobuf.UInt64Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var UInt64Value = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `int32`. + * + * The JSON representation for `Int32Value` is JSON number. + * + * @property {number} value + * The int32 value. + * + * @typedef Int32Value + * @memberof google.protobuf + * @see [google.protobuf.Int32Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var Int32Value = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `uint32`. + * + * The JSON representation for `UInt32Value` is JSON number. + * + * @property {number} value + * The uint32 value. + * + * @typedef UInt32Value + * @memberof google.protobuf + * @see [google.protobuf.UInt32Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var UInt32Value = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `bool`. + * + * The JSON representation for `BoolValue` is JSON `true` and `false`. + * + * @property {boolean} value + * The bool value. + * + * @typedef BoolValue + * @memberof google.protobuf + * @see [google.protobuf.BoolValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var BoolValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `string`. + * + * The JSON representation for `StringValue` is JSON string. + * + * @property {string} value + * The string value. + * + * @typedef StringValue + * @memberof google.protobuf + * @see [google.protobuf.StringValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var StringValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Wrapper message for `bytes`. + * + * The JSON representation for `BytesValue` is JSON string. + * + * @property {string} value + * The bytes value. + * + * @typedef BytesValue + * @memberof google.protobuf + * @see [google.protobuf.BytesValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} + */ +var BytesValue = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index a27b500554f..5fb4152d32b 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_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, @@ -42,28 +42,28 @@ class GroupServiceClient { /** * Construct an instance of GroupServiceClient. * - * @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) { @@ -222,31 +222,31 @@ class GroupServiceClient { * @param {string} request.name * The project whose groups are to be listed. The format is * `"projects/{project_id_or_number}"`. - * @param {string=} request.childrenOfGroup + * @param {string} [request.childrenOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns groups whose `parentName` field contains the group * name. If no groups have this parent, the results are empty. - * @param {string=} request.ancestorsOfGroup + * @param {string} [request.ancestorsOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns groups that are ancestors of the specified group. * The groups are returned in order, starting with the immediate parent and * ending with the most distant ancestor. If the specified group has no * immediate parent, the results are empty. - * @param {string=} request.descendantsOfGroup + * @param {string} [request.descendantsOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns the descendants of the specified group. This is a superset of * the results returned by the `childrenOfGroup` filter, and includes * children-of-children, and so forth. - * @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 [Group]{@link google.monitoring.v3.Group}. @@ -342,28 +342,28 @@ class GroupServiceClient { * @param {string} request.name * The project whose groups are to be listed. The format is * `"projects/{project_id_or_number}"`. - * @param {string=} request.childrenOfGroup + * @param {string} [request.childrenOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns groups whose `parentName` field contains the group * name. If no groups have this parent, the results are empty. - * @param {string=} request.ancestorsOfGroup + * @param {string} [request.ancestorsOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns groups that are ancestors of the specified group. * The groups are returned in order, starting with the immediate parent and * ending with the most distant ancestor. If the specified group has no * immediate parent, the results are empty. - * @param {string=} request.descendantsOfGroup + * @param {string} [request.descendantsOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. * Returns the descendants of the specified group. This is a superset of * the results returned by the `childrenOfGroup` filter, and includes * children-of-children, and so forth. - * @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} @@ -403,10 +403,10 @@ class GroupServiceClient { * @param {string} request.name * The group to retrieve. The format is * `"projects/{project_id_or_number}/groups/{group_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 [Group]{@link google.monitoring.v3.Group}. @@ -455,12 +455,12 @@ class GroupServiceClient { * the system assigns the name. * * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * @param {boolean=} request.validateOnly + * @param {boolean} [request.validateOnly] * If true, validate this request but do not create the group. - * @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 [Group]{@link google.monitoring.v3.Group}. @@ -512,12 +512,12 @@ class GroupServiceClient { * excepting `name`, are replaced with the corresponding fields of this group. * * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * @param {boolean=} request.validateOnly + * @param {boolean} [request.validateOnly] * If true, validate this request but do not update the existing group. - * @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 [Group]{@link google.monitoring.v3.Group}. @@ -561,10 +561,10 @@ class GroupServiceClient { * @param {string} request.name * The group to delete. The format is * `"projects/{project_id_or_number}/groups/{group_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. @@ -600,13 +600,13 @@ class GroupServiceClient { * @param {string} request.name * The group whose members are listed. The format is * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter + * @param {string} [request.filter] * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing * the members to be returned. The filter may reference the type, labels, and * metadata of monitored resources that comprise the group. @@ -614,17 +614,17 @@ class GroupServiceClient { * instances, use this filter: * * resource.type = "gce_instance" - * @param {Object=} request.interval + * @param {Object} [request.interval] * An optional time interval for which results should be returned. Only * members that were part of the group during the specified interval are * included in the response. If no interval is provided then the group * membership over the last minute is returned. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * @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 [MonitoredResource]{@link google.api.MonitoredResource}. @@ -720,13 +720,13 @@ class GroupServiceClient { * @param {string} request.name * The group whose members are listed. The format is * `"projects/{project_id_or_number}/groups/{group_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 {string=} request.filter + * @param {string} [request.filter] * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing * the members to be returned. The filter may reference the type, labels, and * metadata of monitored resources that comprise the group. @@ -734,14 +734,14 @@ class GroupServiceClient { * instances, use this filter: * * resource.type = "gce_instance" - * @param {Object=} request.interval + * @param {Object} [request.interval] * An optional time interval for which results should be returned. Only * members that were part of the group during the specified interval are * included in the response. If no interval is provided then the group * membership over the last minute is returned. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * @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/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index 70e4ac17e91..40a23717c9b 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/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, @@ -14,10 +14,14 @@ 'use strict'; +const AlertPolicyServiceClient = require('./alert_policy_service_client'); const GroupServiceClient = require('./group_service_client'); const MetricServiceClient = require('./metric_service_client'); +const NotificationChannelServiceClient = require('./notification_channel_service_client'); const UptimeCheckServiceClient = require('./uptime_check_service_client'); +module.exports.AlertPolicyServiceClient = AlertPolicyServiceClient; module.exports.GroupServiceClient = GroupServiceClient; module.exports.MetricServiceClient = MetricServiceClient; +module.exports.NotificationChannelServiceClient = NotificationChannelServiceClient; module.exports.UptimeCheckServiceClient = UptimeCheckServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 269105d1d6d..46c9990774f 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_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 MetricServiceClient { /** * Construct an instance of MetricServiceClient. * - * @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) { @@ -226,7 +226,7 @@ class MetricServiceClient { * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter + * @param {string} [request.filter] * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing * the descriptors to be returned. The filter can reference * the descriptor's type and labels. For example, the @@ -234,16 +234,16 @@ class MetricServiceClient { * that have an `id` label: * * resource.type = starts_with("gce_") AND resource.label: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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. @@ -343,7 +343,7 @@ class MetricServiceClient { * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter + * @param {string} [request.filter] * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing * the descriptors to be returned. The filter can reference * the descriptor's type and labels. For example, the @@ -351,13 +351,13 @@ class MetricServiceClient { * that have an `id` label: * * resource.type = starts_with("gce_") AND resource.label: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} @@ -399,10 +399,10 @@ class MetricServiceClient { * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. * The `{resource_type}` is a predefined type, such as * `cloudsql_database`. - * @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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. @@ -450,7 +450,7 @@ class MetricServiceClient { * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter + * @param {string} [request.filter] * If this field is empty, all custom and * system-defined metric descriptors are returned. * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) @@ -459,16 +459,16 @@ class MetricServiceClient { * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): * * metric.type = starts_with("custom.googleapis.com/") - * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. @@ -568,7 +568,7 @@ class MetricServiceClient { * @param {string} request.name * The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. - * @param {string=} request.filter + * @param {string} [request.filter] * If this field is empty, all custom and * system-defined metric descriptors are returned. * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) @@ -577,13 +577,13 @@ class MetricServiceClient { * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): * * metric.type = starts_with("custom.googleapis.com/") - * @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} @@ -625,10 +625,10 @@ class MetricServiceClient { * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example value of `{metric_id}` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. @@ -679,10 +679,10 @@ class MetricServiceClient { * descriptor. * * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} - * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. @@ -738,10 +738,10 @@ class MetricServiceClient { * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example of `{metric_id}` is: * `"custom.googleapis.com/my_test_metric"`. - * @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. @@ -799,26 +799,26 @@ class MetricServiceClient { * Specifies which information is returned about the time series. * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} - * @param {Object=} request.aggregation + * @param {Object} [request.aggregation] * By default, the raw time series data is returned. * Use this field to combine multiple time series for different * views of the data. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * @param {string=} request.orderBy + * @param {string} [request.orderBy] * Specifies the order in which the points of the time series should * be returned. By default, results are not ordered. Currently, * this field must be left blank. - * @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 [TimeSeries]{@link google.monitoring.v3.TimeSeries}. @@ -950,23 +950,23 @@ class MetricServiceClient { * Specifies which information is returned about the time series. * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} - * @param {Object=} request.aggregation + * @param {Object} [request.aggregation] * By default, the raw time series data is returned. * Use this field to combine multiple time series for different * views of the data. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * @param {string=} request.orderBy + * @param {string} [request.orderBy] * Specifies the order in which the points of the time series should * be returned. By default, results are not ordered. Currently, * this field must be left blank. - * @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} @@ -1026,10 +1026,10 @@ class MetricServiceClient { * all label values for the metric and the monitored resource. * * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} - * @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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js new file mode 100644 index 00000000000..4f7074dc820 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -0,0 +1,970 @@ +// 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 gapicConfig = require('./notification_channel_service_client_config'); +const gax = require('google-gax'); +const merge = require('lodash.merge'); +const path = require('path'); + +const VERSION = require('../../package.json').version; + +/** + * The Notification Channel API provides access to configuration that + * controls how messages related to incidents are sent. + * + * @class + * @memberof v3 + */ +class NotificationChannelServiceClient { + /** + * Construct an instance of NotificationChannelServiceClient. + * + * @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.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 + ); + + // 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/monitoring/v3/notification_service.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}'), + notificationChannelPathTemplate: new gax.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + notificationChannelDescriptorPathTemplate: new gax.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + }; + + // 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 = { + listNotificationChannelDescriptors: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'channelDescriptors' + ), + listNotificationChannels: new gax.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'notificationChannels' + ), + }; + + // Put together the default options sent with requests. + var defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.NotificationChannelService', + 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.monitoring.v3.NotificationChannelService. + var notificationChannelServiceStub = gaxGrpc.createStub( + protos.google.monitoring.v3.NotificationChannelService, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + var notificationChannelServiceStubMethods = [ + 'listNotificationChannelDescriptors', + 'getNotificationChannelDescriptor', + 'listNotificationChannels', + 'getNotificationChannel', + 'createNotificationChannel', + 'updateNotificationChannel', + 'deleteNotificationChannel', + ]; + for (let methodName of notificationChannelServiceStubMethods) { + this._innerApiCalls[methodName] = gax.createApiCall( + notificationChannelServiceStub.then( + stub => + function() { + var args = Array.prototype.slice.call(arguments, 0); + return stub[methodName].apply(stub, args); + } + ), + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.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 the descriptors for supported channel types. The use of descriptors + * makes it possible for new channel types to be dynamically added. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID] + * + * Note that this names the parent container in which to look for the + * descriptors; to retrieve a single descriptor by name, use the + * GetNotificationChannelDescriptor + * operation, instead. + * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. + * + * 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 [ListNotificationChannelDescriptorsResponse]{@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} 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 [ListNotificationChannelDescriptorsResponse]{@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * + * client.listNotificationChannelDescriptors({name: formattedName}) + * .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 formattedName = 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.listNotificationChannelDescriptors(nextRequest, options).then(callback); + * } + * } + * client.listNotificationChannelDescriptors({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listNotificationChannelDescriptors(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listNotificationChannelDescriptors( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listNotificationChannelDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listNotificationChannelDescriptors} 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.name + * The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID] + * + * Note that this names the parent container in which to look for the + * descriptors; to retrieve a single descriptor by name, use the + * GetNotificationChannelDescriptor + * operation, instead. + * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * client.listNotificationChannelDescriptorsStream({name: formattedName}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listNotificationChannelDescriptorsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listNotificationChannelDescriptors.createStream( + this._innerApiCalls.listNotificationChannelDescriptors, + request, + options + ); + } + + /** + * Gets a single channel descriptor. The descriptor indicates which fields + * are expected / permitted for a notification channel of the given type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The channel type for which to execute the request. The format is + * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.notificationChannelDescriptorPath('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + * client.getNotificationChannelDescriptor({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getNotificationChannelDescriptor(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getNotificationChannelDescriptor( + request, + options, + callback + ); + } + + /** + * Lists the notification channels that have been created for the project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is + * `projects/[PROJECT_ID]`. That is, this names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * `GetNotificationChannel` operation. + * @param {string} [request.filter] + * If provided, this field specifies the criteria that must be met by + * notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} [request.orderBy] + * A comma-separated list of fields by which to sort the result. Supports + * the same set of fields as in `filter`. Entries can be prefixed with + * a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * + * 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 [ListNotificationChannelsResponse]{@link google.monitoring.v3.ListNotificationChannelsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} 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 [ListNotificationChannelsResponse]{@link google.monitoring.v3.ListNotificationChannelsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * var formattedName = client.projectPath('[PROJECT]'); + * + * client.listNotificationChannels({name: formattedName}) + * .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 formattedName = 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.listNotificationChannels(nextRequest, options).then(callback); + * } + * } + * client.listNotificationChannels({name: formattedName}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listNotificationChannels(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.listNotificationChannels( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listNotificationChannels}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listNotificationChannels} 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.name + * The project on which to execute the request. The format is + * `projects/[PROJECT_ID]`. That is, this names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * `GetNotificationChannel` operation. + * @param {string} [request.filter] + * If provided, this field specifies the criteria that must be met by + * notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} [request.orderBy] + * A comma-separated list of fields by which to sort the result. Supports + * the same set of fields as in `filter`. Entries can be prefixed with + * a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * client.listNotificationChannelsStream({name: formattedName}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listNotificationChannelsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listNotificationChannels.createStream( + this._innerApiCalls.listNotificationChannels, + request, + options + ); + } + + /** + * Gets a single notification channel. The channel includes the relevant + * configuration details with which the channel was created. However, the + * response may truncate or omit passwords, API keys, or other private key + * matter and thus the response may not be 100% identical to the information + * that was supplied in the call to the create method. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The channel for which to execute the request. The format is + * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * client.getNotificationChannel({name: formattedName}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getNotificationChannel(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.getNotificationChannel( + request, + options, + callback + ); + } + + /** + * Creates a new notification channel, representing a single notification + * endpoint such as an email address, SMS number, or pagerduty service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID] + * + * Note that this names the container into which the channel will be + * written. This does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * @param {Object} request.notificationChannel + * The definition of the `NotificationChannel` to create. + * + * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.projectPath('[PROJECT]'); + * var notificationChannel = {}; + * var request = { + * name: formattedName, + * notificationChannel: notificationChannel, + * }; + * client.createNotificationChannel(request) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createNotificationChannel(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.createNotificationChannel( + request, + options, + callback + ); + } + + /** + * Updates a notification channel. Fields not specified in the field mask + * remain unchanged. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.notificationChannel + * A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * + * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} + * @param {Object} [request.updateMask] + * The fields to update. + * + * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var notificationChannel = {}; + * client.updateNotificationChannel({notificationChannel: notificationChannel}) + * .then(responses => { + * var response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateNotificationChannel(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.updateNotificationChannel( + request, + options, + callback + ); + } + + /** + * Deletes a notification channel. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The channel for which to execute the request. The format is + * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + * @param {boolean} [request.force] + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, channels that are still referenced by an existing + * alerting policy will fail to be deleted in a delete operation. + * @param {Object} [options] + * Optional parameters. You can override the default settings for 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 monitoring = require('@google-cloud/monitoring'); + * + * var client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * var formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * client.deleteNotificationChannel({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteNotificationChannel(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + options = options || {}; + + return this._innerApiCalls.deleteNotificationChannel( + request, + options, + callback + ); + } + + // -------------------- + // -- 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 notification_channel resource name string. + * + * @param {String} project + * @param {String} notificationChannel + * @returns {String} + */ + notificationChannelPath(project, notificationChannel) { + return this._pathTemplates.notificationChannelPathTemplate.render({ + project: project, + notification_channel: notificationChannel, + }); + } + + /** + * Return a fully-qualified notification_channel_descriptor resource name string. + * + * @param {String} project + * @param {String} channelDescriptor + * @returns {String} + */ + notificationChannelDescriptorPath(project, channelDescriptor) { + return this._pathTemplates.notificationChannelDescriptorPathTemplate.render( + { + project: project, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * 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 notificationChannelName from a notification_channel resource. + * + * @param {String} notificationChannelName + * A fully-qualified path representing a notification_channel resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromNotificationChannelName(notificationChannelName) { + return this._pathTemplates.notificationChannelPathTemplate.match( + notificationChannelName + ).project; + } + + /** + * Parse the notificationChannelName from a notification_channel resource. + * + * @param {String} notificationChannelName + * A fully-qualified path representing a notification_channel resources. + * @returns {String} - A string representing the notification_channel. + */ + matchNotificationChannelFromNotificationChannelName(notificationChannelName) { + return this._pathTemplates.notificationChannelPathTemplate.match( + notificationChannelName + ).notification_channel; + } + + /** + * Parse the notificationChannelDescriptorName from a notification_channel_descriptor resource. + * + * @param {String} notificationChannelDescriptorName + * A fully-qualified path representing a notification_channel_descriptor resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromNotificationChannelDescriptorName( + notificationChannelDescriptorName + ) { + return this._pathTemplates.notificationChannelDescriptorPathTemplate.match( + notificationChannelDescriptorName + ).project; + } + + /** + * Parse the notificationChannelDescriptorName from a notification_channel_descriptor resource. + * + * @param {String} notificationChannelDescriptorName + * A fully-qualified path representing a notification_channel_descriptor resources. + * @returns {String} - A string representing the channel_descriptor. + */ + matchChannelDescriptorFromNotificationChannelDescriptorName( + notificationChannelDescriptorName + ) { + return this._pathTemplates.notificationChannelDescriptorPathTemplate.match( + notificationChannelDescriptorName + ).channel_descriptor; + } +} + +module.exports = NotificationChannelServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json new file mode 100644 index 00000000000..aabbd7a73b8 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json @@ -0,0 +1,61 @@ +{ + "interfaces": { + "google.monitoring.v3.NotificationChannelService": { + "retry_codes": { + "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, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListNotificationChannelDescriptors": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetNotificationChannelDescriptor": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListNotificationChannels": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetNotificationChannel": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateNotificationChannel": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateNotificationChannel": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteNotificationChannel": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 0899994005f..91bd4dd42b9 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_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, @@ -38,28 +38,28 @@ class UptimeCheckServiceClient { /** * Construct an instance of UptimeCheckServiceClient. * - * @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) { @@ -224,16 +224,16 @@ class UptimeCheckServiceClient { * The project whose uptime check configurations are listed. The format is * * `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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. @@ -334,13 +334,13 @@ class UptimeCheckServiceClient { * The project whose uptime check configurations are listed. The format is * * `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} @@ -381,10 +381,10 @@ class UptimeCheckServiceClient { * The uptime check configuration to retrieve. The format is * * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. @@ -433,10 +433,10 @@ class UptimeCheckServiceClient { * The new uptime check configuration. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * @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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. @@ -489,10 +489,6 @@ class UptimeCheckServiceClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * The uptime check configuration to update. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} request.uptimeCheckConfig * Required. If an `"updateMask"` has been specified, this field gives * the values for the set of fields mentioned in the `"updateMask"`. If an @@ -503,17 +499,17 @@ class UptimeCheckServiceClient { * configuration on the server. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * @param {Object=} request.updateMask + * @param {Object} [request.updateMask] * Optional. If present, only the listed fields in the current uptime check * configuration are updated with values from the new configuration. If this * field is empty, then the current configuration is completely replaced with * the new configuration. * * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. @@ -529,13 +525,8 @@ class UptimeCheckServiceClient { * // optional auth parameters. * }); * - * var name = ''; * var uptimeCheckConfig = {}; - * var request = { - * name: name, - * uptimeCheckConfig: uptimeCheckConfig, - * }; - * client.updateUptimeCheckConfig(request) + * client.updateUptimeCheckConfig({uptimeCheckConfig: uptimeCheckConfig}) * .then(responses => { * var response = responses[0]; * // doThingsWith(response) @@ -569,10 +560,10 @@ class UptimeCheckServiceClient { * The uptime check configuration to delete. The format is * * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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. @@ -609,16 +600,16 @@ class UptimeCheckServiceClient { * * @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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. @@ -707,13 +698,13 @@ class UptimeCheckServiceClient { * * @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} diff --git a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js index a8744152f19..91a4f5786a8 100644 --- a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.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, @@ -15,10 +15,10 @@ 'use strict'; describe('MetricServiceSmokeTest', () => { - 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 using promises', done => { const monitoring = require('../src'); diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 54ba2b0cda3..e8af18dde69 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.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, @@ -22,6 +22,313 @@ var FAKE_STATUS_CODE = 1; var error = new Error(); error.code = FAKE_STATUS_CODE; +describe('AlertPolicyServiceClient', () => { + describe('listAlertPolicies', () => { + it('invokes listAlertPolicies without error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var request = { + name: formattedName, + }; + + // Mock response + var nextPageToken = ''; + var alertPoliciesElement = {}; + var alertPolicies = [alertPoliciesElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + alertPolicies: alertPolicies, + }; + + // Mock Grpc layer + client._innerApiCalls.listAlertPolicies = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.alertPolicies); + }; + + client.listAlertPolicies(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.alertPolicies); + done(); + }); + }); + + it('invokes listAlertPolicies with error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.listAlertPolicies = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listAlertPolicies(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getAlertPolicy', () => { + it('invokes getAlertPolicy without error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + var request = { + name: formattedName, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name: name2, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getAlertPolicy(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getAlertPolicy with error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getAlertPolicy(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createAlertPolicy', () => { + it('invokes createAlertPolicy without error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var alertPolicy = {}; + var request = { + name: formattedName, + alertPolicy: alertPolicy, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name: name2, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createAlertPolicy(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createAlertPolicy with error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var alertPolicy = {}; + var request = { + name: formattedName, + alertPolicy: alertPolicy, + }; + + // Mock Grpc layer + client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createAlertPolicy(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteAlertPolicy', () => { + it('invokes deleteAlertPolicy without error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod(request); + + client.deleteAlertPolicy(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteAlertPolicy with error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteAlertPolicy(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('updateAlertPolicy', () => { + it('invokes updateAlertPolicy without error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var alertPolicy = {}; + var request = { + alertPolicy: alertPolicy, + }; + + // Mock response + var name = 'name3373707'; + var displayName = 'displayName1615086568'; + var expectedResponse = { + name: name, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateAlertPolicy(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateAlertPolicy with error', done => { + var client = new monitoringModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var alertPolicy = {}; + var request = { + alertPolicy: alertPolicy, + }; + + // Mock Grpc layer + client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateAlertPolicy(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); +}); describe('GroupServiceClient', () => { describe('listGroups', () => { it('invokes listGroups without error', done => { @@ -358,7 +665,7 @@ describe('GroupServiceClient', () => { // Mock response var nextPageToken = ''; - var totalSize = -705419236; + var totalSize = 705419236; var membersElement = {}; var members = [membersElement]; var expectedResponse = { @@ -954,31 +1261,503 @@ describe('MetricServiceClient', () => { }); }); }); -describe('UptimeCheckServiceClient', () => { - describe('listUptimeCheckConfigs', () => { - it('invokes listUptimeCheckConfigs without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ +describe('NotificationChannelServiceClient', () => { + describe('listNotificationChannelDescriptors', () => { + it('invokes listNotificationChannelDescriptors without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); + var formattedName = client.projectPath('[PROJECT]'); var request = { - parent: formattedParent, + name: formattedName, }; // Mock response var nextPageToken = ''; - var uptimeCheckConfigsElement = {}; - var uptimeCheckConfigs = [uptimeCheckConfigsElement]; + var channelDescriptorsElement = {}; + var channelDescriptors = [channelDescriptorsElement]; var expectedResponse = { nextPageToken: nextPageToken, - uptimeCheckConfigs: uptimeCheckConfigs, + channelDescriptors: channelDescriptors, }; // Mock Grpc layer - client._innerApiCalls.listUptimeCheckConfigs = ( + client._innerApiCalls.listNotificationChannelDescriptors = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.channelDescriptors); + }; + + client.listNotificationChannelDescriptors(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.channelDescriptors); + done(); + }); + }); + + it('invokes listNotificationChannelDescriptors with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.listNotificationChannelDescriptors = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listNotificationChannelDescriptors(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getNotificationChannelDescriptor', () => { + it('invokes getNotificationChannelDescriptor without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.notificationChannelDescriptorPath( + '[PROJECT]', + '[CHANNEL_DESCRIPTOR]' + ); + var request = { + name: formattedName, + }; + + // Mock response + var name2 = 'name2-1052831874'; + var type = 'type3575610'; + var displayName = 'displayName1615086568'; + var description = 'description-1724546052'; + var expectedResponse = { + name: name2, + type: type, + displayName: displayName, + description: description, + }; + + // Mock Grpc layer + client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getNotificationChannelDescriptor(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getNotificationChannelDescriptor with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.notificationChannelDescriptorPath( + '[PROJECT]', + '[CHANNEL_DESCRIPTOR]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getNotificationChannelDescriptor(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listNotificationChannels', () => { + it('invokes listNotificationChannels without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var request = { + name: formattedName, + }; + + // Mock response + var nextPageToken = ''; + var notificationChannelsElement = {}; + var notificationChannels = [notificationChannelsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + notificationChannels: notificationChannels, + }; + + // Mock Grpc layer + client._innerApiCalls.listNotificationChannels = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.notificationChannels); + }; + + client.listNotificationChannels(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.notificationChannels); + done(); + }); + }); + + it('invokes listNotificationChannels with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.listNotificationChannels = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listNotificationChannels(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getNotificationChannel', () => { + it('invokes getNotificationChannel without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + var request = { + name: formattedName, + }; + + // Mock response + var type = 'type3575610'; + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var description = 'description-1724546052'; + var expectedResponse = { + type: type, + name: name2, + displayName: displayName, + description: description, + }; + + // Mock Grpc layer + client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getNotificationChannel(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getNotificationChannel with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getNotificationChannel(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createNotificationChannel', () => { + it('invokes createNotificationChannel without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var notificationChannel = {}; + var request = { + name: formattedName, + notificationChannel: notificationChannel, + }; + + // Mock response + var type = 'type3575610'; + var name2 = 'name2-1052831874'; + var displayName = 'displayName1615086568'; + var description = 'description-1724546052'; + var expectedResponse = { + type: type, + name: name2, + displayName: displayName, + description: description, + }; + + // Mock Grpc layer + client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createNotificationChannel(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createNotificationChannel with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.projectPath('[PROJECT]'); + var notificationChannel = {}; + var request = { + name: formattedName, + notificationChannel: notificationChannel, + }; + + // Mock Grpc layer + client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createNotificationChannel(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateNotificationChannel', () => { + it('invokes updateNotificationChannel without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var notificationChannel = {}; + var request = { + notificationChannel: notificationChannel, + }; + + // Mock response + var type = 'type3575610'; + var name = 'name3373707'; + var displayName = 'displayName1615086568'; + var description = 'description-1724546052'; + var expectedResponse = { + type: type, + name: name, + displayName: displayName, + description: description, + }; + + // Mock Grpc layer + client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateNotificationChannel(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateNotificationChannel with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var notificationChannel = {}; + var request = { + notificationChannel: notificationChannel, + }; + + // Mock Grpc layer + client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateNotificationChannel(request, (err, response) => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteNotificationChannel', () => { + it('invokes deleteNotificationChannel without error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( + request + ); + + client.deleteNotificationChannel(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteNotificationChannel with error', done => { + var client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + var formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + var request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteNotificationChannel(request, err => { + assert(err instanceof Error); + assert.equal(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); +}); +describe('UptimeCheckServiceClient', () => { + describe('listUptimeCheckConfigs', () => { + it('invokes listUptimeCheckConfigs without error', done => { + var client = new monitoringModule.v3.UptimeCheckServiceClient({ + 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 uptimeCheckConfigsElement = {}; + var uptimeCheckConfigs = [uptimeCheckConfigsElement]; + var expectedResponse = { + nextPageToken: nextPageToken, + uptimeCheckConfigs: uptimeCheckConfigs, + }; + + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckConfigs = ( actualRequest, options, callback @@ -1164,18 +1943,16 @@ describe('UptimeCheckServiceClient', () => { }); // Mock request - var name = 'name3373707'; var uptimeCheckConfig = {}; var request = { - name: name, uptimeCheckConfig: uptimeCheckConfig, }; // Mock response - var name2 = 'name2-1052831874'; + var name = 'name3373707'; var displayName = 'displayName1615086568'; var expectedResponse = { - name: name2, + name: name, displayName: displayName, }; @@ -1199,10 +1976,8 @@ describe('UptimeCheckServiceClient', () => { }); // Mock request - var name = 'name3373707'; var uptimeCheckConfig = {}; var request = { - name: name, uptimeCheckConfig: uptimeCheckConfig, }; From 0cde0f13dbce4eac9df75776c36cd991c46c75bc Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 30 Mar 2018 13:06:39 -0700 Subject: [PATCH 075/422] chore: make environment variable naming consistent (#37) --- packages/google-cloud-monitoring/.circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index d7c00eac0ff..1fffa7de810 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -222,7 +222,7 @@ jobs: command: npm run system-test environment: GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - SMOKE_TEST_PROJECT: long-door-651 + GCLOUD_PROJECT: long-door-651 - run: name: Remove unencrypted key. command: rm .circleci/key.json From 27a91b84b11a5207ac4296dcb6c0b7571253544f Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 30 Mar 2018 14:04:31 -0700 Subject: [PATCH 076/422] chore: bump version to 0.5.0 (#38) --- .../google-cloud-monitoring/package-lock.json | 2000 +++++++++++------ packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 1335 insertions(+), 669 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 2bd1f57e370..67214581e27 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/monitoring", - "version": "0.4.1", + "version": "0.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -161,7 +161,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.2.2", @@ -171,22 +172,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" @@ -194,12 +199,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.1.0" @@ -207,27 +214,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", @@ -237,7 +249,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", @@ -252,7 +265,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.26.0" @@ -260,7 +274,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.5.3", @@ -269,7 +284,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", @@ -281,7 +297,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", @@ -297,7 +314,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", @@ -308,17 +326,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", @@ -327,7 +348,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.2", @@ -337,12 +359,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.3.0", @@ -352,13 +376,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": { @@ -368,7 +394,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", @@ -380,7 +407,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": { @@ -391,7 +419,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 } @@ -399,32 +428,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.1.1", @@ -433,7 +468,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" @@ -441,17 +477,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" @@ -459,7 +498,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.1" @@ -467,7 +507,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" @@ -475,17 +516,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.1.0", @@ -499,7 +543,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.1.1", @@ -511,7 +556,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.1" @@ -519,7 +565,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.2.3" @@ -527,7 +574,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" @@ -535,12 +583,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", @@ -552,7 +602,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", @@ -562,7 +613,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" @@ -570,12 +622,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.2" @@ -583,7 +637,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.0.2", @@ -592,22 +647,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", @@ -620,7 +679,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", @@ -629,7 +689,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.1" @@ -637,17 +698,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.5.2", @@ -658,7 +722,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": "1.0.1" @@ -668,7 +733,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.1.1" @@ -676,22 +742,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.4.0", @@ -700,12 +770,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.3.1" @@ -713,22 +785,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.1.1" @@ -736,12 +812,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" @@ -749,17 +827,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.1" @@ -767,7 +848,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.1" @@ -775,7 +857,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" @@ -783,7 +866,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.2.2" @@ -791,37 +875,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" @@ -829,12 +920,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" @@ -842,7 +935,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.26.0", @@ -856,7 +950,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", @@ -867,7 +962,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" @@ -877,7 +973,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", @@ -889,7 +986,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" @@ -899,7 +997,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.11" @@ -907,17 +1006,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.6" @@ -925,13 +1027,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" @@ -939,7 +1043,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.11", @@ -951,7 +1056,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", @@ -960,24 +1066,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.2" @@ -985,7 +1095,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", @@ -994,7 +1105,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" @@ -1002,12 +1114,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.1.0" @@ -1015,7 +1129,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.7" @@ -1023,7 +1138,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", @@ -1043,12 +1159,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.8" @@ -1056,12 +1174,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" @@ -1069,12 +1189,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.5.0", @@ -1085,7 +1207,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.1.0" @@ -1093,7 +1216,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.1" @@ -1101,17 +1225,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.5", @@ -1120,7 +1247,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.0.2" @@ -1128,7 +1256,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.8", @@ -1137,12 +1266,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", @@ -1152,17 +1283,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" @@ -1170,7 +1304,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", @@ -1181,7 +1316,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.3.1" @@ -1189,7 +1325,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.1" @@ -1197,22 +1334,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.11", @@ -1222,17 +1363,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.4" @@ -1240,7 +1384,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.1.2" @@ -1248,7 +1393,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.1.0", @@ -1259,17 +1405,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", @@ -1278,7 +1427,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.2.2" @@ -1286,7 +1436,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.6" @@ -1296,7 +1447,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.6" @@ -1306,7 +1458,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.1.0", @@ -1316,7 +1469,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.1.2", @@ -1325,7 +1479,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.1.0", @@ -1336,12 +1491,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" @@ -1349,22 +1506,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.2" @@ -1372,22 +1533,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": { @@ -1396,7 +1561,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.1.2" @@ -1404,17 +1570,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" @@ -1422,27 +1591,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", @@ -1455,7 +1629,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.2.2" @@ -1463,17 +1638,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", @@ -1482,17 +1660,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" @@ -1502,7 +1683,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.1.1" @@ -1510,7 +1692,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.1" @@ -1518,17 +1701,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", @@ -1540,17 +1726,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": { @@ -1561,7 +1750,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": { @@ -1575,13 +1765,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.2", @@ -1590,7 +1782,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" @@ -1598,23 +1791,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.2", @@ -1623,7 +1820,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.1.0", @@ -1635,12 +1833,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", @@ -1650,17 +1850,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", @@ -1679,7 +1882,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.2", @@ -1689,7 +1893,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.1.0", @@ -1703,7 +1908,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" @@ -1711,7 +1917,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 } } @@ -6332,11 +6539,13 @@ "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==" }, "ajv": { "version": "4.11.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "requires": { "co": "4.6.0", "json-stable-stringify": "1.0.1" @@ -6344,15 +6553,18 @@ }, "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.3.3" @@ -6360,31 +6572,38 @@ }, "asn1": { "version": "0.2.3", - "bundled": true + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "assert-plus": { "version": "0.2.0", - "bundled": true + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, "asynckit": { "version": "0.4.0", - "bundled": true + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { "version": "0.6.0", - "bundled": true + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" }, "aws4": { "version": "1.6.0", - "bundled": true + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, "balanced-match": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "bcrypt-pbkdf": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -6392,21 +6611,24 @@ }, "block-stream": { "version": "0.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "requires": { "inherits": "2.0.3" } }, "boom": { "version": "2.10.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "requires": { "hoek": "2.16.3" } }, "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=", "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" @@ -6414,81 +6636,97 @@ }, "caseless": { "version": "0.12.0", - "bundled": true + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "co": { "version": "4.6.0", - "bundled": true + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "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=" }, "combined-stream": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "requires": { "delayed-stream": "1.0.0" } }, "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=" }, "cryptiles": { "version": "2.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "requires": { "boom": "2.10.1" } }, "dashdash": { "version": "1.14.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "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.4.2", - "bundled": true + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" }, "delayed-stream": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "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=" }, "ecc-jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { "jsbn": "0.1.1" @@ -6496,19 +6734,23 @@ }, "extend": { "version": "3.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "extsprintf": { "version": "1.3.0", - "bundled": true + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "forever-agent": { "version": "0.6.1", - "bundled": true + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.5", @@ -6517,11 +6759,13 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fstream": { "version": "1.0.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "requires": { "graceful-fs": "4.1.11", "inherits": "2.0.3", @@ -6531,7 +6775,8 @@ }, "fstream-ignore": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "requires": { "fstream": "1.0.11", "inherits": "2.0.3", @@ -6540,7 +6785,8 @@ }, "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.2.0", "console-control-strings": "1.1.0", @@ -6554,20 +6800,23 @@ }, "getpass": { "version": "0.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "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.6", @@ -6579,15 +6828,18 @@ }, "graceful-fs": { "version": "4.1.11", - "bundled": true + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "har-schema": { "version": "1.0.5", - "bundled": true + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" }, "har-validator": { "version": "4.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "requires": { "ajv": "4.11.8", "har-schema": "1.0.5" @@ -6595,11 +6847,13 @@ }, "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=" }, "hawk": { "version": "3.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "requires": { "boom": "2.10.1", "cryptiles": "2.0.5", @@ -6609,11 +6863,13 @@ }, "hoek": { "version": "2.16.3", - "bundled": true + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" }, "http-signature": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "requires": { "assert-plus": "0.2.0", "jsprim": "1.4.1", @@ -6622,7 +6878,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -6630,58 +6887,70 @@ }, "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.1" } }, "is-typedarray": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "isarray": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isstream": { "version": "0.1.2", - "bundled": true + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, "json-schema": { "version": "0.2.3", - "bundled": true + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-stable-stringify": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "requires": { "jsonify": "0.0.0" } }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "jsonify": { "version": "0.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, "jsprim": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -6691,46 +6960,54 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "mime-db": { "version": "1.30.0", - "bundled": true + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" }, "mime-types": { "version": "2.1.17", - "bundled": true, + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", "requires": { "mime-db": "1.30.0" } }, "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.8" } }, "minimist": { "version": "0.0.8", - "bundled": true + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, "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" } }, "ms": { "version": "2.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node-pre-gyp": { "version": "0.6.39", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", + "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", "requires": { "detect-libc": "1.0.3", "hawk": "3.1.3", @@ -6747,7 +7024,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.1.1", "osenv": "0.1.4" @@ -6755,7 +7033,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.4", "console-control-strings": "1.1.0", @@ -6765,34 +7044,41 @@ }, "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=" }, "oauth-sign": { "version": "0.8.2", - "bundled": true + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "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.0.2" } }, "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.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -6800,15 +7086,18 @@ }, "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=" }, "performance-now": { "version": "0.2.0", - "bundled": true + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" }, "process-nextick-args": { "version": "1.0.7", - "bundled": true + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "protobufjs": { "version": "5.0.2", @@ -6823,15 +7112,18 @@ }, "punycode": { "version": "1.4.1", - "bundled": true + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { "version": "6.4.0", - "bundled": true + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" }, "rc": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", + "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", "requires": { "deep-extend": "0.4.2", "ini": "1.3.5", @@ -6841,13 +7133,15 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" } } }, "readable-stream": { "version": "2.3.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -6860,7 +7154,8 @@ }, "request": { "version": "2.81.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "requires": { "aws-sign2": "0.6.0", "aws4": "1.6.0", @@ -6888,37 +7183,44 @@ }, "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.1.2" } }, "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==" }, "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=" }, "sntp": { "version": "1.0.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "requires": { "hoek": "2.16.3" } }, "sshpk": { "version": "1.13.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -6932,13 +7234,15 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "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.1.0", "is-fullwidth-code-point": "1.0.0", @@ -6947,29 +7251,34 @@ }, "string_decoder": { "version": "1.0.3", - "bundled": true, + "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" } }, "stringstream": { "version": "0.0.5", - "bundled": true + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" }, "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.1.1" } }, "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": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { "block-stream": "0.0.9", "fstream": "1.0.11", @@ -6978,7 +7287,8 @@ }, "tar-pack": { "version": "3.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", + "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", "requires": { "debug": "2.6.9", "fstream": "1.0.11", @@ -6992,38 +7302,45 @@ }, "tough-cookie": { "version": "2.3.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", "requires": { "punycode": "1.4.1" } }, "tunnel-agent": { "version": "0.6.0", - "bundled": true, + "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", - "bundled": true, + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "optional": true }, "uid-number": { "version": "0.0.6", - "bundled": true + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { "version": "3.2.1", - "bundled": true + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, "verror": { "version": "1.10.0", - "bundled": true, + "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", @@ -7032,20 +7349,23 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "bundled": true + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, "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=" } } }, @@ -8727,7 +9047,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.2.2", @@ -8737,22 +9058,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" @@ -8760,12 +9085,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.1.0" @@ -8773,42 +9100,50 @@ }, "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 }, "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.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 }, "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.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", + "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=", "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", @@ -8818,7 +9153,8 @@ }, "babel-generator": { "version": "6.26.1", - "bundled": true, + "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", @@ -8833,7 +9169,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.26.0" @@ -8841,7 +9178,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.5.3", @@ -8850,7 +9188,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", @@ -8862,7 +9201,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", @@ -8878,7 +9218,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", @@ -8889,17 +9230,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 }, "base": { "version": "0.11.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "1.0.1", @@ -8913,7 +9257,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.2" @@ -8921,14 +9266,16 @@ }, "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "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", @@ -8937,7 +9284,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.2", @@ -8947,12 +9295,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": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "1.0.0", @@ -8968,14 +9318,16 @@ "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "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.3.0", @@ -8985,13 +9337,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": { @@ -9001,7 +9355,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", @@ -9013,7 +9368,8 @@ }, "class-utils": { "version": "0.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { "arr-union": "3.1.0", @@ -9024,7 +9380,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.6" @@ -9032,7 +9389,8 @@ }, "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.2.2" @@ -9040,7 +9398,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.6" @@ -9050,7 +9409,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.2.2" @@ -9058,7 +9418,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.6" @@ -9068,7 +9429,8 @@ }, "is-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { "is-accessor-descriptor": "0.1.6", @@ -9078,19 +9440,22 @@ }, "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, "kind-of": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } }, "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": { @@ -9101,7 +9466,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 } @@ -9109,12 +9475,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", @@ -9123,37 +9491,44 @@ }, "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 }, "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.1.2", @@ -9162,7 +9537,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" @@ -9170,22 +9546,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" @@ -9193,7 +9573,8 @@ }, "define-property": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { "is-descriptor": "1.0.2", @@ -9202,14 +9583,16 @@ "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true } } }, "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.1" @@ -9217,7 +9600,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" @@ -9225,17 +9609,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.1.0", @@ -9249,7 +9636,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.1.2", @@ -9261,7 +9649,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.1" @@ -9269,7 +9658,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.2.3" @@ -9277,7 +9667,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", @@ -9286,7 +9677,8 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { "is-plain-object": "2.0.4" @@ -9296,7 +9688,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" @@ -9304,12 +9697,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", @@ -9321,7 +9716,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", @@ -9331,7 +9727,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" @@ -9339,12 +9736,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.2" @@ -9352,7 +9751,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.0.2", @@ -9361,7 +9761,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" @@ -9369,27 +9770,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": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -9402,7 +9808,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", @@ -9411,7 +9818,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.1" @@ -9419,17 +9827,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.5.2", @@ -9440,7 +9851,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": "1.0.1" @@ -9450,7 +9862,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.1.1" @@ -9458,12 +9871,14 @@ }, "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 }, "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", @@ -9473,14 +9888,16 @@ "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true } } }, "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", @@ -9489,7 +9906,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.2.2" @@ -9497,7 +9915,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.6" @@ -9507,7 +9926,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.6" @@ -9517,17 +9937,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": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "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.4.0", @@ -9536,12 +9959,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.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", + "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", "dev": true, "requires": { "loose-envify": "1.3.1" @@ -9549,12 +9974,14 @@ }, "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": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "6.0.2" @@ -9562,24 +9989,28 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "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.1.1" @@ -9587,7 +10018,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": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "6.0.2" @@ -9595,14 +10027,16 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } }, "is-descriptor": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "1.0.0", @@ -9612,19 +10046,22 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } }, "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" @@ -9632,17 +10069,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.1" @@ -9650,12 +10090,14 @@ }, "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-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" @@ -9663,7 +10105,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.2.2" @@ -9671,7 +10114,8 @@ }, "is-odd": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "dev": true, "requires": { "is-number": "4.0.0" @@ -9679,14 +10123,16 @@ "dependencies": { "is-number": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", "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": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "3.0.1" @@ -9694,49 +10140,58 @@ "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true } } }, "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 }, "is-windows": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "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" @@ -9744,12 +10199,14 @@ }, "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": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", "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" @@ -9757,7 +10214,8 @@ }, "istanbul-lib-instrument": { "version": "1.10.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", "dev": true, "requires": { "babel-generator": "6.26.1", @@ -9771,7 +10229,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": "sha512-D4jVbMDtT2dPmloPJS/rmeP626N5Pr3Rp+SovrPn1+zPChGHcggd/0sL29jnbm4oK9W0wHjCRsdch9oLd7cm6g==", "dev": true, "requires": { "istanbul-lib-coverage": "1.2.0", @@ -9782,7 +10241,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" @@ -9792,7 +10252,8 @@ }, "istanbul-lib-source-maps": { "version": "1.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz", + "integrity": "sha512-fDa0hwU/5sDXwAklXgAoCJCOsFsBplVQ6WBldz5UwaqOzmDhUK4nfuR7/G//G2lERlblUNJB8P6e8cXq3a7MlA==", "dev": true, "requires": { "debug": "3.1.0", @@ -9804,7 +10265,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" @@ -9814,7 +10276,8 @@ }, "istanbul-reports": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", "dev": true, "requires": { "handlebars": "4.0.11" @@ -9822,17 +10285,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.6" @@ -9840,13 +10306,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" @@ -9854,7 +10322,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.11", @@ -9866,7 +10335,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", @@ -9875,24 +10345,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.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", "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.2" @@ -9900,7 +10374,8 @@ }, "lru-cache": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", "dev": true, "requires": { "pseudomap": "1.0.2", @@ -9909,12 +10384,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.1" @@ -9922,7 +10399,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" @@ -9930,12 +10408,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.2.0" @@ -9943,7 +10423,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": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", "dev": true, "requires": { "source-map": "0.6.1" @@ -9951,14 +10432,16 @@ "dependencies": { "source-map": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "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", @@ -9978,12 +10461,14 @@ }, "mimic-fn": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "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.11" @@ -9991,12 +10476,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": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, "requires": { "for-in": "1.0.2", @@ -10005,7 +10492,8 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { "is-plain-object": "2.0.4" @@ -10015,7 +10503,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" @@ -10023,12 +10512,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": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "dev": true, "requires": { "arr-diff": "4.0.0", @@ -10047,24 +10538,28 @@ "dependencies": { "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 }, "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 }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "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.6.0", @@ -10075,7 +10570,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.1.0" @@ -10083,7 +10579,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.1" @@ -10091,17 +10588,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.1", @@ -10111,7 +10611,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.6" @@ -10119,7 +10620,8 @@ }, "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.2.2" @@ -10127,7 +10629,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.2.2" @@ -10135,7 +10638,8 @@ }, "is-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { "is-accessor-descriptor": "0.1.6", @@ -10145,7 +10649,8 @@ "dependencies": { "kind-of": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } @@ -10154,7 +10659,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.1" @@ -10162,14 +10668,16 @@ "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "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.5", @@ -10178,7 +10686,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" @@ -10186,14 +10695,16 @@ "dependencies": { "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": 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.0.2" @@ -10201,7 +10712,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.8", @@ -10210,12 +10722,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", @@ -10225,12 +10739,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": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "dev": true, "requires": { "p-try": "1.0.0" @@ -10238,7 +10754,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.2.0" @@ -10246,12 +10763,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-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", @@ -10262,7 +10781,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.3.1" @@ -10270,12 +10790,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.1" @@ -10283,22 +10805,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.11", @@ -10308,17 +10834,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.4" @@ -10326,7 +10855,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.1.2" @@ -10334,7 +10864,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.1.0", @@ -10345,22 +10876,26 @@ }, "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 }, "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", @@ -10369,7 +10904,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.2.2" @@ -10377,7 +10913,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.6" @@ -10387,7 +10924,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.6" @@ -10397,7 +10935,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.1.0", @@ -10407,7 +10946,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.1.2", @@ -10416,7 +10956,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.1.0", @@ -10427,12 +10968,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" @@ -10440,7 +10983,8 @@ }, "regex-not": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { "extend-shallow": "3.0.2", @@ -10449,22 +10993,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.2" @@ -10472,32 +11020,38 @@ }, "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": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "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": { @@ -10506,7 +11060,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.1.2" @@ -10514,7 +11069,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.15" @@ -10522,17 +11078,20 @@ }, "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 }, "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": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { "extend-shallow": "2.0.1", @@ -10543,7 +11102,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.1" @@ -10553,7 +11113,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" @@ -10561,22 +11122,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": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { "base": "0.11.2", @@ -10591,7 +11156,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.6" @@ -10599,7 +11165,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.1" @@ -10607,7 +11174,8 @@ }, "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.2.2" @@ -10615,7 +11183,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.6" @@ -10625,7 +11194,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.2.2" @@ -10633,7 +11203,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.6" @@ -10643,7 +11214,8 @@ }, "is-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { "is-accessor-descriptor": "0.1.6", @@ -10653,14 +11225,16 @@ }, "kind-of": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } }, "snapdragon-node": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "1.0.0", @@ -10670,7 +11244,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.2" @@ -10678,14 +11253,16 @@ }, "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true } } }, "snapdragon-util": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "3.2.2" @@ -10693,12 +11270,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.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", + "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "dev": true, "requires": { "atob": "2.0.3", @@ -10710,12 +11289,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": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", "dev": true, "requires": { "foreground-child": "1.5.6", @@ -10728,7 +11309,8 @@ }, "spdx-correct": { "version": "3.0.0", - "bundled": true, + "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", @@ -10737,12 +11319,14 @@ }, "spdx-exceptions": { "version": "2.1.0", - "bundled": true, + "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", - "bundled": true, + "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", @@ -10751,12 +11335,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": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, "split-string": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "3.0.2" @@ -10764,7 +11350,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", @@ -10773,7 +11360,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.6" @@ -10781,7 +11369,8 @@ }, "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.2.2" @@ -10789,7 +11378,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.6" @@ -10799,7 +11389,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.2.2" @@ -10807,7 +11398,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.6" @@ -10817,7 +11409,8 @@ }, "is-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { "is-accessor-descriptor": "0.1.6", @@ -10827,14 +11420,16 @@ }, "kind-of": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "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", @@ -10843,12 +11438,14 @@ "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 }, "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" @@ -10858,7 +11455,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.1.1" @@ -10866,7 +11464,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.1" @@ -10874,17 +11473,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.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", + "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", "dev": true, "requires": { "arrify": "1.0.1", @@ -10896,17 +11498,20 @@ "dependencies": { "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 }, "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 }, "braces": { "version": "2.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", "dev": true, "requires": { "arr-flatten": "1.1.0", @@ -10925,7 +11530,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.2" @@ -10933,7 +11539,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.1" @@ -10943,7 +11550,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.6.9", @@ -10957,7 +11565,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.6" @@ -10965,7 +11574,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.1" @@ -10973,7 +11583,8 @@ }, "is-descriptor": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { "is-accessor-descriptor": "0.1.6", @@ -10983,14 +11594,16 @@ }, "kind-of": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } }, "extglob": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { "array-unique": "0.3.2", @@ -11005,7 +11618,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.2" @@ -11013,7 +11627,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.1" @@ -11023,7 +11638,8 @@ }, "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", @@ -11034,7 +11650,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.1" @@ -11044,7 +11661,8 @@ }, "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.2.2" @@ -11052,7 +11670,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.6" @@ -11062,7 +11681,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.2.2" @@ -11070,7 +11690,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.6" @@ -11080,7 +11701,8 @@ }, "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.2.2" @@ -11088,7 +11710,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.6" @@ -11098,17 +11721,20 @@ }, "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, "micromatch": { "version": "3.1.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", "dev": true, "requires": { "arr-diff": "4.0.0", @@ -11130,12 +11756,14 @@ }, "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 }, "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.2.2" @@ -11143,7 +11771,8 @@ }, "to-regex": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { "define-property": "2.0.2", @@ -11154,7 +11783,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", @@ -11163,7 +11793,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.2.2" @@ -11173,12 +11804,14 @@ }, "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": { @@ -11189,7 +11822,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": { @@ -11203,13 +11837,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", @@ -11220,7 +11856,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.1" @@ -11228,7 +11865,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", @@ -11241,7 +11879,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", @@ -11250,7 +11889,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.6", @@ -11260,7 +11900,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" @@ -11270,24 +11911,28 @@ }, "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 }, "isobject": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "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": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "dev": true, "requires": { "kind-of": "6.0.2" @@ -11295,14 +11940,16 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "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": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { "spdx-correct": "3.0.0", @@ -11311,7 +11958,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" @@ -11319,23 +11967,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.2", @@ -11344,7 +11996,8 @@ "dependencies": { "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.1" @@ -11352,7 +12005,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.1.0", @@ -11364,12 +12018,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", @@ -11379,17 +12035,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": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", "dev": true, "requires": { "cliui": "4.0.0", @@ -11408,17 +12067,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 }, "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.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", + "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", "dev": true, "requires": { "string-width": "2.1.1", @@ -11428,7 +12090,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" @@ -11436,7 +12099,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" @@ -11446,7 +12110,8 @@ }, "yargs-parser": { "version": "8.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", "dev": true, "requires": { "camelcase": "4.1.0" @@ -11454,7 +12119,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 } } diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a575dd85e61..f676c61f551 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.4.1", + "version": "0.5.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index b4b4b6dbf5c..c764674ce47 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -12,7 +12,7 @@ "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.4.1", + "@google-cloud/monitoring": "0.5.0", "yargs": "11.1.0" }, "devDependencies": { From f09089051709cc3899a0bf8ed4172696f5173c23 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 08:31:20 -0700 Subject: [PATCH 077/422] chore: lock files maintenance (#39) * chore: lock files maintenance * chore: lock files maintenance --- .../google-cloud-monitoring/package-lock.json | 4281 ++++++----------- 1 file changed, 1435 insertions(+), 2846 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 67214581e27..4fd18a391ce 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/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,9 +81,9 @@ } }, "@google-cloud/nodejs-repo-tools": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@google-cloud/nodejs-repo-tools/-/nodejs-repo-tools-2.2.6.tgz", - "integrity": "sha512-bDEgNBAJ8kfYWrpifg+D7rXs8NUBUUeu2I6NWkcL9IOXg86rblu7xnhFHRxBMcvytJ+7WY4pvkCLxO1v3QBsXg==", + "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", @@ -94,6 +94,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", @@ -108,9 +109,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", @@ -124,6 +125,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", @@ -161,8 +168,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.2.2", @@ -172,26 +178,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" @@ -199,14 +201,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.1.0" @@ -214,32 +214,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", @@ -249,8 +244,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", @@ -265,8 +259,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.26.0" @@ -274,8 +267,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.5.3", @@ -284,8 +276,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", @@ -297,8 +288,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", @@ -314,8 +304,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", @@ -326,20 +315,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", @@ -348,8 +334,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.2", @@ -359,14 +344,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.3.0", @@ -376,15 +359,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": { @@ -394,8 +375,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", @@ -407,8 +387,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": { @@ -419,8 +398,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 } @@ -428,38 +406,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.1.1", @@ -468,8 +440,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" @@ -477,20 +448,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" @@ -498,8 +466,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.1" @@ -507,8 +474,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" @@ -516,20 +482,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.1.0", @@ -543,8 +506,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.1.1", @@ -556,8 +518,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.1" @@ -565,8 +526,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.2.3" @@ -574,8 +534,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" @@ -583,14 +542,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", @@ -602,8 +559,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", @@ -613,8 +569,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" @@ -622,14 +577,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.2" @@ -637,8 +590,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.0.2", @@ -647,26 +599,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", @@ -679,8 +627,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", @@ -689,8 +636,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.1" @@ -698,20 +644,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.5.2", @@ -722,8 +665,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": "1.0.1" @@ -733,8 +675,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.1.1" @@ -742,26 +683,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.4.0", @@ -770,14 +707,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.3.1" @@ -785,26 +720,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.1.1" @@ -812,14 +743,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" @@ -827,20 +756,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.1" @@ -848,8 +774,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.1" @@ -857,8 +782,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" @@ -866,8 +790,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.2.2" @@ -875,44 +798,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" @@ -920,14 +836,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" @@ -935,8 +849,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.26.0", @@ -950,8 +863,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", @@ -962,8 +874,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" @@ -973,8 +884,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", @@ -986,8 +896,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" @@ -997,8 +906,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.11" @@ -1006,20 +914,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.6" @@ -1027,15 +932,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" @@ -1043,8 +946,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.11", @@ -1056,8 +958,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", @@ -1066,28 +967,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.2" @@ -1095,8 +992,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", @@ -1105,8 +1001,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" @@ -1114,14 +1009,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.1.0" @@ -1129,8 +1022,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.7" @@ -1138,8 +1030,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", @@ -1159,14 +1050,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.8" @@ -1174,14 +1063,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" @@ -1189,14 +1076,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.5.0", @@ -1207,8 +1092,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.1.0" @@ -1216,8 +1100,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.1" @@ -1225,20 +1108,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.5", @@ -1247,8 +1127,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.0.2" @@ -1256,8 +1135,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.8", @@ -1266,14 +1144,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", @@ -1283,20 +1159,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" @@ -1304,8 +1177,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", @@ -1316,8 +1188,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.3.1" @@ -1325,8 +1196,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.1" @@ -1334,26 +1204,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.11", @@ -1363,20 +1229,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.4" @@ -1384,8 +1247,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.1.2" @@ -1393,8 +1255,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.1.0", @@ -1405,20 +1266,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", @@ -1427,8 +1285,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.2.2" @@ -1436,8 +1293,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.6" @@ -1447,8 +1303,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.6" @@ -1458,8 +1313,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.1.0", @@ -1469,8 +1323,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.1.2", @@ -1479,8 +1332,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.1.0", @@ -1491,14 +1343,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" @@ -1506,26 +1356,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.2" @@ -1533,26 +1379,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": { @@ -1561,8 +1403,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.1.2" @@ -1570,20 +1411,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" @@ -1591,32 +1429,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", @@ -1629,8 +1462,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.2.2" @@ -1638,20 +1470,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", @@ -1660,20 +1489,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" @@ -1683,8 +1509,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.1.1" @@ -1692,8 +1517,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.1" @@ -1701,20 +1525,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", @@ -1726,20 +1547,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": { @@ -1750,8 +1568,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": { @@ -1765,15 +1582,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.2", @@ -1782,8 +1597,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" @@ -1791,27 +1605,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.2", @@ -1820,8 +1630,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.1.0", @@ -1833,14 +1642,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", @@ -1850,20 +1657,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", @@ -1882,8 +1686,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.2", @@ -1893,8 +1696,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.1.0", @@ -1908,8 +1710,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" @@ -1917,8 +1718,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 } } @@ -1961,7 +1761,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", @@ -2107,9 +1907,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "8.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.1.tgz", - "integrity": "sha512-X/pIUOcgpX7xxKsmdPCMKeDBefsGH/4D/IuJ1gIHbqgWI0qEy/yMKeqaN/sT+rzV9UpAXAfd0kLOVExRmZrXIg==" + "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", @@ -2457,7 +2257,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": { @@ -2472,9 +2272,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.0.tgz", - "integrity": "sha512-SuiKH8vbsOyCALjA/+EINmt/Kdl+TQPrtFgW7XZZcwtryFu9e5kQoX3bjCW6mIvGH1fbeAZZuvwGR5IlBRznGw==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "auto-bind": { "version": "1.2.0", @@ -2501,17 +2301,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", @@ -2559,18 +2359,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.4.0" + "update-notifier": "2.5.0" }, "dependencies": { "ansi-regex": { @@ -2652,9 +2452,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", @@ -2704,9 +2504,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", @@ -2722,7 +2522,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", @@ -2741,7 +2541,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" }, @@ -2829,7 +2629,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": { @@ -2882,7 +2682,7 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.4", + "core-js": "2.5.5", "espower-location-detector": "1.0.0", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -2944,9 +2744,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", @@ -3027,11 +2827,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.4", + "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" }, @@ -3053,7 +2853,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.5", "regenerator-runtime": "0.11.1" } }, @@ -3067,7 +2867,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": { @@ -3084,7 +2884,7 @@ "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.4", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-types": { @@ -3095,7 +2895,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" } }, @@ -3131,6 +2931,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" + } } } }, @@ -3176,7 +3002,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", @@ -3232,17 +3058,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", @@ -3250,14 +3074,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", @@ -3390,7 +3206,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.5", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -3468,14 +3284,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": { @@ -3492,7 +3308,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", @@ -3557,57 +3373,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==" } } }, @@ -3639,9 +3404,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": { @@ -3741,163 +3506,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": { @@ -3979,7 +3595,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" } }, @@ -4061,9 +3677,9 @@ } }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=" + "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", @@ -4180,9 +3796,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": { @@ -4207,6 +3823,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": { @@ -4369,7 +4013,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" } }, @@ -4393,7 +4037,7 @@ "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", "requires": { "base64url": "2.0.0", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "empower": { @@ -4401,14 +4045,14 @@ "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "requires": { - "core-js": "2.5.4", + "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" @@ -4420,7 +4064,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.4" + "core-js": "2.5.5" } }, "end-of-stream": { @@ -4601,7 +4245,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", @@ -4609,20 +4253,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.4.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", @@ -4655,9 +4299,9 @@ } }, "globals": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", - "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", + "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", "dev": true }, "strip-ansi": { @@ -4694,16 +4338,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" @@ -4800,7 +4444,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", @@ -4847,13 +4491,13 @@ "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "requires": { - "core-js": "2.5.4" + "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" @@ -4933,57 +4577,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==" } } }, @@ -5063,13 +4656,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" } }, @@ -5103,6 +4696,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" + } } } }, @@ -5123,9 +4742,9 @@ "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", @@ -5312,7 +4931,7 @@ "dev": true, "requires": { "inherits": "2.0.3", - "readable-stream": "2.3.5" + "readable-stream": "2.3.6" } }, "fs-extra": { @@ -5332,39 +4951,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 @@ -5376,91 +4985,25 @@ "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", - "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", + "version": "1.0.0", "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", + "version": "1.1.11", "bundled": true, "dev": true, "requires": { - "balanced-match": "0.4.2", + "balanced-match": "1.0.0", "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", + "chownr": { + "version": "1.0.1", "bundled": true, "dev": true, "optional": true @@ -5470,14 +5013,6 @@ "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, @@ -5491,35 +5026,11 @@ "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 - } - } + "optional": true }, "debug": { - "version": "2.6.8", + "version": "2.6.9", "bundled": true, "dev": true, "optional": true, @@ -5533,11 +5044,6 @@ "dev": true, "optional": true }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "delegates": { "version": "1.0.0", "bundled": true, @@ -5545,74 +5051,25 @@ "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", + "version": "1.0.3", "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", + "fs-minipass": { + "version": "1.2.5", "bundled": true, "dev": true, "optional": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" + "minipass": "2.2.4" } }, "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" - } + "optional": true }, "gauge": { "version": "2.7.4", @@ -5620,7 +5077,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", @@ -5630,27 +5087,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", @@ -5660,64 +5101,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" @@ -5729,7 +5141,7 @@ "dev": true }, "ini": { - "version": "1.3.4", + "version": "1.3.5", "bundled": true, "dev": true, "optional": true @@ -5742,156 +5154,114 @@ "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", + "minimatch": { + "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { - "jsbn": "0.1.1" + "brace-expansion": "1.1.11" } }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", + "minimist": { + "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, - "json-stable-stringify": { - "version": "1.0.1", + "minipass": { + "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { - "jsonify": "0.0.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "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", + "minizlib": { + "version": "1.1.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 - } + "minipass": "2.2.4" } }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", + "mkdirp": { + "version": "0.5.1", "bundled": true, "dev": true, "requires": { - "mime-db": "1.27.0" + "minimist": "0.0.8" } }, - "minimatch": { - "version": "3.0.4", + "ms": { + "version": "2.0.0", "bundled": true, "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true + "optional": true }, - "mkdirp": { - "version": "0.5.1", + "needle": { + "version": "2.2.0", "bundled": true, "dev": true, + "optional": true, "requires": { - "minimist": "0.0.8" + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" } }, - "ms": { - "version": "2.0.0", + "node-pre-gyp": { + "version": "0.9.1", "bundled": true, "dev": true, - "optional": 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.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } }, - "node-pre-gyp": { - "version": "0.6.39", + "nopt": { + "version": "4.0.1", "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" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, - "nopt": { - "version": "4.0.1", + "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": { - "abbrev": "1.1.0", - "osenv": "0.1.4" + "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, @@ -5907,12 +5277,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, @@ -5940,7 +5304,7 @@ "optional": true }, "osenv": { - "version": "0.1.4", + "version": "0.1.5", "bundled": true, "dev": true, "optional": true, @@ -5952,39 +5316,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" }, @@ -5998,112 +5346,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", @@ -6116,19 +5415,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, @@ -6144,81 +5438,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, @@ -6232,6 +5471,11 @@ "version": "1.0.2", "bundled": true, "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true } } }, @@ -6389,21 +5633,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", @@ -6411,29 +5655,29 @@ } }, "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.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==", + "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.9.7", + "google-auto-auth": "0.10.1", "google-proto-files": "0.15.1", - "grpc": "1.9.1", - "is-stream-ended": "0.1.3", - "lodash": "4.17.5", + "grpc": "1.11.0", + "is-stream-ended": "0.1.4", + "lodash": "4.17.10", "protobufjs": "6.8.6", "through2": "2.0.3" } @@ -6443,7 +5687,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" } }, @@ -6465,7 +5709,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" } @@ -6491,7 +5735,7 @@ "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" @@ -6527,83 +5771,73 @@ "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": { "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 }, "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "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": { "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=", + "bundled": true, "requires": { "delegates": "1.0.0", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "asn1": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + "bundled": true }, "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=" + "version": "1.0.0", + "bundled": true }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "bundled": true }, "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + "version": "0.7.0", + "bundled": true }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + "version": "1.7.0", + "bundled": 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 }, "bcrypt-pbkdf": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "bundled": true, "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -6611,24 +5845,21 @@ }, "block-stream": { "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "bundled": true, "requires": { "inherits": "2.0.3" } }, "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "version": "4.3.1", + "bundled": true, "requires": { - "hoek": "2.16.3" + "hoek": "4.2.1" } }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "bundled": true, "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" @@ -6636,97 +5867,84 @@ }, "caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "bundled": true }, "co": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + "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 }, "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "version": "1.0.6", + "bundled": true, "requires": { "delayed-stream": "1.0.0" } }, "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 }, "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "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": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "bundled": true, "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "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.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + "bundled": true }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "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 }, "ecc-jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "bundled": true, "optional": true, "requires": { "jsbn": "0.1.1" @@ -6734,38 +5952,40 @@ }, "extend": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "bundled": true }, "extsprintf": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "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", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "bundled": true }, "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "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": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "bundled": true }, "fstream": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "bundled": true, "requires": { "graceful-fs": "4.1.11", "inherits": "2.0.3", @@ -6775,8 +5995,7 @@ }, "fstream-ignore": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "bundled": true, "requires": { "fstream": "1.0.11", "inherits": "2.0.3", @@ -6785,8 +6004,7 @@ }, "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.2.0", "console-control-strings": "1.1.0", @@ -6800,23 +6018,14 @@ }, "getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "bundled": true, "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "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.6", @@ -6828,58 +6037,50 @@ }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "bundled": true }, "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + "version": "2.0.0", + "bundled": true }, "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "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": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + "bundled": true }, "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "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", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + "version": "4.2.1", + "bundled": 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=", + "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": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -6887,135 +6088,107 @@ }, "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.1" } }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "bundled": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "bundled": true }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "bundled": true }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "bundled": true, "optional": true }, "json-schema": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "bundled": true }, - "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=", - "requires": { - "jsonify": "0.0.0" - } + "json-schema-traverse": { + "version": "0.3.1", + "bundled": 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=" - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + "bundled": true }, "jsprim": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "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", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" } }, "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + "version": "1.33.0", + "bundled": true }, "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "version": "2.1.18", + "bundled": true, "requires": { - "mime-db": "1.30.0" + "mime-db": "1.33.0" } }, "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.8" + "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=" + "version": "1.2.0", + "bundled": true }, "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", + "bundled": true + } } }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "bundled": true }, "node-pre-gyp": { - "version": "0.6.39", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", - "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", + "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", @@ -7024,17 +6197,15 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "requires": { "abbrev": "1.1.1", - "osenv": "0.1.4" + "osenv": "0.1.5" } }, "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.4", "console-control-strings": "1.1.0", @@ -7044,41 +6215,34 @@ }, "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 }, "oauth-sign": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + "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.0.2" } }, "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.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "version": "0.1.5", + "bundled": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -7086,18 +6250,15 @@ }, "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 }, "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + "version": "2.1.0", + "bundled": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "version": "2.0.0", + "bundled": true }, "protobufjs": { "version": "5.0.2", @@ -7112,115 +6273,96 @@ }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "bundled": true }, "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + "version": "6.5.1", + "bundled": true }, "rc": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.4.tgz", - "integrity": "sha1-oPYGyq4qO4YrvQ74VILAElsxX6M=", + "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", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } } }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "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", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "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" } }, "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.1.2" } }, "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 }, "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 }, "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "version": "2.1.0", + "bundled": true, "requires": { - "hoek": "2.16.3" + "hoek": "4.2.1" } }, "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "version": "1.14.1", + "bundled": true, "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -7230,19 +6372,11 @@ "getpass": "0.1.7", "jsbn": "0.1.1", "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "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.1.0", "is-fullwidth-code-point": "1.0.0", @@ -7250,35 +6384,30 @@ } }, "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", + "bundled": true, "requires": { "safe-buffer": "5.1.1" } }, "stringstream": { "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + "bundled": true }, "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.1.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=" + "bundled": true }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "bundled": true, "requires": { "block-stream": "0.0.9", "fstream": "1.0.11", @@ -7287,97 +6416,80 @@ }, "tar-pack": { "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz", - "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==", + "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", + "readable-stream": "2.3.6", "rimraf": "2.6.2", "tar": "2.2.1", "uid-number": "0.0.6" } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "version": "2.3.4", + "bundled": true, "requires": { "punycode": "1.4.1" } }, "tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "bundled": true, "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=", + "bundled": true, "optional": true }, "uid-number": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + "bundled": true }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true }, "uuid": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + "bundled": true }, "verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "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", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "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, "requires": { "string-width": "1.0.2" } }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "bundled": true } } }, "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.2", + "mime": "2.3.1", "pify": "3.0.0" } }, @@ -7544,7 +6656,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": { @@ -7582,19 +6694,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", @@ -7661,7 +6776,7 @@ "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", "dev": true, "requires": { - "moment": "2.21.0", + "moment": "2.22.1", "sanitize-html": "1.18.2" } }, @@ -7672,12 +6787,12 @@ "dev": true, "requires": { "ansi-escapes": "3.1.0", - "chalk": "2.3.2", + "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", @@ -7760,11 +6875,21 @@ "dev": true }, "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": { @@ -7806,21 +6931,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": { @@ -8036,9 +7178,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", @@ -8192,15 +7334,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", @@ -8227,12 +7360,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", @@ -8258,7 +7385,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": { @@ -8268,7 +7395,7 @@ "requires": { "base64url": "2.0.0", "jwa": "1.1.5", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "keyv": { @@ -8368,9 +7495,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.clonedeep": { "version": "4.5.0", @@ -8724,7 +7851,7 @@ "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", @@ -8738,9 +7865,9 @@ } }, "mime": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.2.2.tgz", - "integrity": "sha512-A7PDg4s48MkqFEcYg2b069m3DXOEq7hx+9q9rIFrSSYfzsh35GX+LOVMQ8Au0ko7d8bSQCIAuzkjp0vCtwENlQ==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==" }, "mime-db": { "version": "1.33.0", @@ -8810,9 +7937,9 @@ } }, "mocha": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.5.tgz", - "integrity": "sha512-3MM3UjZ5p8EJrYpG7s+29HAI9G7sTzKEe4+w37Dg0QP7qL4XGsV+Q2xet2cE37AqdgN1OtYQB6Vl98YiPV3PgA==", + "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", @@ -8823,6 +7950,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" }, @@ -8854,9 +7982,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": { @@ -8939,9 +8067,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", @@ -8952,9 +8080,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", @@ -9011,9 +8139,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", @@ -9031,7 +8159,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", @@ -9047,8 +8175,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.2.2", @@ -9058,26 +8185,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" @@ -9085,14 +8208,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.1.0" @@ -9100,50 +8221,42 @@ }, "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 }, "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.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 }, "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.0.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz", - "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=", + "version": "2.1.0", + "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", @@ -9153,8 +8266,7 @@ }, "babel-generator": { "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "bundled": true, "dev": true, "requires": { "babel-messages": "6.23.0", @@ -9169,8 +8281,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.26.0" @@ -9178,18 +8289,16 @@ }, "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.5.3", + "core-js": "2.5.5", "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=", + "bundled": true, "dev": true, "requires": { "babel-runtime": "6.26.0", @@ -9201,8 +8310,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", @@ -9212,14 +8320,13 @@ "babylon": "6.18.0", "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.3", + "invariant": "2.2.4", "lodash": "4.17.5" } }, "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", @@ -9230,20 +8337,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 }, "base": { "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "bundled": true, "dev": true, "requires": { "cache-base": "1.0.1", @@ -9257,25 +8361,53 @@ "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.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", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "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", @@ -9284,8 +8416,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.2", @@ -9295,14 +8426,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": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "bundled": true, "dev": true, "requires": { "collection-visit": "1.0.0", @@ -9318,16 +8447,14 @@ "dependencies": { "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "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.3.0", @@ -9337,15 +8464,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": { @@ -9354,108 +8479,46 @@ } }, "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" - } - }, - "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==", - "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", - "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.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=", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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==", + "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-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", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "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==", + "bundled": true, "dev": true } } }, "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": { @@ -9466,8 +8529,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 } @@ -9475,14 +8537,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", @@ -9491,44 +8551,37 @@ }, "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 }, "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", + "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.1.2", @@ -9537,8 +8590,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" @@ -9546,26 +8598,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" @@ -9573,26 +8621,54 @@ }, "define-property": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "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.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", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, "dev": true } } }, "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.1" @@ -9600,8 +8676,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" @@ -9609,20 +8684,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.1.0", @@ -9636,8 +8708,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.1.2", @@ -9649,8 +8720,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.1" @@ -9658,8 +8728,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.2.3" @@ -9667,8 +8736,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", @@ -9677,8 +8745,7 @@ "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==", + "bundled": true, "dev": true, "requires": { "is-plain-object": "2.0.4" @@ -9688,8 +8755,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" @@ -9697,14 +8763,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", @@ -9716,8 +8780,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", @@ -9727,8 +8790,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" @@ -9736,14 +8798,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.2" @@ -9751,8 +8811,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.0.2", @@ -9761,8 +8820,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" @@ -9770,32 +8828,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": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "bundled": true, "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -9808,8 +8861,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", @@ -9818,8 +8870,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.1" @@ -9827,20 +8878,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.5.2", @@ -9851,8 +8899,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": "1.0.1" @@ -9862,8 +8909,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.1.1" @@ -9871,14 +8917,12 @@ }, "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 }, "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", @@ -9888,16 +8932,14 @@ "dependencies": { "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, "dev": true } } }, "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", @@ -9906,8 +8948,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.2.2" @@ -9915,8 +8956,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.6" @@ -9926,8 +8966,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.6" @@ -9937,20 +8976,17 @@ }, "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==", + "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.4.0", @@ -9959,14 +8995,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.3", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", - "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", + "version": "2.2.4", + "bundled": true, "dev": true, "requires": { "loose-envify": "1.3.1" @@ -9974,94 +9008,68 @@ }, "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": "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", + "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } + "kind-of": "3.2.2" } }, "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.1.1" } }, "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", + "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } + "kind-of": "3.2.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==", + "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", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "5.1.0", + "bundled": true, "dev": true } } }, "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" @@ -10069,20 +9077,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.1" @@ -10090,14 +9095,12 @@ }, "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-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" @@ -10105,8 +9108,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.2.2" @@ -10114,8 +9116,7 @@ }, "is-odd": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "bundled": true, "dev": true, "requires": { "is-number": "4.0.0" @@ -10123,16 +9124,14 @@ "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==", + "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": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "bundled": true, "dev": true, "requires": { "isobject": "3.0.1" @@ -10140,58 +9139,49 @@ "dependencies": { "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, "dev": true } } }, "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 }, "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==", + "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" @@ -10199,14 +9189,12 @@ }, "istanbul-lib-coverage": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "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" @@ -10214,8 +9202,7 @@ }, "istanbul-lib-instrument": { "version": "1.10.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", - "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "bundled": true, "dev": true, "requires": { "babel-generator": "6.26.1", @@ -10229,8 +9216,7 @@ }, "istanbul-lib-report": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz", - "integrity": "sha512-D4jVbMDtT2dPmloPJS/rmeP626N5Pr3Rp+SovrPn1+zPChGHcggd/0sL29jnbm4oK9W0wHjCRsdch9oLd7cm6g==", + "bundled": true, "dev": true, "requires": { "istanbul-lib-coverage": "1.2.0", @@ -10241,8 +9227,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" @@ -10252,8 +9237,7 @@ }, "istanbul-lib-source-maps": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz", - "integrity": "sha512-fDa0hwU/5sDXwAklXgAoCJCOsFsBplVQ6WBldz5UwaqOzmDhUK4nfuR7/G//G2lERlblUNJB8P6e8cXq3a7MlA==", + "bundled": true, "dev": true, "requires": { "debug": "3.1.0", @@ -10265,8 +9249,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" @@ -10275,9 +9258,8 @@ } }, "istanbul-reports": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", - "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "version": "1.4.0", + "bundled": true, "dev": true, "requires": { "handlebars": "4.0.11" @@ -10285,20 +9267,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.6" @@ -10306,15 +9285,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" @@ -10322,8 +9299,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.11", @@ -10335,8 +9311,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", @@ -10345,28 +9320,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.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "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.2" @@ -10374,8 +9345,7 @@ }, "lru-cache": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "bundled": true, "dev": true, "requires": { "pseudomap": "1.0.2", @@ -10384,14 +9354,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.1" @@ -10399,8 +9367,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" @@ -10408,14 +9375,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.2.0" @@ -10423,8 +9388,7 @@ }, "merge-source-map": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "bundled": true, "dev": true, "requires": { "source-map": "0.6.1" @@ -10432,16 +9396,14 @@ "dependencies": { "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "bundled": true, "dev": true } } }, "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", @@ -10461,14 +9423,12 @@ }, "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==", + "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.11" @@ -10476,14 +9436,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": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "bundled": true, "dev": true, "requires": { "for-in": "1.0.2", @@ -10492,8 +9450,7 @@ "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==", + "bundled": true, "dev": true, "requires": { "is-plain-object": "2.0.4" @@ -10503,8 +9460,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" @@ -10512,14 +9468,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": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "bundled": true, "dev": true, "requires": { "arr-diff": "4.0.0", @@ -10538,28 +9492,24 @@ "dependencies": { "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 }, "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 }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "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.6.0", @@ -10570,8 +9520,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.1.0" @@ -10579,8 +9528,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.1" @@ -10588,20 +9536,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.1", @@ -10611,56 +9556,17 @@ "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.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=", - "dev": true, - "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=", - "dev": true, - "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==", - "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", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } } } }, "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.1" @@ -10668,16 +9574,14 @@ "dependencies": { "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "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.5", @@ -10686,8 +9590,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" @@ -10695,16 +9598,14 @@ "dependencies": { "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, "dev": 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.0.2" @@ -10712,8 +9613,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.8", @@ -10722,14 +9622,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", @@ -10739,14 +9637,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": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "bundled": true, "dev": true, "requires": { "p-try": "1.0.0" @@ -10754,8 +9650,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.2.0" @@ -10763,14 +9658,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-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", @@ -10781,8 +9674,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.3.1" @@ -10790,14 +9682,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.1" @@ -10805,26 +9695,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.11", @@ -10834,20 +9720,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.4" @@ -10855,8 +9738,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.1.2" @@ -10864,8 +9746,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.1.0", @@ -10876,26 +9757,22 @@ }, "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 }, "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", @@ -10904,8 +9781,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.2.2" @@ -10913,8 +9789,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.6" @@ -10924,8 +9799,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.6" @@ -10935,8 +9809,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.1.0", @@ -10946,8 +9819,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.1.2", @@ -10956,8 +9828,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.1.0", @@ -10968,14 +9839,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" @@ -10983,8 +9852,7 @@ }, "regex-not": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "bundled": true, "dev": true, "requires": { "extend-shallow": "3.0.2", @@ -10993,26 +9861,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.2" @@ -11020,38 +9884,32 @@ }, "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": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "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": { @@ -11060,8 +9918,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.1.2" @@ -11069,8 +9926,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.15" @@ -11078,20 +9934,17 @@ }, "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 }, "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": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "bundled": true, "dev": true, "requires": { "extend-shallow": "2.0.1", @@ -11102,8 +9955,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.1" @@ -11113,8 +9965,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" @@ -11122,26 +9973,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": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "bundled": true, "dev": true, "requires": { "base": "0.11.2", @@ -11156,8 +10003,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.6" @@ -11165,76 +10011,17 @@ }, "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.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=", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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==", - "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", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true } } }, "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==", + "bundled": true, "dev": true, "requires": { "define-property": "1.0.0", @@ -11244,25 +10031,53 @@ "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.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", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, "dev": true } } }, "snapdragon-util": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "bundled": true, "dev": true, "requires": { "kind-of": "3.2.2" @@ -11270,17 +10085,15 @@ }, "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.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", - "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", + "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", @@ -11289,14 +10102,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": "sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==", + "bundled": true, "dev": true, "requires": { "foreground-child": "1.5.6", @@ -11309,8 +10120,7 @@ }, "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==", + "bundled": true, "dev": true, "requires": { "spdx-expression-parse": "3.0.0", @@ -11319,14 +10129,12 @@ }, "spdx-exceptions": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "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": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "bundled": true, "dev": true, "requires": { "spdx-exceptions": "2.1.0", @@ -11335,14 +10143,12 @@ }, "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==", + "bundled": true, "dev": true }, "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==", + "bundled": true, "dev": true, "requires": { "extend-shallow": "3.0.2" @@ -11350,8 +10156,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", @@ -11360,76 +10165,17 @@ "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.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=", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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==", - "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", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "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", @@ -11438,14 +10184,12 @@ "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 }, "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" @@ -11455,8 +10199,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.1.1" @@ -11464,8 +10207,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.1" @@ -11473,24 +10215,21 @@ }, "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.2.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", - "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", + "bundled": true, "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" @@ -11498,49 +10237,34 @@ "dependencies": { "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 }, "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 }, "braces": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", - "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "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", "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=", - "dev": true, - "requires": { - "is-descriptor": "1.0.2" - } - }, + }, + "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.1" @@ -11550,8 +10274,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.6.9", @@ -11565,8 +10288,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.6" @@ -11574,17 +10296,51 @@ }, "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.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", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "bundled": true, "dev": true, "requires": { "is-accessor-descriptor": "0.1.6", @@ -11594,16 +10350,14 @@ }, "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==", + "bundled": true, "dev": true } } }, "extglob": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "bundled": true, "dev": true, "requires": { "array-unique": "0.3.2", @@ -11618,8 +10372,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.2" @@ -11627,8 +10380,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.1" @@ -11638,8 +10390,7 @@ }, "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", @@ -11650,8 +10401,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.1" @@ -11660,49 +10410,34 @@ } }, "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=", + "version": "1.0.0", + "bundled": true, "dev": true, "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=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } + "kind-of": "6.0.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=", + "version": "1.0.0", + "bundled": true, "dev": true, "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=", - "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": { "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.2.2" @@ -11710,8 +10445,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.6" @@ -11721,25 +10455,22 @@ }, "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "bundled": true, "dev": true }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "bundled": true, "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", + "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", @@ -11756,14 +10487,12 @@ }, "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 }, "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.2.2" @@ -11771,8 +10500,7 @@ }, "to-regex": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "bundled": true, "dev": true, "requires": { "define-property": "2.0.2", @@ -11783,8 +10511,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", @@ -11793,8 +10520,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.2.2" @@ -11804,14 +10530,12 @@ }, "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": { @@ -11822,8 +10546,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": { @@ -11837,15 +10560,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", @@ -11856,8 +10577,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.1" @@ -11865,8 +10585,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", @@ -11879,8 +10598,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", @@ -11889,8 +10607,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.6", @@ -11900,8 +10617,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" @@ -11911,28 +10627,24 @@ }, "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 }, "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "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": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "bundled": true, "dev": true, "requires": { "kind-of": "6.0.2" @@ -11940,16 +10652,14 @@ "dependencies": { "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "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": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "bundled": true, "dev": true, "requires": { "spdx-correct": "3.0.0", @@ -11958,8 +10668,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" @@ -11967,27 +10676,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.2", @@ -11996,8 +10701,7 @@ "dependencies": { "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.1" @@ -12005,8 +10709,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.1.0", @@ -12018,14 +10721,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", @@ -12035,20 +10736,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": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "bundled": true, "dev": true, "requires": { "cliui": "4.0.0", @@ -12067,20 +10765,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 }, "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.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.0.0.tgz", - "integrity": "sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw==", + "bundled": true, "dev": true, "requires": { "string-width": "2.1.1", @@ -12090,8 +10785,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" @@ -12099,8 +10793,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" @@ -12110,8 +10803,7 @@ }, "yargs-parser": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", - "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "bundled": true, "dev": true, "requires": { "camelcase": "4.1.0" @@ -12119,8 +10811,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 } } @@ -12156,39 +10847,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", @@ -12427,7 +11085,7 @@ "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "timed-out": "4.0.1", "unzip-response": "2.0.1", "url-parse-lax": "1.0.0" @@ -12632,14 +11290,14 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "6.0.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", - "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", + "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": { @@ -12667,7 +11325,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.4", + "core-js": "2.5.5", "power-assert-context-traversal": "1.1.1" } }, @@ -12678,7 +11336,7 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.4", + "core-js": "2.5.5", "espurify": "1.7.0", "estraverse": "4.2.0" } @@ -12688,7 +11346,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.4", + "core-js": "2.5.5", "estraverse": "4.2.0" } }, @@ -12697,7 +11355,7 @@ "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "requires": { - "core-js": "2.5.4", + "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", @@ -12725,7 +11383,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.4", + "core-js": "2.5.5", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -12737,7 +11395,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.4", + "core-js": "2.5.5", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -12778,9 +11436,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": { @@ -12834,7 +11492,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.1", + "@types/node": "8.10.11", "long": "4.0.0" } }, @@ -12897,12 +11555,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" @@ -12955,16 +11613,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" } }, @@ -12976,7 +11634,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" } }, @@ -13054,8 +11712,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": { @@ -13064,7 +11722,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.6" + "rc": "1.2.7" } }, "regjsgen": { @@ -13122,7 +11780,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", @@ -13138,7 +11796,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", @@ -13297,9 +11955,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", @@ -13309,6 +11967,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", @@ -13321,14 +11985,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.21", + "postcss": "6.0.22", "srcset": "1.0.0", "xtend": "4.0.1" } @@ -13418,8 +12082,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" } }, @@ -13481,57 +12145,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==" } } }, @@ -13552,6 +12165,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" + } } } }, @@ -13600,7 +12239,7 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz", "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==", "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", @@ -13608,11 +12247,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": { @@ -13722,57 +12362,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==" } } }, @@ -13804,11 +12393,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": { @@ -13816,7 +12405,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.4", + "core-js": "2.5.5", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -13871,9 +12460,9 @@ "dev": true }, "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", @@ -13885,7 +12474,7 @@ "methods": "1.1.2", "mime": "1.6.0", "qs": "6.5.1", - "readable-stream": "2.3.5" + "readable-stream": "2.3.6" }, "dependencies": { "debug": { @@ -13942,13 +12531,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" @@ -13976,8 +12565,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" }, @@ -14053,7 +12642,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" } }, @@ -14158,7 +12747,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": { @@ -14400,13 +12989,13 @@ "dev": true }, "update-notifier": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.4.0.tgz", - "integrity": "sha1-+bTHAPv9TsEsgRWHJYd31WPYyGY=", + "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", + "chalk": "2.4.1", "configstore": "3.1.2", "import-lazy": "2.1.0", "is-ci": "1.1.0", From 09089c540320675bf6ec28f76fe4a2dc2eb53dd0 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 15:10:19 -0700 Subject: [PATCH 078/422] chore: test on node10 (#40) --- .../.circleci/config.yml | 65 ++++++------------- 1 file changed, 20 insertions(+), 45 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 1fffa7de810..2e27ce96a6c 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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: /.*/ @@ -89,14 +95,15 @@ 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: | 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 - run: name: Run unit tests. command: npm test @@ -116,22 +123,18 @@ jobs: docker: - image: 'node:9' steps: *unit_tests_steps + node10: + docker: + - image: 'node:10' + steps: *unit_tests_steps lint: docker: - image: 'node:8' 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 - npm link - - run: + - run: *npm_install_and_link + - run: &samples_npm_install_and_link name: Link the module being tested to the samples. command: | cd samples/ @@ -147,14 +150,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 @@ -170,22 +166,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: | - 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 - - run: - name: Link the module being tested to the samples. - command: | - cd samples/ - npm link @google-cloud/monitoring - npm install - cd .. + - run: *npm_install_and_link + - run: *samples_npm_install_and_link - run: name: Run sample tests. command: npm run samples-test @@ -209,14 +191,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 b6e45c6464c8478a1b9f795370fcadbc3f4eb4d5 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Fri, 4 May 2018 13:37:05 -0700 Subject: [PATCH 079/422] Add Alerting samples. (#41) --- .../.cloud-repo-tools.json | 7 ++ packages/google-cloud-monitoring/.gitignore | 4 ++ packages/google-cloud-monitoring/README.md | 5 +- packages/google-cloud-monitoring/package.json | 2 +- .../google-cloud-monitoring/samples/README.md | 72 ++++++++++++++++--- .../samples/package.json | 2 +- 6 files changed, 78 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-monitoring/.cloud-repo-tools.json b/packages/google-cloud-monitoring/.cloud-repo-tools.json index 7f79b3da5f5..72bd859e09e 100644 --- a/packages/google-cloud-monitoring/.cloud-repo-tools.json +++ b/packages/google-cloud-monitoring/.cloud-repo-tools.json @@ -5,6 +5,13 @@ "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/monitoring/latest/", "release_quality": "beta", "samples": [ + { + "id": "alerts", + "name": "Alert Policies", + "file": "alerts.js", + "docs_link": "https://cloud.google.com/monitoring/docs", + "usage": "node alerts.js --help" + }, { "id": "metrics", "name": "Metrics", diff --git a/packages/google-cloud-monitoring/.gitignore b/packages/google-cloud-monitoring/.gitignore index b7d407606fb..082cf01ed78 100644 --- a/packages/google-cloud-monitoring/.gitignore +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 2f4511938dd..84f1b3950ff 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/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 Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) @@ -126,6 +128,7 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Alert Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) | | Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) | | Uptime Config | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | @@ -157,4 +160,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENS [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ [product-docs]: https://cloud.google.com/monitoring/docs -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f676c61f551..cb388bca1c3 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -64,7 +64,7 @@ "lodash.union": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.2.3", + "@google-cloud/nodejs-repo-tools": "^2.3.0", "async": "^2.5.0", "codecov": "^3.0.0", "eslint": "^4.9.0", diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 37d70aa3edf..c9599478498 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/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 Monitoring: Node.js Samples @@ -10,6 +12,7 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Alert Policies](#alert-policies) * [Metrics](#metrics) * [Uptime Config](#uptime-config) @@ -21,9 +24,56 @@ library's README. ## Samples +### Alert Policies + +View the [source code][alerts_0_code]. + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) + +__Usage:__ `node alerts.js --help` + +``` +alerts.js + +Commands: + alerts.js backup Save alert policies to a ./policies_backup.json file. + alerts.js restore Restore alert policies from a ./policies_backup.json file. + alerts.js replace Replace the notification channels of the specified alert policy. + alerts.js disable [filter] Disables policies that match the given filter. + alerts.js enable [filter] Enables policies that match the given filter. + +Options: + --version Show version number [boolean] + --alertPolicyName [string] + --help Show help [boolean] + +Examples: + node alerts.js backup my-project-id Backup policies. + node alerts.js restore my-project-id Restore policies. + node alerts.js replace Replace the notification channels of the specified alert + projects/my-project-id/alertPolicies/12345 channel-1 policy. + channel-2 channel-3 + node alerts.js disable my-project-id "(NOT Disables policies that match the given filter. + display_name.empty OR NOT description.empty) AND + user_labels='active'" + node alerts.js disable my-project-id "description:'cloud'" Disables policies that match the given filter. + node alerts.js disable my-project-id Disables policies that match the given filter. + "display_name=monitoring.regex.full_match('Temp \d{4}')" + node alerts.js enable my-project-id "(NOT display_name.empty Enables policies that match the given filter. + OR NOT description.empty) AND user_labels='active'" + node alerts.js enable my-project-id "description:'cloud'" Enables policies that match the given filter. + node alerts.js enable my-project-id Enables policies that match the given filter. + "display_name=monitoring.regex.full_match('Temp \d{4}')" + +For more information, see https://cloud.google.com/monitoring/docs/ +``` + +[alerts_0_docs]: https://cloud.google.com/monitoring/docs +[alerts_0_code]: alerts.js + ### Metrics -View the [source code][metrics_0_code]. +View the [source code][metrics_1_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) @@ -52,7 +102,7 @@ Commands: Options: --version Show version number [boolean] - --projectId, -p [string] + --projectId, -p [string] [default: "nodejs-docs-samples"] --help Show help [boolean] Examples: @@ -71,12 +121,12 @@ Examples: For more information, see https://cloud.google.com/monitoring/docs ``` -[metrics_0_docs]: https://cloud.google.com/monitoring/docs -[metrics_0_code]: metrics.js +[metrics_1_docs]: https://cloud.google.com/monitoring/docs +[metrics_1_code]: metrics.js ### Uptime Config -View the [source code][uptime_1_code]. +View the [source code][uptime_2_code]. [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) @@ -86,7 +136,7 @@ __Usage:__ `node uptime.js --help` uptime.js Commands: - uptime.js create [projectId] Creates an uptime check config. + uptime.js create [projectId] Creates an uptime check config. uptime.js list [projectId] Lists uptime check configs. uptime.js list-ips Lists uptime check config IPs. uptime.js get [projectId] Gets an uptime check config. @@ -94,11 +144,11 @@ Commands: Options: --version Show version number [boolean] - --projectId, -p [string] + --projectId, -p [string] [default: "nodejs-docs-samples"] --help Show help [boolean] Examples: - node uptime.js create my-instance Create an uptime check for a "my-instance" GCE instance. + node uptime.js create mydomain.com Create an uptime check. node uptime.js list List all uptime check configs. node uptime.js list "resource.type = gce_instance AND List all uptime check configs for a specific GCE resource.label.instance_id = mongodb" instance. @@ -109,8 +159,8 @@ Examples: For more information, see https://cloud.google.com/monitoring/uptime-checks/ ``` -[uptime_1_docs]: https://cloud.google.com/monitoring/docs -[uptime_1_code]: uptime.js +[uptime_2_docs]: https://cloud.google.com/monitoring/docs +[uptime_2_code]: uptime.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[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/nodejs-monitoring&page=editor&open_in_editor=samples/README.md diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index c764674ce47..1ae7629638f 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -16,7 +16,7 @@ "yargs": "11.1.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.2.6", + "@google-cloud/nodejs-repo-tools": "2.3.0", "ava": "0.25.0", "proxyquire": "2.0.1", "sinon": "4.5.0" From ad95b28002dd225799a0ee6363985f79de515e4a Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Mon, 7 May 2018 11:03:49 -0700 Subject: [PATCH 080/422] Fixes #43. (#44) Makes alert tests more stable and adds a list alert sample. --- packages/google-cloud-monitoring/samples/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index c9599478498..a3e44bb5206 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -41,6 +41,7 @@ Commands: alerts.js replace Replace the notification channels of the specified alert policy. alerts.js disable [filter] Disables policies that match the given filter. alerts.js enable [filter] Enables policies that match the given filter. + alerts.js list Lists alert policies in the specified project. Options: --version Show version number [boolean] From abaa249ad6c2c3248e78a65bc7c522e93a6d7d6b Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 10 May 2018 07:22:27 -0700 Subject: [PATCH 081/422] chore: lock files maintenance (#45) --- .../google-cloud-monitoring/package-lock.json | 517 ++++-------------- 1 file changed, 116 insertions(+), 401 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 4fd18a391ce..d5d968359fd 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -1907,9 +1907,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", @@ -2682,7 +2682,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" @@ -2829,7 +2829,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", @@ -2853,7 +2853,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" } }, @@ -3206,7 +3206,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" @@ -3677,9 +3677,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", @@ -4007,9 +4007,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", @@ -4045,7 +4045,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" } }, @@ -4064,7 +4064,7 @@ "integrity": "sha1-Wt71ZgiOMfuoC6CjbfR9cJQWkUQ=", "requires": { "call-signature": "0.0.2", - "core-js": "2.5.5" + "core-js": "2.5.6" } }, "end-of-stream": { @@ -4491,7 +4491,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": { @@ -4662,7 +4662,7 @@ "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.21", + "iconv-lite": "0.4.22", "tmp": "0.0.33" } }, @@ -4749,7 +4749,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" } }, @@ -5670,12 +5670,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", @@ -5771,13 +5771,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": { @@ -5785,16 +5785,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 @@ -5811,52 +5801,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, @@ -5865,25 +5813,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 @@ -5896,29 +5833,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, @@ -5927,11 +5841,7 @@ } }, "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "delayed-stream": { - "version": "1.0.0", + "version": "0.5.1", "bundled": true }, "delegates": { @@ -5942,66 +5852,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, @@ -6016,13 +5877,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, @@ -6035,47 +5889,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": { @@ -6101,67 +5927,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, @@ -6179,20 +5974,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": { @@ -6203,6 +6007,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, @@ -6217,10 +6033,6 @@ "version": "1.0.1", "bundled": true }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, "object-assign": { "version": "4.1.1", "bundled": true @@ -6252,10 +6064,6 @@ "version": "1.0.1", "bundled": true }, - "performance-now": { - "version": "2.1.0", - "bundled": true - }, "process-nextick-args": { "version": "2.0.0", "bundled": true @@ -6271,19 +6079,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" @@ -6302,34 +6102,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, @@ -6341,6 +6113,10 @@ "version": "5.1.1", "bundled": true }, + "sax": { + "version": "1.2.4", + "bundled": true + }, "semver": { "version": "5.5.0", "bundled": true @@ -6353,27 +6129,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, @@ -6390,10 +6145,6 @@ "safe-buffer": "5.1.1" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -6406,68 +6157,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, @@ -6478,6 +6189,10 @@ "wrappy": { "version": "1.0.2", "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true } } }, @@ -6698,9 +6413,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" @@ -7834,9 +7549,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==" }, "methods": { "version": "1.1.2", @@ -11325,7 +11040,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" } }, @@ -11336,7 +11051,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" } @@ -11346,7 +11061,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" } }, @@ -11355,7 +11070,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", @@ -11383,7 +11098,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", @@ -11395,7 +11110,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" @@ -11492,7 +11207,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" } }, @@ -11518,9 +11233,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", @@ -11795,7 +11510,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", @@ -12405,7 +12120,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" } @@ -12473,7 +12188,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 3011aa17109c48465fff4d37e916c31c09eaea55 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 16 May 2018 16:52:27 -0700 Subject: [PATCH 082/422] chore: timeout for system test (#49) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cb388bca1c3..6e7943305b9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -53,7 +53,7 @@ "lint": "repo-tools lint --cmd eslint -- src/ samples/ system-test/ test/", "prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "system-test": "mocha system-test/*.js --timeout 5000", + "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", "test": "repo-tools test run --cmd npm -- run cover" }, From 120986d40474590d4e1cda15d69b012060e173e6 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 21 May 2018 16:05:28 -0700 Subject: [PATCH 083/422] chore: the ultimate fix for repo-tools EPERM (#50) --- .../.circleci/config.yml | 51 +++++++------------ 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 2e27ce96a6c..18889ff868d 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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: @@ -96,14 +79,14 @@ 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: name: Run unit tests. command: npm test From e1600217bd29637f65a19f0ff7a6816b5ccc8e45 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 22 May 2018 11:32:26 -0700 Subject: [PATCH 084/422] chore: lock files maintenance (#51) * chore: lock files maintenance * chore: lock files maintenance --- .../google-cloud-monitoring/package-lock.json | 738 ++++++++---------- 1 file changed, 312 insertions(+), 426 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index d5d968359fd..f0514264152 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -1832,6 +1832,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", @@ -1894,7 +1899,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": { @@ -1907,9 +1912,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", @@ -2253,9 +2258,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" } @@ -2345,7 +2350,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", @@ -2362,7 +2367,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", @@ -2461,7 +2466,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" } }, @@ -2684,7 +2689,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" } }, @@ -2960,11 +2965,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", @@ -2986,14 +2986,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", @@ -3208,7 +3200,7 @@ "requires": { "core-js": "2.5.6", "deep-equal": "1.0.1", - "espurify": "1.7.0", + "espurify": "1.8.0", "estraverse": "4.2.0" } }, @@ -3308,7 +3300,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", @@ -3506,13 +3498,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" } }, @@ -3560,9 +3552,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": { @@ -3637,7 +3629,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" @@ -3701,29 +3693,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", @@ -3926,9 +3900,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", @@ -3973,9 +3947,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" @@ -4032,11 +4006,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" } }, @@ -4382,9 +4355,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", @@ -4392,7 +4365,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", @@ -4446,7 +4419,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", @@ -4487,9 +4460,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" } @@ -4586,18 +4559,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" } @@ -4662,7 +4635,7 @@ "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.22", + "iconv-lite": "0.4.23", "tmp": "0.0.33" } }, @@ -4742,11 +4715,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", @@ -4827,7 +4801,7 @@ "dev": true, "requires": { "commondir": "1.0.1", - "make-dir": "1.2.0", + "make-dir": "1.3.0", "pkg-dir": "2.0.0" } }, @@ -4859,9 +4833,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" }, @@ -4951,14 +4925,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": { @@ -5039,7 +5013,7 @@ } }, "deep-extend": { - "version": "0.4.2", + "version": "0.5.1", "bundled": true, "dev": true, "optional": true @@ -5217,7 +5191,7 @@ } }, "node-pre-gyp": { - "version": "0.9.1", + "version": "0.10.0", "bundled": true, "dev": true, "optional": true, @@ -5228,7 +5202,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" @@ -5326,12 +5300,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" @@ -5633,7 +5607,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", @@ -5641,16 +5615,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" } }, @@ -5659,10 +5633,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": { @@ -5765,9 +5739,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": { @@ -5778,7 +5752,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": { @@ -6069,9 +6043,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", @@ -6203,7 +6177,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" } @@ -6322,28 +6296,12 @@ "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", "dev": true }, - "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", @@ -6367,7 +6325,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", @@ -6413,9 +6371,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" @@ -7093,23 +7051,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" } }, @@ -7296,9 +7252,9 @@ "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" }, "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": { @@ -7338,18 +7294,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" @@ -7389,6 +7345,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", @@ -7652,22 +7614,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" + "supports-color": "5.4.0" }, "dependencies": { "debug": { @@ -7678,15 +7640,6 @@ "requires": { "ms": "2.0.0" } - }, - "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" - } } } }, @@ -7789,7 +7742,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" } @@ -7854,9 +7807,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", @@ -7877,7 +7830,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", @@ -7927,12 +7880,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", @@ -7945,7 +7895,7 @@ "dev": true }, "array-unique": { - "version": "0.2.1", + "version": "0.3.2", "bundled": true, "dev": true }, @@ -7965,7 +7915,7 @@ "dev": true }, "atob": { - "version": "2.1.0", + "version": "2.1.1", "bundled": true, "dev": true }, @@ -7989,7 +7939,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" } @@ -8007,7 +7957,7 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "regenerator-runtime": "0.11.1" } }, @@ -8020,7 +7970,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": { @@ -8036,7 +7986,7 @@ "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.4", - "lodash": "4.17.5" + "lodash": "4.17.10" } }, "babel-types": { @@ -8046,7 +7996,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" } }, @@ -8130,13 +8080,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": { @@ -8290,7 +8257,7 @@ "dev": true }, "core-js": { - "version": "2.5.5", + "version": "2.5.6", "bundled": true, "dev": true }, @@ -8299,7 +8266,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "which": "1.3.0" } }, @@ -8426,7 +8393,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" } @@ -8434,19 +8401,35 @@ } }, "expand-brackets": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", + "version": "2.1.4", "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": { @@ -8469,28 +8452,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": { @@ -8516,14 +8559,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, @@ -8574,23 +8609,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, @@ -8777,29 +8795,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, @@ -8813,16 +8813,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": { @@ -8859,16 +8851,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, @@ -8895,12 +8877,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", @@ -9041,7 +9020,7 @@ } }, "lodash": { - "version": "4.17.5", + "version": "4.17.10", "bundled": true, "dev": true }, @@ -9059,7 +9038,7 @@ } }, "lru-cache": { - "version": "4.1.2", + "version": "4.1.3", "bundled": true, "dev": true, "requires": { @@ -9117,23 +9096,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": { @@ -9233,14 +9219,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, @@ -9294,15 +9272,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, @@ -9376,17 +9345,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, @@ -9475,53 +9433,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, @@ -9557,14 +9473,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, @@ -9574,11 +9482,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, @@ -9808,7 +9711,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", @@ -10464,7 +10367,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", @@ -10489,7 +10392,7 @@ "dev": true }, "cliui": { - "version": "4.0.0", + "version": "4.1.0", "bundled": true, "dev": true, "requires": { @@ -11052,7 +10955,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" } }, @@ -11099,7 +11002,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" @@ -11207,7 +11110,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" } }, @@ -11249,23 +11152,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 } } }, @@ -11375,9 +11276,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": { @@ -11416,7 +11317,7 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.3.3", + "regenerate": "1.4.0", "regjsgen": "0.2.0", "regjsparser": "0.1.5" } @@ -11490,9 +11391,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", @@ -11502,7 +11403,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", @@ -11512,7 +11412,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" @@ -11796,7 +11695,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" @@ -11841,7 +11740,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": { @@ -11927,14 +11826,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", @@ -11950,9 +11841,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", @@ -11962,9 +11853,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", @@ -12125,11 +12016,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", @@ -12901,7 +12787,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 4088c41282165845bef539c174293e044edf4779 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sun, 3 Jun 2018 17:49:30 -0700 Subject: [PATCH 085/422] chore(package): update nyc to version 12.0.2 (#53) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 6e7943305b9..736d27d27d6 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -75,7 +75,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.0.0", - "nyc": "^11.2.1", + "nyc": "^12.0.2", "power-assert": "^1.4.4", "prettier": "^1.7.4" } From 3158de12723ffeb6682c193a57cf7a95344afdae Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Jun 2018 17:11:42 -0700 Subject: [PATCH 086/422] fix: update linking for samples (#58) --- packages/google-cloud-monitoring/.circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 18889ff868d..eac9cd20352 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -83,7 +83,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 @@ -121,9 +120,8 @@ jobs: name: Link the module being tested to the samples. command: | cd samples/ - npm link ../ npm install - cd .. + npm link ../ - run: name: Run linting. command: npm run lint From 88c42d9955cefb77913ce683d2258ba31367322b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Jun 2018 22:50:25 -0700 Subject: [PATCH 087/422] refactor: drop repo-tool as an exec wrapper (#61) --- packages/google-cloud-monitoring/.circleci/config.yml | 1 - packages/google-cloud-monitoring/package.json | 10 +++++----- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index eac9cd20352..4595509174c 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -83,7 +83,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/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 736d27d27d6..76fb256617b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -48,14 +48,14 @@ ], "scripts": { "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", - "docs": "repo-tools exec -- jsdoc -c .jsdoc.js", + "docs": "jsdoc -c .jsdoc.js", "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/", - "prettier": "repo-tools exec -- prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", + "lint": "eslint src/ samples/ system-test/ test/", + "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", - "test-no-cover": "repo-tools test run --cmd mocha -- test/*.js --no-timeouts", - "test": "repo-tools test run --cmd npm -- run cover" + "test-no-cover": "mocha test/*.js --no-timeouts", + "test": "npm run cover" }, "dependencies": { "extend": "^3.0", diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 1ae7629638f..8da0512f72c 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -9,7 +9,7 @@ "node": ">=4.0.0" }, "scripts": { - "test": "repo-tools test run --cmd ava -- -T 3m --verbose system-test/*.test.js" + "test": "ava -T 3m --verbose system-test/*.test.js" }, "dependencies": { "@google-cloud/monitoring": "0.5.0", From 5a7178adfd109ac6200cd928c60e6c54a551c201 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 26 Jun 2018 07:15:21 -0700 Subject: [PATCH 088/422] chore(package): update eslint to version 5.0.0 (#57) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 76fb256617b..9c5e4a0036e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -67,7 +67,7 @@ "@google-cloud/nodejs-repo-tools": "^2.3.0", "async": "^2.5.0", "codecov": "^3.0.0", - "eslint": "^4.9.0", + "eslint": "^5.0.0", "eslint-config-prettier": "^2.6.0", "eslint-plugin-node": "^6.0.0", "eslint-plugin-prettier": "^2.3.1", From 15d3a2b1060ea316a10a0e7cd74a04b39a5f94a8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 26 Jun 2018 21:26:27 -0700 Subject: [PATCH 089/422] fix(deps): update dependency yargs to v12 (#65) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 8da0512f72c..ef92d22e6c3 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@google-cloud/monitoring": "0.5.0", - "yargs": "11.1.0" + "yargs": "12.0.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "2.3.0", From f8e485cfa303cf2379bf6996cf37d8cb06d7e73f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 27 Jun 2018 13:55:19 -0700 Subject: [PATCH 090/422] chore(deps): update dependency sinon to v6 (#64) --- .../google-cloud-monitoring/samples/package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index ef92d22e6c3..72d0ab73c78 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -6,19 +6,19 @@ "author": "Google Inc.", "repository": "googleapis/nodejs-monitoring", "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" }, "scripts": { "test": "ava -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "0.5.0", - "yargs": "12.0.0" + "@google-cloud/monitoring": "^0.5.0", + "yargs": "^12.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "2.3.0", - "ava": "0.25.0", - "proxyquire": "2.0.1", - "sinon": "4.5.0" + "@google-cloud/nodejs-repo-tools": "^2.3.0", + "ava": "^0.25.0", + "proxyquire": "^2.0.1", + "sinon": "^6.0.1" } } From 01f2b3eec86a3862e6609e16fd1475c7402f48d2 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 28 Jun 2018 10:46:50 -0700 Subject: [PATCH 091/422] chore: check in synth script and update gax dependency (#62) * chore: check in synth.py; regenerate v3 * chore: update google-gax to 0.17.0 * chore: synth.py to run for a single version only --- .../google-cloud-monitoring/package-lock.json | 2050 ++++++++--------- packages/google-cloud-monitoring/package.json | 2 +- .../smoke-test/metric_service_smoke_test.js | 92 + .../src/v3/alert_policy_service_client.js | 4 +- .../src/v3/doc/google/api/doc_metric.js | 18 +- .../doc/google/api/doc_monitored_resource.js | 40 +- .../google/monitoring/v3/doc_alert_service.js | 188 ++ .../google/monitoring/v3/doc_group_service.js | 216 ++ .../monitoring/v3/doc_metric_service.js | 346 +++ .../monitoring/v3/doc_notification_service.js | 328 +++ .../monitoring/v3/doc_uptime_service.js | 198 ++ .../src/v3/doc/google/protobuf/doc_empty.js | 34 + .../src/v3/group_service_client.js | 4 +- .../src/v3/metric_service_client.js | 4 +- .../v3/notification_channel_service_client.js | 4 +- .../src/v3/uptime_check_service_client.js | 4 +- packages/google-cloud-monitoring/synth.py | 29 + 17 files changed, 2391 insertions(+), 1170 deletions(-) create mode 100644 packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js create mode 100644 packages/google-cloud-monitoring/synth.py diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index f0514264152..03e756a2083 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -71,6 +71,148 @@ "slide": "1.1.6" } }, + "@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.10", + "source-map": "0.5.7", + "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.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "@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.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=", + "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.7.0", + "invariant": "2.2.4", + "lodash": "4.17.10" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "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.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.10", + "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", @@ -1833,9 +1975,9 @@ } }, "@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", @@ -1912,14 +2054,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", @@ -1927,26 +2069,19 @@ "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": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, "requires": { "co": "4.6.0", "fast-deep-equal": "1.1.0", @@ -1955,9 +2090,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": { @@ -2047,7 +2182,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "1.9.2" } }, "anymatch": { @@ -2245,12 +2380,14 @@ "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, "assign-symbols": { "version": "1.0.0", @@ -2261,6 +2398,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" } @@ -2274,7 +2412,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "atob": { "version": "2.1.1", @@ -2282,9 +2421,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": { @@ -2304,7 +2443,7 @@ "array-union": "1.0.2", "array-uniq": "1.0.3", "arrify": "1.0.1", - "auto-bind": "1.2.0", + "auto-bind": "1.2.1", "ava-init": "0.2.1", "babel-core": "6.26.3", "babel-generator": "6.26.1", @@ -2351,7 +2490,7 @@ "lodash.flatten": "4.4.0", "loud-rejection": "1.6.0", "make-dir": "1.3.0", - "matcher": "1.1.0", + "matcher": "1.1.1", "md5-hex": "2.0.0", "meow": "3.7.0", "ms": "2.0.0", @@ -2361,7 +2500,7 @@ "package-hash": "2.0.0", "pkg-conf": "2.1.0", "plur": "2.1.2", - "pretty-ms": "3.1.0", + "pretty-ms": "3.2.0", "require-precompiled": "0.1.0", "resolve-cwd": "2.0.0", "safe-buffer": "5.1.2", @@ -2393,6 +2532,16 @@ "ms": "2.0.0" } }, + "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.5.7" + } + }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", @@ -2448,18 +2597,20 @@ "execa": "0.7.0", "has-yarn": "1.0.0", "read-pkg-up": "2.0.0", - "write-pkg": "3.1.0" + "write-pkg": "3.2.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=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true }, "axios": { "version": "0.18.0", @@ -2687,7 +2838,7 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.6", + "core-js": "2.5.7", "espower-location-detector": "1.0.0", "espurify": "1.8.0", "estraverse": "4.2.0" @@ -2834,7 +2985,7 @@ "requires": { "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.6", + "core-js": "2.5.7", "home-or-tmp": "2.0.0", "lodash": "4.17.10", "mkdirp": "0.5.1", @@ -2858,7 +3009,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, @@ -2969,6 +3120,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -3094,9 +3246,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==", "dev": true }, "builtin-modules": { @@ -3198,7 +3350,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "deep-equal": "1.0.1", "espurify": "1.8.0", "estraverse": "4.2.0" @@ -3253,7 +3405,8 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true }, "catharsis": { "version": "0.8.9", @@ -3472,7 +3625,8 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true }, "co-with-promise": { "version": "4.6.0", @@ -3518,18 +3672,18 @@ } }, "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": { @@ -3547,6 +3701,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, "requires": { "delayed-stream": "1.0.0" } @@ -3579,18 +3734,6 @@ "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.3.6", - "typedarray": "0.0.6" - } - }, "concordance": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/concordance/-/concordance-3.0.0.tgz", @@ -3648,9 +3791,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": { @@ -3669,9 +3812,9 @@ } }, "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", @@ -3695,7 +3838,7 @@ "requires": { "lru-cache": "4.1.3", "shebang-command": "1.2.0", - "which": "1.3.0" + "which": "1.3.1" } }, "crypto-random-string": { @@ -3719,13 +3862,14 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.42" + "es5-ext": "0.10.45" } }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, "requires": { "assert-plus": "1.0.0" } @@ -3770,9 +3914,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": { @@ -3787,7 +3931,7 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { "foreach": "2.0.5", - "object-keys": "1.0.11" + "object-keys": "1.0.12" } }, "define-property": { @@ -3882,7 +4026,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "detect-indent": { "version": "4.0.0", @@ -3992,14 +4137,15 @@ } }, "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", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, "optional": true, "requires": { "jsbn": "0.1.1" @@ -4014,12 +4160,12 @@ } }, "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.5.7", + "empower-core": "1.2.0" } }, "empower-assert": { @@ -4032,12 +4178,12 @@ } }, "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.5.7" } }, "end-of-stream": { @@ -4061,18 +4207,42 @@ "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" } }, + "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.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", @@ -4093,7 +4263,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.42", + "es5-ext": "0.10.45", "es6-symbol": "3.1.1" } }, @@ -4104,7 +4274,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.42", + "es5-ext": "0.10.45", "es6-iterator": "2.0.3", "es6-set": "0.1.5", "es6-symbol": "3.1.1", @@ -4118,7 +4288,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.42", + "es5-ext": "0.10.45", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" @@ -4131,7 +4301,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.42" + "es5-ext": "0.10.45" } }, "es6-weak-map": { @@ -4141,7 +4311,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.42", + "es5-ext": "0.10.45", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1" } @@ -4171,9 +4341,9 @@ "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", @@ -4211,32 +4381,31 @@ } }, "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", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "11.5.0", - "ignore": "3.3.8", + "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.11.0", + "js-yaml": "3.12.0", "json-stable-stringify-without-jsonify": "1.0.1", "levn": "0.3.0", "lodash": "4.17.10", @@ -4250,18 +4419,44 @@ "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" + } + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -4271,10 +4466,22 @@ "ms": "2.0.0" } }, + "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.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "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": { @@ -4311,16 +4518,16 @@ "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { - "ignore": "3.3.8", + "ignore": "3.3.10", "minimatch": "3.0.4", - "resolve": "1.7.1", + "resolve": "1.8.1", "semver": "5.5.0" }, "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.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -4329,9 +4536,9 @@ } }, "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.2", @@ -4339,9 +4546,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", @@ -4362,7 +4569,7 @@ "requires": { "array-find": "1.0.0", "escallmatch": "1.5.0", - "escodegen": "1.9.1", + "escodegen": "1.10.0", "escope": "3.6.0", "espower-location-detector": "1.0.0", "espurify": "1.8.0", @@ -4379,7 +4586,7 @@ "dev": true, "requires": { "convert-source-map": "1.5.1", - "espower-source": "2.2.0", + "espower-source": "2.3.0", "minimatch": "3.0.4", "source-map-support": "0.4.18", "xtend": "4.0.1" @@ -4409,48 +4616,32 @@ } }, "espower-source": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/espower-source/-/espower-source-2.2.0.tgz", - "integrity": "sha1-fgBSVa5HtcE2RIZEs/PYAtUD91I=", + "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.5.3", + "acorn": "5.7.1", "acorn-es7-plugin": "1.1.7", "convert-source-map": "1.5.1", "empower-assert": "1.1.0", - "escodegen": "1.9.1", + "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" - }, - "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==", + "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.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.7.1", + "acorn-jsx": "4.1.1" } }, "esprima": { @@ -4464,7 +4655,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.5.7" } }, "esquery": { @@ -4503,7 +4694,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.42" + "es5-ext": "0.10.45" } }, "execa": { @@ -4701,12 +4892,14 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, "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=" + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true }, "fast-diff": { "version": "1.1.2", @@ -4720,7 +4913,7 @@ "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", "requires": { "@mrmlnc/readdir-enhanced": "2.2.1", - "@nodelib/fs.stat": "1.0.2", + "@nodelib/fs.stat": "1.1.0", "glob-parent": "3.1.0", "is-glob": "4.0.0", "merge2": "1.2.2", @@ -4730,7 +4923,8 @@ "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=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -4872,12 +5066,14 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true }, "form-data": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.6", @@ -4916,7 +5112,7 @@ "requires": { "graceful-fs": "4.1.11", "jsonfile": "4.0.0", - "universalify": "0.1.1" + "universalify": "0.1.2" } }, "fs.realpath": { @@ -5453,6 +5649,12 @@ } } }, + "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", @@ -5508,6 +5710,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, "requires": { "assert-plus": "1.0.0" } @@ -5609,15 +5812,15 @@ "dir-glob": "2.0.0", "fast-glob": "2.2.2", "glob": "7.1.2", - "ignore": "3.3.8", + "ignore": "3.3.10", "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==", + "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", @@ -5628,31 +5831,21 @@ "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==", - "requires": { - "async": "2.6.1", - "gcp-metadata": "0.6.3", - "google-auth-library": "1.5.0", - "request": "2.87.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==", + "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.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", + "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" } }, @@ -5666,28 +5859,13 @@ } }, "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.1", + "resolved": "https://registry.npmjs.org/google-proto-files/-/google-proto-files-0.16.1.tgz", + "integrity": "sha512-ykdhaYDiU/jlyrkzZDPemraKwVIgLT31XMHVNSJW//R9VED56hqSDRMx1Jlxbf0O4iDZnBWQ0JQLHbM2r5+wuA==", "requires": { - "globby": "7.1.1", - "power-assert": "1.5.0", + "globby": "8.0.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=", - "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" - } - } } }, "got": { @@ -5745,9 +5923,9 @@ "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==", + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.12.4.tgz", + "integrity": "sha512-t0Hy4yoHHYLkK0b+ULTHw5ZuSFmWokCABY0C4bKQbE4jnm1hpjA23cQVD0xAqDcRHN5CkvFzlqb34ngV22dqoQ==", "requires": { "lodash": "4.17.10", "nan": "2.10.0", @@ -5768,7 +5946,7 @@ "bundled": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "requires": { "delegates": "1.0.0", @@ -5815,7 +5993,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true }, "delegates": { @@ -5830,7 +6008,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "2.2.4" + "minipass": "2.3.3" } }, "fs.realpath": { @@ -5848,7 +6026,7 @@ "signal-exit": "3.0.2", "string-width": "1.0.2", "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "wide-align": "1.1.3" } }, "glob": { @@ -5868,8 +6046,11 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.19", - "bundled": true + "version": "0.4.23", + "bundled": true, + "requires": { + "safer-buffer": "2.1.2" + } }, "ignore-walk": { "version": "3.0.1", @@ -5917,10 +6098,10 @@ "bundled": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.3", "bundled": true, "requires": { - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "yallist": "3.0.2" } }, @@ -5928,7 +6109,7 @@ "version": "1.1.0", "bundled": true, "requires": { - "minipass": "2.2.4" + "minipass": "2.3.3" } }, "mkdirp": { @@ -5953,7 +6134,7 @@ "bundled": true, "requires": { "debug": "2.6.9", - "iconv-lite": "0.4.19", + "iconv-lite": "0.4.23", "sax": "1.2.4" } }, @@ -5967,10 +6148,10 @@ "nopt": "4.0.1", "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.7", + "rc": "1.2.8", "rimraf": "2.6.2", "semver": "5.5.0", - "tar": "4.4.2" + "tar": "4.4.4" } }, "nopt": { @@ -5997,7 +6178,7 @@ "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "1.1.4", + "are-we-there-yet": "1.1.5", "console-control-strings": "1.1.0", "gauge": "2.7.4", "set-blocking": "2.0.0" @@ -6054,10 +6235,10 @@ } }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "0.5.1", + "deep-extend": "0.6.0", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -6071,7 +6252,7 @@ "inherits": "2.0.3", "isarray": "1.0.0", "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } @@ -6084,7 +6265,11 @@ } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", "bundled": true }, "sax": { @@ -6116,7 +6301,7 @@ "version": "1.1.1", "bundled": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, "strip-ansi": { @@ -6131,22 +6316,16 @@ "bundled": true }, "tar": { - "version": "4.4.2", + "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.1", "safe-buffer": "5.1.2", "yallist": "3.0.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "bundled": true - } } }, "util-deprecate": { @@ -6154,7 +6333,7 @@ "bundled": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "requires": { "string-width": "1.0.2" @@ -6214,17 +6393,28 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, "har-validator": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, "requires": { "ajv": "5.5.2", "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", @@ -6252,6 +6442,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", @@ -6313,9 +6509,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": { @@ -6342,10 +6538,11 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { "assert-plus": "1.0.0", "jsprim": "1.4.1", - "sshpk": "1.14.1" + "sshpk": "1.14.2" } }, "hullabaloo-config-manager": { @@ -6380,9 +6577,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", @@ -6449,14 +6646,14 @@ "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", "dev": true, "requires": { - "moment": "2.22.1", + "moment": "2.22.2", "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==", + "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", @@ -6468,8 +6665,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" @@ -6594,6 +6790,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", @@ -6621,6 +6823,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", @@ -6832,6 +7040,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", @@ -6855,10 +7072,17 @@ "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=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-url": { "version": "1.2.4", @@ -6896,9 +7120,31 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, - "isurl": { + "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.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", + "@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==", @@ -6927,9 +7173,9 @@ "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", @@ -6949,6 +7195,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, "optional": true }, "jsdoc": { @@ -7000,12 +7247,14 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, "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=" + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -7016,7 +7265,8 @@ "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=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, "json5": { "version": "0.5.1", @@ -7037,6 +7287,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -7252,9 +7503,9 @@ "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" }, "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": { @@ -7337,9 +7588,9 @@ "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" @@ -7549,12 +7800,14 @@ "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==" + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true }, "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==", + "dev": true, "requires": { "mime-db": "1.33.0" } @@ -7650,9 +7903,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": { @@ -7734,15 +7987,21 @@ "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.3.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.3.tgz", - "integrity": "sha512-v1J/FLUB9PfGqZLGDBhQqODkbLotP0WtLo9R4EJY2PPu5f5Xg4o0rA8FDlmrjFSv9vBBKcfnOSpfYYuu5RTHqg==", + "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.6.0", + "lolex": "2.7.0", "path-to-regexp": "1.7.0", "text-encoding": "0.6.4" } @@ -7758,7 +8017,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" @@ -7807,9 +8066,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", - "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", + "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", @@ -7824,10 +8083,10 @@ "glob": "7.1.2", "istanbul-lib-coverage": "1.2.0", "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-instrument": "2.2.1", "istanbul-lib-report": "1.1.3", - "istanbul-lib-source-maps": "1.2.3", - "istanbul-reports": "1.4.0", + "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", @@ -7857,12 +8116,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 }, @@ -7919,92 +8173,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, @@ -8058,11 +8226,6 @@ "kind-of": "6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -8125,13 +8288,6 @@ "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": { @@ -8160,18 +8316,6 @@ "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, @@ -8190,11 +8334,6 @@ "requires": { "is-descriptor": "0.1.6" } - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true } } }, @@ -8256,22 +8395,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" + "which": "1.3.1" } }, "debug": { - "version": "2.6.9", + "version": "3.1.0", "bundled": true, "dev": true, "requires": { @@ -8336,11 +8470,6 @@ "kind-of": "6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -8348,14 +8477,6 @@ } } }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, "error-ex": { "version": "1.3.1", "bundled": true, @@ -8364,16 +8485,6 @@ "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, @@ -8395,7 +8506,7 @@ "requires": { "lru-cache": "4.1.3", "shebang-command": "1.2.0", - "which": "1.3.0" + "which": "1.3.1" } } } @@ -8414,6 +8525,14 @@ "to-regex": "3.0.2" }, "dependencies": { + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "bundled": true, @@ -8609,11 +8728,6 @@ "path-is-absolute": "1.0.1" } }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, "graceful-fs": { "version": "4.1.11", "bundled": true, @@ -8640,19 +8754,6 @@ } } }, - "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, @@ -8661,13 +8762,6 @@ "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": { @@ -8679,24 +8773,6 @@ "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, @@ -8731,14 +8807,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, @@ -8800,14 +8868,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, @@ -8842,13 +8902,6 @@ "dev": true, "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } } }, "is-stream": { @@ -8894,20 +8947,6 @@ "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, @@ -8919,6 +8958,11 @@ "supports-color": "3.2.3" }, "dependencies": { + "has-flag": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "supports-color": { "version": "3.2.3", "bundled": true, @@ -8930,7 +8974,7 @@ } }, "istanbul-lib-source-maps": { - "version": "1.2.3", + "version": "1.2.5", "bundled": true, "dev": true, "requires": { @@ -8939,36 +8983,16 @@ "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.4.0", + "version": "1.4.1", "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, @@ -9019,24 +9043,11 @@ } } }, - "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, @@ -9191,16 +9202,6 @@ "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, @@ -9263,13 +9264,6 @@ "dev": true, "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } } }, "object.pick": { @@ -9278,13 +9272,6 @@ "dev": true, "requires": { "isobject": "3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - } } }, "once": { @@ -9468,11 +9455,6 @@ } } }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, "regex-not": { "version": "1.0.2", "bundled": true, @@ -9492,14 +9474,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, @@ -9615,10 +9589,18 @@ "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": { + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "bundled": true, @@ -9681,11 +9663,6 @@ "kind-of": "6.0.2" } }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, "kind-of": { "version": "6.0.2", "bundled": true, @@ -9701,413 +9678,138 @@ "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.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.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" - } - } - } - }, - "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.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", + "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.1", + "os-homedir": "1.0.2", + "rimraf": "2.6.2", + "signal-exit": "3.0.2", + "which": "1.3.1" + } + }, + "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": { - "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" + "is-descriptor": "0.1.6" } } } }, - "to-fast-properties": { - "version": "1.0.3", + "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.1" + } + }, + "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.10", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, "to-object-path": { "version": "0.3.0", "bundled": true, @@ -10134,23 +9836,8 @@ "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, @@ -10247,11 +9934,6 @@ "version": "0.1.4", "bundled": true, "dev": true - }, - "isobject": { - "version": "3.0.1", - "bundled": true, - "dev": true } } }, @@ -10285,7 +9967,7 @@ } }, "which": { - "version": "1.3.0", + "version": "1.3.1", "bundled": true, "dev": true, "requires": { @@ -10317,6 +9999,11 @@ "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, @@ -10334,6 +10021,14 @@ "is-fullwidth-code-point": "1.0.0", "strip-ansi": "3.0.1" } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } } } }, @@ -10381,11 +10076,6 @@ "yargs-parser": "9.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, "camelcase": { "version": "4.1.0", "bundled": true, @@ -10401,14 +10091,6 @@ "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, @@ -10439,7 +10121,8 @@ "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true }, "object-assign": { "version": "4.1.1", @@ -10476,9 +10159,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", @@ -10634,9 +10317,9 @@ "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" @@ -10648,7 +10331,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "1.3.0" } }, "p-timeout": { @@ -10746,7 +10429,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "1.3.2" } }, "parse-ms": { @@ -10822,7 +10505,8 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "pify": { "version": "3.0.0", @@ -10872,7 +10556,7 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.1", + "error-ex": "1.3.2", "json-parse-better-errors": "1.0.2" } } @@ -10908,9 +10592,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", @@ -10927,44 +10611,44 @@ } }, "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", + "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": { - "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.5.7", + "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": "5.7.1", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.6", + "core-js": "2.5.7", "espurify": "1.8.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", + "core-js": "2.5.7", "estraverse": "4.2.0" } }, @@ -10973,22 +10657,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.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": { - "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-util-string-width": "1.2.0" } }, "power-assert-renderer-base": { @@ -10997,11 +10681,11 @@ "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", + "core-js": "2.5.7", "diff-match-patch": "1.0.1", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -11009,30 +10693,30 @@ } }, "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", + "core-js": "2.5.7", "power-assert-renderer-base": "1.1.1", - "power-assert-util-string-width": "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-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": { @@ -11054,19 +10738,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.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.6.tgz", + "integrity": "sha512-p5eqCNiohWZN++7aJXUVj0JgLqHCPLf9GLIcLBHGNWs4Y9FJOPs6+KNO2WT0udJIQJTbeZFrJkjzjcb8fkAYYQ==", "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.1" }, "dependencies": { "parse-ms": { @@ -11110,7 +10793,7 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "8.10.17", + "@types/node": "8.10.20", "long": "4.0.0" } }, @@ -11133,12 +10816,14 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true }, "query-string": { "version": "5.1.1", @@ -11171,12 +10856,12 @@ } }, "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", + "deep-extend": "0.6.0", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -11305,6 +10990,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", @@ -11328,7 +11022,7 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.7", + "rc": "1.2.8", "safe-buffer": "5.1.2" } }, @@ -11338,7 +11032,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.7" + "rc": "1.2.8" } }, "regjsgen": { @@ -11394,6 +11088,7 @@ "version": "2.87.0", "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, "requires": { "aws-sign2": "0.7.0", "aws4": "1.7.0", @@ -11414,7 +11109,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": { @@ -11525,6 +11220,14 @@ "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.3" + } + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -11553,19 +11256,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": { @@ -11606,7 +11311,7 @@ "lodash.isplainobject": "4.0.6", "lodash.isstring": "4.0.1", "lodash.mergewith": "4.6.1", - "postcss": "6.0.22", + "postcss": "6.0.23", "srcset": "1.0.0", "xtend": "4.0.1" } @@ -11695,8 +11400,8 @@ "@sinonjs/formatio": "2.0.0", "diff": "3.5.0", "lodash.get": "4.4.2", - "lolex": "2.6.0", - "nise": "1.3.3", + "lolex": "2.7.0", + "nise": "1.4.2", "supports-color": "5.4.0", "type-detect": "4.0.8" } @@ -11858,7 +11563,7 @@ "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "buffer-from": "1.0.0", + "buffer-from": "1.1.0", "source-map": "0.6.1" }, "dependencies": { @@ -11932,9 +11637,10 @@ } }, "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=", + "dev": true, "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -11943,6 +11649,7 @@ "ecc-jsbn": "0.1.1", "getpass": "0.1.7", "jsbn": "0.1.1", + "safer-buffer": "2.1.2", "tweetnacl": "0.14.5" } }, @@ -11998,6 +11705,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" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -12011,7 +11731,7 @@ "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.3.0.tgz", "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -12067,7 +11787,7 @@ "dev": true, "requires": { "component-emitter": "1.2.1", - "cookiejar": "2.1.1", + "cookiejar": "2.1.2", "debug": "3.1.0", "extend": "3.0.1", "form-data": "2.3.2", @@ -12103,7 +11823,7 @@ "requires": { "arrify": "1.0.1", "indent-string": "3.2.0", - "js-yaml": "3.11.0", + "js-yaml": "3.12.0", "serialize-error": "2.1.0", "strip-ansi": "4.0.0" }, @@ -12159,31 +11879,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", @@ -12316,6 +12060,7 @@ "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, "requires": { "punycode": "1.4.1" } @@ -12347,6 +12092,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "5.1.2" } @@ -12355,6 +12101,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, "optional": true }, "type-check": { @@ -12377,12 +12124,6 @@ "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", @@ -12538,13 +12279,13 @@ "requires": { "array-filter": "1.0.0", "indexof": "0.0.1", - "object-keys": "1.0.11" + "object-keys": "1.0.12" } }, "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": { @@ -12607,6 +12348,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", @@ -12647,9 +12405,10 @@ "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==", + "dev": true }, "validate-npm-package-license": { "version": "3.0.3", @@ -12665,6 +12424,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, "requires": { "assert-plus": "1.0.0", "core-util-is": "1.0.2", @@ -12678,9 +12438,9 @@ "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" @@ -12802,9 +12562,9 @@ } }, "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", diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 9c5e4a0036e..164ce202ee8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ }, "dependencies": { "extend": "^3.0", - "google-gax": "^0.16.0", + "google-gax": "^0.17.0", "lodash.merge": "^4.6.0", "lodash.union": "^4.6.0" }, diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js new file mode 100644 index 00000000000..221e0d2eee1 --- /dev/null +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -0,0 +1,92 @@ +// 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('MetricServiceSmokeTest', () => { + if (!process.env.GCLOUD_PROJECT) { + throw new Error("Usage: GCLOUD_PROJECT= node #{$0}"); + } + var projectId = process.env.GCLOUD_PROJECT; + + it('successfully makes a call to the service using promises', done => { + const monitoring = require('../src'); + + var client = new monitoring.v3.MetricServiceClient({ + // optional auth parameters. + }); + + // Iterate over all elements. + var formattedName = client.projectPath(projectId); + + client.listMonitoredResourceDescriptors({name: formattedName}) + .then(responses => { + var resources = responses[0]; + for (let i = 0; i < resources.length; i += 1) { + console.log(resources[i]); + } + }) + .then(done) + .catch(done); + }); + + it('successfully makes a call to the service using callbacks', done => { + const monitoring = require('../src'); + + var client = new monitoring.v3.MetricServiceClient({ + // optional auth parameters. + }); + + // Or obtain the paged response. + var formattedName = client.projectPath(projectId); + + + 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) { + console.log(resources[i]); + } + if (nextRequest) { + // Fetch the next page. + return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + } + } + client.listMonitoredResourceDescriptors({name: formattedName}, options) + .then(callback) + .then(done) + .catch(done); + }); + + it('successfully makes a call to the service using streaming', done => { + const monitoring = require('../src'); + + var client = new monitoring.v3.MetricServiceClient({ + // optional auth parameters. + }); + + var formattedName = client.projectPath(projectId); + client.listMonitoredResourceDescriptorsStream({name: formattedName}) + .on('data', element => { + console.log(element); + }) + .on('error', done) + .on('end', done); + }); +}); diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 755bde74bbe..47c803230ba 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -79,14 +79,14 @@ class AlertPolicyServiceClient { // 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; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index a877b0212c3..7d5172fe633 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js @@ -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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 8e1750cb22d..733bf2b9e35 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js @@ -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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js new file mode 100644 index 00000000000..9b52887e73f --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js @@ -0,0 +1,188 @@ +// 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. + +/** + * The protocol for the `CreateAlertPolicy` request. + * + * @property {string} name + * The project in which to create the alerting policy. The format is + * `projects/[PROJECT_ID]`. + * + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. The alerting + * policy that is returned will have a name that contains a normalized + * representation of this name as a prefix but adds a suffix of the form + * `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. + * + * @property {Object} alertPolicy + * The requested alerting policy. You should omit the `name` field in this + * policy. The name will be returned in the new policy, including + * a new [ALERT_POLICY_ID] value. + * + * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} + * + * @typedef CreateAlertPolicyRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} + */ +var CreateAlertPolicyRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `GetAlertPolicy` request. + * + * @property {string} name + * The alerting policy to retrieve. The format is + * + * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + * + * @typedef GetAlertPolicyRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} + */ +var GetAlertPolicyRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `ListAlertPolicies` request. + * + * @property {string} name + * The project whose alert policies are to be listed. The format is + * + * projects/[PROJECT_ID] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * GetAlertPolicy + * operation, instead. + * + * @property {string} filter + * If provided, this field specifies the criteria that must be met by + * alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * @property {string} orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of field references as the `filter` field. Entries can be + * prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * @property {number} pageSize + * The maximum number of results to return in a single response. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * + * @typedef ListAlertPoliciesRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListAlertPoliciesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} + */ +var ListAlertPoliciesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `ListAlertPolicies` response. + * + * @property {Object[]} alertPolicies + * The returned alert policies. + * + * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} + * + * @property {string} nextPageToken + * If there might be more results than were returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListAlertPoliciesResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListAlertPoliciesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} + */ +var ListAlertPoliciesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `UpdateAlertPolicy` request. + * + * @property {Object} updateMask + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @property {Object} alertPolicy + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * + * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} + * + * @typedef UpdateAlertPolicyRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UpdateAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} + */ +var UpdateAlertPolicyRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `DeleteAlertPolicy` request. + * + * @property {string} name + * The alerting policy to delete. The format is: + * + * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + * + * For more information, see AlertPolicy. + * + * @typedef DeleteAlertPolicyRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} + */ +var DeleteAlertPolicyRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js new file mode 100644 index 00000000000..b1e42a5b7f9 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js @@ -0,0 +1,216 @@ +// 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. + +/** + * The `ListGroup` request. + * + * @property {string} name + * The project whose groups are to be listed. The format is + * `"projects/{project_id_or_number}"`. + * + * @property {string} childrenOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups whose `parentName` field contains the group + * name. If no groups have this parent, the results are empty. + * + * @property {string} ancestorsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * + * @property {string} descendantsOfGroup + * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `childrenOfGroup` filter, and includes + * children-of-children, and so forth. + * + * @property {number} pageSize + * A positive number that is the maximum number of results to return. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @typedef ListGroupsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListGroupsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var ListGroupsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListGroups` response. + * + * @property {Object[]} group + * The groups that match the specified filters. + * + * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListGroupsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListGroupsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var ListGroupsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetGroup` request. + * + * @property {string} name + * The group to retrieve. The format is + * `"projects/{project_id_or_number}/groups/{group_id}"`. + * + * @typedef GetGroupRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var GetGroupRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `CreateGroup` request. + * + * @property {string} name + * The project in which to create the group. The format is + * `"projects/{project_id_or_number}"`. + * + * @property {Object} group + * A group definition. It is an error to define the `name` field because + * the system assigns the name. + * + * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} + * + * @property {boolean} validateOnly + * If true, validate this request but do not create the group. + * + * @typedef CreateGroupRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var CreateGroupRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `UpdateGroup` request. + * + * @property {Object} group + * The new definition of the group. All fields of the existing group, + * excepting `name`, are replaced with the corresponding fields of this group. + * + * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} + * + * @property {boolean} validateOnly + * If true, validate this request but do not update the existing group. + * + * @typedef UpdateGroupRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UpdateGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var UpdateGroupRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `DeleteGroup` request. You can only delete a group if it has no children. + * + * @property {string} name + * The group to delete. The format is + * `"projects/{project_id_or_number}/groups/{group_id}"`. + * + * @typedef DeleteGroupRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var DeleteGroupRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListGroupMembers` request. + * + * @property {string} name + * The group whose members are listed. The format is + * `"projects/{project_id_or_number}/groups/{group_id}"`. + * + * @property {number} pageSize + * A positive number that is the maximum number of results to return. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @property {string} filter + * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing + * the members to be returned. The filter may reference the type, labels, and + * metadata of monitored resources that comprise the group. + * For example, to return only resources representing Compute Engine VM + * instances, use this filter: + * + * resource.type = "gce_instance" + * + * @property {Object} interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} + * + * @typedef ListGroupMembersRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListGroupMembersRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var ListGroupMembersRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListGroupMembers` response. + * + * @property {Object[]} members + * A set of monitored resources in the group. + * + * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is + * set to a non-empty value. To see the additional results, use that value as + * `pageToken` in the next call to this method. + * + * @property {number} totalSize + * The total number of elements matching this request. + * + * @typedef ListGroupMembersResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListGroupMembersResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} + */ +var ListGroupMembersResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js new file mode 100644 index 00000000000..63e6b60320e --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -0,0 +1,346 @@ +// 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. + +/** + * The `ListMonitoredResourceDescriptors` request. + * + * @property {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * + * @property {string} filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing + * the descriptors to be returned. The filter can reference + * the descriptor's type and labels. For example, the + * following filter returns only Google Compute Engine descriptors + * that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label:id + * + * @property {number} pageSize + * A positive number that is the maximum number of results to return. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @typedef ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var ListMonitoredResourceDescriptorsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListMonitoredResourcDescriptors` response. + * + * @property {Object[]} resourceDescriptors + * The monitored resource descriptors that are available to this project + * and that match `filter`, if present. + * + * This object should have the same structure as [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var ListMonitoredResourceDescriptorsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetMonitoredResourceDescriptor` request. + * + * @property {string} name + * The monitored resource descriptor to get. The format is + * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. + * The `{resource_type}` is a predefined type, such as + * `cloudsql_database`. + * + * @typedef GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetMonitoredResourceDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var GetMonitoredResourceDescriptorRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListMetricDescriptors` request. + * + * @property {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * + * @property {string} filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * + * @property {number} pageSize + * A positive number that is the maximum number of results to return. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @typedef ListMetricDescriptorsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListMetricDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var ListMetricDescriptorsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListMetricDescriptors` response. + * + * @property {Object[]} metricDescriptors + * The metric descriptors that are available to the project + * and that match the value of `filter`, if present. + * + * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListMetricDescriptorsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListMetricDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var ListMetricDescriptorsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetMetricDescriptor` request. + * + * @property {string} name + * The metric descriptor on which to execute the request. The format is + * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + * An example value of `{metric_id}` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * + * @typedef GetMetricDescriptorRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var GetMetricDescriptorRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `CreateMetricDescriptor` request. + * + * @property {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * + * @property {Object} metricDescriptor + * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) + * descriptor. + * + * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} + * + * @typedef CreateMetricDescriptorRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var CreateMetricDescriptorRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `DeleteMetricDescriptor` request. + * + * @property {string} name + * The metric descriptor on which to execute the request. The format is + * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. + * An example of `{metric_id}` is: + * `"custom.googleapis.com/my_test_metric"`. + * + * @typedef DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var DeleteMetricDescriptorRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListTimeSeries` request. + * + * @property {string} name + * The project on which to execute the request. The format is + * "projects/{project_id_or_number}". + * + * @property {string} filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * series should be returned. The filter must specify a single metric type, + * and can additionally specify metric labels and other information. For + * example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.label.instance_name = "my-instance-name" + * + * @property {Object} interval + * The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * + * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} + * + * @property {Object} aggregation + * By default, the raw time series data is returned. + * Use this field to combine multiple time series for different + * views of the data. + * + * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} + * + * @property {string} orderBy + * Specifies the order in which the points of the time series should + * be returned. By default, results are not ordered. Currently, + * this field must be left blank. + * + * @property {number} view + * Specifies which information is returned about the time series. + * + * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} + * + * @property {number} pageSize + * A positive number that is the maximum number of results to return. + * When `view` field sets to `FULL`, it limits the number of `Points` server + * will return; if `view` field is `HEADERS`, it limits the number of + * `TimeSeries` server will return. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @typedef ListTimeSeriesRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListTimeSeriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var ListTimeSeriesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Controls which fields are returned by `ListTimeSeries`. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ + TimeSeriesView: { + + /** + * Returns the identity of the metric(s), the time series, + * and the time series data. + */ + FULL: 0, + + /** + * Returns the identity of the metric and the time series resource, + * but not the time series data. + */ + HEADERS: 1 + } +}; + +/** + * The `ListTimeSeries` response. + * + * @property {Object[]} timeSeries + * One or more time series that match the filter included in the request. + * + * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListTimeSeriesResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListTimeSeriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var ListTimeSeriesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `CreateTimeSeries` request. + * + * @property {string} name + * The project on which to execute the request. The format is + * `"projects/{project_id_or_number}"`. + * + * @property {Object[]} timeSeries + * The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} + * + * @typedef CreateTimeSeriesRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateTimeSeriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var CreateTimeSeriesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Describes the result of a failed request to write data to a time series. + * + * @property {Object} timeSeries + * The time series, including the `Metric`, `MonitoredResource`, + * and `Point`s (including timestamp and value) that resulted + * in the error. This field provides all of the context that + * would be needed to retry the operation. + * + * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} + * + * @property {Object} status + * The status of the requested write operation. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * + * @typedef CreateTimeSeriesError + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateTimeSeriesError definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} + */ +var CreateTimeSeriesError = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js new file mode 100644 index 00000000000..4e1d52a18d5 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js @@ -0,0 +1,328 @@ +// 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. + +/** + * The `ListNotificationChannelDescriptors` request. + * + * @property {string} name + * The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID] + * + * Note that this names the parent container in which to look for the + * descriptors; to retrieve a single descriptor by name, use the + * GetNotificationChannelDescriptor + * operation, instead. + * + * @property {number} pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * @property {string} pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * @typedef ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListNotificationChannelDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var ListNotificationChannelDescriptorsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListNotificationChannelDescriptors` response. + * + * @property {Object[]} channelDescriptors + * The monitored resource descriptors supported for the specified + * project, optionally filtered. + * + * This object should have the same structure as [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} + * + * @property {string} nextPageToken + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * @typedef ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListNotificationChannelDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var ListNotificationChannelDescriptorsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetNotificationChannelDescriptor` response. + * + * @property {string} name + * The channel type for which to execute the request. The format is + * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. + * + * @typedef GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetNotificationChannelDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var GetNotificationChannelDescriptorRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `CreateNotificationChannel` request. + * + * @property {string} name + * The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID] + * + * Note that this names the container into which the channel will be + * written. This does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * + * @property {Object} notificationChannel + * The definition of the `NotificationChannel` to create. + * + * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} + * + * @typedef CreateNotificationChannelRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var CreateNotificationChannelRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListNotificationChannels` request. + * + * @property {string} name + * The project on which to execute the request. The format is + * `projects/[PROJECT_ID]`. That is, this names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * `GetNotificationChannel` operation. + * + * @property {string} filter + * If provided, this field specifies the criteria that must be met by + * notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * @property {string} orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of fields as in `filter`. Entries can be prefixed with + * a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * @property {number} pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * @property {string} pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * @typedef ListNotificationChannelsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListNotificationChannelsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var ListNotificationChannelsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListNotificationChannels` response. + * + * @property {Object[]} notificationChannels + * The notification channels defined for the specified project. + * + * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} + * + * @property {string} nextPageToken + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * @typedef ListNotificationChannelsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListNotificationChannelsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var ListNotificationChannelsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetNotificationChannel` request. + * + * @property {string} name + * The channel for which to execute the request. The format is + * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + * + * @typedef GetNotificationChannelRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var GetNotificationChannelRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `UpdateNotificationChannel` request. + * + * @property {Object} updateMask + * The fields to update. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @property {Object} notificationChannel + * A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * + * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} + * + * @typedef UpdateNotificationChannelRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UpdateNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var UpdateNotificationChannelRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `DeleteNotificationChannel` request. + * + * @property {string} name + * The channel for which to execute the request. The format is + * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + * + * @property {boolean} force + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, channels that are still referenced by an existing + * alerting policy will fail to be deleted in a delete operation. + * + * @typedef DeleteNotificationChannelRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var DeleteNotificationChannelRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `SendNotificationChannelVerificationCode` request. + * + * @property {string} name + * The notification channel to which to send a verification code. + * + * @typedef SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.SendNotificationChannelVerificationCodeRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var SendNotificationChannelVerificationCodeRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetNotificationChannelVerificationCode` request. + * + * @property {string} name + * The notification channel for which a verification code is to be generated + * and retrieved. This must name a channel that is already verified; if + * the specified channel is not verified, the request will fail. + * + * @property {Object} expireTime + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @typedef GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetNotificationChannelVerificationCodeRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var GetNotificationChannelVerificationCodeRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetNotificationChannelVerificationCode` request. + * + * @property {string} code + * The verification code, which may be used to verify other channels + * that have an equivalent identity (i.e. other channels of the same + * type with the same fingerprint such as other email channels with + * the same email address or other sms channels with the same number). + * + * @property {Object} expireTime + * The expiration time associated with the code that was returned. If + * an expiration was provided in the request, this is the minimum of the + * requested expiration in the request and the max permitted expiration. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @typedef GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetNotificationChannelVerificationCodeResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var GetNotificationChannelVerificationCodeResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `VerifyNotificationChannel` request. + * + * @property {string} name + * The notification channel to verify. + * + * @property {string} code + * The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * + * @typedef VerifyNotificationChannelRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.VerifyNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} + */ +var VerifyNotificationChannelRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js new file mode 100644 index 00000000000..565fe868d90 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js @@ -0,0 +1,198 @@ +// 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. + +/** + * The protocol for the `ListUptimeCheckConfigs` request. + * + * @property {string} parent + * The project whose uptime check configurations are listed. The format is + * + * `projects/[PROJECT_ID]`. + * + * @property {number} pageSize + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * + * @typedef ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListUptimeCheckConfigsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var ListUptimeCheckConfigsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `ListUptimeCheckConfigs` response. + * + * @property {Object[]} uptimeCheckConfigs + * The returned uptime check configurations. + * + * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} + * + * @property {string} nextPageToken + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * + * @typedef ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListUptimeCheckConfigsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var ListUptimeCheckConfigsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `GetUptimeCheckConfig` request. + * + * @property {string} name + * The uptime check configuration to retrieve. The format is + * + * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * + * @typedef GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var GetUptimeCheckConfigRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `CreateUptimeCheckConfig` request. + * + * @property {string} parent + * The project in which to create the uptime check. The format is: + * + * `projects/[PROJECT_ID]`. + * + * @property {Object} uptimeCheckConfig + * The new uptime check configuration. + * + * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} + * + * @typedef CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var CreateUptimeCheckConfigRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `UpdateUptimeCheckConfig` request. + * + * @property {Object} updateMask + * Optional. If present, only the listed fields in the current uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @property {Object} uptimeCheckConfig + * Required. If an `"updateMask"` has been specified, this field gives + * the values for the set of fields mentioned in the `"updateMask"`. If an + * `"updateMask"` has not been given, this uptime check configuration replaces + * the current configuration. If a field is mentioned in `"updateMask`" but + * the corresonding field is omitted in this partial uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * + * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} + * + * @typedef UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UpdateUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var UpdateUptimeCheckConfigRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `DeleteUptimeCheckConfig` request. + * + * @property {string} name + * The uptime check configuration to delete. The format is + * + * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * + * @typedef DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var DeleteUptimeCheckConfigRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `ListUptimeCheckIps` request. + * + * @property {number} pageSize + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * + * @typedef ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListUptimeCheckIpsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var ListUptimeCheckIpsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The protocol for the `ListUptimeCheckIps` response. + * + * @property {Object[]} uptimeCheckIps + * The returned list of IP addresses (including region and location) that the + * checkers run from. + * + * This object should have the same structure as [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} + * + * @property {string} nextPageToken + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * NOTE: this field is not yet implemented + * + * @typedef ListUptimeCheckIpsResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListUptimeCheckIpsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} + */ +var ListUptimeCheckIpsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js new file mode 100644 index 00000000000..5e3640e90d8 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 5fb4152d32b..4f22c4df9cd 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -82,14 +82,14 @@ class GroupServiceClient { // 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; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 46c9990774f..27e48c2ff54 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -72,14 +72,14 @@ class MetricServiceClient { // 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; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 4f7074dc820..5841ae74172 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -72,14 +72,14 @@ class NotificationChannelServiceClient { // 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; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 91bd4dd42b9..8d4db920d03 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -78,14 +78,14 @@ class UptimeCheckServiceClient { // 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; // Determine the client header string. var clientHeader = [ - `gl-node/${process.version.node}`, + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, `gapic/${VERSION}`, diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py new file mode 100644 index 00000000000..ca3e6fd3fb5 --- /dev/null +++ b/packages/google-cloud-monitoring/synth.py @@ -0,0 +1,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() + +version = 'v3' + +library = gapic.node_library( + 'monitoring', version, + config_path="/google/monitoring/" + "artman_monitoring.yaml") + +# skip index, protos, package.json, and README.md +s.copy( + library, + excludes=['package.json', 'README.md', 'src/index.js'], +) + +# +# Node.js specific cleanup +# +subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'run', 'prettier']) +subprocess.run(['npm', 'run', 'lint']) From cf7db381512124b3a0c1b249c989b88a2e351d95 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 2 Jul 2018 09:17:17 -0700 Subject: [PATCH 092/422] fix: re-generate some lock files (#66) --- .../google-cloud-monitoring/package-lock.json | 4444 ++++++++--------- 1 file changed, 2222 insertions(+), 2222 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 03e756a2083..0d3129b5d64 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/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.49", - "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-lr3GtD4TSCASumaRsQGEktOWIsw=", "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.49", "@babel/parser": "7.0.0-beta.49", "@babel/types": "7.0.0-beta.49", - "lodash": "4.17.10" + "lodash": "^4.17.5" } }, "@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.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": { "debug": { @@ -200,9 +200,9 @@ "integrity": "sha1-t+Oxw/TUz+Eb34yJ8e/V4WF7h6Y=", "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": { @@ -219,7 +219,7 @@ "integrity": "sha512-htrsRaQX8Iixlsek8zQU7tE8wcsTQJ5UhZkSPEA8slCDAisKpC/2VgU/ucPn32M5/LjGGXRaUEKvEw1Wiuu4zQ==", "dev": true, "requires": { - "arrify": "1.0.1" + "arrify": "^1.0.1" } }, "@google-cloud/nodejs-repo-tools": { @@ -236,7 +236,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", @@ -256,9 +256,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": { @@ -279,33 +279,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": { @@ -313,9 +313,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": { @@ -338,7 +338,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -351,7 +351,7 @@ "bundled": true, "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -379,9 +379,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": { @@ -389,14 +389,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": { @@ -404,7 +404,7 @@ "bundled": true, "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -412,8 +412,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": { @@ -421,11 +421,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": { @@ -433,15 +433,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": { @@ -449,10 +449,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": { @@ -470,7 +470,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -479,9 +479,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": { @@ -494,9 +494,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": { @@ -511,8 +511,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": { @@ -520,11 +520,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": { @@ -533,8 +533,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": { @@ -576,8 +576,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": { @@ -603,7 +603,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "detect-indent": { @@ -611,7 +611,7 @@ "bundled": true, "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "error-ex": { @@ -619,7 +619,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { @@ -637,13 +637,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": { @@ -651,9 +651,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" } } } @@ -663,7 +663,7 @@ "bundled": true, "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -671,7 +671,7 @@ "bundled": true, "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extglob": { @@ -679,7 +679,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "filename-regex": { @@ -692,11 +692,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": { @@ -704,9 +704,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": { @@ -714,7 +714,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -727,7 +727,7 @@ "bundled": true, "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreground-child": { @@ -735,8 +735,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": { @@ -759,12 +759,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": { @@ -772,8 +772,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": { @@ -781,7 +781,7 @@ "bundled": true, "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "globals": { @@ -799,10 +799,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": { @@ -810,7 +810,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -820,7 +820,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -843,8 +843,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -857,7 +857,7 @@ "bundled": true, "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -880,7 +880,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-dotfile": { @@ -893,7 +893,7 @@ "bundled": true, "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -911,7 +911,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -919,7 +919,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -927,7 +927,7 @@ "bundled": true, "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-number": { @@ -935,7 +935,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-posix-bracket": { @@ -986,7 +986,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -994,13 +994,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": { @@ -1008,10 +1008,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": { @@ -1019,7 +1019,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -1029,11 +1029,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": { @@ -1051,7 +1051,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "js-tokens": { @@ -1069,7 +1069,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -1083,7 +1083,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -1091,11 +1091,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": { @@ -1103,8 +1103,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": { @@ -1129,7 +1129,7 @@ "bundled": true, "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -1137,8 +1137,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "md5-hex": { @@ -1146,7 +1146,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -1159,7 +1159,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -1167,7 +1167,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } }, "micromatch": { @@ -1175,19 +1175,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": { @@ -1200,7 +1200,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1226,10 +1226,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": { @@ -1237,7 +1237,7 @@ "bundled": true, "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -1245,7 +1245,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -1263,8 +1263,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": { @@ -1272,7 +1272,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -1280,8 +1280,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -1294,9 +1294,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": { @@ -1314,7 +1314,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "parse-glob": { @@ -1322,10 +1322,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": { @@ -1333,7 +1333,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -1341,7 +1341,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -1364,9 +1364,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": { @@ -1384,7 +1384,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -1392,7 +1392,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -1400,8 +1400,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" } } } @@ -1421,8 +1421,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": { @@ -1430,7 +1430,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -1438,7 +1438,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1448,7 +1448,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1458,9 +1458,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": { @@ -1468,8 +1468,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": { @@ -1477,8 +1477,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" } } } @@ -1493,7 +1493,7 @@ "bundled": true, "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -1516,7 +1516,7 @@ "bundled": true, "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -1540,7 +1540,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -1548,7 +1548,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "semver": { @@ -1566,7 +1566,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -1594,12 +1594,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": { @@ -1607,7 +1607,7 @@ "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -1625,8 +1625,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": { @@ -1644,7 +1644,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1654,7 +1654,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -1662,7 +1662,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -1680,11 +1680,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": { @@ -1703,9 +1703,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": { @@ -1714,9 +1714,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" } } @@ -1733,8 +1733,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": { @@ -1742,7 +1742,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -1766,8 +1766,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": { @@ -1775,9 +1775,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" } } } @@ -1792,9 +1792,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": { @@ -1812,18 +1812,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": { @@ -1831,9 +1831,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": { @@ -1841,9 +1841,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" } } } @@ -1855,7 +1855,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -1873,9 +1873,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" } }, "string-width": { @@ -1884,8 +1884,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": { @@ -1894,7 +1894,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "yargs": { @@ -1903,18 +1903,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" } } } @@ -1925,10 +1925,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": { @@ -1943,9 +1943,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": { @@ -1954,7 +1954,7 @@ "integrity": "sha1-2oeaaC/zOjcBEEbxPWJ/Z8c7hPY=", "dev": true, "requires": { - "parse-ms": "0.1.2" + "parse-ms": "^0.1.0" } }, "strip-ansi": { @@ -1970,8 +1970,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": { @@ -2004,8 +2004,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": { @@ -2074,7 +2074,7 @@ "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "5.7.1" + "acorn": "^5.0.3" } }, "ajv": { @@ -2083,10 +2083,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": 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" + "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": { @@ -2101,9 +2101,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": { @@ -2112,7 +2112,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2129,7 +2129,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -2150,8 +2150,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": { @@ -2160,7 +2160,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2182,7 +2182,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.2" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -2191,8 +2191,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": { @@ -2201,7 +2201,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "array-unique": { @@ -2216,9 +2216,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": { @@ -2227,7 +2227,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "extglob": { @@ -2236,7 +2236,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-extglob": { @@ -2251,7 +2251,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "kind-of": { @@ -2260,7 +2260,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "micromatch": { @@ -2269,19 +2269,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" } } } @@ -2292,7 +2292,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "argv": { @@ -2350,7 +2350,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": { @@ -2373,8 +2373,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": { @@ -2400,7 +2400,7 @@ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "dev": true, "requires": { - "lodash": "4.17.10" + "lodash": "^4.17.10" } }, "async-each": { @@ -2432,89 +2432,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": { @@ -2539,7 +2539,7 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "2.5.7" + "core-js": "^2.0.0" } }, "globby": { @@ -2548,11 +2548,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": { @@ -2573,7 +2573,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "strip-ansi": { @@ -2582,7 +2582,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2593,11 +2593,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": { @@ -2617,8 +2617,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": { @@ -2627,9 +2627,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": { @@ -2644,11 +2644,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": { @@ -2665,25 +2665,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" } }, "babel-generator": { @@ -2692,14 +2692,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": { @@ -2716,9 +2716,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": { @@ -2727,10 +2727,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": { @@ -2739,9 +2739,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": { @@ -2750,11 +2750,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": { @@ -2763,8 +2763,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": { @@ -2773,8 +2773,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": { @@ -2783,9 +2783,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": { @@ -2794,11 +2794,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": { @@ -2807,8 +2807,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": { @@ -2817,7 +2817,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { @@ -2826,7 +2826,7 @@ "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-espower": { @@ -2835,13 +2835,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": { @@ -2874,9 +2874,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": { @@ -2885,7 +2885,7 @@ "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { @@ -2894,9 +2894,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": { @@ -2905,10 +2905,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": { @@ -2917,12 +2917,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": { @@ -2931,7 +2931,7 @@ "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { @@ -2940,9 +2940,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": { @@ -2951,9 +2951,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": { @@ -2962,9 +2962,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": { @@ -2973,8 +2973,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": { @@ -2983,13 +2983,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": { @@ -2998,7 +2998,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -3009,8 +3009,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": { @@ -3019,11 +3019,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": { @@ -3032,15 +3032,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" } }, "babel-types": { @@ -3049,10 +3049,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": { @@ -3071,13 +3071,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": { @@ -3085,7 +3085,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": { @@ -3093,7 +3093,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": { @@ -3101,7 +3101,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": { @@ -3109,9 +3109,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" } } } @@ -3123,7 +3123,7 @@ "dev": true, "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "binary-extensions": { @@ -3144,13 +3144,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": { @@ -3177,8 +3177,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": { @@ -3187,7 +3187,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3197,7 +3197,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" } }, @@ -3206,16 +3206,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": { @@ -3223,7 +3223,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" } } } @@ -3262,7 +3262,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": { @@ -3277,15 +3277,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": { @@ -3317,9 +3317,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": { @@ -3328,7 +3328,7 @@ "integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "write-file-atomic": { @@ -3337,9 +3337,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" } } } @@ -3350,10 +3350,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": { @@ -3372,7 +3372,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -3392,8 +3392,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" } }, "capture-stack-trace": { @@ -3414,7 +3414,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "0.3.0" + "underscore-contrib": "~0.3.0" } }, "center-align": { @@ -3424,8 +3424,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": { @@ -3434,9 +3434,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": { @@ -3451,15 +3451,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": { @@ -3468,7 +3468,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -3483,7 +3483,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -3505,10 +3505,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": { @@ -3516,7 +3516,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" } } } @@ -3545,7 +3545,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-spinners": { @@ -3560,8 +3560,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": { @@ -3582,8 +3582,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": { @@ -3592,7 +3592,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3608,9 +3608,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": { @@ -3619,7 +3619,7 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "co": { @@ -3634,7 +3634,7 @@ "integrity": "sha1-QT59tvWJOmC5Qs9JLEvsk9tBWrc=", "dev": true, "requires": { - "pinkie-promise": "1.0.0" + "pinkie-promise": "^1.0.0" } }, "code-excerpt": { @@ -3643,7 +3643,7 @@ "integrity": "sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw==", "dev": true, "requires": { - "convert-to-spaces": "1.0.2" + "convert-to-spaces": "^1.0.1" } }, "code-point-at": { @@ -3658,7 +3658,7 @@ "dev": true, "requires": { "argv": "0.0.2", - "request": "2.87.0", + "request": "^2.81.0", "urlgrey": "0.4.4" } }, @@ -3667,8 +3667,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": { @@ -3703,7 +3703,7 @@ "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "dev": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -3740,17 +3740,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": { @@ -3759,7 +3759,7 @@ "integrity": "sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g==", "dev": true, "requires": { - "time-zone": "1.0.0" + "time-zone": "^1.0.0" } } } @@ -3770,12 +3770,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": { @@ -3807,8 +3807,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": { @@ -3827,7 +3827,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "cross-spawn": { @@ -3836,9 +3836,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": { @@ -3853,7 +3853,7 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "1.0.2" + "array-find-index": "^1.0.1" } }, "d": { @@ -3862,7 +3862,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.45" + "es5-ext": "^0.10.9" } }, "dashdash": { @@ -3871,7 +3871,7 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "date-time": { @@ -3904,7 +3904,7 @@ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { - "mimic-response": "1.0.0" + "mimic-response": "^1.0.0" } }, "deep-equal": { @@ -3930,8 +3930,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": { @@ -3939,8 +3939,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": { @@ -3948,7 +3948,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": { @@ -3956,7 +3956,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": { @@ -3964,9 +3964,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" } } } @@ -3977,13 +3977,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": { @@ -3992,12 +3992,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": { @@ -4018,7 +4018,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } } } @@ -4035,7 +4035,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "diff": { @@ -4054,8 +4054,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": { @@ -4064,7 +4064,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-serializer": { @@ -4073,8 +4073,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": { @@ -4097,7 +4097,7 @@ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -4106,8 +4106,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": { @@ -4116,7 +4116,7 @@ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer3": { @@ -4130,10 +4130,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": { @@ -4148,7 +4148,7 @@ "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ecdsa-sig-formatter": { @@ -4156,7 +4156,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": { @@ -4164,8 +4164,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": { @@ -4174,7 +4174,7 @@ "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.2.0" } }, "empower-core": { @@ -4183,7 +4183,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": { @@ -4191,7 +4191,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" } }, "entities": { @@ -4212,7 +4212,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -4221,11 +4221,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": { @@ -4234,9 +4234,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": { @@ -4245,9 +4245,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": { @@ -4262,9 +4262,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": { @@ -4273,12 +4273,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": { @@ -4287,11 +4287,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": { @@ -4300,8 +4300,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": { @@ -4310,10 +4310,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": { @@ -4322,8 +4322,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": { @@ -4346,11 +4346,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": { @@ -4374,10 +4374,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": { @@ -4386,44 +4386,44 @@ "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", "dev": true, "requires": { - "ajv": "6.5.1", - "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": { @@ -4432,10 +4432,10 @@ "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" + "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": { @@ -4450,11 +4450,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" } }, "debug": { @@ -4490,7 +4490,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -4501,7 +4501,7 @@ "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", "dev": true, "requires": { - "get-stdin": "5.0.1" + "get-stdin": "^5.0.1" }, "dependencies": { "get-stdin": { @@ -4518,10 +4518,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": { @@ -4530,7 +4530,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } } } @@ -4541,8 +4541,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": { @@ -4551,8 +4551,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": { @@ -4567,16 +4567,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": { @@ -4585,11 +4585,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": { @@ -4598,7 +4598,7 @@ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" } } } @@ -4609,10 +4609,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": { @@ -4621,17 +4621,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": { @@ -4640,8 +4640,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": { @@ -4655,7 +4655,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": { @@ -4664,7 +4664,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -4673,7 +4673,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -4693,8 +4693,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.45" + "d": "1", + "es5-ext": "~0.10.14" } }, "execa": { @@ -4703,13 +4703,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": { @@ -4717,13 +4717,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": { "define-property": { @@ -4731,7 +4731,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": { @@ -4739,7 +4739,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" } } } @@ -4750,7 +4750,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.4" + "fill-range": "^2.1.0" }, "dependencies": { "fill-range": { @@ -4759,11 +4759,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": { @@ -4772,7 +4772,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "isobject": { @@ -4790,7 +4790,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -4805,8 +4805,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": { @@ -4814,7 +4814,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" } } } @@ -4825,9 +4825,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": { @@ -4835,14 +4835,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": { @@ -4850,7 +4850,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": { @@ -4858,7 +4858,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": { @@ -4866,7 +4866,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": { @@ -4874,7 +4874,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": { @@ -4882,9 +4882,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" } } } @@ -4912,12 +4912,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": { @@ -4938,7 +4938,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -4947,8 +4947,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": { @@ -4963,8 +4963,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": { @@ -4972,10 +4972,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": { @@ -4983,7 +4983,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" } } } @@ -4994,9 +4994,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": { @@ -5005,7 +5005,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -5014,10 +5014,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": { @@ -5031,7 +5031,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" }, "dependencies": { "debug": { @@ -5055,7 +5055,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -5075,9 +5075,9 @@ "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "dev": true, "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 +5091,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 +5100,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 +5110,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": { @@ -5127,8 +5127,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 +5154,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 +5168,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -5232,7 +5232,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -5247,14 +5247,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 +5263,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 +5283,7 @@ "dev": true, "optional": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "^2.1.0" } }, "ignore-walk": { @@ -5292,7 +5292,7 @@ "dev": true, "optional": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { @@ -5301,8 +5301,8 @@ "dev": true, "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -5321,7 +5321,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -5335,7 +5335,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -5348,8 +5348,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 +5358,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -5381,9 +5381,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 +5392,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 +5410,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -5426,8 +5426,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 +5436,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 +5458,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -5479,8 +5479,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 +5501,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 +5521,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 +5536,7 @@ "dev": true, "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -5579,9 +5579,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 +5590,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -5598,7 +5598,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -5613,13 +5613,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 +5634,7 @@ "dev": true, "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { @@ -5672,8 +5672,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" } }, @@ -5712,7 +5712,7 @@ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -5720,12 +5720,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": { @@ -5734,8 +5734,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": { @@ -5744,7 +5744,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "is-extglob": { @@ -5759,7 +5759,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -5769,8 +5769,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": { @@ -5778,7 +5778,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" } } } @@ -5794,7 +5794,7 @@ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "dev": true, "requires": { - "ini": "1.3.5" + "ini": "^1.3.4" } }, "globals": { @@ -5808,13 +5808,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": { @@ -5822,13 +5822,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-gax": { @@ -5836,17 +5836,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": { @@ -5854,8 +5854,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": { @@ -5863,9 +5863,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": { @@ -5874,23 +5874,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": { @@ -5905,7 +5905,7 @@ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { - "prepend-http": "2.0.0" + "prepend-http": "^2.0.0" } } } @@ -5927,10 +5927,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": { @@ -5949,8 +5949,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": { @@ -5961,7 +5961,7 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -6008,7 +6008,7 @@ "version": "1.2.5", "bundled": true, "requires": { - "minipass": "2.3.3" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -6019,26 +6019,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": { @@ -6049,22 +6049,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": { @@ -6079,7 +6079,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -6090,7 +6090,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -6101,15 +6101,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": { @@ -6133,33 +6133,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": { @@ -6170,18 +6170,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": { @@ -6196,7 +6196,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -6211,8 +6211,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": { @@ -6228,40 +6228,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": { @@ -6292,23 +6292,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.2" + "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": { @@ -6319,13 +6319,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": { @@ -6336,7 +6336,7 @@ "version": "1.1.3", "bundled": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -6354,11 +6354,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": { @@ -6367,10 +6367,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": { @@ -6385,7 +6385,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -6402,8 +6402,8 @@ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, "requires": { - "ajv": "5.5.2", - "har-schema": "2.0.0" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" } }, "has": { @@ -6412,7 +6412,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -6421,7 +6421,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-color": { @@ -6454,7 +6454,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": { @@ -6462,9 +6462,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": { @@ -6472,8 +6472,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": { @@ -6481,7 +6481,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" } } } @@ -6504,8 +6504,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": { @@ -6520,12 +6520,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": { @@ -6540,9 +6540,9 @@ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "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": { @@ -6551,20 +6551,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": { @@ -6573,7 +6573,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { @@ -6599,8 +6599,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": { @@ -6625,8 +6625,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": { @@ -6646,8 +6646,8 @@ "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", "dev": true, "requires": { - "moment": "2.22.2", - "sanitize-html": "1.18.2" + "moment": "^2.14.1", + "sanitize-html": "^1.13.0" } }, "inquirer": { @@ -6656,19 +6656,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": { @@ -6689,8 +6689,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": { @@ -6699,7 +6699,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -6710,7 +6710,7 @@ "integrity": "sha1-LHsDFGvB1GvyENCgOXxckatMorA=", "dev": true, "requires": { - "espower-loader": "1.2.2" + "espower-loader": "^1.0.0" } }, "into-stream": { @@ -6719,8 +6719,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": { @@ -6729,7 +6729,7 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -6748,7 +6748,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": { @@ -6756,7 +6756,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" } } } @@ -6773,7 +6773,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -6787,7 +6787,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -6802,7 +6802,7 @@ "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "1.1.3" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -6810,7 +6810,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": { @@ -6818,7 +6818,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" } } } @@ -6834,9 +6834,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": { @@ -6858,7 +6858,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-error": { @@ -6883,7 +6883,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -6891,7 +6891,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": { @@ -6905,7 +6905,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": { @@ -6914,8 +6914,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": { @@ -6929,7 +6929,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": { @@ -6937,7 +6937,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" } } } @@ -6960,7 +6960,7 @@ "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "symbol-observable": "1.2.0" + "symbol-observable": "^1.1.0" } }, "is-odd": { @@ -6968,7 +6968,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": { @@ -6990,7 +6990,7 @@ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -6999,7 +6999,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-plain-obj": { @@ -7013,7 +7013,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": { @@ -7046,7 +7046,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.3" + "has": "^1.0.1" } }, "is-resolvable": { @@ -7140,8 +7140,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": { @@ -7150,8 +7150,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": { @@ -7178,8 +7178,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": { @@ -7188,7 +7188,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "xmlcreate": "^1.0.1" } }, "jsbn": { @@ -7205,17 +7205,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": { @@ -7280,7 +7280,7 @@ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsprim": { @@ -7308,7 +7308,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": { @@ -7316,8 +7316,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": { @@ -7340,7 +7340,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.9" } }, "last-line-stream": { @@ -7349,7 +7349,7 @@ "integrity": "sha1-0bZNafhv8kry0EiDos7uFFIKVgA=", "dev": true, "requires": { - "through2": "2.0.3" + "through2": "^2.0.0" } }, "latest-version": { @@ -7358,7 +7358,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -7373,7 +7373,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": { @@ -7382,8 +7382,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": { @@ -7392,10 +7392,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": { @@ -7412,8 +7412,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": { @@ -7525,7 +7525,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -7534,8 +7534,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": { @@ -7549,8 +7549,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": { @@ -7559,7 +7559,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "map-cache": { @@ -7578,7 +7578,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": { @@ -7593,7 +7593,7 @@ "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.4" } }, "math-random": { @@ -7608,7 +7608,7 @@ "integrity": "sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=", "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -7623,7 +7623,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "meow": { @@ -7632,16 +7632,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": { @@ -7650,8 +7650,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": { @@ -7660,11 +7660,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" } }, "minimist": { @@ -7679,7 +7679,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-type": { @@ -7688,9 +7688,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": { @@ -7711,7 +7711,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "read-pkg": { @@ -7720,9 +7720,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": { @@ -7731,8 +7731,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": { @@ -7741,7 +7741,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } } } @@ -7758,7 +7758,7 @@ "integrity": "sha1-65aDOLXe1c7tgs7AMH3sui2OqZQ=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "merge2": { @@ -7777,19 +7777,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": { @@ -7809,7 +7809,7 @@ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "mimic-fn": { @@ -7829,7 +7829,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": { @@ -7843,8 +7843,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": { @@ -7852,7 +7852,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" } } } @@ -7919,7 +7919,7 @@ "integrity": "sha1-sJ/IWG6qF/gdV1xK0C4Pej9rEQU=", "dev": true, "requires": { - "source-map": "0.1.43" + "source-map": "^0.1.34" }, "dependencies": { "source-map": { @@ -7928,7 +7928,7 @@ "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -7939,10 +7939,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": { @@ -7961,18 +7961,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": { @@ -7999,11 +7999,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": { @@ -8017,10 +8017,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": { @@ -8029,7 +8029,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "normalize-url": { @@ -8038,9 +8038,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": { @@ -8057,7 +8057,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -8071,33 +8071,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.2.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": { @@ -8105,9 +8105,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": { @@ -8125,7 +8125,7 @@ "bundled": true, "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "archy": { @@ -8183,13 +8183,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": { @@ -8197,7 +8197,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -8205,7 +8205,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8213,7 +8213,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8221,9 +8221,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": { @@ -8238,7 +8238,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -8247,16 +8247,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": { @@ -8264,7 +8264,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8279,15 +8279,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": { @@ -8295,9 +8295,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": { @@ -8312,8 +8312,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": { @@ -8321,10 +8321,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": { @@ -8332,7 +8332,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -8343,8 +8343,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": { @@ -8366,8 +8366,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": { @@ -8400,8 +8400,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": { @@ -8432,7 +8432,7 @@ "bundled": true, "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-property": { @@ -8440,8 +8440,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": { @@ -8449,7 +8449,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8457,7 +8457,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8465,9 +8465,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": { @@ -8482,7 +8482,7 @@ "bundled": true, "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "execa": { @@ -8490,13 +8490,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": { @@ -8504,9 +8504,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" } } } @@ -8516,13 +8516,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": { @@ -8538,7 +8538,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -8546,7 +8546,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8556,8 +8556,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": { @@ -8565,7 +8565,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -8575,14 +8575,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": { @@ -8590,7 +8590,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -8598,7 +8598,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -8606,7 +8606,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -8614,7 +8614,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -8622,9 +8622,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": { @@ -8639,10 +8639,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": { @@ -8650,7 +8650,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -8660,9 +8660,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": { @@ -8670,7 +8670,7 @@ "bundled": true, "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "for-in": { @@ -8683,8 +8683,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": { @@ -8692,7 +8692,7 @@ "bundled": true, "dev": true, "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "fs.realpath": { @@ -8720,12 +8720,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": { @@ -8738,10 +8738,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": { @@ -8749,7 +8749,7 @@ "bundled": true, "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -8759,9 +8759,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": { @@ -8769,8 +8769,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": { @@ -8778,7 +8778,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -8798,8 +8798,8 @@ "bundled": true, "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -8817,7 +8817,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-arrayish": { @@ -8835,7 +8835,7 @@ "bundled": true, "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-data-descriptor": { @@ -8843,7 +8843,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-descriptor": { @@ -8851,9 +8851,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": { @@ -8878,7 +8878,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-odd": { @@ -8886,7 +8886,7 @@ "bundled": true, "dev": true, "requires": { - "is-number": "4.0.0" + "is-number": "^4.0.0" }, "dependencies": { "is-number": { @@ -8901,7 +8901,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-stream": { @@ -8944,7 +8944,7 @@ "bundled": true, "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-report": { @@ -8952,10 +8952,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": { @@ -8968,7 +8968,7 @@ "bundled": true, "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -8978,11 +8978,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": { @@ -8990,7 +8990,7 @@ "bundled": true, "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "kind-of": { @@ -8998,7 +8998,7 @@ "bundled": true, "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -9012,7 +9012,7 @@ "bundled": true, "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "load-json-file": { @@ -9020,11 +9020,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": { @@ -9032,8 +9032,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": { @@ -9053,8 +9053,8 @@ "bundled": true, "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "map-cache": { @@ -9067,7 +9067,7 @@ "bundled": true, "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "md5-hex": { @@ -9075,7 +9075,7 @@ "bundled": true, "dev": true, "requires": { - "md5-o-matic": "0.1.1" + "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { @@ -9088,7 +9088,7 @@ "bundled": true, "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "merge-source-map": { @@ -9096,7 +9096,7 @@ "bundled": true, "dev": true, "requires": { - "source-map": "0.6.1" + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -9111,19 +9111,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": { @@ -9143,7 +9143,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -9156,8 +9156,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": { @@ -9165,7 +9165,7 @@ "bundled": true, "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -9188,18 +9188,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": { @@ -9214,10 +9214,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": { @@ -9225,7 +9225,7 @@ "bundled": true, "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -9243,9 +9243,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": { @@ -9253,7 +9253,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9263,7 +9263,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.pick": { @@ -9271,7 +9271,7 @@ "bundled": true, "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "once": { @@ -9279,7 +9279,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "optimist": { @@ -9287,8 +9287,8 @@ "bundled": true, "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" } }, "os-homedir": { @@ -9301,9 +9301,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": { @@ -9316,7 +9316,7 @@ "bundled": true, "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -9324,7 +9324,7 @@ "bundled": true, "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -9337,7 +9337,7 @@ "bundled": true, "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "pascalcase": { @@ -9350,7 +9350,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -9373,9 +9373,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": { @@ -9393,7 +9393,7 @@ "bundled": true, "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-dir": { @@ -9401,7 +9401,7 @@ "bundled": true, "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -9409,8 +9409,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" } } } @@ -9430,9 +9430,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": { @@ -9440,8 +9440,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": { @@ -9449,8 +9449,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" } } } @@ -9460,8 +9460,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": { @@ -9505,7 +9505,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -9513,7 +9513,7 @@ "bundled": true, "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-regex": { @@ -9521,7 +9521,7 @@ "bundled": true, "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "semver": { @@ -9539,10 +9539,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": { @@ -9550,7 +9550,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9560,7 +9560,7 @@ "bundled": true, "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -9583,14 +9583,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": { @@ -9606,7 +9606,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -9614,7 +9614,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -9624,9 +9624,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": { @@ -9634,7 +9634,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -9642,7 +9642,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -9650,7 +9650,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -9658,9 +9658,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": { @@ -9675,7 +9675,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" } }, "source-map": { @@ -9688,11 +9688,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": { @@ -9705,12 +9705,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": { @@ -9718,8 +9718,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": { @@ -9732,8 +9732,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": { @@ -9746,7 +9746,7 @@ "bundled": true, "dev": true, "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "static-extend": { @@ -9754,8 +9754,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": { @@ -9763,7 +9763,7 @@ "bundled": true, "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -9773,8 +9773,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": { @@ -9782,7 +9782,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -9790,7 +9790,7 @@ "bundled": true, "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -9803,11 +9803,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": { @@ -9815,7 +9815,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "to-regex": { @@ -9823,10 +9823,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": { @@ -9834,8 +9834,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": { @@ -9844,9 +9844,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": { @@ -9855,9 +9855,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" } } @@ -9874,10 +9874,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": { @@ -9885,7 +9885,7 @@ "bundled": true, "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -9893,10 +9893,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" } } } @@ -9906,8 +9906,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": { @@ -9915,9 +9915,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": { @@ -9947,7 +9947,7 @@ "bundled": true, "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { @@ -9962,8 +9962,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": { @@ -9971,7 +9971,7 @@ "bundled": true, "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -9995,8 +9995,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": { @@ -10009,7 +10009,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -10017,9 +10017,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": { @@ -10027,7 +10027,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -10042,9 +10042,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": { @@ -10062,18 +10062,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": { @@ -10086,9 +10086,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": { @@ -10096,7 +10096,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" } } } @@ -10106,7 +10106,7 @@ "bundled": true, "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { @@ -10135,9 +10135,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": { @@ -10145,7 +10145,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": { @@ -10153,7 +10153,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" } } } @@ -10168,7 +10168,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": { @@ -10177,8 +10177,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": { @@ -10186,7 +10186,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": { @@ -10195,8 +10195,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": { @@ -10205,7 +10205,7 @@ "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", "dev": true, "requires": { - "symbol-observable": "0.2.4" + "symbol-observable": "^0.2.2" }, "dependencies": { "symbol-observable": { @@ -10223,7 +10223,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -10232,7 +10232,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -10241,8 +10241,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": { @@ -10257,12 +10257,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": { @@ -10289,7 +10289,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": { @@ -10322,7 +10322,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -10331,7 +10331,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.3.0" + "p-limit": "^1.1.0" } }, "p-timeout": { @@ -10340,7 +10340,7 @@ "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { - "p-finally": "1.0.0" + "p-finally": "^1.0.0" } }, "p-try": { @@ -10355,10 +10355,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": { @@ -10367,10 +10367,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": { @@ -10379,17 +10379,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" } } } @@ -10400,10 +10400,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": { @@ -10418,7 +10418,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } } } @@ -10429,7 +10429,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.2" + "error-ex": "^1.2.0" } }, "parse-ms": { @@ -10499,7 +10499,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": { @@ -10525,7 +10525,7 @@ "integrity": "sha1-0dpn9UglY7t89X8oauKCLs+/NnA=", "dev": true, "requires": { - "pinkie": "1.0.0" + "pinkie": "^1.0.0" } }, "pkg-conf": { @@ -10534,8 +10534,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": { @@ -10544,10 +10544,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": { @@ -10556,8 +10556,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" } } } @@ -10568,7 +10568,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "plur": { @@ -10577,7 +10577,7 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true, "requires": { - "irregular-plurals": "1.4.0" + "irregular-plurals": "^1.0.0" } }, "pluralize": { @@ -10597,9 +10597,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": { @@ -10615,11 +10615,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": { @@ -10627,8 +10627,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": { @@ -10636,11 +10636,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": { @@ -10648,8 +10648,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": { @@ -10657,13 +10657,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": { @@ -10671,8 +10671,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": { @@ -10685,11 +10685,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": { @@ -10697,10 +10697,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": { @@ -10708,7 +10708,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": { @@ -10716,7 +10716,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": { @@ -10749,7 +10749,7 @@ "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "1.0.1" + "parse-ms": "^1.0.0" }, "dependencies": { "parse-ms": { @@ -10782,19 +10782,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" } }, "proxyquire": { @@ -10803,9 +10803,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" } }, "pseudomap": { @@ -10831,9 +10831,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": { @@ -10842,9 +10842,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": { @@ -10861,10 +10861,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": { @@ -10881,9 +10881,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": { @@ -10892,7 +10892,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pify": { @@ -10909,8 +10909,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": { @@ -10918,13 +10918,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": { @@ -10933,10 +10933,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": { @@ -10945,8 +10945,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": { @@ -10955,7 +10955,7 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } } } @@ -10978,7 +10978,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "regex-not": { @@ -10986,8 +10986,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": { @@ -10996,7 +10996,7 @@ "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", "dev": true, "requires": { - "define-properties": "1.1.2" + "define-properties": "^1.1.2" } }, "regexpp": { @@ -11011,9 +11011,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": { @@ -11022,8 +11022,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": { @@ -11032,7 +11032,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.8" + "rc": "^1.0.1" } }, "regjsgen": { @@ -11047,7 +11047,7 @@ "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "dev": true, "requires": { - "jsesc": "0.5.0" + "jsesc": "~0.5.0" } }, "release-zalgo": { @@ -11056,7 +11056,7 @@ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", "dev": true, "requires": { - "es6-error": "4.1.1" + "es6-error": "^4.0.1" } }, "remove-trailing-separator": { @@ -11081,7 +11081,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "request": { @@ -11090,26 +11090,26 @@ "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "dev": 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", - "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.0" + "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": { @@ -11136,8 +11136,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": { @@ -11154,7 +11154,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "1.6.0" + "underscore": "~1.6.0" }, "dependencies": { "underscore": { @@ -11177,7 +11177,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -11197,7 +11197,7 @@ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { - "lowercase-keys": "1.0.1" + "lowercase-keys": "^1.0.0" } }, "restore-cursor": { @@ -11206,8 +11206,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": { @@ -11225,7 +11225,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": { @@ -11235,7 +11235,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -11244,7 +11244,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -11253,7 +11253,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "rxjs": { @@ -11283,7 +11283,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": { @@ -11304,16 +11304,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": { @@ -11328,7 +11328,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.5.0" + "semver": "^5.0.3" } }, "serialize-error": { @@ -11354,10 +11354,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": { @@ -11365,7 +11365,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" } } } @@ -11376,7 +11376,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -11397,13 +11397,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": { @@ -11417,7 +11417,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": { @@ -11439,14 +11439,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": { "define-property": { @@ -11454,7 +11454,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": { @@ -11462,7 +11462,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" } } } @@ -11472,9 +11472,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": { @@ -11482,7 +11482,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": { @@ -11490,7 +11490,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": { @@ -11498,7 +11498,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": { @@ -11506,9 +11506,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" } } } @@ -11518,7 +11518,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": { @@ -11526,7 +11526,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" } } } @@ -11537,7 +11537,7 @@ "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "is-plain-obj": "^1.0.0" } }, "source-map": { @@ -11550,11 +11550,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": { @@ -11563,8 +11563,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": { @@ -11586,8 +11586,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": { @@ -11602,8 +11602,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": { @@ -11617,7 +11617,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": { @@ -11632,8 +11632,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": { @@ -11642,15 +11642,15 @@ "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "dev": 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", - "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": { @@ -11664,8 +11664,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": { @@ -11673,7 +11673,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" } } } @@ -11700,9 +11700,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": { @@ -11711,11 +11711,11 @@ "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": { @@ -11723,7 +11723,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": { @@ -11731,9 +11731,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": { @@ -11741,7 +11741,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": { @@ -11756,7 +11756,7 @@ "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.1" } }, "strip-eof": { @@ -11771,7 +11771,7 @@ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "4.0.1" + "get-stdin": "^4.0.1" } }, "strip-json-comments": { @@ -11786,16 +11786,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": { "debug": { @@ -11821,11 +11821,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": { @@ -11840,7 +11840,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11851,8 +11851,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": { @@ -11861,7 +11861,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" }, "dependencies": { "has-flag": { @@ -11884,12 +11884,12 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "6.5.1", - "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": { @@ -11898,10 +11898,10 @@ "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" + "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": { @@ -11934,8 +11934,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": { @@ -11944,7 +11944,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -11961,7 +11961,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "text-encoding": { @@ -11987,8 +11987,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": { @@ -12009,7 +12009,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-fast-properties": { @@ -12023,7 +12023,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": { @@ -12031,7 +12031,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" } } } @@ -12041,10 +12041,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": { @@ -12052,8 +12052,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" } }, "tough-cookie": { @@ -12062,7 +12062,7 @@ "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "dev": true, "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "traverse": { @@ -12094,7 +12094,7 @@ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -12110,7 +12110,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "type-detect": { @@ -12131,9 +12131,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": { @@ -12150,8 +12150,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" } }, @@ -12176,9 +12176,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" } } @@ -12225,10 +12225,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": { @@ -12236,7 +12236,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": { @@ -12244,10 +12244,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" } } } @@ -12258,7 +12258,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "unique-temp-dir": { @@ -12267,8 +12267,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" } }, @@ -12277,9 +12277,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": { @@ -12293,8 +12293,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": { @@ -12302,9 +12302,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": { @@ -12336,16 +12336,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": { @@ -12354,7 +12354,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" }, "dependencies": { "punycode": { @@ -12376,7 +12376,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "url-to-options": { @@ -12396,7 +12396,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": { @@ -12416,8 +12416,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": { @@ -12426,9 +12426,9 @@ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "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": { @@ -12443,7 +12443,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -12458,7 +12458,7 @@ "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-regex": { @@ -12479,8 +12479,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": { @@ -12489,7 +12489,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -12510,8 +12510,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": { @@ -12525,7 +12525,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "write-file-atomic": { @@ -12534,9 +12534,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": { @@ -12545,12 +12545,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": { @@ -12567,8 +12567,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": { @@ -12603,13 +12603,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": { @@ -12618,7 +12618,7 @@ "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { From cb5aca74cad7f85c49130c8462aff84af080dfba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 2 Jul 2018 20:51:38 -0700 Subject: [PATCH 093/422] chore(deps): lock file maintenance (#67) --- .../google-cloud-monitoring/package-lock.json | 160 ++++++++---------- 1 file changed, 72 insertions(+), 88 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 0d3129b5d64..b36e485d83c 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/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.5", "source-map": "^0.5.0", @@ -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.0.0", @@ -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.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=", + "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.1.0", "invariant": "^2.2.0", @@ -195,9 +195,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", @@ -3117,9 +3117,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=", "dev": true, "optional": true, "requires": { @@ -4427,9 +4427,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", @@ -6963,21 +6963,6 @@ "symbol-observable": "^1.1.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", @@ -7130,16 +7115,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" } @@ -7957,16 +7942,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", @@ -10738,9 +10722,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": { @@ -11893,9 +11877,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", @@ -12405,9 +12389,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==", "dev": true }, "validate-npm-package-license": { From c0eed4f7d2b4a819006e521be77e6b53526d519b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 3 Jul 2018 09:40:15 -0700 Subject: [PATCH 094/422] chore(deps): lock file maintenance (#68) --- packages/google-cloud-monitoring/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index b36e485d83c..9aea1c35f86 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -6791,9 +6791,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 396a0e2130433db0a9df9d46e0288cf202d8ea63 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 3 Jul 2018 11:02:57 -0700 Subject: [PATCH 095/422] chore(deps): lock file maintenance (#70) --- packages/google-cloud-monitoring/package-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 9aea1c35f86..015c0ecc68d 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -5923,9 +5923,9 @@ "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.5", "nan": "^2.0.0", @@ -6139,7 +6139,7 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.2", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -6148,7 +6148,7 @@ "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" From 9e446b2c5ab2b1188f1b4281ff55f6d2a836941e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 9 Jul 2018 19:40:58 -0700 Subject: [PATCH 096/422] chore(deps): lock file maintenance (#71) --- .../google-cloud-monitoring/package-lock.json | 81 +++++++++++-------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 015c0ecc68d..3ab81c8be19 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -2054,9 +2054,9 @@ "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": "8.10.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", + "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" }, "acorn": { "version": "5.7.1", @@ -3652,14 +3652,15 @@ "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.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", - "request": "^2.81.0", - "urlgrey": "0.4.4" + "argv": "^0.0.2", + "ignore-walk": "^3.0.1", + "request": "^2.87.0", + "urlgrey": "^0.4.4" } }, "collection-visit": { @@ -4381,9 +4382,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.0", @@ -4393,6 +4394,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", @@ -4400,7 +4402,7 @@ "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.5.0", + "globals": "^11.7.0", "ignore": "^3.3.3", "imurmurhash": "^0.1.4", "inquirer": "^5.2.0", @@ -4536,9 +4538,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.1", @@ -4555,6 +4557,12 @@ "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", @@ -5027,9 +5035,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" }, @@ -6509,9 +6517,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": { @@ -6587,6 +6595,15 @@ "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", @@ -7109,15 +7126,15 @@ "dev": true }, "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", @@ -7125,7 +7142,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" } }, @@ -7488,9 +7505,9 @@ "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" }, "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": { From 30b388ac9c22e718f35f1088f3b0d160b10794c7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 9 Jul 2018 22:12:26 -0700 Subject: [PATCH 097/422] fix: drop support for node.js 4.x and 9.x (#72) --- .../.circleci/config.yml | 30 +++++-------------- packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 4595509174c..39f8d74e0de 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -17,18 +17,14 @@ workflows: 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 +58,9 @@ workflows: only: master jobs: *workflow_jobs jobs: - node4: + node6: docker: - - image: 'node:4' + - image: 'node:6' steps: &unit_tests_steps - checkout - run: &remove_package_lock @@ -85,17 +81,9 @@ 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 - node6: - docker: - - image: 'node:6' - steps: *unit_tests_steps + - run: npm test + - run: node_modules/.bin/codecov + node8: docker: - image: 'node:8' @@ -187,9 +175,5 @@ jobs: - 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 + - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - run: npm publish diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 164ce202ee8..9075c0face1 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/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-monitoring", "main": "src/index.js", From cbc182fabfa1c99507684f7e236943b97b3b7f69 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 9 Jul 2018 22:59:59 -0700 Subject: [PATCH 098/422] chore: really delete node4 and node9 (#73) --- packages/google-cloud-monitoring/.circleci/config.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 39f8d74e0de..54dc9321e7e 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -3,16 +3,12 @@ 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: @@ -88,10 +84,6 @@ jobs: docker: - image: 'node:8' steps: *unit_tests_steps - node9: - docker: - - image: 'node:9' - steps: *unit_tests_steps node10: docker: - image: 'node:10' From 8859b8a5055a14c1cdb0c6b2eadacf77ad2fbb4f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 08:06:58 -0700 Subject: [PATCH 099/422] chore(deps): lock file maintenance (#74) --- packages/google-cloud-monitoring/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 3ab81c8be19..8db7fc3a084 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -4659,9 +4659,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 50af5dac3c0ce371b0b02ff392c6fa871a04b7b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 10 Jul 2018 09:40:57 -0700 Subject: [PATCH 100/422] chore(deps): lock file maintenance (#75) --- packages/google-cloud-monitoring/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 8db7fc3a084..c8a568b29b8 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -7522,12 +7522,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 09b29fcfee127dac6c2c6fabcf4fc8da1f41436c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 10 Jul 2018 13:00:03 -0700 Subject: [PATCH 101/422] chore(build): use `npm ci` instead of `npm install` (#76) --- packages/google-cloud-monitoring/synth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index ca3e6fd3fb5..2fe51cad653 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -21,9 +21,7 @@ excludes=['package.json', 'README.md', 'src/index.js'], ) -# # Node.js specific cleanup -# -subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'ci']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From fa45a29dcee4c919ae4c673d9228c16916b319eb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 16 Jul 2018 19:09:52 -0700 Subject: [PATCH 102/422] chore(deps): lock file maintenance (#79) --- .../google-cloud-monitoring/package-lock.json | 1308 +++++++++++++---- 1 file changed, 1005 insertions(+), 303 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index c8a568b29b8..466c4b2eaed 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -223,25 +223,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": { @@ -250,6 +250,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", @@ -274,37 +280,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": { @@ -347,20 +353,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 }, @@ -369,11 +377,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, @@ -385,7 +403,7 @@ } }, "babel-generator": { - "version": "6.26.0", + "version": "6.26.1", "bundled": true, "dev": true, "requires": { @@ -395,7 +413,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" } }, @@ -465,8 +483,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": { @@ -475,13 +548,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": { @@ -489,6 +579,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, @@ -527,6 +633,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, @@ -551,11 +678,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, @@ -566,8 +707,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 }, @@ -598,6 +744,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, @@ -606,6 +757,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, @@ -659,44 +852,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": { @@ -722,21 +1010,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": { @@ -754,6 +1042,11 @@ "bundled": true, "dev": true }, + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, "glob": { "version": "7.1.2", "bundled": true, @@ -767,23 +1060,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, @@ -828,8 +1104,37 @@ "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.5.0", + "version": "2.6.0", "bundled": true, "dev": true }, @@ -853,7 +1158,7 @@ "dev": true }, "invariant": { - "version": "2.2.2", + "version": "2.2.4", "bundled": true, "dev": true, "requires": { @@ -865,6 +1170,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, @@ -883,17 +1196,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": { @@ -901,11 +1226,6 @@ "bundled": true, "dev": true }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "is-finite": { "version": "1.0.2", "bundled": true, @@ -915,39 +1235,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, @@ -958,6 +1280,11 @@ "bundled": true, "dev": true }, + "is-windows": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, "isarray": { "version": "1.0.0", "bundled": true, @@ -969,15 +1296,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 }, @@ -990,7 +1314,7 @@ } }, "istanbul-lib-instrument": { - "version": "1.9.1", + "version": "1.10.1", "bundled": true, "dev": true, "requires": { @@ -999,16 +1323,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" @@ -1025,12 +1349,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" @@ -1047,7 +1371,7 @@ } }, "istanbul-reports": { - "version": "1.1.3", + "version": "1.4.0", "bundled": true, "dev": true, "requires": { @@ -1115,7 +1439,7 @@ } }, "lodash": { - "version": "4.17.4", + "version": "4.17.10", "bundled": true, "dev": true }, @@ -1133,7 +1457,7 @@ } }, "lru-cache": { - "version": "4.1.1", + "version": "4.1.3", "bundled": true, "dev": true, "requires": { @@ -1141,6 +1465,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, @@ -1163,35 +1500,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 }, @@ -1208,6 +1559,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, @@ -1221,6 +1591,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, @@ -1232,14 +1628,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, @@ -1258,13 +1646,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": { @@ -1305,9 +1720,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", @@ -1317,16 +1735,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", @@ -1336,6 +1748,11 @@ "error-ex": "^1.2.0" } }, + "pascalcase": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "path-exists": { "version": "2.1.0", "bundled": true, @@ -1406,8 +1823,8 @@ } } }, - "preserve": { - "version": "0.2.0", + "posix-character-classes": { + "version": "0.1.1", "bundled": true, "dev": true }, @@ -1416,43 +1833,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, @@ -1488,19 +1868,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, @@ -1534,6 +1910,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, @@ -1551,16 +1937,45 @@ "glob": "^7.0.5" } }, - "semver": { - "version": "5.4.1", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, + "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, @@ -1584,11 +1999,120 @@ "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, @@ -1603,23 +2127,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, @@ -1634,11 +2195,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, @@ -1676,12 +2232,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" @@ -1692,6 +2248,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, @@ -1728,13 +2312,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": { @@ -1770,6 +2442,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, @@ -1808,11 +2488,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", @@ -1823,35 +2503,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": { @@ -1915,6 +2609,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" + } + } } } } @@ -4342,9 +5047,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", @@ -4653,9 +5358,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": { @@ -5686,9 +6391,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": { @@ -5877,9 +6582,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", @@ -5892,7 +6597,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", @@ -7821,9 +8526,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": { @@ -10300,9 +11005,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-finally": { @@ -11393,18 +12098,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": { @@ -11782,9 +12487,9 @@ "dev": true }, "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", @@ -11792,11 +12497,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": { "debug": { @@ -11847,13 +12552,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": { @@ -12393,12 +13098,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", @@ -12614,9 +13316,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 923a23a72b18a9b205f115c3bf115168c6528d5f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 18 Jul 2018 00:58:30 -0700 Subject: [PATCH 103/422] test: use strictEqual in tests (#81) --- .../google-cloud-monitoring/test/gapic-v3.js | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index e8af18dde69..1de1c7f5a2c 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -83,7 +83,7 @@ describe('AlertPolicyServiceClient', () => { client.listAlertPolicies(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(); }); @@ -145,7 +145,7 @@ describe('AlertPolicyServiceClient', () => { client.getAlertPolicy(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(); }); @@ -211,7 +211,7 @@ describe('AlertPolicyServiceClient', () => { client.createAlertPolicy(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(); }); @@ -261,7 +261,7 @@ describe('AlertPolicyServiceClient', () => { client.deleteAlertPolicy(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -322,7 +322,7 @@ describe('AlertPolicyServiceClient', () => { client.updateAlertPolicy(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(); }); @@ -386,7 +386,7 @@ describe('GroupServiceClient', () => { client.listGroups(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(); }); @@ -454,7 +454,7 @@ describe('GroupServiceClient', () => { client.getGroup(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(); }); @@ -526,7 +526,7 @@ describe('GroupServiceClient', () => { client.createGroup(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(); }); @@ -594,7 +594,7 @@ describe('GroupServiceClient', () => { client.updateGroup(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(); }); @@ -644,7 +644,7 @@ describe('GroupServiceClient', () => { client.deleteGroup(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -712,7 +712,7 @@ describe('GroupServiceClient', () => { client.listGroupMembers(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(); }); @@ -780,7 +780,7 @@ describe('MetricServiceClient', () => { 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(); }); @@ -852,7 +852,7 @@ describe('MetricServiceClient', () => { client.getMonitoredResourceDescriptor(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(); }); @@ -919,7 +919,7 @@ describe('MetricServiceClient', () => { client.listMetricDescriptors(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(); }); @@ -993,7 +993,7 @@ describe('MetricServiceClient', () => { client.getMetricDescriptor(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(); }); @@ -1065,7 +1065,7 @@ describe('MetricServiceClient', () => { client.createMetricDescriptor(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(); }); @@ -1123,7 +1123,7 @@ describe('MetricServiceClient', () => { client.deleteMetricDescriptor(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -1201,7 +1201,7 @@ describe('MetricServiceClient', () => { client.listTimeSeries(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(); }); @@ -1255,7 +1255,7 @@ describe('MetricServiceClient', () => { client.createTimeSeries(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -1322,7 +1322,7 @@ describe('NotificationChannelServiceClient', () => { client.listNotificationChannelDescriptors(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(); }); @@ -1394,7 +1394,7 @@ describe('NotificationChannelServiceClient', () => { client.getNotificationChannelDescriptor(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(); }); @@ -1461,7 +1461,7 @@ describe('NotificationChannelServiceClient', () => { client.listNotificationChannels(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(); }); @@ -1533,7 +1533,7 @@ describe('NotificationChannelServiceClient', () => { client.getNotificationChannel(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(); }); @@ -1603,7 +1603,7 @@ describe('NotificationChannelServiceClient', () => { client.createNotificationChannel(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(); }); @@ -1669,7 +1669,7 @@ describe('NotificationChannelServiceClient', () => { client.updateNotificationChannel(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(); }); @@ -1727,7 +1727,7 @@ describe('NotificationChannelServiceClient', () => { client.deleteNotificationChannel(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -1794,7 +1794,7 @@ describe('UptimeCheckServiceClient', () => { client.listUptimeCheckConfigs(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(); }); @@ -1862,7 +1862,7 @@ describe('UptimeCheckServiceClient', () => { client.getUptimeCheckConfig(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(); }); @@ -1928,7 +1928,7 @@ describe('UptimeCheckServiceClient', () => { client.createUptimeCheckConfig(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(); }); @@ -1990,7 +1990,7 @@ describe('UptimeCheckServiceClient', () => { client.updateUptimeCheckConfig(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(); }); @@ -2048,7 +2048,7 @@ describe('UptimeCheckServiceClient', () => { client.deleteUptimeCheckConfig(request, err => { assert(err instanceof Error); - assert.equal(err.code, FAKE_STATUS_CODE); + assert.strictEqual(err.code, FAKE_STATUS_CODE); done(); }); }); @@ -2108,7 +2108,7 @@ describe('UptimeCheckServiceClient', () => { client.listUptimeCheckIps(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(); }); From dbb40d2b9a366adfeb7d4ba838559439f9e66083 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 18 Jul 2018 11:20:05 -0700 Subject: [PATCH 104/422] chore(deps): update dependency eslint-plugin-node to v7 (#80) --- .../google-cloud-monitoring/package-lock.json | 79 +++++++++++++++---- packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 64 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 466c4b2eaed..85eb94f4c22 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -318,6 +318,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1446,7 +1447,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -2805,6 +2807,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", @@ -2816,6 +2819,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" } @@ -5219,18 +5223,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", @@ -5874,12 +5904,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" @@ -5894,17 +5926,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", @@ -6021,7 +6056,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6033,6 +6069,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6047,6 +6084,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6054,12 +6092,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" @@ -6078,6 +6118,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6158,7 +6199,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6170,6 +6212,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6291,6 +6334,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", @@ -8224,7 +8268,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", @@ -8810,6 +8855,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9752,7 +9798,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 9075c0face1..2be50b702e1 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -69,7 +69,7 @@ "codecov": "^3.0.0", "eslint": "^5.0.0", "eslint-config-prettier": "^2.6.0", - "eslint-plugin-node": "^6.0.0", + "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.3.1", "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", From 2087a934c46e3a080a2ed55244c886f4b06a6530 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 24 Jul 2018 10:04:45 -0700 Subject: [PATCH 105/422] chore(deps): lock file maintenance (#83) --- .../google-cloud-monitoring/package-lock.json | 103 ++++++++---------- 1 file changed, 44 insertions(+), 59 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 85eb94f4c22..a346faad49f 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -223,9 +223,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", @@ -318,7 +318,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1447,8 +1446,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.3.1", @@ -2756,14 +2754,14 @@ } }, "@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": "8.10.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", - "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", + "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==" }, "acorn": { "version": "5.7.1", @@ -2807,7 +2805,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", @@ -2819,7 +2816,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" } @@ -5091,9 +5087,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", @@ -5112,7 +5108,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", @@ -5189,6 +5185,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", @@ -5539,9 +5541,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", @@ -5904,14 +5906,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" @@ -5926,20 +5926,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", @@ -6056,8 +6053,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -6069,7 +6065,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6084,7 +6079,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6092,14 +6086,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" @@ -6118,7 +6110,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6199,8 +6190,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6212,7 +6202,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6334,7 +6323,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", @@ -8268,8 +8256,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", @@ -8550,18 +8537,18 @@ "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==", "dev": true }, "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==", "dev": true, "requires": { - "mime-db": "~1.33.0" + "mime-db": "~1.35.0" } }, "mimic-fn": { @@ -8855,7 +8842,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9798,8 +9784,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -11531,9 +11516,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", @@ -11545,8 +11530,8 @@ "@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" } }, From ade9adffa84aea879aa6634f734783a370096f41 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 07:51:36 -0700 Subject: [PATCH 106/422] chore: require node 8 for samples (#86) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 72d0ab73c78..5000d3affbe 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -6,7 +6,7 @@ "author": "Google Inc.", "repository": "googleapis/nodejs-monitoring", "engines": { - "node": ">=6.0.0" + "node": ">=8" }, "scripts": { "test": "ava -T 3m --verbose system-test/*.test.js" From 1edec5457f970bde94cb526902c67193ab578f9e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Jul 2018 11:12:22 -0700 Subject: [PATCH 107/422] chore: move mocha options to mocha.opts (#85) --- packages/google-cloud-monitoring/package.json | 4 ++-- packages/google-cloud-monitoring/test/mocha.opts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-monitoring/test/mocha.opts diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2be50b702e1..c5846c46061 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -47,14 +47,14 @@ "greenkeeper[bot] " ], "scripts": { - "cover": "nyc --reporter=lcov mocha --require intelli-espower-loader test/*.js && nyc report", + "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", "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/", "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", - "test-no-cover": "mocha test/*.js --no-timeouts", + "test-no-cover": "mocha test/*.js", "test": "npm run cover" }, "dependencies": { diff --git a/packages/google-cloud-monitoring/test/mocha.opts b/packages/google-cloud-monitoring/test/mocha.opts new file mode 100644 index 00000000000..3e740ac6e4c --- /dev/null +++ b/packages/google-cloud-monitoring/test/mocha.opts @@ -0,0 +1,2 @@ +--require intelli-espower-loader +--timeout 10000 From dd1ef407b527b98607df9b5085dd4c31c944b733 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 30 Jul 2018 18:44:56 -0700 Subject: [PATCH 108/422] chore(deps): lock file maintenance (#87) --- .../google-cloud-monitoring/package-lock.json | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index a346faad49f..679a8b936d1 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -223,9 +223,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", @@ -2759,9 +2759,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==" }, "acorn": { "version": "5.7.1", @@ -4848,13 +4848,14 @@ "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=", "dev": true, "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "ecdsa-sig-formatter": { @@ -6668,9 +6669,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", @@ -6884,12 +6885,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", @@ -6912,7 +6913,7 @@ "bundled": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.1.11", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -7869,9 +7870,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", @@ -11476,9 +11477,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 4306b9e58337d959ad635f27697c17fb75bf894b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 1 Aug 2018 19:10:19 -0700 Subject: [PATCH 109/422] fix(deps): update dependency google-gax to ^0.18.0 (#88) --- .../google-cloud-monitoring/package-lock.json | 85 ++++++++++++++----- packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 66 insertions(+), 21 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 679a8b936d1..03a5a8eafa9 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -318,6 +318,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1446,7 +1447,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -2624,6 +2626,17 @@ } } }, + "@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" + } + }, "@ladjs/time-require": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@ladjs/time-require/-/time-require-0.1.4.tgz", @@ -2753,15 +2766,20 @@ "samsam": "1.3.0" } }, + "@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==" + "version": "9.6.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.25.tgz", + "integrity": "sha512-uZpzO9MKSHy7zBiTtziA3JgZP3upcAvLTASkKgheLj6/rNZmRX4UyvsFYaY2kbYcmmh8bNZ2T0eocBRCfZdGvQ==" }, "acorn": { "version": "5.7.1", @@ -2805,6 +2823,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", @@ -2816,6 +2835,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" } @@ -5773,9 +5793,9 @@ "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==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", + "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", "requires": { "debug": "^3.1.0" }, @@ -5907,12 +5927,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" @@ -5927,17 +5949,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", @@ -6054,7 +6079,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6066,6 +6092,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6080,6 +6107,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6087,12 +6115,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" @@ -6111,6 +6141,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6191,7 +6222,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6203,6 +6235,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6324,6 +6357,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", @@ -6578,10 +6612,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", @@ -6590,7 +6625,7 @@ "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" } @@ -8257,7 +8292,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", @@ -8843,6 +8879,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9785,7 +9822,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", @@ -11534,6 +11572,13 @@ "@types/long": "^4.0.0", "@types/node": "^10.1.0", "long": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "10.5.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.5.tgz", + "integrity": "sha512-6Qnb1gXbp3g1JX9QVJj3A6ORzc9XCyhokxUKaoonHgNXcQhmk8adhotxfkeK8El9TnFeUuH72yI6jQ5nDJKS6w==" + } } }, "proxyquire": { diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c5846c46061..1a1a61faa8f 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ }, "dependencies": { "extend": "^3.0", - "google-gax": "^0.17.0", + "google-gax": "^0.18.0", "lodash.merge": "^4.6.0", "lodash.union": "^4.6.0" }, From 14e7188c225374369493ffab0b34e0896a7207ae Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 2 Aug 2018 05:11:43 -0700 Subject: [PATCH 110/422] remove that whitespace (#89) --- packages/google-cloud-monitoring/test/mocha.opts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/test/mocha.opts b/packages/google-cloud-monitoring/test/mocha.opts index 3e740ac6e4c..8751e7bae37 100644 --- a/packages/google-cloud-monitoring/test/mocha.opts +++ b/packages/google-cloud-monitoring/test/mocha.opts @@ -1,2 +1,3 @@ --require intelli-espower-loader --timeout 10000 +--throw-deprecation From aa9cdf9a1bc8205f6410fee3c088804a16e597e9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 6 Aug 2018 19:07:32 -0700 Subject: [PATCH 111/422] chore(deps): lock file maintenance (#91) --- .../google-cloud-monitoring/package-lock.json | 128 +++++++----------- 1 file changed, 51 insertions(+), 77 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index 03a5a8eafa9..b54356245e2 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -318,7 +318,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1447,8 +1446,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.3.1", @@ -2767,9 +2765,9 @@ } }, "@types/lodash": { - "version": "4.14.115", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.115.tgz", - "integrity": "sha512-9K/P4XMQxk61omAzQh3bbbFiqnG17eLcFysjlAYz0aPcYrVo8T+ujaCeIeY0Gpzux7x1YbxtEtLKB7ZWf79qdg==" + "version": "4.14.116", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", + "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==" }, "@types/long": { "version": "4.0.0", @@ -2823,7 +2821,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", @@ -2835,7 +2832,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" } @@ -3103,10 +3099,13 @@ } }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } }, "assert-plus": { "version": "1.0.0", @@ -3332,9 +3331,9 @@ "dev": true }, "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, "axios": { @@ -3971,9 +3970,9 @@ "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==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "builtin-modules": { @@ -5108,9 +5107,9 @@ } }, "eslint": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.2.0.tgz", - "integrity": "sha512-zlggW1qp7/TBjwLfouRoY7eWXrXwJZFqCdIxxh0/LVB/QuuKuIMkzyUZEcDo6LBadsry5JcEMxIqd3H/66CXVg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", + "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -5144,7 +5143,7 @@ "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^1.1.0", + "regexpp": "^2.0.0", "require-uncached": "^1.0.3", "semver": "^5.5.0", "string.prototype.matchall": "^2.0.0", @@ -5207,9 +5206,9 @@ "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==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", + "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", "dev": true }, "json-schema-traverse": { @@ -5254,14 +5253,6 @@ "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": { @@ -5279,9 +5270,9 @@ }, "dependencies": { "ignore": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.2.tgz", - "integrity": "sha512-uoxnT7PYpyEnsja+yX+7v49B7LXxmzDJ2JALqHH3oEGzpM2U1IGcbfnOr8Dt57z3B/UWs7/iAgPFbmye8m4I0g==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", + "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", "dev": true }, "resolve": { @@ -5927,14 +5918,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" @@ -5949,20 +5938,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", @@ -6079,8 +6065,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -6092,7 +6077,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6107,7 +6091,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6115,14 +6098,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" @@ -6141,7 +6122,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6222,8 +6202,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6235,7 +6214,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6357,7 +6335,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", @@ -8292,8 +8269,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", @@ -8879,7 +8855,6 @@ "version": "0.1.4", "bundled": true, "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -9822,8 +9797,7 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "lru-cache": { "version": "4.1.3", @@ -11249,9 +11223,9 @@ "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=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-to-regexp": { @@ -11575,9 +11549,9 @@ }, "dependencies": { "@types/node": { - "version": "10.5.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.5.tgz", - "integrity": "sha512-6Qnb1gXbp3g1JX9QVJj3A6ORzc9XCyhokxUKaoonHgNXcQhmk8adhotxfkeK8El9TnFeUuH72yI6jQ5nDJKS6w==" + "version": "10.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz", + "integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w==" } } }, @@ -11784,9 +11758,9 @@ } }, "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", "dev": true }, "regexpu-core": { @@ -12083,9 +12057,9 @@ "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==", + "version": "1.18.4", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.4.tgz", + "integrity": "sha512-hjyDYCYrQuhnEjq+5lenLlIfdPBtnZ7z0DkQOC8YGxvkuOInH+1SrkNTj30t4f2/SSv9c5kLniB+uCIpBvYuew==", "dev": true, "requires": { "chalk": "^2.3.0", @@ -13192,9 +13166,9 @@ "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": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", From e26fdfa139def8a536e162e67f7cd44e5f731ae9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 7 Aug 2018 07:49:33 -0700 Subject: [PATCH 112/422] chore(deps): lock file maintenance (#92) --- packages/google-cloud-monitoring/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json index b54356245e2..9e813b79107 100644 --- a/packages/google-cloud-monitoring/package-lock.json +++ b/packages/google-cloud-monitoring/package-lock.json @@ -2775,9 +2775,9 @@ "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "9.6.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.25.tgz", - "integrity": "sha512-uZpzO9MKSHy7zBiTtziA3JgZP3upcAvLTASkKgheLj6/rNZmRX4UyvsFYaY2kbYcmmh8bNZ2T0eocBRCfZdGvQ==" + "version": "9.6.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.26.tgz", + "integrity": "sha512-3LKKscYUZdZreOuvnly8oWsCA1TOWtmkV3mbcUnV34f+nqDWJic+4SGjRi1C/sPHnZcSs/x209O+Dgy8aWHt2A==" }, "acorn": { "version": "5.7.1", From 01c5b4c1a5324d4fca01065363cc32c939400ce2 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 7 Aug 2018 14:00:26 -0700 Subject: [PATCH 113/422] chore: ignore package-lock.json (#93) * chore: ignore package-log.json * remove locky * renovateeee --- .../.circleci/config.yml | 17 +- .../.circleci/get_workflow_name.py | 67 - packages/google-cloud-monitoring/.gitignore | 3 +- .../google-cloud-monitoring/package-lock.json | 13388 ---------------- 4 files changed, 3 insertions(+), 13472 deletions(-) delete mode 100644 packages/google-cloud-monitoring/.circleci/get_workflow_name.py delete mode 100644 packages/google-cloud-monitoring/package-lock.json diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 54dc9321e7e..48055680b6c 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -58,18 +58,7 @@ jobs: docker: - image: 'node:6' 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: |- @@ -93,7 +82,6 @@ jobs: - image: 'node:8' 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. @@ -109,7 +97,6 @@ jobs: - image: 'node:8' steps: - checkout - - run: *remove_package_lock - run: *npm_install_and_link - run: name: Build documentation. @@ -119,7 +106,6 @@ jobs: - image: 'node:8' steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | @@ -144,7 +130,6 @@ jobs: - image: 'node:8' steps: - checkout - - run: *remove_package_lock - run: name: Decrypt credentials. command: | diff --git a/packages/google-cloud-monitoring/.circleci/get_workflow_name.py b/packages/google-cloud-monitoring/.circleci/get_workflow_name.py deleted file mode 100644 index ff6b58fd24f..00000000000 --- a/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.gitignore b/packages/google-cloud-monitoring/.gitignore index 082cf01ed78..531c77e628b 100644 --- a/packages/google-cloud-monitoring/.gitignore +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/package-lock.json b/packages/google-cloud-monitoring/package-lock.json deleted file mode 100644 index 9e813b79107..00000000000 --- a/packages/google-cloud-monitoring/package-lock.json +++ /dev/null @@ -1,13388 +0,0 @@ -{ - "name": "@google-cloud/monitoring", - "version": "0.5.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": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "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/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, - "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 - }, - "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" - } - }, - "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" - } - } - } - } - } - }, - "@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" - } - }, - "@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/lodash": { - "version": "4.14.116", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", - "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==" - }, - "@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": "9.6.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.26.tgz", - "integrity": "sha512-3LKKscYUZdZreOuvnly8oWsCA1TOWtmkV3mbcUnV34f+nqDWJic+4SGjRi1C/sPHnZcSs/x209O+Dgy8aWHt2A==" - }, - "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=", - "dev": true, - "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, - "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, - "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.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "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=" - }, - "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=", - "dev": true - }, - "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 - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "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=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "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" - } - }, - "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" - } - }, - "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=", - "dev": true, - "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.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "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" - } - }, - "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=", - "dev": true - }, - "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=", - "dev": true - }, - "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=", - "dev": true, - "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=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "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" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "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": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "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" - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "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==", - "dev": true, - "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=", - "dev": true, - "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" - } - }, - "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.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", - "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", - "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": "^2.0.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" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "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.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", - "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" - } - }, - "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.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", - "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" - } - }, - "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": { - "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=", - "dev": true - }, - "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=", - "dev": true - }, - "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=", - "dev": true - }, - "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.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", - "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", - "requires": { - "debug": "^3.1.0" - }, - "dependencies": { - "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" - } - } - } - }, - "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=", - "dev": true - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, - "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 - }, - "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", - "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.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" - } - }, - "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=", - "dev": true, - "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" - } - }, - "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" - } - }, - "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=", - "dev": true - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "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 - }, - "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=", - "dev": true, - "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": "1.3.2", - "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz", - "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", - "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-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=", - "dev": true - }, - "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=", - "dev": true - }, - "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=", - "dev": true - }, - "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=", - "dev": true, - "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=", - "dev": true - }, - "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=", - "dev": true - }, - "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=", - "dev": true - }, - "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=", - "dev": true, - "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.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.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" - }, - "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 - }, - "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": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "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=", - "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" - } - }, - "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==" - }, - "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==", - "dev": true - }, - "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==", - "dev": true, - "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" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "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, - "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 - }, - "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=", - "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=", - "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-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.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "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=", - "dev": true - }, - "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 - }, - "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" - }, - "dependencies": { - "@types/node": { - "version": "10.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz", - "integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w==" - } - } - }, - "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" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "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": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", - "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==", - "dev": true, - "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==", - "dev": true - }, - "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.4", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.18.4.tgz", - "integrity": "sha512-hjyDYCYrQuhnEjq+5lenLlIfdPBtnZ7z0DkQOC8YGxvkuOInH+1SrkNTj30t4f2/SSv9c5kLniB+uCIpBvYuew==", - "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 - }, - "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": { - "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-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=", - "dev": true, - "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-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-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 - }, - "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": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "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-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" - } - }, - "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==", - "dev": true, - "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=", - "dev": true, - "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=", - "dev": true, - "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=" - }, - "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==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "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=", - "dev": true, - "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 4dccd013d10615cb169fabd2c606dd444aee78de Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 9 Aug 2018 14:42:52 -0700 Subject: [PATCH 114/422] chore: do not use npm ci (#94) --- packages/google-cloud-monitoring/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index 2fe51cad653..eab9b86b22d 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -22,6 +22,6 @@ ) # Node.js specific cleanup -subprocess.run(['npm', 'ci']) +subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'prettier']) subprocess.run(['npm', 'run', 'lint']) From 3edf478fdba75eb6ca6af562eac45423f3b956bd Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 10 Aug 2018 07:47:38 -0700 Subject: [PATCH 115/422] feat: run the generator --- .../protos/google/monitoring/v3/alert.proto | 17 ++- .../google/monitoring/v3/alert_service.proto | 2 +- .../protos/google/monitoring/v3/common.proto | 4 +- .../google/monitoring/v3/dropped_labels.proto | 42 ++++++ .../protos/google/monitoring/v3/group.proto | 2 +- .../google/monitoring/v3/group_service.proto | 30 ++-- .../protos/google/monitoring/v3/metric.proto | 33 +++-- .../google/monitoring/v3/metric_service.proto | 58 +++++--- .../monitoring/v3/mutation_record.proto | 2 +- .../google/monitoring/v3/notification.proto | 4 +- .../monitoring/v3/notification_service.proto | 2 +- .../google/monitoring/v3/span_context.proto | 43 ++++++ .../protos/google/monitoring/v3/uptime.proto | 78 +++++++---- .../google/monitoring/v3/uptime_service.proto | 58 +++++--- .../v3/doc/google/monitoring/v3/doc_alert.js | 15 +- .../v3/doc/google/monitoring/v3/doc_metric.js | 31 +++-- .../monitoring/v3/doc_metric_service.js | 22 +-- .../v3/doc/google/monitoring/v3/doc_uptime.js | 92 +++++++----- .../monitoring/v3/doc_uptime_service.js | 30 ++-- .../src/v3/doc/google/protobuf/doc_any.js | 131 ++++++++++++++++++ .../src/v3/doc/google/protobuf/doc_struct.js | 112 +++++++++++++++ .../src/v3/doc/google/rpc/doc_status.js | 92 ++++++++++++ .../src/v3/group_service_client.js | 2 +- .../src/v3/metric_service_client.js | 10 +- .../src/v3/uptime_check_service_client.js | 31 ++--- .../google-cloud-monitoring/test/gapic-v3.js | 8 ++ 26 files changed, 748 insertions(+), 203 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 18d87174d00..4c995b13bcc 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.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. @@ -142,15 +142,14 @@ message AlertPolicy { // The amount of time that a time series must violate the // threshold to be considered failing. Currently, only values - // that are a multiple of a minute--e.g. 60, 120, or 300 + // that are a multiple of a minute--e.g., 0, 60, 120, or 300 // seconds--are supported. If an invalid value is given, an - // error will be returned. The `Duration.nanos` field is - // ignored. When choosing a duration, it is useful to keep in mind the - // frequency of the underlying time series data (which may also be - // affected by any alignments specified in the `aggregation` field); - // a good duration is long enough so that a single outlier does not - // generate spurious alerts, but short enough that unhealthy states - // are detected and alerted on quickly. + // error will be returned. When choosing a duration, it is useful to + // keep in mind the frequency of the underlying time series data + // (which may also be affected by any alignments specified in the + // `aggregations` field); a good duration is long enough so that a single + // outlier does not generate spurious alerts, but short enough that + // unhealthy states are detected and alerted on quickly. google.protobuf.Duration duration = 6; // The number/percent of time series for which the comparison must hold diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index ca2839f97c1..4bcb9d36e86 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 84d8423fd69..3e9653a8588 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.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. @@ -395,6 +395,8 @@ enum ComparisonType { // [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers) // for more details. enum ServiceTier { + option deprecated = true; + // An invalid sentinel value, used to indicate that a tier has not // been provided explicitly. SERVICE_TIER_UNSPECIFIED = 0; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto new file mode 100644 index 00000000000..bc3b8545b92 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -0,0 +1,42 @@ +// 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. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; + + +// A set of (label, value) pairs which were dropped during aggregation, attached +// to google.api.Distribution.Exemplars in google.api.Distribution values during +// aggregation. +// +// These values are used in combination with the label values that remain on the +// aggregated Distribution timeseries to construct the full label set for the +// exemplar values. The resulting full label set may be used to identify the +// specific task/job/instance (for example) which may be contributing to a +// long-tail, while allowing the storage savings of only storing aggregated +// distribution values for a large group. +// +// Note that there are no guarantees on ordering of the labels from +// exemplar-to-exemplar and from distribution-to-distribution in the same +// stream, and there may be duplicates. It is up to clients to resolve any +// ambiguities. +message DroppedLabels { + // Map from label to its value, for all labels dropped in any aggregation. + map label = 1; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index 0c98bebead9..bad5016c199 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -1,4 +1,4 @@ -// Copyright 2016 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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 3d7493cf0ad..7cfae976940 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 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. @@ -31,7 +31,7 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The Group API lets you inspect and manage your -// [groups](google.monitoring.v3.Group). +// [groups](#google.monitoring.v3.Group). // // A group is a named filter that is used to identify // a collection of monitored resources. Groups are typically used to @@ -45,33 +45,47 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; service GroupService { // Lists the existing groups. rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/groups" }; + option (google.api.http) = { + get: "/v3/{name=projects/*}/groups" + }; } // Gets a single group. rpc GetGroup(GetGroupRequest) returns (Group) { - option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/groups/*}" + }; } // Creates a new group. rpc CreateGroup(CreateGroupRequest) returns (Group) { - option (google.api.http) = { post: "/v3/{name=projects/*}/groups" body: "group" }; + option (google.api.http) = { + post: "/v3/{name=projects/*}/groups" + body: "group" + }; } // Updates an existing group. // You can change any group attributes except `name`. rpc UpdateGroup(UpdateGroupRequest) returns (Group) { - option (google.api.http) = { put: "/v3/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.http) = { + put: "/v3/{group.name=projects/*/groups/*}" + body: "group" + }; } // Deletes an existing group. rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" }; + option (google.api.http) = { + delete: "/v3/{name=projects/*/groups/*}" + }; } // Lists the monitored resources that are members of a group. rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/groups/*}/members" + }; } } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 80c59d50b0e..9d2d8d72e00 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -1,4 +1,4 @@ -// Copyright 2016 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. @@ -16,6 +16,8 @@ syntax = "proto3"; package google.monitoring.v3; +import "google/api/annotations.proto"; +import "google/api/label.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; @@ -30,14 +32,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A single data point in a time series. message Point { - // The time interval to which the data point applies. For GAUGE metrics, only - // the end time of the interval is used. For DELTA metrics, the start and end - // time should specify a non-zero interval, with subsequent points specifying - // contiguous and non-overlapping intervals. For CUMULATIVE metrics, the - // start and end time should specify a non-zero interval, with subsequent - // points specifying 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. + // The time interval to which the data point applies. For `GAUGE` metrics, + // only the end time of the interval is used. For `DELTA` metrics, the start + // and end time should specify a non-zero interval, with subsequent points + // specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + // metrics, the start and end time should specify a non-zero interval, with + // subsequent points specifying 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. TimeInterval interval = 1; // The value of the data point. @@ -53,10 +55,15 @@ message TimeSeries { // series. google.api.Metric metric = 1; - // The associated resource. A fully-specified monitored resource used to - // identify the time series. + // The associated monitored resource. Custom metrics can use only certain + // monitored resource types in their time series data. google.api.MonitoredResource resource = 2; + // Output only. The associated monitored resource metadata. When reading a + // a timeseries, this field will include metadata labels that are explicitly + // named in the reduction. When creating a timeseries, this field is ignored. + google.api.MonitoredResourceMetadata metadata = 7; + // The metric kind of the time series. When listing time series, this metric // kind might be different from the metric kind of the associated metric if // this time series is an alignment or reduction of other time series. @@ -76,8 +83,8 @@ message TimeSeries { // the same as the type of the data in the `points` field. google.api.MetricDescriptor.ValueType value_type = 4; - // The data points of this time series. When listing time series, the order of - // the points is specified by the list method. + // The data points of this time series. When listing time series, points are + // returned in reverse time order. // // When creating a time series, this field must contain exactly one point and // the point's type must be the same as the value type of the associated diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index de11cbde96f..170c4eae2a9 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -1,4 +1,4 @@ -// Copyright 2016 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. @@ -21,6 +21,7 @@ import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/metric.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; @@ -37,40 +38,55 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; service MetricService { // Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; + option (google.api.http) = { + get: "/v3/{name=projects/*}/monitoredResourceDescriptors" + }; } // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { - option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + }; } // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; + option (google.api.http) = { + get: "/v3/{name=projects/*}/metricDescriptors" + }; } // Gets a single metric descriptor. This method does not require a Stackdriver account. rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { - option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/metricDescriptors/**}" + }; } // Creates a new metric descriptor. // User-created metric descriptors define // [custom metrics](/monitoring/custom-metrics). rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { - option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" }; + option (google.api.http) = { + post: "/v3/{name=projects/*}/metricDescriptors" + body: "metric_descriptor" + }; } // Deletes a metric descriptor. Only user-created // [custom metrics](/monitoring/custom-metrics) can be deleted. rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.http) = { + delete: "/v3/{name=projects/*/metricDescriptors/**}" + }; } // Lists time series that match a filter. This method does not require a Stackdriver account. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { - option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" }; + option (google.api.http) = { + get: "/v3/{name=projects/*}/timeSeries" + }; } // Creates or adds data to one or more time series. @@ -78,7 +94,10 @@ service MetricService { // If any time series could not be written, a corresponding failure message is // included in the error response. rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" }; + option (google.api.http) = { + post: "/v3/{name=projects/*}/timeSeries" + body: "*" + }; } } @@ -106,7 +125,7 @@ message ListMonitoredResourceDescriptorsRequest { string page_token = 4; } -// The `ListMonitoredResourcDescriptors` response. +// The `ListMonitoredResourceDescriptors` response. message ListMonitoredResourceDescriptorsResponse { // The monitored resource descriptors that are available to this project // and that match `filter`, if present. @@ -217,6 +236,7 @@ message ListTimeSeriesRequest { // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND // metric.label.instance_name = "my-instance-name" + // string filter = 2; // The time interval for which results should be returned. Only time series @@ -229,18 +249,18 @@ message ListTimeSeriesRequest { // views of the data. Aggregation aggregation = 5; - // Specifies the order in which the points of the time series should - // be returned. By default, results are not ordered. Currently, - // this field must be left blank. + // Unsupported: must be left blank. The points in each time series are + // returned in reverse time order. string order_by = 6; // Specifies which information is returned about the time series. TimeSeriesView view = 7; - // A positive number that is the maximum number of results to return. - // When `view` field sets to `FULL`, it limits the number of `Points` server - // will return; if `view` field is `HEADERS`, it limits the number of - // `TimeSeries` server will return. + // A positive number that is the maximum number of results to return. If + // `page_size` is empty or more than 100,000 results, the effective + // `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + // maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + // the maximum number of `TimeSeries` returned. int32 page_size = 8; // If this field is not empty then it must contain the `nextPageToken` value @@ -258,6 +278,10 @@ message ListTimeSeriesResponse { // to a non-empty value. To see the additional results, // use that value as `pageToken` in the next call to this method. string next_page_token = 2; + + // Query execution errors that may have caused the time series data returned + // to be incomplete. + repeated google.rpc.Status execution_errors = 3; } // The `CreateTimeSeries` request. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index a3ba28a1d15..3c979a17981 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index 8cbca33f246..ed6a56f7886 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.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. @@ -60,7 +60,7 @@ message NotificationChannelDescriptor { // The tiers that support this notification channel; the project service tier // must be one of the supported_tiers. - repeated ServiceTier supported_tiers = 5; + repeated ServiceTier supported_tiers = 5 [deprecated = true]; } // A `NotificationChannel` is a medium through which an alert is diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index aa5d294bef5..745e3984ce3 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto new file mode 100644 index 00000000000..c099bbb618e --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto @@ -0,0 +1,43 @@ +// 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. + +syntax = "proto3"; + +package google.monitoring.v3; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "SpanContextProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; + + +// The context of a span, attached to google.api.Distribution.Exemplars +// in google.api.Distribution values during aggregation. +// +// It contains the name of a span with format: +// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] +message SpanContext { + // The resource name of the span in the following format: + // + // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // + // [TRACE_ID] is a unique identifier for a trace within a project; + // it is a 32-character hexadecimal encoding of a 16-byte array. + // + // [SPAN_ID] is a unique identifier for a span within a trace; it + // is a 16-character hexadecimal encoding of an 8-byte array. + string span_name = 1; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 24dd1d73d64..4c280e9b8d8 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -1,4 +1,4 @@ -// Copyright 2017 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. @@ -27,6 +27,26 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +// Nimbus InternalCheckers. +message InternalChecker { + // The GCP project ID. Not necessarily the same as the project_id for the + // config. + string project_id = 1; + + // The internal network to perform this uptime check on. + string network = 2; + + // The GCP zone the uptime check should egress from. Only respected for + // internal uptime checks, where internal_network is specified. + string gcp_zone = 3; + + // The checker ID. + string checker_id = 4; + + // The checker's human-readable name. + string display_name = 5; +} + // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { @@ -86,6 +106,7 @@ message UptimeCheckConfig { // https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). // Entering two separate headers with the same key in a Create call will // cause the first to be overwritten by the second. + // The maximum number of headers allowed is 100. map headers = 6; } @@ -101,29 +122,10 @@ message UptimeCheckConfig { // content. In the future, it can be expanded to allow for regular expressions // and more complex matching. message ContentMatcher { - // String content to match + // String content to match (max 1024 bytes) string content = 1; } - // Nimbus InternalCheckers. - message InternalChecker { - // The GCP project ID. Not necessarily the same as the project_id for the config. - string project_id = 1; - - // The internal network to perform this uptime check on. - string network = 2; - - // The GCP zone the uptime check should egress from. Only respected for - // internal uptime checks, where internal_network is specified. - string gcp_zone = 3; - - // The checker ID. - string checker_id = 4; - - // The checker's human-readable name. - string display_name = 5; - } - // A unique resource name for this UptimeCheckConfig. The format is: // // @@ -141,7 +143,15 @@ message UptimeCheckConfig { // The resource the check is checking. Required. oneof resource { - // The monitored resource associated with the configuration. + // The [monitored + // resource](https://cloud.google.com/monitoring/api/resources) associated + // with the configuration. + // The following monitored resource types are supported for uptime checks: + // uptime_url + // gce_instance + // gae_app + // aws_ec2_instance + // aws_elb_load_balancer google.api.MonitoredResource monitored_resource = 3; // The group resource associated with the configuration. @@ -157,8 +167,10 @@ message UptimeCheckConfig { TcpCheck tcp_check = 6; } - // How often the uptime check is performed. - // Currently, only 1, 5, 10, and 15 minutes are supported. Required. + // How often, in seconds, the uptime check is performed. + // Currently, the only supported values are `60s` (1 minute), `300s` + // (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + // defaults to `300s`. google.protobuf.Duration period = 7; // The maximum amount of time to wait for the request to complete (must be @@ -179,7 +191,12 @@ message UptimeCheckConfig { // regions. repeated UptimeCheckRegion selected_regions = 10; - // The internal checkers that this check will egress from. + // Denotes whether this is a check that egresses from InternalCheckers. + bool is_internal = 15; + + // The internal checkers that this check will egress from. If `is_internal` is + // true and this list is empty, the check will egress from all + // InternalCheckers configured for the project that owns this CheckConfig. repeated InternalChecker internal_checkers = 14; } @@ -224,15 +241,18 @@ enum UptimeCheckRegion { } // The supported resource types that can be used as values of -// group_resource.resource_type. gae_app and uptime_url are not allowed -// because group checks on App Engine modules and URLs are not allowed. +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. enum GroupResourceType { // Default value (not valid). RESOURCE_TYPE_UNSPECIFIED = 0; - // A group of instances (could be either GCE or AWS_EC2). + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). INSTANCE = 1; - // A group of AWS load balancers. + // A group of Amazon ELB load balancers. AWS_ELB_LOAD_BALANCER = 2; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index c3e04133fb2..3293edaef15 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -1,4 +1,4 @@ -// Copyright 2017 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. @@ -41,17 +41,24 @@ service UptimeCheckService { // Lists the existing valid uptime check configurations for the project, // leaving out any invalid configurations. rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { - option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; + option (google.api.http) = { + get: "/v3/{parent=projects/*}/uptimeCheckConfigs" + }; } // Gets a single uptime check configuration. rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.http) = { + get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" + }; } // Creates a new uptime check configuration. rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + option (google.api.http) = { + post: "/v3/{parent=projects/*}/uptimeCheckConfigs" + body: "uptime_check_config" + }; } // Updates an uptime check configuration. You can either replace the entire @@ -59,27 +66,33 @@ service UptimeCheckService { // configuration by specifying the fields to be updated via `"updateMask"`. // Returns the updated configuration. rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { - option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + option (google.api.http) = { + patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" + body: "uptime_check_config" + }; } // Deletes an uptime check configuration. Note that this method will fail // if the uptime check configuration is referenced by an alert policy or // other dependent configs that would be rendered invalid by the deletion. rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.http) = { + delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" + }; } // Returns the list of IPs that checkers run from rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { - option (google.api.http) = { get: "/v3/uptimeCheckIps" }; + option (google.api.http) = { + get: "/v3/uptimeCheckIps" + }; } } // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose uptime check configurations are listed. The format is - // - // `projects/[PROJECT_ID]`. + // The project whose uptime check configurations are listed. The format + // is `projects/[PROJECT_ID]`. string parent = 1; // The maximum number of results to return in a single response. The server @@ -105,21 +118,23 @@ message ListUptimeCheckConfigsResponse { // next_page_token is passed to the subsequent List method call (in the // request message's page_token field). string next_page_token = 2; + + // The total number of uptime check configurations for the project, + // irrespective of any pagination. + int32 total_size = 3; } // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // The uptime check configuration to retrieve. The format is - // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // The uptime check configuration to retrieve. The format + // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the uptime check. The format is: - // - // `projects/[PROJECT_ID]`. + // The project in which to create the uptime check. The format + // is `projects/[PROJECT_ID]`. string parent = 1; // The new uptime check configuration. @@ -137,18 +152,21 @@ message UpdateUptimeCheckConfigRequest { // Required. If an `"updateMask"` has been specified, this field gives // the values for the set of fields mentioned in the `"updateMask"`. If an // `"updateMask"` has not been given, this uptime check configuration replaces - // the current configuration. If a field is mentioned in `"updateMask`" but + // the current configuration. If a field is mentioned in `"updateMask"` but // the corresonding field is omitted in this partial uptime check // configuration, it has the effect of deleting/clearing the field from the // configuration on the server. + // + // The following fields can be updated: `display_name`, + // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + // `selected_regions`. UptimeCheckConfig uptime_check_config = 3; } // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The uptime check configuration to delete. The format is - // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // The uptime check configuration to delete. The format + // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index b60323bc92a..1796929d2ca 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -290,15 +290,14 @@ var AlertPolicy = { * @property {Object} duration * The amount of time that a time series must violate the * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g. 60, 120, or 300 + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 * seconds--are supported. If an invalid value is given, an - * error will be returned. The `Duration.nanos` field is - * ignored. When choosing a duration, it is useful to keep in mind the - * frequency of the underlying time series data (which may also be - * affected by any alignments specified in the `aggregation` field); - * a good duration is long enough so that a single outlier does not - * generate spurious alerts, but short enough that unhealthy states - * are detected and alerted on quickly. + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index 8ea16bf4459..b2d8d3aab5f 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js @@ -19,14 +19,14 @@ * A single data point in a time series. * * @property {Object} interval - * The time interval to which the data point applies. For GAUGE metrics, only - * the end time of the interval is used. For DELTA metrics, the start and end - * time should specify a non-zero interval, with subsequent points specifying - * contiguous and non-overlapping intervals. For CUMULATIVE metrics, the - * start and end time should specify a non-zero interval, with subsequent - * points specifying 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. + * The time interval to which the data point applies. For `GAUGE` metrics, + * only the end time of the interval is used. For `DELTA` metrics, the start + * and end time should specify a non-zero interval, with subsequent points + * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + * metrics, the start and end time should specify a non-zero interval, with + * subsequent points specifying 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. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * @@ -56,11 +56,18 @@ var Point = { * This object should have the same structure as [Metric]{@link google.api.Metric} * * @property {Object} resource - * The associated resource. A fully-specified monitored resource used to - * identify the time series. + * The associated monitored resource. Custom metrics can use only certain + * monitored resource types in their time series data. * * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * + * @property {Object} metadata + * Output only. The associated monitored resource metadata. When reading a + * a timeseries, this field will include metadata labels that are explicitly + * named in the reduction. When creating a timeseries, this field is ignored. + * + * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} + * * @property {number} metricKind * The metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind of the associated metric if @@ -85,8 +92,8 @@ var Point = { * The number should be among the values of [ValueType]{@link google.api.ValueType} * * @property {Object[]} points - * The data points of this time series. When listing time series, the order of - * the points is specified by the list method. + * The data points of this time series. When listing time series, points are + * returned in reverse time order. * * When creating a time series, this field must contain exactly one point and * the point's type must be the same as the value type of the associated diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index 63e6b60320e..97757a828d4 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -48,7 +48,7 @@ var ListMonitoredResourceDescriptorsRequest = { }; /** - * The `ListMonitoredResourcDescriptors` response. + * The `ListMonitoredResourceDescriptors` response. * * @property {Object[]} resourceDescriptors * The monitored resource descriptors that are available to this project @@ -227,9 +227,8 @@ var DeleteMetricDescriptorRequest = { * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * * @property {string} orderBy - * Specifies the order in which the points of the time series should - * be returned. By default, results are not ordered. Currently, - * this field must be left blank. + * Unsupported: must be left blank. The points in each time series are + * returned in reverse time order. * * @property {number} view * Specifies which information is returned about the time series. @@ -237,10 +236,11 @@ var DeleteMetricDescriptorRequest = { * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * * @property {number} pageSize - * A positive number that is the maximum number of results to return. - * When `view` field sets to `FULL`, it limits the number of `Points` server - * will return; if `view` field is `HEADERS`, it limits the number of - * `TimeSeries` server will return. + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. * * @property {string} pageToken * If this field is not empty then it must contain the `nextPageToken` value @@ -289,6 +289,12 @@ var ListTimeSeriesRequest = { * to a non-empty value. To see the additional results, * use that value as `pageToken` in the next call to this method. * + * @property {Object[]} executionErrors + * Query execution errors that may have caused the time series data returned + * to be incomplete. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * * @typedef ListTimeSeriesResponse * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListTimeSeriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 27cf5252fa3..f1415a32c7f 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -15,6 +15,34 @@ // Note: this file is purely for documentation. Any contents are not expected // to be loaded as the JS file. +/** + * Nimbus InternalCheckers. + * + * @property {string} projectId + * The GCP project ID. Not necessarily the same as the project_id for the + * config. + * + * @property {string} network + * The internal network to perform this uptime check on. + * + * @property {string} gcpZone + * The GCP zone the uptime check should egress from. Only respected for + * internal uptime checks, where internal_network is specified. + * + * @property {string} checkerId + * The checker ID. + * + * @property {string} displayName + * The checker's human-readable name. + * + * @typedef InternalChecker + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} + */ +var InternalChecker = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + /** * This message configures which resources and services to monitor for * availability. @@ -35,7 +63,15 @@ * to identify; however, uniqueness is not enforced. Required. * * @property {Object} monitoredResource - * The monitored resource associated with the configuration. + * The [monitored + * resource](https://cloud.google.com/monitoring/api/resources) associated + * with the configuration. + * The following monitored resource types are supported for uptime checks: + * uptime_url + * gce_instance + * gae_app + * aws_ec2_instance + * aws_elb_load_balancer * * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * @@ -55,8 +91,10 @@ * This object should have the same structure as [TcpCheck]{@link google.monitoring.v3.TcpCheck} * * @property {Object} period - * How often the uptime check is performed. - * Currently, only 1, 5, 10, and 15 minutes are supported. Required. + * How often, in seconds, the uptime check is performed. + * Currently, the only supported values are `60s` (1 minute), `300s` + * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + * defaults to `300s`. * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * @@ -84,8 +122,13 @@ * * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * + * @property {boolean} isInternal + * Denotes whether this is a check that egresses from InternalCheckers. + * * @property {Object[]} internalCheckers - * The internal checkers that this check will egress from. + * The internal checkers that this check will egress from. If `is_internal` is + * true and this list is empty, the check will egress from all + * InternalCheckers configured for the project that owns this CheckConfig. * * This object should have the same structure as [InternalChecker]{@link google.monitoring.v3.InternalChecker} * @@ -155,6 +198,7 @@ var UptimeCheckConfig = { * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). * Entering two separate headers with the same key in a Create call will * cause the first to be overwritten by the second. + * The maximum number of headers allowed is 100. * * @typedef HttpCheck * @memberof google.monitoring.v3 @@ -205,7 +249,7 @@ var UptimeCheckConfig = { * and more complex matching. * * @property {string} content - * String content to match + * String content to match (max 1024 bytes) * * @typedef ContentMatcher * @memberof google.monitoring.v3 @@ -213,33 +257,6 @@ var UptimeCheckConfig = { */ ContentMatcher: { // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Nimbus InternalCheckers. - * - * @property {string} projectId - * The GCP project ID. Not necessarily the same as the project_id for the config. - * - * @property {string} network - * The internal network to perform this uptime check on. - * - * @property {string} gcpZone - * The GCP zone the uptime check should egress from. Only respected for - * internal uptime checks, where internal_network is specified. - * - * @property {string} checkerId - * The checker ID. - * - * @property {string} displayName - * The checker's human-readable name. - * - * @typedef InternalChecker - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - InternalChecker: { - // This is for documentation. Actual contents will be loaded by gRPC. } }; @@ -311,8 +328,10 @@ var UptimeCheckRegion = { /** * The supported resource types that can be used as values of - * group_resource.resource_type. gae_app and uptime_url are not allowed - * because group checks on App Engine modules and URLs are not allowed. + * `group_resource.resource_type`. + * `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. + * The resource types `gae_app` and `uptime_url` are not valid here because + * group checks on App Engine modules and URLs are not allowed. * * @enum {number} * @memberof google.monitoring.v3 @@ -325,12 +344,13 @@ var GroupResourceType = { RESOURCE_TYPE_UNSPECIFIED: 0, /** - * A group of instances (could be either GCE or AWS_EC2). + * A group of instances from Google Cloud Platform (GCP) or + * Amazon Web Services (AWS). */ INSTANCE: 1, /** - * A group of AWS load balancers. + * A group of Amazon ELB load balancers. */ AWS_ELB_LOAD_BALANCER: 2 }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index 565fe868d90..a948014d012 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js @@ -19,9 +19,8 @@ * The protocol for the `ListUptimeCheckConfigs` request. * * @property {string} parent - * The project whose uptime check configurations are listed. The format is - * - * `projects/[PROJECT_ID]`. + * The project whose uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. * * @property {number} pageSize * The maximum number of results to return in a single response. The server @@ -57,6 +56,10 @@ var ListUptimeCheckConfigsRequest = { * next_page_token is passed to the subsequent List method call (in the * request message's page_token field). * + * @property {number} totalSize + * The total number of uptime check configurations for the project, + * irrespective of any pagination. + * * @typedef ListUptimeCheckConfigsResponse * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListUptimeCheckConfigsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} @@ -69,9 +72,8 @@ var ListUptimeCheckConfigsResponse = { * The protocol for the `GetUptimeCheckConfig` request. * * @property {string} name - * The uptime check configuration to retrieve. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to retrieve. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef GetUptimeCheckConfigRequest * @memberof google.monitoring.v3 @@ -85,9 +87,8 @@ var GetUptimeCheckConfigRequest = { * The protocol for the `CreateUptimeCheckConfig` request. * * @property {string} parent - * The project in which to create the uptime check. The format is: - * - * `projects/[PROJECT_ID]`. + * The project in which to create the uptime check. The format + * is `projects/[PROJECT_ID]`. * * @property {Object} uptimeCheckConfig * The new uptime check configuration. @@ -117,11 +118,15 @@ var CreateUptimeCheckConfigRequest = { * Required. If an `"updateMask"` has been specified, this field gives * the values for the set of fields mentioned in the `"updateMask"`. If an * `"updateMask"` has not been given, this uptime check configuration replaces - * the current configuration. If a field is mentioned in `"updateMask`" but + * the current configuration. If a field is mentioned in `"updateMask"` but * the corresonding field is omitted in this partial uptime check * configuration, it has the effect of deleting/clearing the field from the * configuration on the server. * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * * @typedef UpdateUptimeCheckConfigRequest @@ -136,9 +141,8 @@ var UpdateUptimeCheckConfigRequest = { * The protocol for the `DeleteUptimeCheckConfig` request. * * @property {string} name - * The uptime check configuration to delete. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to delete. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef DeleteUptimeCheckConfigRequest * @memberof google.monitoring.v3 diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js new file mode 100644 index 00000000000..f55fa17ff12 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js @@ -0,0 +1,131 @@ +// 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. + +/** + * `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 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 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. + * + * @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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js new file mode 100644 index 00000000000..efcd8ac5af9 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js new file mode 100644 index 00000000000..7122f1682e0 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js @@ -0,0 +1,92 @@ +// 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. + +/** + * The `Status` type defines a logical error model that is suitable for different + * programming environments, including REST APIs and RPC APIs. It is used by + * [gRPC](https://github.com/grpc). The error model is designed to be: + * + * - Simple to use and understand for most users + * - Flexible enough to meet unexpected needs + * + * # Overview + * + * The `Status` message contains three pieces of data: error code, error message, + * and error details. The error code should be an enum value of + * google.rpc.Code, but it may accept additional error codes if needed. The + * error message should be a developer-facing English message that helps + * developers *understand* and *resolve* the error. If a localized user-facing + * error message is needed, put the localized message in the error details or + * localize it in the client. The optional error details may contain arbitrary + * information about the error. There is a predefined set of error detail types + * in the package `google.rpc` that can be used for common error conditions. + * + * # Language mapping + * + * The `Status` message is the logical representation of the error model, but it + * is not necessarily the actual wire format. When the `Status` message is + * exposed in different client libraries and different wire protocols, it can be + * mapped differently. For example, it will likely be mapped to some exceptions + * in Java, but more likely mapped to some error codes in C. + * + * # Other uses + * + * The error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a + * consistent developer experience across different environments. + * + * Example uses of this error model include: + * + * - Partial errors. If a service needs to return partial errors to the client, + * it may embed the `Status` in the normal response to indicate the partial + * errors. + * + * - Workflow errors. A typical workflow has multiple steps. Each step may + * have a `Status` message for error reporting. + * + * - Batch operations. If a client uses batch request and batch response, the + * `Status` message should be used directly inside batch response, one for + * each error sub-response. + * + * - Asynchronous operations. If an API call embeds asynchronous operation + * results in its response, the status of those operations should be + * represented directly using the `Status` message. + * + * - Logging. If some API errors are stored in logs, the message `Status` could + * be used directly after any stripping needed for security/privacy reasons. + * + * @property {number} code + * The status code, which should be an enum value of google.rpc.Code. + * + * @property {string} message + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + * + * @property {Object[]} details + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + * + * This object should have the same structure as [Any]{@link google.protobuf.Any} + * + * @typedef Status + * @memberof google.rpc + * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} + */ +var Status = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 4f22c4df9cd..b6652770ac7 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -23,7 +23,7 @@ const VERSION = require('../../package.json').version; /** * The Group API lets you inspect and manage your - * [groups](https://cloud.google.comgoogle.monitoring.v3.Group). + * [groups](https://cloud.google.com#google.monitoring.v3.Group). * * A group is a named filter that is used to identify * a collection of monitored resources. Groups are typically used to diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 27e48c2ff54..3d1625518fb 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -806,9 +806,8 @@ class MetricServiceClient { * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @param {string} [request.orderBy] - * Specifies the order in which the points of the time series should - * be returned. By default, results are not ordered. Currently, - * this field must be left blank. + * Unsupported: must be left blank. The points in each time series are + * returned in reverse time order. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -957,9 +956,8 @@ class MetricServiceClient { * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @param {string} [request.orderBy] - * Specifies the order in which the points of the time series should - * be returned. By default, results are not ordered. Currently, - * this field must be left blank. + * Unsupported: must be left blank. The points in each time series are + * returned in reverse time order. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 8d4db920d03..d4e4b50fa43 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -221,9 +221,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose uptime check configurations are listed. The format is - * - * `projects/[PROJECT_ID]`. + * The project whose uptime check configurations are listed. The format + * is `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 @@ -331,9 +330,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose uptime check configurations are listed. The format is - * - * `projects/[PROJECT_ID]`. + * The project whose uptime check configurations are listed. The format + * is `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 @@ -378,9 +376,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The uptime check configuration to retrieve. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to retrieve. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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. @@ -426,9 +423,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which to create the uptime check. The format is: - * - * `projects/[PROJECT_ID]`. + * The project in which to create the uptime check. The format + * is `projects/[PROJECT_ID]`. * @param {Object} request.uptimeCheckConfig * The new uptime check configuration. * @@ -493,11 +489,15 @@ class UptimeCheckServiceClient { * Required. If an `"updateMask"` has been specified, this field gives * the values for the set of fields mentioned in the `"updateMask"`. If an * `"updateMask"` has not been given, this uptime check configuration replaces - * the current configuration. If a field is mentioned in `"updateMask`" but + * the current configuration. If a field is mentioned in `"updateMask"` but * the corresonding field is omitted in this partial uptime check * configuration, it has the effect of deleting/clearing the field from the * configuration on the server. * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @param {Object} [request.updateMask] * Optional. If present, only the listed fields in the current uptime check @@ -557,9 +557,8 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The uptime check configuration to delete. The format is - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * The uptime check configuration to delete. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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. diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 1de1c7f5a2c..749f50a2d1f 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -1749,10 +1749,12 @@ describe('UptimeCheckServiceClient', () => { // Mock response var nextPageToken = ''; + var totalSize = 705419236; var uptimeCheckConfigsElement = {}; var uptimeCheckConfigs = [uptimeCheckConfigsElement]; var expectedResponse = { nextPageToken: nextPageToken, + totalSize: totalSize, uptimeCheckConfigs: uptimeCheckConfigs, }; @@ -1820,9 +1822,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response var name2 = 'name2-1052831874'; var displayName = 'displayName1615086568'; + var isInternal = true; var expectedResponse = { name: name2, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer @@ -1887,9 +1891,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response var name = 'name3373707'; var displayName = 'displayName1615086568'; + var isInternal = true; var expectedResponse = { name: name, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer @@ -1951,9 +1957,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response var name = 'name3373707'; var displayName = 'displayName1615086568'; + var isInternal = true; var expectedResponse = { name: name, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer From 54c194efb92f3dbc94aef5e21dd863db81c00529 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 15 Aug 2018 04:26:24 -0700 Subject: [PATCH 116/422] doc: Fix namespace causing 404s (#99) --- packages/google-cloud-monitoring/src/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index 9cee6f734ac..9944aa3fd20 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -16,13 +16,19 @@ * @namespace google */ /** - * @namespace google.cloud + * @namespace google.monitoring */ /** - * @namespace google.cloud.monitoring + * @namespace google.monitoring.v3 */ /** - * @namespace google.cloud.monitoring.v3 + * @namespace google.protobuf + */ +/** + * @namespace google.rpc + */ +/** + * @namespace google.type */ 'use strict'; From b4fc2f4be220e7a06c2ebcccd38bc6db2d87c2d1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 15 Aug 2018 08:28:38 -0400 Subject: [PATCH 117/422] chore(deps): update dependency eslint-config-prettier to v3 (#97) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit

This Pull Request updates devDependency eslint-config-prettier from ^2.6.0 to ^3.0.0

Note: This PR was created on a configured schedule ("after 9am and before 3pm") and will not receive updates outside those times.


Release Notes

v3.0.1

Compare Source

  • Improved: eslint --print-config usage instructions.

v3.0.0

Compare Source

  • Breaking change: Dropped Node.js 4 support.


This PR has been generated by Renovate Bot.

--- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 1a1a61faa8f..c7db9060bb9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -68,7 +68,7 @@ "async": "^2.5.0", "codecov": "^3.0.0", "eslint": "^5.0.0", - "eslint-config-prettier": "^2.6.0", + "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", "eslint-plugin-prettier": "^2.3.1", "ink-docstrap": "^1.3.0", From abff06a4f322fc7a059baa0ea218304705db08e1 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 15 Aug 2018 15:49:50 -0700 Subject: [PATCH 118/422] Release v0.6.0 (#103) --- packages/google-cloud-monitoring/CHANGELOG.md | 48 +++++++++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 packages/google-cloud-monitoring/CHANGELOG.md diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md new file mode 100644 index 00000000000..4c981d76436 --- /dev/null +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -0,0 +1,48 @@ +# Changelog + +[npm history][1] + +[1]: https://www.npmjs.com/package/nodejs-monitoring?activeTab=versions + +## v0.6.0 + +### Implementation Changes +BREAKING CHANGE +- fix: drop support for node.js 4.x and 9.x (#72) + +### New Features +Bring in some documentation changes inside protos (see #96) + +### Dependencies +- chore(deps): update dependency eslint-config-prettier to v3 (#97) +- fix(deps): update dependency google-gax to ^0.18.0 (#88) +- chore(deps): update dependency eslint-plugin-node to v7 (#80) +- chore(deps): update dependency sinon to v6 (#64) +- fix(deps): update dependency yargs to v12 (#65) +- chore: check in synth script and update gax dependency (#62) +- chore(package): update eslint to version 5.0.0 (#57) +- chore(package): update nyc to version 12.0.2 (#53) + +### Documentation +- doc: Fix namespace causing 404s (#99) + +### Internal / Testing Changes +- chore: ignore package-lock.json (#93) +- test: add sample for updating an uptime check (#95) +- chore: update renovate config (#90) +- chore: move mocha options to mocha.opts (#85) +- chore: require node 8 for samples (#86) +- test: use strictEqual in tests (#81) +- chore: really delete node4 and node9 (#73) +- Configure Renovate (#56) +- refactor: drop repo-tool as an exec wrapper (#61) +- fix: update linking for samples (#58) +- chore: the ultimate fix for repo-tools EPERM (#50) +- test: fix uptime sample test (#48) +- chore: timeout for system test (#49) +- test: add resource type filter to alerts test (#46) +- Fixes #43. (#44) +- Fix region tags. (#42) +- Add Alerting samples. (#41) +- chore: test on node10 (#40) + diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c7db9060bb9..ffd33545e96 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.5.0", + "version": "0.6.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From f6f73d0cb0a863ef3820db4578dc48d373c5c3b6 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 15 Aug 2018 15:54:48 -0700 Subject: [PATCH 119/422] build: node templates (#101) * build: add node_templates to synth.py * npm ci => npm install --- packages/google-cloud-monitoring/synth.py | 50 +++++++++++++++-------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index eab9b86b22d..aedbf40fad6 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -1,27 +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. + +"""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 +import logging logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() +common_templates = gcp.CommonTemplates() + +version = "v3" + +library = gapic.node_library("monitoring", version, + config_path="/google/monitoring/artman_monitoring.yaml") -version = 'v3' +s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) -library = gapic.node_library( - 'monitoring', version, - config_path="/google/monitoring/" - "artman_monitoring.yaml") +templates = common_templates.node_library( + package_name="@google-cloud/monitoring", + repo_name="googleapis/nodejs-monitoring") -# skip index, protos, package.json, and README.md -s.copy( - library, - excludes=['package.json', 'README.md', 'src/index.js'], -) +s.copy(templates) -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'prettier']) -subprocess.run(['npm', 'run', 'lint']) +""" +Node.js specific cleanup +""" +subprocess.run(["npm", "install"]) +subprocess.run(["npm", "run", "prettier"]) +subprocess.run(["npm", "run", "lint"]) From 65c2f21a8d7def86a8a7400c13366f4bdd735c2f Mon Sep 17 00:00:00 2001 From: DPE bot Date: Thu, 16 Aug 2018 15:22:28 -0700 Subject: [PATCH 120/422] chore(build): make the CircleCI config consistent --- .../.circleci/config.yml | 26 ++++++++++++++----- .../CODE_OF_CONDUCT.md | 2 +- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 48055680b6c..6286d44c7cc 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -57,8 +57,9 @@ jobs: node6: docker: - image: 'node:6' + user: node steps: &unit_tests_steps - - checkout + - checkout - run: &npm_install_and_link name: Install and link the module command: |- @@ -68,18 +69,21 @@ jobs: NPM_CONFIG_PREFIX: /home/node/.npm-global - run: npm test - run: node_modules/.bin/codecov - + 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 @@ -87,14 +91,19 @@ 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: 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 @@ -104,6 +113,7 @@ jobs: sample_tests: docker: - image: 'node:8' + user: node steps: - checkout - run: @@ -119,15 +129,17 @@ jobs: command: npm run samples-test environment: GCLOUD_PROJECT: long-door-651 - GOOGLE_APPLICATION_CREDENTIALS: /var/monitoring/.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 when: always - working_directory: /var/monitoring/ + working_directory: /home/node/samples/ system_tests: docker: - image: 'node:8' + user: node steps: - checkout - run: @@ -142,7 +154,6 @@ jobs: command: npm run system-test environment: GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json - GCLOUD_PROJECT: long-door-651 - run: name: Remove unencrypted key. command: rm .circleci/key.json @@ -150,7 +161,8 @@ jobs: publish_npm: docker: - image: 'node:8' + user: node steps: - checkout - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: npm publish + - run: npm publish --access=public \ No newline at end of file diff --git a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md b/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md index 46b2a08ea6d..c3727800341 100644 --- a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md @@ -40,4 +40,4 @@ 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/) +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) \ No newline at end of file From 50e80aaa04add07272aee981faaac9905b154f8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 16 Aug 2018 15:32:59 -0700 Subject: [PATCH 121/422] fix(deps): update dependency @google-cloud/monitoring to ^0.6.0 (#104) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 5000d3affbe..20561f475fb 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -12,7 +12,7 @@ "test": "ava -T 3m --verbose system-test/*.test.js" }, "dependencies": { - "@google-cloud/monitoring": "^0.5.0", + "@google-cloud/monitoring": "^0.6.0", "yargs": "^12.0.0" }, "devDependencies": { From c4fea77f197b3d0f4b9905527c126f4322c8542a Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 22 Aug 2018 07:24:17 -0700 Subject: [PATCH 122/422] chore: make the CircleCI config consistent --- packages/google-cloud-monitoring/.circleci/config.yml | 2 +- packages/google-cloud-monitoring/CODE_OF_CONDUCT.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 6286d44c7cc..41c82336dbb 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -165,4 +165,4 @@ jobs: steps: - checkout - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - run: npm publish --access=public \ No newline at end of file + - run: npm publish --access=public diff --git a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md b/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md index c3727800341..46b2a08ea6d 100644 --- a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md @@ -40,4 +40,4 @@ 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/) \ No newline at end of file +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) From 046190f5a1e2f2bee89d02763b34f06b0c951832 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Mon, 27 Aug 2018 11:16:58 -0700 Subject: [PATCH 123/422] Update the CI config (#109) --- packages/google-cloud-monitoring/.circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 41c82336dbb..eab76c4a6ba 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -107,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' @@ -164,5 +162,6 @@ jobs: user: node steps: - checkout - - run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' + - npm install + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - run: npm publish --access=public From d47243cf3d3962280ebd90dc2a7f1a1eca1dd23d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 27 Aug 2018 19:30:05 -0700 Subject: [PATCH 124/422] fix(deps): update dependency google-gax to ^0.19.0 (#106) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index ffd33545e96..2deaceb9110 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ }, "dependencies": { "extend": "^3.0", - "google-gax": "^0.18.0", + "google-gax": "^0.19.0", "lodash.merge": "^4.6.0", "lodash.union": "^4.6.0" }, From 44d64112886cc6901f14a2dc4d7fca61c8850113 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 28 Aug 2018 07:59:25 -0700 Subject: [PATCH 125/422] chore(deps): update dependency nyc to v13 (#111) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2deaceb9110..c0119586722 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -75,7 +75,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.0.0", - "nyc": "^12.0.2", + "nyc": "^13.0.0", "power-assert": "^1.4.4", "prettier": "^1.7.4" } From d9ab5531f409ce697e1730bc10b34e5928a8d746 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 31 Aug 2018 16:22:18 -0700 Subject: [PATCH 126/422] Update CircleCI and Kokoro config (#113) * Re-generate library using /synth.py * run synth.py to regenerate templates --- .../.circleci/config.yml | 20 +++++++++++++----- packages/google-cloud-monitoring/.jsdoc.js | 4 ++-- .../src/v3/doc/google/protobuf/doc_any.js | 21 ++++++++++++------- .../v3/doc/google/protobuf/doc_field_mask.js | 6 ++++++ .../v3/doc/google/protobuf/doc_timestamp.js | 8 ++++--- 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index eab76c4a6ba..9a65e928a47 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.circleci/config.yml @@ -117,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: @@ -131,7 +133,10 @@ jobs: 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/samples/ system_tests: @@ -143,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. @@ -154,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: @@ -162,6 +172,6 @@ jobs: user: node steps: - checkout - - npm install + - run: npm install - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc - run: npm publish --access=public diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 44780a0d50e..10ceab0f822 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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/monitoring', diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js index f55fa17ff12..c5c5bbafa23 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js index c82c2b33949..d700752b7c6 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index a02db52bdeb..51d8f40f54d 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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 4c531d044d17298f1e799a490781c355c8c9adc3 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Sep 2018 10:55:49 -0700 Subject: [PATCH 127/422] Retry npm install in CI (#115) --- .../.circleci/config.yml | 6 +- .../.circleci/npm-install-retry.js | 60 +++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100755 packages/google-cloud-monitoring/.circleci/npm-install-retry.js diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 9a65e928a47..80dcf7e67d9 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.circleci/npm-install-retry.js b/packages/google-cloud-monitoring/.circleci/npm-install-retry.js new file mode 100755 index 00000000000..ae3220d7348 --- /dev/null +++ b/packages/google-cloud-monitoring/.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 b3e030e9001f7c4c8d3c4520f21c88f12fde69cf Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 6 Sep 2018 11:02:50 -0700 Subject: [PATCH 128/422] run synth.py to fix system-test (#117) * remove unused kwargs from synth.py * run synth.py --- packages/google-cloud-monitoring/.circleci/config.yml | 11 +++++++---- packages/google-cloud-monitoring/synth.py | 11 ++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 80dcf7e67d9..8af6a4d0489 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index aedbf40fad6..b0488cf9ad6 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -21,20 +21,17 @@ logging.basicConfig(level=logging.DEBUG) -gapic = gcp.GAPICGenerator() common_templates = gcp.CommonTemplates() version = "v3" -library = gapic.node_library("monitoring", version, - config_path="/google/monitoring/artman_monitoring.yaml") +library = gapic.node_library( + "monitoring", version, config_path="/google/monitoring/artman_monitoring.yaml" +) s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) -templates = common_templates.node_library( - package_name="@google-cloud/monitoring", - repo_name="googleapis/nodejs-monitoring") - +templates = common_templates.node_library() s.copy(templates) """ From e52e20414107cdd74d6fe7acf16c244305ad5b0b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 13 Sep 2018 06:58:19 -0700 Subject: [PATCH 129/422] fix(deps): update dependency google-gax to ^0.20.0 (#121) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c0119586722..8ae9427f0e0 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ }, "dependencies": { "extend": "^3.0", - "google-gax": "^0.19.0", + "google-gax": "^0.20.0", "lodash.merge": "^4.6.0", "lodash.union": "^4.6.0" }, From da76ea77053cd8f10af8ca209e811e2e721310cb Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 18 Sep 2018 10:51:33 -0700 Subject: [PATCH 130/422] Enable no-var in eslint (#122) --- .../google-cloud-monitoring/.eslintrc.yml | 1 + .../src/v3/alert_policy_service_client.js | 14 +- .../src/v3/group_service_client.js | 14 +- .../src/v3/metric_service_client.js | 14 +- .../v3/notification_channel_service_client.js | 14 +- .../src/v3/uptime_check_service_client.js | 14 +- .../system-test/metric_service_smoke_test.js | 22 +- .../google-cloud-monitoring/test/gapic-v3.js | 656 +++++++++--------- 8 files changed, 375 insertions(+), 374 deletions(-) diff --git a/packages/google-cloud-monitoring/.eslintrc.yml b/packages/google-cloud-monitoring/.eslintrc.yml index bed57fbc42c..65f1dce6c0c 100644 --- a/packages/google-cloud-monitoring/.eslintrc.yml +++ b/packages/google-cloud-monitoring/.eslintrc.yml @@ -11,3 +11,4 @@ rules: block-scoped-var: error eqeqeq: error no-warning-comments: warn + no-var: error diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 47c803230ba..92f97d9d211 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -79,13 +79,13 @@ class AlertPolicyServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + let 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 = [ + let clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -96,7 +96,7 @@ class AlertPolicyServiceClient { } // Load the applicable protos. - var protos = merge( + let protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -129,7 +129,7 @@ class AlertPolicyServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + let defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.AlertPolicyService', gapicConfig, opts.clientConfig, @@ -143,14 +143,14 @@ class AlertPolicyServiceClient { // Put together the "service stub" for // google.monitoring.v3.AlertPolicyService. - var alertPolicyServiceStub = gaxGrpc.createStub( + let alertPolicyServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.AlertPolicyService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var alertPolicyServiceStubMethods = [ + let alertPolicyServiceStubMethods = [ 'listAlertPolicies', 'getAlertPolicy', 'createAlertPolicy', @@ -162,7 +162,7 @@ class AlertPolicyServiceClient { alertPolicyServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + let args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index b6652770ac7..7d04ed43be4 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -82,13 +82,13 @@ class GroupServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + let 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 = [ + let clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -99,7 +99,7 @@ class GroupServiceClient { } // Load the applicable protos. - var protos = merge( + let protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -130,7 +130,7 @@ class GroupServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + let defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.GroupService', gapicConfig, opts.clientConfig, @@ -144,14 +144,14 @@ class GroupServiceClient { // Put together the "service stub" for // google.monitoring.v3.GroupService. - var groupServiceStub = gaxGrpc.createStub( + let groupServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.GroupService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var groupServiceStubMethods = [ + let groupServiceStubMethods = [ 'listGroups', 'getGroup', 'createGroup', @@ -164,7 +164,7 @@ class GroupServiceClient { groupServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + let args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 3d1625518fb..5a19cc85b2a 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -72,13 +72,13 @@ class MetricServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + let 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 = [ + let clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class MetricServiceClient { } // Load the applicable protos. - var protos = merge( + let protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -132,7 +132,7 @@ class MetricServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + let defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.MetricService', gapicConfig, opts.clientConfig, @@ -146,14 +146,14 @@ class MetricServiceClient { // Put together the "service stub" for // google.monitoring.v3.MetricService. - var metricServiceStub = gaxGrpc.createStub( + let metricServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.MetricService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var metricServiceStubMethods = [ + let metricServiceStubMethods = [ 'listMonitoredResourceDescriptors', 'getMonitoredResourceDescriptor', 'listMetricDescriptors', @@ -168,7 +168,7 @@ class MetricServiceClient { metricServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + let args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 5841ae74172..5e697f5d1ad 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -72,13 +72,13 @@ class NotificationChannelServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + let 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 = [ + let clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class NotificationChannelServiceClient { } // Load the applicable protos. - var protos = merge( + let protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -127,7 +127,7 @@ class NotificationChannelServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + let defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.NotificationChannelService', gapicConfig, opts.clientConfig, @@ -141,14 +141,14 @@ class NotificationChannelServiceClient { // Put together the "service stub" for // google.monitoring.v3.NotificationChannelService. - var notificationChannelServiceStub = gaxGrpc.createStub( + let notificationChannelServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.NotificationChannelService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var notificationChannelServiceStubMethods = [ + let notificationChannelServiceStubMethods = [ 'listNotificationChannelDescriptors', 'getNotificationChannelDescriptor', 'listNotificationChannels', @@ -162,7 +162,7 @@ class NotificationChannelServiceClient { notificationChannelServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + let args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index d4e4b50fa43..48524fdb301 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -78,13 +78,13 @@ class UptimeCheckServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - var gaxGrpc = new gax.GrpcClient(opts); + let 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 = [ + let clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -95,7 +95,7 @@ class UptimeCheckServiceClient { } // Load the applicable protos. - var protos = merge( + let protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -130,7 +130,7 @@ class UptimeCheckServiceClient { }; // Put together the default options sent with requests. - var defaults = gaxGrpc.constructSettings( + let defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.UptimeCheckService', gapicConfig, opts.clientConfig, @@ -144,14 +144,14 @@ class UptimeCheckServiceClient { // Put together the "service stub" for // google.monitoring.v3.UptimeCheckService. - var uptimeCheckServiceStub = gaxGrpc.createStub( + let uptimeCheckServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.UptimeCheckService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - var uptimeCheckServiceStubMethods = [ + let uptimeCheckServiceStubMethods = [ 'listUptimeCheckConfigs', 'getUptimeCheckConfig', 'createUptimeCheckConfig', @@ -164,7 +164,7 @@ class UptimeCheckServiceClient { uptimeCheckServiceStub.then( stub => function() { - var args = Array.prototype.slice.call(arguments, 0); + let args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js index 91a4f5786a8..9ca68e72308 100644 --- a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js @@ -18,22 +18,22 @@ describe('MetricServiceSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } - var projectId = process.env.GCLOUD_PROJECT; + let projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { const monitoring = require('../src'); - var client = new monitoring.v3.MetricServiceClient({ + let client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Iterate over all elements. - var formattedName = client.projectPath(projectId); + let formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptors({name: formattedName}) .then(responses => { - var resources = responses[0]; + let resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } @@ -45,19 +45,19 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using callbacks', done => { const monitoring = require('../src'); - var client = new monitoring.v3.MetricServiceClient({ + let client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Or obtain the paged response. - var formattedName = client.projectPath(projectId); + let formattedName = client.projectPath(projectId); - var options = {autoPaginate: false}; + let options = {autoPaginate: false}; var callback = responses => { // The actual resources in a response. - var resources = responses[0]; + let resources = responses[0]; // The next request if the response shows that there are more responses. - var nextRequest = responses[1]; + let nextRequest = responses[1]; // The actual response object, if necessary. // var rawResponse = responses[2]; for (let i = 0; i < resources.length; i += 1) { @@ -80,11 +80,11 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using streaming', done => { const monitoring = require('../src'); - var client = new monitoring.v3.MetricServiceClient({ + let client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); - var formattedName = client.projectPath(projectId); + let formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptorsStream({name: formattedName}) .on('data', element => { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 749f50a2d1f..7cf3d8fda5d 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -18,29 +18,29 @@ const assert = require('assert'); const monitoringModule = require('../src'); -var FAKE_STATUS_CODE = 1; -var error = new Error(); +let FAKE_STATUS_CODE = 1; +let error = new Error(); error.code = FAKE_STATUS_CODE; describe('AlertPolicyServiceClient', () => { describe('listAlertPolicies', () => { it('invokes listAlertPolicies without error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var alertPoliciesElement = {}; - var alertPolicies = [alertPoliciesElement]; - var expectedResponse = { + let nextPageToken = ''; + let alertPoliciesElement = {}; + let alertPolicies = [alertPoliciesElement]; + let expectedResponse = { nextPageToken: nextPageToken, alertPolicies: alertPolicies, }; @@ -63,14 +63,14 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes listAlertPolicies with error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; @@ -92,21 +92,21 @@ describe('AlertPolicyServiceClient', () => { describe('getAlertPolicy', () => { it('invokes getAlertPolicy without error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - var request = { + let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + let request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let expectedResponse = { name: name2, displayName: displayName, }; @@ -125,14 +125,14 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes getAlertPolicy with error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - var request = { + let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + let request = { name: formattedName, }; @@ -154,23 +154,23 @@ describe('AlertPolicyServiceClient', () => { describe('createAlertPolicy', () => { it('invokes createAlertPolicy without error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var alertPolicy = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let alertPolicy = {}; + let request = { name: formattedName, alertPolicy: alertPolicy, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let expectedResponse = { name: name2, displayName: displayName, }; @@ -189,15 +189,15 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes createAlertPolicy with error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var alertPolicy = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let alertPolicy = {}; + let request = { name: formattedName, alertPolicy: alertPolicy, }; @@ -220,14 +220,14 @@ describe('AlertPolicyServiceClient', () => { describe('deleteAlertPolicy', () => { it('invokes deleteAlertPolicy without error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - var request = { + let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + let request = { name: formattedName, }; @@ -241,14 +241,14 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes deleteAlertPolicy with error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - var request = { + let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + let request = { name: formattedName, }; @@ -269,21 +269,21 @@ describe('AlertPolicyServiceClient', () => { describe('updateAlertPolicy', () => { it('invokes updateAlertPolicy without error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var alertPolicy = {}; - var request = { + let alertPolicy = {}; + let request = { alertPolicy: alertPolicy, }; // Mock response - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var expectedResponse = { + let name = 'name3373707'; + let displayName = 'displayName1615086568'; + let expectedResponse = { name: name, displayName: displayName, }; @@ -302,14 +302,14 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes updateAlertPolicy with error', done => { - var client = new monitoringModule.v3.AlertPolicyServiceClient({ + let client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var alertPolicy = {}; - var request = { + let alertPolicy = {}; + let request = { alertPolicy: alertPolicy, }; @@ -332,22 +332,22 @@ describe('AlertPolicyServiceClient', () => { describe('GroupServiceClient', () => { describe('listGroups', () => { it('invokes listGroups without error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var groupElement = {}; - var group = [groupElement]; - var expectedResponse = { + let nextPageToken = ''; + let groupElement = {}; + let group = [groupElement]; + let expectedResponse = { nextPageToken: nextPageToken, group: group, }; @@ -366,14 +366,14 @@ describe('GroupServiceClient', () => { }); it('invokes listGroups with error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; @@ -395,24 +395,24 @@ describe('GroupServiceClient', () => { describe('getGroup', () => { it('invokes getGroup without error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - var request = { + let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + let request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var parentName = 'parentName1015022848'; - var filter = 'filter-1274492040'; - var isCluster = false; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let parentName = 'parentName1015022848'; + let filter = 'filter-1274492040'; + let isCluster = false; + let expectedResponse = { name: name2, displayName: displayName, parentName: parentName, @@ -434,14 +434,14 @@ describe('GroupServiceClient', () => { }); it('invokes getGroup with error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - var request = { + let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + let request = { name: formattedName, }; @@ -463,26 +463,26 @@ describe('GroupServiceClient', () => { describe('createGroup', () => { it('invokes createGroup without error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var group = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let group = {}; + let request = { name: formattedName, group: group, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var parentName = 'parentName1015022848'; - var filter = 'filter-1274492040'; - var isCluster = false; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let parentName = 'parentName1015022848'; + let filter = 'filter-1274492040'; + let isCluster = false; + let expectedResponse = { name: name2, displayName: displayName, parentName: parentName, @@ -504,15 +504,15 @@ describe('GroupServiceClient', () => { }); it('invokes createGroup with error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var group = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let group = {}; + let request = { name: formattedName, group: group, }; @@ -535,24 +535,24 @@ describe('GroupServiceClient', () => { describe('updateGroup', () => { it('invokes updateGroup without error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var group = {}; - var request = { + let group = {}; + let request = { group: group, }; // Mock response - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var parentName = 'parentName1015022848'; - var filter = 'filter-1274492040'; - var isCluster = false; - var expectedResponse = { + let name = 'name3373707'; + let displayName = 'displayName1615086568'; + let parentName = 'parentName1015022848'; + let filter = 'filter-1274492040'; + let isCluster = false; + let expectedResponse = { name: name, displayName: displayName, parentName: parentName, @@ -574,14 +574,14 @@ describe('GroupServiceClient', () => { }); it('invokes updateGroup with error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var group = {}; - var request = { + let group = {}; + let request = { group: group, }; @@ -603,14 +603,14 @@ describe('GroupServiceClient', () => { describe('deleteGroup', () => { it('invokes deleteGroup without error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - var request = { + let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + let request = { name: formattedName, }; @@ -624,14 +624,14 @@ describe('GroupServiceClient', () => { }); it('invokes deleteGroup with error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - var request = { + let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + let request = { name: formattedName, }; @@ -652,23 +652,23 @@ describe('GroupServiceClient', () => { describe('listGroupMembers', () => { it('invokes listGroupMembers without error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - var request = { + let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var totalSize = 705419236; - var membersElement = {}; - var members = [membersElement]; - var expectedResponse = { + let nextPageToken = ''; + let totalSize = 705419236; + let membersElement = {}; + let members = [membersElement]; + let expectedResponse = { nextPageToken: nextPageToken, totalSize: totalSize, members: members, @@ -692,14 +692,14 @@ describe('GroupServiceClient', () => { }); it('invokes listGroupMembers with error', done => { - var client = new monitoringModule.v3.GroupServiceClient({ + let client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - var request = { + let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + let request = { name: formattedName, }; @@ -722,22 +722,22 @@ describe('GroupServiceClient', () => { describe('MetricServiceClient', () => { describe('listMonitoredResourceDescriptors', () => { it('invokes listMonitoredResourceDescriptors without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var resourceDescriptorsElement = {}; - var resourceDescriptors = [resourceDescriptorsElement]; - var expectedResponse = { + let nextPageToken = ''; + let resourceDescriptorsElement = {}; + let resourceDescriptors = [resourceDescriptorsElement]; + let expectedResponse = { nextPageToken: nextPageToken, resourceDescriptors: resourceDescriptors, }; @@ -760,14 +760,14 @@ describe('MetricServiceClient', () => { }); it('invokes listMonitoredResourceDescriptors with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; @@ -789,26 +789,26 @@ describe('MetricServiceClient', () => { describe('getMonitoredResourceDescriptor', () => { it('invokes getMonitoredResourceDescriptor without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.monitoredResourceDescriptorPath( + let formattedName = client.monitoredResourceDescriptorPath( '[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var type = 'type3575610'; - var displayName = 'displayName1615086568'; - var description = 'description-1724546052'; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let type = 'type3575610'; + let displayName = 'displayName1615086568'; + let description = 'description-1724546052'; + let expectedResponse = { name: name2, type: type, displayName: displayName, @@ -829,17 +829,17 @@ describe('MetricServiceClient', () => { }); it('invokes getMonitoredResourceDescriptor with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.monitoredResourceDescriptorPath( + let formattedName = client.monitoredResourceDescriptorPath( '[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; @@ -861,22 +861,22 @@ describe('MetricServiceClient', () => { describe('listMetricDescriptors', () => { it('invokes listMetricDescriptors without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var metricDescriptorsElement = {}; - var metricDescriptors = [metricDescriptorsElement]; - var expectedResponse = { + let nextPageToken = ''; + let metricDescriptorsElement = {}; + let metricDescriptors = [metricDescriptorsElement]; + let expectedResponse = { nextPageToken: nextPageToken, metricDescriptors: metricDescriptors, }; @@ -899,14 +899,14 @@ describe('MetricServiceClient', () => { }); it('invokes listMetricDescriptors with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; @@ -928,27 +928,27 @@ describe('MetricServiceClient', () => { describe('getMetricDescriptor', () => { it('invokes getMetricDescriptor without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.metricDescriptorPath( + let formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var type = 'type3575610'; - var unit = 'unit3594628'; - var description = 'description-1724546052'; - var displayName = 'displayName1615086568'; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let type = 'type3575610'; + let unit = 'unit3594628'; + let description = 'description-1724546052'; + let displayName = 'displayName1615086568'; + let expectedResponse = { name: name2, type: type, unit: unit, @@ -970,17 +970,17 @@ describe('MetricServiceClient', () => { }); it('invokes getMetricDescriptor with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.metricDescriptorPath( + let formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; @@ -1002,26 +1002,26 @@ describe('MetricServiceClient', () => { describe('createMetricDescriptor', () => { it('invokes createMetricDescriptor without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var metricDescriptor = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let metricDescriptor = {}; + let request = { name: formattedName, metricDescriptor: metricDescriptor, }; // Mock response - var name2 = 'name2-1052831874'; - var type = 'type3575610'; - var unit = 'unit3594628'; - var description = 'description-1724546052'; - var displayName = 'displayName1615086568'; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let type = 'type3575610'; + let unit = 'unit3594628'; + let description = 'description-1724546052'; + let displayName = 'displayName1615086568'; + let expectedResponse = { name: name2, type: type, unit: unit, @@ -1043,15 +1043,15 @@ describe('MetricServiceClient', () => { }); it('invokes createMetricDescriptor with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var metricDescriptor = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let metricDescriptor = {}; + let request = { name: formattedName, metricDescriptor: metricDescriptor, }; @@ -1074,17 +1074,17 @@ describe('MetricServiceClient', () => { describe('deleteMetricDescriptor', () => { it('invokes deleteMetricDescriptor without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.metricDescriptorPath( + let formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; @@ -1100,17 +1100,17 @@ describe('MetricServiceClient', () => { }); it('invokes deleteMetricDescriptor with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.metricDescriptorPath( + let formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; @@ -1131,17 +1131,17 @@ describe('MetricServiceClient', () => { describe('listTimeSeries', () => { it('invokes listTimeSeries without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var filter = 'filter-1274492040'; - var interval = {}; - var view = 'FULL'; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let filter = 'filter-1274492040'; + let interval = {}; + let view = 'FULL'; + let request = { name: formattedName, filter: filter, interval: interval, @@ -1149,10 +1149,10 @@ describe('MetricServiceClient', () => { }; // Mock response - var nextPageToken = ''; - var timeSeriesElement = {}; - var timeSeries = [timeSeriesElement]; - var expectedResponse = { + let nextPageToken = ''; + let timeSeriesElement = {}; + let timeSeries = [timeSeriesElement]; + let expectedResponse = { nextPageToken: nextPageToken, timeSeries: timeSeries, }; @@ -1175,17 +1175,17 @@ describe('MetricServiceClient', () => { }); it('invokes listTimeSeries with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var filter = 'filter-1274492040'; - var interval = {}; - var view = 'FULL'; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let filter = 'filter-1274492040'; + let interval = {}; + let view = 'FULL'; + let request = { name: formattedName, filter: filter, interval: interval, @@ -1210,15 +1210,15 @@ describe('MetricServiceClient', () => { describe('createTimeSeries', () => { it('invokes createTimeSeries without error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var timeSeries = []; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let timeSeries = []; + let request = { name: formattedName, timeSeries: timeSeries, }; @@ -1233,15 +1233,15 @@ describe('MetricServiceClient', () => { }); it('invokes createTimeSeries with error', done => { - var client = new monitoringModule.v3.MetricServiceClient({ + let client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var timeSeries = []; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let timeSeries = []; + let request = { name: formattedName, timeSeries: timeSeries, }; @@ -1264,22 +1264,22 @@ describe('MetricServiceClient', () => { describe('NotificationChannelServiceClient', () => { describe('listNotificationChannelDescriptors', () => { it('invokes listNotificationChannelDescriptors without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var channelDescriptorsElement = {}; - var channelDescriptors = [channelDescriptorsElement]; - var expectedResponse = { + let nextPageToken = ''; + let channelDescriptorsElement = {}; + let channelDescriptors = [channelDescriptorsElement]; + let expectedResponse = { nextPageToken: nextPageToken, channelDescriptors: channelDescriptors, }; @@ -1302,14 +1302,14 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannelDescriptors with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; @@ -1331,26 +1331,26 @@ describe('NotificationChannelServiceClient', () => { describe('getNotificationChannelDescriptor', () => { it('invokes getNotificationChannelDescriptor without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.notificationChannelDescriptorPath( + let formattedName = client.notificationChannelDescriptorPath( '[PROJECT]', '[CHANNEL_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var type = 'type3575610'; - var displayName = 'displayName1615086568'; - var description = 'description-1724546052'; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let type = 'type3575610'; + let displayName = 'displayName1615086568'; + let description = 'description-1724546052'; + let expectedResponse = { name: name2, type: type, displayName: displayName, @@ -1371,17 +1371,17 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannelDescriptor with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.notificationChannelDescriptorPath( + let formattedName = client.notificationChannelDescriptorPath( '[PROJECT]', '[CHANNEL_DESCRIPTOR]' ); - var request = { + let request = { name: formattedName, }; @@ -1403,22 +1403,22 @@ describe('NotificationChannelServiceClient', () => { describe('listNotificationChannels', () => { it('invokes listNotificationChannels without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; // Mock response - var nextPageToken = ''; - var notificationChannelsElement = {}; - var notificationChannels = [notificationChannelsElement]; - var expectedResponse = { + let nextPageToken = ''; + let notificationChannelsElement = {}; + let notificationChannels = [notificationChannelsElement]; + let expectedResponse = { nextPageToken: nextPageToken, notificationChannels: notificationChannels, }; @@ -1441,14 +1441,14 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannels with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let request = { name: formattedName, }; @@ -1470,26 +1470,26 @@ describe('NotificationChannelServiceClient', () => { describe('getNotificationChannel', () => { it('invokes getNotificationChannel without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.notificationChannelPath( + let formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - var request = { + let request = { name: formattedName, }; // Mock response - var type = 'type3575610'; - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var description = 'description-1724546052'; - var expectedResponse = { + let type = 'type3575610'; + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let description = 'description-1724546052'; + let expectedResponse = { type: type, name: name2, displayName: displayName, @@ -1510,17 +1510,17 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannel with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.notificationChannelPath( + let formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - var request = { + let request = { name: formattedName, }; @@ -1542,25 +1542,25 @@ describe('NotificationChannelServiceClient', () => { describe('createNotificationChannel', () => { it('invokes createNotificationChannel without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var notificationChannel = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let notificationChannel = {}; + let request = { name: formattedName, notificationChannel: notificationChannel, }; // Mock response - var type = 'type3575610'; - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var description = 'description-1724546052'; - var expectedResponse = { + let type = 'type3575610'; + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let description = 'description-1724546052'; + let expectedResponse = { type: type, name: name2, displayName: displayName, @@ -1581,15 +1581,15 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes createNotificationChannel with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.projectPath('[PROJECT]'); - var notificationChannel = {}; - var request = { + let formattedName = client.projectPath('[PROJECT]'); + let notificationChannel = {}; + let request = { name: formattedName, notificationChannel: notificationChannel, }; @@ -1612,23 +1612,23 @@ describe('NotificationChannelServiceClient', () => { describe('updateNotificationChannel', () => { it('invokes updateNotificationChannel without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var notificationChannel = {}; - var request = { + let notificationChannel = {}; + let request = { notificationChannel: notificationChannel, }; // Mock response - var type = 'type3575610'; - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var description = 'description-1724546052'; - var expectedResponse = { + let type = 'type3575610'; + let name = 'name3373707'; + let displayName = 'displayName1615086568'; + let description = 'description-1724546052'; + let expectedResponse = { type: type, name: name, displayName: displayName, @@ -1649,14 +1649,14 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes updateNotificationChannel with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var notificationChannel = {}; - var request = { + let notificationChannel = {}; + let request = { notificationChannel: notificationChannel, }; @@ -1678,17 +1678,17 @@ describe('NotificationChannelServiceClient', () => { describe('deleteNotificationChannel', () => { it('invokes deleteNotificationChannel without error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.notificationChannelPath( + let formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - var request = { + let request = { name: formattedName, }; @@ -1704,17 +1704,17 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes deleteNotificationChannel with error', done => { - var client = new monitoringModule.v3.NotificationChannelServiceClient({ + let client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.notificationChannelPath( + let formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - var request = { + let request = { name: formattedName, }; @@ -1736,23 +1736,23 @@ describe('NotificationChannelServiceClient', () => { describe('UptimeCheckServiceClient', () => { describe('listUptimeCheckConfigs', () => { it('invokes listUptimeCheckConfigs without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + let formattedParent = client.projectPath('[PROJECT]'); + let request = { parent: formattedParent, }; // Mock response - var nextPageToken = ''; - var totalSize = 705419236; - var uptimeCheckConfigsElement = {}; - var uptimeCheckConfigs = [uptimeCheckConfigsElement]; - var expectedResponse = { + let nextPageToken = ''; + let totalSize = 705419236; + let uptimeCheckConfigsElement = {}; + let uptimeCheckConfigs = [uptimeCheckConfigsElement]; + let expectedResponse = { nextPageToken: nextPageToken, totalSize: totalSize, uptimeCheckConfigs: uptimeCheckConfigs, @@ -1776,14 +1776,14 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes listUptimeCheckConfigs with error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var request = { + let formattedParent = client.projectPath('[PROJECT]'); + let request = { parent: formattedParent, }; @@ -1805,25 +1805,25 @@ describe('UptimeCheckServiceClient', () => { describe('getUptimeCheckConfig', () => { it('invokes getUptimeCheckConfig without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.uptimeCheckConfigPath( + let formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - var request = { + let request = { name: formattedName, }; // Mock response - var name2 = 'name2-1052831874'; - var displayName = 'displayName1615086568'; - var isInternal = true; - var expectedResponse = { + let name2 = 'name2-1052831874'; + let displayName = 'displayName1615086568'; + let isInternal = true; + let expectedResponse = { name: name2, displayName: displayName, isInternal: isInternal, @@ -1843,17 +1843,17 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes getUptimeCheckConfig with error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.uptimeCheckConfigPath( + let formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - var request = { + let request = { name: formattedName, }; @@ -1875,24 +1875,24 @@ describe('UptimeCheckServiceClient', () => { describe('createUptimeCheckConfig', () => { it('invokes createUptimeCheckConfig without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var uptimeCheckConfig = {}; - var request = { + let formattedParent = client.projectPath('[PROJECT]'); + let uptimeCheckConfig = {}; + let request = { parent: formattedParent, uptimeCheckConfig: uptimeCheckConfig, }; // Mock response - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var isInternal = true; - var expectedResponse = { + let name = 'name3373707'; + let displayName = 'displayName1615086568'; + let isInternal = true; + let expectedResponse = { name: name, displayName: displayName, isInternal: isInternal, @@ -1912,15 +1912,15 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes createUptimeCheckConfig with error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedParent = client.projectPath('[PROJECT]'); - var uptimeCheckConfig = {}; - var request = { + let formattedParent = client.projectPath('[PROJECT]'); + let uptimeCheckConfig = {}; + let request = { parent: formattedParent, uptimeCheckConfig: uptimeCheckConfig, }; @@ -1943,22 +1943,22 @@ describe('UptimeCheckServiceClient', () => { describe('updateUptimeCheckConfig', () => { it('invokes updateUptimeCheckConfig without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var uptimeCheckConfig = {}; - var request = { + let uptimeCheckConfig = {}; + let request = { uptimeCheckConfig: uptimeCheckConfig, }; // Mock response - var name = 'name3373707'; - var displayName = 'displayName1615086568'; - var isInternal = true; - var expectedResponse = { + let name = 'name3373707'; + let displayName = 'displayName1615086568'; + let isInternal = true; + let expectedResponse = { name: name, displayName: displayName, isInternal: isInternal, @@ -1978,14 +1978,14 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes updateUptimeCheckConfig with error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var uptimeCheckConfig = {}; - var request = { + let uptimeCheckConfig = {}; + let request = { uptimeCheckConfig: uptimeCheckConfig, }; @@ -2007,17 +2007,17 @@ describe('UptimeCheckServiceClient', () => { describe('deleteUptimeCheckConfig', () => { it('invokes deleteUptimeCheckConfig without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.uptimeCheckConfigPath( + let formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - var request = { + let request = { name: formattedName, }; @@ -2033,17 +2033,17 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes deleteUptimeCheckConfig with error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var formattedName = client.uptimeCheckConfigPath( + let formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - var request = { + let request = { name: formattedName, }; @@ -2064,19 +2064,19 @@ describe('UptimeCheckServiceClient', () => { describe('listUptimeCheckIps', () => { it('invokes listUptimeCheckIps without error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var request = {}; + let request = {}; // Mock response - var nextPageToken = ''; - var uptimeCheckIpsElement = {}; - var uptimeCheckIps = [uptimeCheckIpsElement]; - var expectedResponse = { + let nextPageToken = ''; + let uptimeCheckIpsElement = {}; + let uptimeCheckIps = [uptimeCheckIpsElement]; + let expectedResponse = { nextPageToken: nextPageToken, uptimeCheckIps: uptimeCheckIps, }; @@ -2099,13 +2099,13 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes listUptimeCheckIps with error', done => { - var client = new monitoringModule.v3.UptimeCheckServiceClient({ + let client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - var request = {}; + let request = {}; // Mock Grpc layer client._innerApiCalls.listUptimeCheckIps = mockSimpleGrpcMethod( From dbad334e92a02ce68a64343e8afa9396f29c4d42 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 18 Sep 2018 16:14:56 -0700 Subject: [PATCH 131/422] Fix the linter (#123) --- packages/google-cloud-monitoring/package.json | 5 ++- .../smoke-test/.eslintrc.yml | 5 +++ .../smoke-test/metric_service_smoke_test.js | 44 ++++++++++--------- .../system-test/metric_service_smoke_test.js | 4 +- 4 files changed, 34 insertions(+), 24 deletions(-) create mode 100644 packages/google-cloud-monitoring/smoke-test/.eslintrc.yml diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8ae9427f0e0..3218c116cd0 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -50,12 +50,13 @@ "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", "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 **/*.js", "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", - "test": "npm run cover" + "test": "npm run cover", + "fix": "eslint **/*.js --fix && npm run prettier" }, "dependencies": { "extend": "^3.0", diff --git a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml new file mode 100644 index 00000000000..f5a6b01f2cf --- /dev/null +++ b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +rules: + no-console: off +env: + mocha: true diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index 221e0d2eee1..a1612e30ecd 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -16,23 +16,24 @@ describe('MetricServiceSmokeTest', () => { 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; + let projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { const monitoring = require('../src'); - var client = new monitoring.v3.MetricServiceClient({ + let client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Iterate over all elements. - var formattedName = client.projectPath(projectId); + let formattedName = client.projectPath(projectId); - client.listMonitoredResourceDescriptors({name: formattedName}) + client + .listMonitoredResourceDescriptors({name: formattedName}) .then(responses => { - var resources = responses[0]; + let resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } @@ -44,31 +45,33 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using callbacks', done => { const monitoring = require('../src'); - var client = new monitoring.v3.MetricServiceClient({ + let client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Or obtain the paged response. - var formattedName = client.projectPath(projectId); + let formattedName = client.projectPath(projectId); - - var options = {autoPaginate: false}; - var callback = responses => { + let options = {autoPaginate: false}; + const callback = responses => { // The actual resources in a response. - var resources = responses[0]; + let resources = responses[0]; // The next request if the response shows that there are more responses. - var nextRequest = responses[1]; + let 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) { console.log(resources[i]); } if (nextRequest) { // Fetch the next page. - return client.listMonitoredResourceDescriptors(nextRequest, options).then(callback); + return client + .listMonitoredResourceDescriptors(nextRequest, options) + .then(callback); } - } - client.listMonitoredResourceDescriptors({name: formattedName}, options) + }; + client + .listMonitoredResourceDescriptors({name: formattedName}, options) .then(callback) .then(done) .catch(done); @@ -77,12 +80,13 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using streaming', done => { const monitoring = require('../src'); - var client = new monitoring.v3.MetricServiceClient({ + let client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); - var formattedName = client.projectPath(projectId); - client.listMonitoredResourceDescriptorsStream({name: formattedName}) + let formattedName = client.projectPath(projectId); + client + .listMonitoredResourceDescriptorsStream({name: formattedName}) .on('data', element => { console.log(element); }) diff --git a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js index 9ca68e72308..a1612e30ecd 100644 --- a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js @@ -53,13 +53,13 @@ describe('MetricServiceSmokeTest', () => { let formattedName = client.projectPath(projectId); let options = {autoPaginate: false}; - var callback = responses => { + const callback = responses => { // The actual resources in a response. let resources = responses[0]; // The next request if the response shows that there are more responses. let 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) { console.log(resources[i]); } From 89e20458ba5f7d39ed6f1ed88b70716280fd995a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 20 Sep 2018 12:29:54 -0700 Subject: [PATCH 132/422] Enable prefer-const in the eslint config (#124) --- .../google-cloud-monitoring/.eslintrc.yml | 1 + .../smoke-test/metric_service_smoke_test.js | 22 +- .../src/v3/alert_policy_service_client.js | 16 +- .../src/v3/group_service_client.js | 16 +- .../src/v3/metric_service_client.js | 16 +- .../v3/notification_channel_service_client.js | 16 +- .../src/v3/uptime_check_service_client.js | 16 +- .../system-test/metric_service_smoke_test.js | 22 +- .../google-cloud-monitoring/test/gapic-v3.js | 668 +++++++++--------- 9 files changed, 403 insertions(+), 390 deletions(-) diff --git a/packages/google-cloud-monitoring/.eslintrc.yml b/packages/google-cloud-monitoring/.eslintrc.yml index 65f1dce6c0c..73eeec27612 100644 --- a/packages/google-cloud-monitoring/.eslintrc.yml +++ b/packages/google-cloud-monitoring/.eslintrc.yml @@ -12,3 +12,4 @@ rules: eqeqeq: error no-warning-comments: warn no-var: error + prefer-const: error diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index a1612e30ecd..685a7b593a3 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -18,22 +18,22 @@ describe('MetricServiceSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } - let projectId = process.env.GCLOUD_PROJECT; + const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { const monitoring = require('../src'); - let client = new monitoring.v3.MetricServiceClient({ + const client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Iterate over all elements. - let formattedName = client.projectPath(projectId); + const formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptors({name: formattedName}) .then(responses => { - let resources = responses[0]; + const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } @@ -45,19 +45,19 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using callbacks', done => { const monitoring = require('../src'); - let client = new monitoring.v3.MetricServiceClient({ + const client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Or obtain the paged response. - let formattedName = client.projectPath(projectId); + const formattedName = client.projectPath(projectId); - let options = {autoPaginate: false}; + const options = {autoPaginate: false}; const callback = responses => { // The actual resources in a response. - let resources = responses[0]; + const resources = responses[0]; // The next request if the response shows that there are more responses. - let nextRequest = responses[1]; + const nextRequest = responses[1]; // The actual response object, if necessary. // const rawResponse = responses[2]; for (let i = 0; i < resources.length; i += 1) { @@ -80,11 +80,11 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using streaming', done => { const monitoring = require('../src'); - let client = new monitoring.v3.MetricServiceClient({ + const client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); - let formattedName = client.projectPath(projectId); + const formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptorsStream({name: formattedName}) .on('data', element => { diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 92f97d9d211..2add1746c2f 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -79,13 +79,13 @@ class AlertPolicyServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - let 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. - let clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -96,7 +96,7 @@ class AlertPolicyServiceClient { } // Load the applicable protos. - let protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -129,7 +129,7 @@ class AlertPolicyServiceClient { }; // Put together the default options sent with requests. - let defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.AlertPolicyService', gapicConfig, opts.clientConfig, @@ -143,26 +143,26 @@ class AlertPolicyServiceClient { // Put together the "service stub" for // google.monitoring.v3.AlertPolicyService. - let alertPolicyServiceStub = gaxGrpc.createStub( + const alertPolicyServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.AlertPolicyService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - let alertPolicyServiceStubMethods = [ + const alertPolicyServiceStubMethods = [ 'listAlertPolicies', 'getAlertPolicy', 'createAlertPolicy', 'deleteAlertPolicy', 'updateAlertPolicy', ]; - for (let methodName of alertPolicyServiceStubMethods) { + for (const methodName of alertPolicyServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( alertPolicyServiceStub.then( stub => function() { - let args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 7d04ed43be4..0236af9e8ed 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -82,13 +82,13 @@ class GroupServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - let 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. - let clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -99,7 +99,7 @@ class GroupServiceClient { } // Load the applicable protos. - let protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -130,7 +130,7 @@ class GroupServiceClient { }; // Put together the default options sent with requests. - let defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.GroupService', gapicConfig, opts.clientConfig, @@ -144,14 +144,14 @@ class GroupServiceClient { // Put together the "service stub" for // google.monitoring.v3.GroupService. - let groupServiceStub = gaxGrpc.createStub( + const groupServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.GroupService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - let groupServiceStubMethods = [ + const groupServiceStubMethods = [ 'listGroups', 'getGroup', 'createGroup', @@ -159,12 +159,12 @@ class GroupServiceClient { 'deleteGroup', 'listGroupMembers', ]; - for (let methodName of groupServiceStubMethods) { + for (const methodName of groupServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( groupServiceStub.then( stub => function() { - let args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 5a19cc85b2a..63077330d4a 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -72,13 +72,13 @@ class MetricServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - let 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. - let clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class MetricServiceClient { } // Load the applicable protos. - let protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -132,7 +132,7 @@ class MetricServiceClient { }; // Put together the default options sent with requests. - let defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.MetricService', gapicConfig, opts.clientConfig, @@ -146,14 +146,14 @@ class MetricServiceClient { // Put together the "service stub" for // google.monitoring.v3.MetricService. - let metricServiceStub = gaxGrpc.createStub( + const metricServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.MetricService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - let metricServiceStubMethods = [ + const metricServiceStubMethods = [ 'listMonitoredResourceDescriptors', 'getMonitoredResourceDescriptor', 'listMetricDescriptors', @@ -163,12 +163,12 @@ class MetricServiceClient { 'listTimeSeries', 'createTimeSeries', ]; - for (let methodName of metricServiceStubMethods) { + for (const methodName of metricServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( metricServiceStub.then( stub => function() { - let args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 5e697f5d1ad..6e9b98c47ad 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -72,13 +72,13 @@ class NotificationChannelServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - let 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. - let clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -89,7 +89,7 @@ class NotificationChannelServiceClient { } // Load the applicable protos. - let protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -127,7 +127,7 @@ class NotificationChannelServiceClient { }; // Put together the default options sent with requests. - let defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.NotificationChannelService', gapicConfig, opts.clientConfig, @@ -141,14 +141,14 @@ class NotificationChannelServiceClient { // Put together the "service stub" for // google.monitoring.v3.NotificationChannelService. - let notificationChannelServiceStub = gaxGrpc.createStub( + const notificationChannelServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.NotificationChannelService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - let notificationChannelServiceStubMethods = [ + const notificationChannelServiceStubMethods = [ 'listNotificationChannelDescriptors', 'getNotificationChannelDescriptor', 'listNotificationChannels', @@ -157,12 +157,12 @@ class NotificationChannelServiceClient { 'updateNotificationChannel', 'deleteNotificationChannel', ]; - for (let methodName of notificationChannelServiceStubMethods) { + for (const methodName of notificationChannelServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( notificationChannelServiceStub.then( stub => function() { - let args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 48524fdb301..9be268aa451 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -78,13 +78,13 @@ class UptimeCheckServiceClient { // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = this.constructor.scopes; - let 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. - let clientHeader = [ + const clientHeader = [ `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, `gax/${gax.version}`, @@ -95,7 +95,7 @@ class UptimeCheckServiceClient { } // Load the applicable protos. - let protos = merge( + const protos = merge( {}, gaxGrpc.loadProto( path.join(__dirname, '..', '..', 'protos'), @@ -130,7 +130,7 @@ class UptimeCheckServiceClient { }; // Put together the default options sent with requests. - let defaults = gaxGrpc.constructSettings( + const defaults = gaxGrpc.constructSettings( 'google.monitoring.v3.UptimeCheckService', gapicConfig, opts.clientConfig, @@ -144,14 +144,14 @@ class UptimeCheckServiceClient { // Put together the "service stub" for // google.monitoring.v3.UptimeCheckService. - let uptimeCheckServiceStub = gaxGrpc.createStub( + const uptimeCheckServiceStub = gaxGrpc.createStub( protos.google.monitoring.v3.UptimeCheckService, opts ); // Iterate over each of the methods that the service provides // and create an API call method for each. - let uptimeCheckServiceStubMethods = [ + const uptimeCheckServiceStubMethods = [ 'listUptimeCheckConfigs', 'getUptimeCheckConfig', 'createUptimeCheckConfig', @@ -159,12 +159,12 @@ class UptimeCheckServiceClient { 'deleteUptimeCheckConfig', 'listUptimeCheckIps', ]; - for (let methodName of uptimeCheckServiceStubMethods) { + for (const methodName of uptimeCheckServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( uptimeCheckServiceStub.then( stub => function() { - let args = Array.prototype.slice.call(arguments, 0); + const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); } ), diff --git a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js index a1612e30ecd..685a7b593a3 100644 --- a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js @@ -18,22 +18,22 @@ describe('MetricServiceSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); } - let projectId = process.env.GCLOUD_PROJECT; + const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { const monitoring = require('../src'); - let client = new monitoring.v3.MetricServiceClient({ + const client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Iterate over all elements. - let formattedName = client.projectPath(projectId); + const formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptors({name: formattedName}) .then(responses => { - let resources = responses[0]; + const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); } @@ -45,19 +45,19 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using callbacks', done => { const monitoring = require('../src'); - let client = new monitoring.v3.MetricServiceClient({ + const client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); // Or obtain the paged response. - let formattedName = client.projectPath(projectId); + const formattedName = client.projectPath(projectId); - let options = {autoPaginate: false}; + const options = {autoPaginate: false}; const callback = responses => { // The actual resources in a response. - let resources = responses[0]; + const resources = responses[0]; // The next request if the response shows that there are more responses. - let nextRequest = responses[1]; + const nextRequest = responses[1]; // The actual response object, if necessary. // const rawResponse = responses[2]; for (let i = 0; i < resources.length; i += 1) { @@ -80,11 +80,11 @@ describe('MetricServiceSmokeTest', () => { it('successfully makes a call to the service using streaming', done => { const monitoring = require('../src'); - let client = new monitoring.v3.MetricServiceClient({ + const client = new monitoring.v3.MetricServiceClient({ // optional auth parameters. }); - let formattedName = client.projectPath(projectId); + const formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptorsStream({name: formattedName}) .on('data', element => { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 7cf3d8fda5d..75f630a7144 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -18,29 +18,29 @@ const assert = require('assert'); const monitoringModule = require('../src'); -let FAKE_STATUS_CODE = 1; -let error = new Error(); +const FAKE_STATUS_CODE = 1; +const error = new Error(); error.code = FAKE_STATUS_CODE; describe('AlertPolicyServiceClient', () => { describe('listAlertPolicies', () => { it('invokes listAlertPolicies without error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let alertPoliciesElement = {}; - let alertPolicies = [alertPoliciesElement]; - let expectedResponse = { + const nextPageToken = ''; + const alertPoliciesElement = {}; + const alertPolicies = [alertPoliciesElement]; + const expectedResponse = { nextPageToken: nextPageToken, alertPolicies: alertPolicies, }; @@ -63,14 +63,14 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes listAlertPolicies with error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; @@ -92,21 +92,24 @@ describe('AlertPolicyServiceClient', () => { describe('getAlertPolicy', () => { it('invokes getAlertPolicy without error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - let request = { + const formattedName = client.alertPolicyPath( + '[PROJECT]', + '[ALERT_POLICY]' + ); + const request = { name: formattedName, }; // Mock response - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const expectedResponse = { name: name2, displayName: displayName, }; @@ -125,14 +128,17 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes getAlertPolicy with error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - let request = { + const formattedName = client.alertPolicyPath( + '[PROJECT]', + '[ALERT_POLICY]' + ); + const request = { name: formattedName, }; @@ -154,23 +160,23 @@ describe('AlertPolicyServiceClient', () => { describe('createAlertPolicy', () => { it('invokes createAlertPolicy without error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let alertPolicy = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const alertPolicy = {}; + const request = { name: formattedName, alertPolicy: alertPolicy, }; // Mock response - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const expectedResponse = { name: name2, displayName: displayName, }; @@ -189,15 +195,15 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes createAlertPolicy with error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let alertPolicy = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const alertPolicy = {}; + const request = { name: formattedName, alertPolicy: alertPolicy, }; @@ -220,14 +226,17 @@ describe('AlertPolicyServiceClient', () => { describe('deleteAlertPolicy', () => { it('invokes deleteAlertPolicy without error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - let request = { + const formattedName = client.alertPolicyPath( + '[PROJECT]', + '[ALERT_POLICY]' + ); + const request = { name: formattedName, }; @@ -241,14 +250,17 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes deleteAlertPolicy with error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - let request = { + const formattedName = client.alertPolicyPath( + '[PROJECT]', + '[ALERT_POLICY]' + ); + const request = { name: formattedName, }; @@ -269,21 +281,21 @@ describe('AlertPolicyServiceClient', () => { describe('updateAlertPolicy', () => { it('invokes updateAlertPolicy without error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let alertPolicy = {}; - let request = { + const alertPolicy = {}; + const request = { alertPolicy: alertPolicy, }; // Mock response - let name = 'name3373707'; - let displayName = 'displayName1615086568'; - let expectedResponse = { + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const expectedResponse = { name: name, displayName: displayName, }; @@ -302,14 +314,14 @@ describe('AlertPolicyServiceClient', () => { }); it('invokes updateAlertPolicy with error', done => { - let client = new monitoringModule.v3.AlertPolicyServiceClient({ + const client = new monitoringModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let alertPolicy = {}; - let request = { + const alertPolicy = {}; + const request = { alertPolicy: alertPolicy, }; @@ -332,22 +344,22 @@ describe('AlertPolicyServiceClient', () => { describe('GroupServiceClient', () => { describe('listGroups', () => { it('invokes listGroups without error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let groupElement = {}; - let group = [groupElement]; - let expectedResponse = { + const nextPageToken = ''; + const groupElement = {}; + const group = [groupElement]; + const expectedResponse = { nextPageToken: nextPageToken, group: group, }; @@ -366,14 +378,14 @@ describe('GroupServiceClient', () => { }); it('invokes listGroups with error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; @@ -395,24 +407,24 @@ describe('GroupServiceClient', () => { describe('getGroup', () => { it('invokes getGroup without error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - let request = { + const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + const request = { name: formattedName, }; // Mock response - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let parentName = 'parentName1015022848'; - let filter = 'filter-1274492040'; - let isCluster = false; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const parentName = 'parentName1015022848'; + const filter = 'filter-1274492040'; + const isCluster = false; + const expectedResponse = { name: name2, displayName: displayName, parentName: parentName, @@ -434,14 +446,14 @@ describe('GroupServiceClient', () => { }); it('invokes getGroup with error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - let request = { + const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + const request = { name: formattedName, }; @@ -463,26 +475,26 @@ describe('GroupServiceClient', () => { describe('createGroup', () => { it('invokes createGroup without error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let group = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const group = {}; + const request = { name: formattedName, group: group, }; // Mock response - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let parentName = 'parentName1015022848'; - let filter = 'filter-1274492040'; - let isCluster = false; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const parentName = 'parentName1015022848'; + const filter = 'filter-1274492040'; + const isCluster = false; + const expectedResponse = { name: name2, displayName: displayName, parentName: parentName, @@ -504,15 +516,15 @@ describe('GroupServiceClient', () => { }); it('invokes createGroup with error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let group = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const group = {}; + const request = { name: formattedName, group: group, }; @@ -535,24 +547,24 @@ describe('GroupServiceClient', () => { describe('updateGroup', () => { it('invokes updateGroup without error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let group = {}; - let request = { + const group = {}; + const request = { group: group, }; // Mock response - let name = 'name3373707'; - let displayName = 'displayName1615086568'; - let parentName = 'parentName1015022848'; - let filter = 'filter-1274492040'; - let isCluster = false; - let expectedResponse = { + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const parentName = 'parentName1015022848'; + const filter = 'filter-1274492040'; + const isCluster = false; + const expectedResponse = { name: name, displayName: displayName, parentName: parentName, @@ -574,14 +586,14 @@ describe('GroupServiceClient', () => { }); it('invokes updateGroup with error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let group = {}; - let request = { + const group = {}; + const request = { group: group, }; @@ -603,14 +615,14 @@ describe('GroupServiceClient', () => { describe('deleteGroup', () => { it('invokes deleteGroup without error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - let request = { + const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + const request = { name: formattedName, }; @@ -624,14 +636,14 @@ describe('GroupServiceClient', () => { }); it('invokes deleteGroup with error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - let request = { + const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + const request = { name: formattedName, }; @@ -652,23 +664,23 @@ describe('GroupServiceClient', () => { describe('listGroupMembers', () => { it('invokes listGroupMembers without error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - let request = { + const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let totalSize = 705419236; - let membersElement = {}; - let members = [membersElement]; - let expectedResponse = { + const nextPageToken = ''; + const totalSize = 705419236; + const membersElement = {}; + const members = [membersElement]; + const expectedResponse = { nextPageToken: nextPageToken, totalSize: totalSize, members: members, @@ -692,14 +704,14 @@ describe('GroupServiceClient', () => { }); it('invokes listGroupMembers with error', done => { - let client = new monitoringModule.v3.GroupServiceClient({ + const client = new monitoringModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - let request = { + const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + const request = { name: formattedName, }; @@ -722,22 +734,22 @@ describe('GroupServiceClient', () => { describe('MetricServiceClient', () => { describe('listMonitoredResourceDescriptors', () => { it('invokes listMonitoredResourceDescriptors without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let resourceDescriptorsElement = {}; - let resourceDescriptors = [resourceDescriptorsElement]; - let expectedResponse = { + const nextPageToken = ''; + const resourceDescriptorsElement = {}; + const resourceDescriptors = [resourceDescriptorsElement]; + const expectedResponse = { nextPageToken: nextPageToken, resourceDescriptors: resourceDescriptors, }; @@ -760,14 +772,14 @@ describe('MetricServiceClient', () => { }); it('invokes listMonitoredResourceDescriptors with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; @@ -789,26 +801,26 @@ describe('MetricServiceClient', () => { describe('getMonitoredResourceDescriptor', () => { it('invokes getMonitoredResourceDescriptor without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.monitoredResourceDescriptorPath( + const formattedName = client.monitoredResourceDescriptorPath( '[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; // Mock response - let name2 = 'name2-1052831874'; - let type = 'type3575610'; - let displayName = 'displayName1615086568'; - let description = 'description-1724546052'; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const type = 'type3575610'; + const displayName = 'displayName1615086568'; + const description = 'description-1724546052'; + const expectedResponse = { name: name2, type: type, displayName: displayName, @@ -829,17 +841,17 @@ describe('MetricServiceClient', () => { }); it('invokes getMonitoredResourceDescriptor with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.monitoredResourceDescriptorPath( + const formattedName = client.monitoredResourceDescriptorPath( '[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; @@ -861,22 +873,22 @@ describe('MetricServiceClient', () => { describe('listMetricDescriptors', () => { it('invokes listMetricDescriptors without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let metricDescriptorsElement = {}; - let metricDescriptors = [metricDescriptorsElement]; - let expectedResponse = { + const nextPageToken = ''; + const metricDescriptorsElement = {}; + const metricDescriptors = [metricDescriptorsElement]; + const expectedResponse = { nextPageToken: nextPageToken, metricDescriptors: metricDescriptors, }; @@ -899,14 +911,14 @@ describe('MetricServiceClient', () => { }); it('invokes listMetricDescriptors with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; @@ -928,27 +940,27 @@ describe('MetricServiceClient', () => { describe('getMetricDescriptor', () => { it('invokes getMetricDescriptor without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.metricDescriptorPath( + const formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; // Mock response - let name2 = 'name2-1052831874'; - let type = 'type3575610'; - let unit = 'unit3594628'; - let description = 'description-1724546052'; - let displayName = 'displayName1615086568'; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const type = 'type3575610'; + const unit = 'unit3594628'; + const description = 'description-1724546052'; + const displayName = 'displayName1615086568'; + const expectedResponse = { name: name2, type: type, unit: unit, @@ -970,17 +982,17 @@ describe('MetricServiceClient', () => { }); it('invokes getMetricDescriptor with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.metricDescriptorPath( + const formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; @@ -1002,26 +1014,26 @@ describe('MetricServiceClient', () => { describe('createMetricDescriptor', () => { it('invokes createMetricDescriptor without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let metricDescriptor = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const metricDescriptor = {}; + const request = { name: formattedName, metricDescriptor: metricDescriptor, }; // Mock response - let name2 = 'name2-1052831874'; - let type = 'type3575610'; - let unit = 'unit3594628'; - let description = 'description-1724546052'; - let displayName = 'displayName1615086568'; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const type = 'type3575610'; + const unit = 'unit3594628'; + const description = 'description-1724546052'; + const displayName = 'displayName1615086568'; + const expectedResponse = { name: name2, type: type, unit: unit, @@ -1043,15 +1055,15 @@ describe('MetricServiceClient', () => { }); it('invokes createMetricDescriptor with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let metricDescriptor = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const metricDescriptor = {}; + const request = { name: formattedName, metricDescriptor: metricDescriptor, }; @@ -1074,17 +1086,17 @@ describe('MetricServiceClient', () => { describe('deleteMetricDescriptor', () => { it('invokes deleteMetricDescriptor without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.metricDescriptorPath( + const formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; @@ -1100,17 +1112,17 @@ describe('MetricServiceClient', () => { }); it('invokes deleteMetricDescriptor with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.metricDescriptorPath( + const formattedName = client.metricDescriptorPath( '[PROJECT]', '[METRIC_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; @@ -1131,17 +1143,17 @@ describe('MetricServiceClient', () => { describe('listTimeSeries', () => { it('invokes listTimeSeries without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let filter = 'filter-1274492040'; - let interval = {}; - let view = 'FULL'; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const filter = 'filter-1274492040'; + const interval = {}; + const view = 'FULL'; + const request = { name: formattedName, filter: filter, interval: interval, @@ -1149,10 +1161,10 @@ describe('MetricServiceClient', () => { }; // Mock response - let nextPageToken = ''; - let timeSeriesElement = {}; - let timeSeries = [timeSeriesElement]; - let expectedResponse = { + const nextPageToken = ''; + const timeSeriesElement = {}; + const timeSeries = [timeSeriesElement]; + const expectedResponse = { nextPageToken: nextPageToken, timeSeries: timeSeries, }; @@ -1175,17 +1187,17 @@ describe('MetricServiceClient', () => { }); it('invokes listTimeSeries with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let filter = 'filter-1274492040'; - let interval = {}; - let view = 'FULL'; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const filter = 'filter-1274492040'; + const interval = {}; + const view = 'FULL'; + const request = { name: formattedName, filter: filter, interval: interval, @@ -1210,15 +1222,15 @@ describe('MetricServiceClient', () => { describe('createTimeSeries', () => { it('invokes createTimeSeries without error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let timeSeries = []; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const timeSeries = []; + const request = { name: formattedName, timeSeries: timeSeries, }; @@ -1233,15 +1245,15 @@ describe('MetricServiceClient', () => { }); it('invokes createTimeSeries with error', done => { - let client = new monitoringModule.v3.MetricServiceClient({ + const client = new monitoringModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let timeSeries = []; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const timeSeries = []; + const request = { name: formattedName, timeSeries: timeSeries, }; @@ -1264,22 +1276,22 @@ describe('MetricServiceClient', () => { describe('NotificationChannelServiceClient', () => { describe('listNotificationChannelDescriptors', () => { it('invokes listNotificationChannelDescriptors without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let channelDescriptorsElement = {}; - let channelDescriptors = [channelDescriptorsElement]; - let expectedResponse = { + const nextPageToken = ''; + const channelDescriptorsElement = {}; + const channelDescriptors = [channelDescriptorsElement]; + const expectedResponse = { nextPageToken: nextPageToken, channelDescriptors: channelDescriptors, }; @@ -1302,14 +1314,14 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannelDescriptors with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; @@ -1331,26 +1343,26 @@ describe('NotificationChannelServiceClient', () => { describe('getNotificationChannelDescriptor', () => { it('invokes getNotificationChannelDescriptor without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.notificationChannelDescriptorPath( + const formattedName = client.notificationChannelDescriptorPath( '[PROJECT]', '[CHANNEL_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; // Mock response - let name2 = 'name2-1052831874'; - let type = 'type3575610'; - let displayName = 'displayName1615086568'; - let description = 'description-1724546052'; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const type = 'type3575610'; + const displayName = 'displayName1615086568'; + const description = 'description-1724546052'; + const expectedResponse = { name: name2, type: type, displayName: displayName, @@ -1371,17 +1383,17 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannelDescriptor with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.notificationChannelDescriptorPath( + const formattedName = client.notificationChannelDescriptorPath( '[PROJECT]', '[CHANNEL_DESCRIPTOR]' ); - let request = { + const request = { name: formattedName, }; @@ -1403,22 +1415,22 @@ describe('NotificationChannelServiceClient', () => { describe('listNotificationChannels', () => { it('invokes listNotificationChannels without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; // Mock response - let nextPageToken = ''; - let notificationChannelsElement = {}; - let notificationChannels = [notificationChannelsElement]; - let expectedResponse = { + const nextPageToken = ''; + const notificationChannelsElement = {}; + const notificationChannels = [notificationChannelsElement]; + const expectedResponse = { nextPageToken: nextPageToken, notificationChannels: notificationChannels, }; @@ -1441,14 +1453,14 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannels with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const request = { name: formattedName, }; @@ -1470,26 +1482,26 @@ describe('NotificationChannelServiceClient', () => { describe('getNotificationChannel', () => { it('invokes getNotificationChannel without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.notificationChannelPath( + const formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - let request = { + const request = { name: formattedName, }; // Mock response - let type = 'type3575610'; - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let description = 'description-1724546052'; - let expectedResponse = { + const type = 'type3575610'; + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const description = 'description-1724546052'; + const expectedResponse = { type: type, name: name2, displayName: displayName, @@ -1510,17 +1522,17 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannel with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.notificationChannelPath( + const formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - let request = { + const request = { name: formattedName, }; @@ -1542,25 +1554,25 @@ describe('NotificationChannelServiceClient', () => { describe('createNotificationChannel', () => { it('invokes createNotificationChannel without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let notificationChannel = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const notificationChannel = {}; + const request = { name: formattedName, notificationChannel: notificationChannel, }; // Mock response - let type = 'type3575610'; - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let description = 'description-1724546052'; - let expectedResponse = { + const type = 'type3575610'; + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const description = 'description-1724546052'; + const expectedResponse = { type: type, name: name2, displayName: displayName, @@ -1581,15 +1593,15 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes createNotificationChannel with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.projectPath('[PROJECT]'); - let notificationChannel = {}; - let request = { + const formattedName = client.projectPath('[PROJECT]'); + const notificationChannel = {}; + const request = { name: formattedName, notificationChannel: notificationChannel, }; @@ -1612,23 +1624,23 @@ describe('NotificationChannelServiceClient', () => { describe('updateNotificationChannel', () => { it('invokes updateNotificationChannel without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let notificationChannel = {}; - let request = { + const notificationChannel = {}; + const request = { notificationChannel: notificationChannel, }; // Mock response - let type = 'type3575610'; - let name = 'name3373707'; - let displayName = 'displayName1615086568'; - let description = 'description-1724546052'; - let expectedResponse = { + const type = 'type3575610'; + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const description = 'description-1724546052'; + const expectedResponse = { type: type, name: name, displayName: displayName, @@ -1649,14 +1661,14 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes updateNotificationChannel with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let notificationChannel = {}; - let request = { + const notificationChannel = {}; + const request = { notificationChannel: notificationChannel, }; @@ -1678,17 +1690,17 @@ describe('NotificationChannelServiceClient', () => { describe('deleteNotificationChannel', () => { it('invokes deleteNotificationChannel without error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.notificationChannelPath( + const formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - let request = { + const request = { name: formattedName, }; @@ -1704,17 +1716,17 @@ describe('NotificationChannelServiceClient', () => { }); it('invokes deleteNotificationChannel with error', done => { - let client = new monitoringModule.v3.NotificationChannelServiceClient({ + const client = new monitoringModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.notificationChannelPath( + const formattedName = client.notificationChannelPath( '[PROJECT]', '[NOTIFICATION_CHANNEL]' ); - let request = { + const request = { name: formattedName, }; @@ -1736,23 +1748,23 @@ describe('NotificationChannelServiceClient', () => { describe('UptimeCheckServiceClient', () => { describe('listUptimeCheckConfigs', () => { it('invokes listUptimeCheckConfigs without error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedParent = client.projectPath('[PROJECT]'); - let request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; // Mock response - let nextPageToken = ''; - let totalSize = 705419236; - let uptimeCheckConfigsElement = {}; - let uptimeCheckConfigs = [uptimeCheckConfigsElement]; - let expectedResponse = { + const nextPageToken = ''; + const totalSize = 705419236; + const uptimeCheckConfigsElement = {}; + const uptimeCheckConfigs = [uptimeCheckConfigsElement]; + const expectedResponse = { nextPageToken: nextPageToken, totalSize: totalSize, uptimeCheckConfigs: uptimeCheckConfigs, @@ -1776,14 +1788,14 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes listUptimeCheckConfigs with error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedParent = client.projectPath('[PROJECT]'); - let request = { + const formattedParent = client.projectPath('[PROJECT]'); + const request = { parent: formattedParent, }; @@ -1805,25 +1817,25 @@ describe('UptimeCheckServiceClient', () => { describe('getUptimeCheckConfig', () => { it('invokes getUptimeCheckConfig without error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.uptimeCheckConfigPath( + const formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - let request = { + const request = { name: formattedName, }; // Mock response - let name2 = 'name2-1052831874'; - let displayName = 'displayName1615086568'; - let isInternal = true; - let expectedResponse = { + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const isInternal = true; + const expectedResponse = { name: name2, displayName: displayName, isInternal: isInternal, @@ -1843,17 +1855,17 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes getUptimeCheckConfig with error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.uptimeCheckConfigPath( + const formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - let request = { + const request = { name: formattedName, }; @@ -1875,24 +1887,24 @@ describe('UptimeCheckServiceClient', () => { describe('createUptimeCheckConfig', () => { it('invokes createUptimeCheckConfig without error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedParent = client.projectPath('[PROJECT]'); - let uptimeCheckConfig = {}; - let request = { + const formattedParent = client.projectPath('[PROJECT]'); + const uptimeCheckConfig = {}; + const request = { parent: formattedParent, uptimeCheckConfig: uptimeCheckConfig, }; // Mock response - let name = 'name3373707'; - let displayName = 'displayName1615086568'; - let isInternal = true; - let expectedResponse = { + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const isInternal = true; + const expectedResponse = { name: name, displayName: displayName, isInternal: isInternal, @@ -1912,15 +1924,15 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes createUptimeCheckConfig with error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedParent = client.projectPath('[PROJECT]'); - let uptimeCheckConfig = {}; - let request = { + const formattedParent = client.projectPath('[PROJECT]'); + const uptimeCheckConfig = {}; + const request = { parent: formattedParent, uptimeCheckConfig: uptimeCheckConfig, }; @@ -1943,22 +1955,22 @@ describe('UptimeCheckServiceClient', () => { describe('updateUptimeCheckConfig', () => { it('invokes updateUptimeCheckConfig without error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let uptimeCheckConfig = {}; - let request = { + const uptimeCheckConfig = {}; + const request = { uptimeCheckConfig: uptimeCheckConfig, }; // Mock response - let name = 'name3373707'; - let displayName = 'displayName1615086568'; - let isInternal = true; - let expectedResponse = { + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const isInternal = true; + const expectedResponse = { name: name, displayName: displayName, isInternal: isInternal, @@ -1978,14 +1990,14 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes updateUptimeCheckConfig with error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let uptimeCheckConfig = {}; - let request = { + const uptimeCheckConfig = {}; + const request = { uptimeCheckConfig: uptimeCheckConfig, }; @@ -2007,17 +2019,17 @@ describe('UptimeCheckServiceClient', () => { describe('deleteUptimeCheckConfig', () => { it('invokes deleteUptimeCheckConfig without error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.uptimeCheckConfigPath( + const formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - let request = { + const request = { name: formattedName, }; @@ -2033,17 +2045,17 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes deleteUptimeCheckConfig with error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let formattedName = client.uptimeCheckConfigPath( + const formattedName = client.uptimeCheckConfigPath( '[PROJECT]', '[UPTIME_CHECK_CONFIG]' ); - let request = { + const request = { name: formattedName, }; @@ -2064,19 +2076,19 @@ describe('UptimeCheckServiceClient', () => { describe('listUptimeCheckIps', () => { it('invokes listUptimeCheckIps without error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let request = {}; + const request = {}; // Mock response - let nextPageToken = ''; - let uptimeCheckIpsElement = {}; - let uptimeCheckIps = [uptimeCheckIpsElement]; - let expectedResponse = { + const nextPageToken = ''; + const uptimeCheckIpsElement = {}; + const uptimeCheckIps = [uptimeCheckIpsElement]; + const expectedResponse = { nextPageToken: nextPageToken, uptimeCheckIps: uptimeCheckIps, }; @@ -2099,13 +2111,13 @@ describe('UptimeCheckServiceClient', () => { }); it('invokes listUptimeCheckIps with error', done => { - let client = new monitoringModule.v3.UptimeCheckServiceClient({ + const client = new monitoringModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); // Mock request - let request = {}; + const request = {}; // Mock Grpc layer client._innerApiCalls.listUptimeCheckIps = mockSimpleGrpcMethod( From 7aa3908c510af3e3b0080ba5f176878d1b537378 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 21 Sep 2018 12:52:31 -0700 Subject: [PATCH 133/422] Fix failing sample tests (#126) --- packages/google-cloud-monitoring/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 3218c116cd0..f6e8d1b6973 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -50,13 +50,13 @@ "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", - "lint": "eslint **/*.js", + "lint": "eslint '**/*.js'", "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", "test": "npm run cover", - "fix": "eslint **/*.js --fix && npm run prettier" + "fix": "eslint '**/*.js' --fix && npm run prettier" }, "dependencies": { "extend": "^3.0", From 4d48aa7652cdc09a6f02a7de85d2e270d31bc133 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 24 Sep 2018 17:00:51 -0700 Subject: [PATCH 134/422] test: remove appveyor config (#127) --- .../google-cloud-monitoring/.appveyor.yml | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 packages/google-cloud-monitoring/.appveyor.yml diff --git a/packages/google-cloud-monitoring/.appveyor.yml b/packages/google-cloud-monitoring/.appveyor.yml deleted file mode 100644 index 24082152655..00000000000 --- a/packages/google-cloud-monitoring/.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 183fbb24a6762031e9737a2fcf013783403c5b9c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 1 Oct 2018 05:01:07 -0700 Subject: [PATCH 135/422] chore(deps): update dependency eslint-plugin-prettier to v3 (#131) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f6e8d1b6973..47a55f4a1c1 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -71,7 +71,7 @@ "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^7.0.0", - "eslint-plugin-prettier": "^2.3.1", + "eslint-plugin-prettier": "^3.0.0", "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", From 2be95608571e56158e73e924843d770ee85c0460 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 1 Oct 2018 15:59:05 -0700 Subject: [PATCH 136/422] docs: fix link in changelog (#132) --- packages/google-cloud-monitoring/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 4c981d76436..4ddfbecbe4c 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -2,7 +2,7 @@ [npm history][1] -[1]: https://www.npmjs.com/package/nodejs-monitoring?activeTab=versions +[1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions ## v0.6.0 From 53a0eee6dd757fe31d8c32641dba072ae17337f1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 14 Oct 2018 07:59:59 -0700 Subject: [PATCH 137/422] chore(deps): update dependency sinon to v7 (#133) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 20561f475fb..ff1765014b8 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -19,6 +19,6 @@ "@google-cloud/nodejs-repo-tools": "^2.3.0", "ava": "^0.25.0", "proxyquire": "^2.0.1", - "sinon": "^6.0.1" + "sinon": "^7.0.0" } } From 1675769389a7429e7b06a447812e020052eee161 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 15 Oct 2018 14:43:31 -0700 Subject: [PATCH 138/422] build: fix codecov uploading on Kokoro (#134) * 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 --- packages/google-cloud-monitoring/.circleci/config.yml | 2 -- .../google-cloud-monitoring/.circleci/npm-install-retry.js | 2 +- packages/google-cloud-monitoring/codecov.yaml | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-monitoring/codecov.yaml diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 8af6a4d0489..da54155fc57 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.circleci/npm-install-retry.js b/packages/google-cloud-monitoring/.circleci/npm-install-retry.js index ae3220d7348..3240aa2cbf2 100755 --- a/packages/google-cloud-monitoring/.circleci/npm-install-retry.js +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/codecov.yaml b/packages/google-cloud-monitoring/codecov.yaml new file mode 100644 index 00000000000..5724ea9478d --- /dev/null +++ b/packages/google-cloud-monitoring/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com From b42f64ba8d3d061fd55bd3131e874d5c480dd412 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 24 Oct 2018 15:08:45 -0700 Subject: [PATCH 139/422] chore(build): fix the synth file and generation --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/synth.py | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 47a55f4a1c1..8ddbfce071e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -56,7 +56,7 @@ "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", "test": "npm run cover", - "fix": "eslint '**/*.js' --fix && npm run prettier" + "fix": "eslint '**/*.js' --fix" }, "dependencies": { "extend": "^3.0", diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index b0488cf9ad6..86c12f1e540 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -18,25 +18,18 @@ import synthtool.gcp as gcp import subprocess import logging - logging.basicConfig(level=logging.DEBUG) -common_templates = gcp.CommonTemplates() - +gapic = gcp.GAPICGenerator() version = "v3" - library = gapic.node_library( - "monitoring", version, config_path="/google/monitoring/artman_monitoring.yaml" + "monitoring", version, config_path="/google/monitoring/artman_monitoring.yaml" ) - s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) +common_templates = gcp.CommonTemplates() 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", "run", "fix"]) From ff188c69376669c0f09ea3327d0433226c8699b0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 24 Oct 2018 15:10:14 -0700 Subject: [PATCH 140/422] feat: run the generator --- .../src/v3/alert_policy_service_client.js | 48 +++--- .../src/v3/doc/google/api/doc_distribution.js | 159 +++++++++++------- .../src/v3/doc/google/api/doc_label.js | 2 +- .../src/v3/doc/google/api/doc_metric.js | 47 +++++- .../doc/google/api/doc_monitored_resource.js | 15 +- .../v3/doc/google/monitoring/v3/doc_alert.js | 2 +- .../google/monitoring/v3/doc_alert_service.js | 12 +- .../v3/doc/google/monitoring/v3/doc_common.js | 10 +- .../v3/doc/google/monitoring/v3/doc_group.js | 2 +- .../google/monitoring/v3/doc_group_service.js | 16 +- .../v3/doc/google/monitoring/v3/doc_metric.js | 4 +- .../monitoring/v3/doc_metric_service.js | 24 +-- .../monitoring/v3/doc_mutation_record.js | 2 +- .../google/monitoring/v3/doc_notification.js | 4 +- .../monitoring/v3/doc_notification_service.js | 26 +-- .../v3/doc/google/monitoring/v3/doc_uptime.js | 10 +- .../monitoring/v3/doc_uptime_service.js | 16 +- .../src/v3/doc/google/protobuf/doc_any.js | 2 +- .../v3/doc/google/protobuf/doc_duration.js | 2 +- .../src/v3/doc/google/protobuf/doc_empty.js | 2 +- .../v3/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v3/doc/google/protobuf/doc_struct.js | 8 +- .../v3/doc/google/protobuf/doc_timestamp.js | 2 +- .../v3/doc/google/protobuf/doc_wrappers.js | 18 +- .../src/v3/doc/google/rpc/doc_status.js | 2 +- .../src/v3/group_service_client.js | 70 ++++---- .../src/v3/metric_service_client.js | 124 +++++++------- .../v3/notification_channel_service_client.js | 76 ++++----- ...ication_channel_service_client_config.json | 1 + .../src/v3/uptime_check_service_client.js | 64 +++---- 30 files changed, 425 insertions(+), 347 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 2add1746c2f..84a3a224758 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -273,16 +273,16 @@ class AlertPolicyServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.AlertPolicyServiceClient({ + * const client = new monitoring.v3.AlertPolicyServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * * client.listAlertPolicies({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -292,17 +292,17 @@ class AlertPolicyServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = 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]); * } @@ -381,11 +381,11 @@ class AlertPolicyServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.AlertPolicyServiceClient({ + * const client = new monitoring.v3.AlertPolicyServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * client.listAlertPoliciesStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) @@ -427,14 +427,14 @@ class AlertPolicyServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.AlertPolicyServiceClient({ + * const client = new monitoring.v3.AlertPolicyServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + * const formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); * client.getAlertPolicy({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -486,19 +486,19 @@ class AlertPolicyServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.AlertPolicyServiceClient({ + * const client = new monitoring.v3.AlertPolicyServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); - * var alertPolicy = {}; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const alertPolicy = {}; + * const request = { * name: formattedName, * alertPolicy: alertPolicy, * }; * client.createAlertPolicy(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -538,11 +538,11 @@ class AlertPolicyServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.AlertPolicyServiceClient({ + * const client = new monitoring.v3.AlertPolicyServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); + * const formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); * client.deleteAlertPolicy({name: formattedName}).catch(err => { * console.error(err); * }); @@ -611,14 +611,14 @@ class AlertPolicyServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.AlertPolicyServiceClient({ + * const client = new monitoring.v3.AlertPolicyServiceClient({ * // optional auth parameters. * }); * - * var alertPolicy = {}; + * const alertPolicy = {}; * client.updateAlertPolicy({alertPolicy: alertPolicy}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js index 7629c3a8f76..dd297f6f840 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ b/packages/google-cloud-monitoring/src/v3/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) * @@ -57,29 +58,38 @@ * This object should have the same structure as [Range]{@link 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 * @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. /** @@ -100,29 +110,21 @@ var 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. @@ -147,12 +149,12 @@ var 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)). @@ -175,12 +177,12 @@ var 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)). @@ -203,17 +205,17 @@ var 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. @@ -225,5 +227,44 @@ var 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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js index 0ccae3a5932..b26faacb2d3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 7d5172fe633..ec52c27bf2a 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/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 @@ -130,13 +131,49 @@ * 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} */ -var MetricDescriptor = { +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. * @@ -233,6 +270,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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 733bf2b9e35..5c185bc5cdc 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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. }; @@ -101,15 +101,14 @@ var 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: @@ -127,6 +126,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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index 1796929d2ca..5a7e7f3d249 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -108,7 +108,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.AlertPolicy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} */ -var AlertPolicy = { +const AlertPolicy = { // This is for documentation. Actual contents will be loaded by gRPC. /** diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js index 9b52887e73f..606df7121d5 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js @@ -39,7 +39,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} */ -var CreateAlertPolicyRequest = { +const CreateAlertPolicyRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -55,7 +55,7 @@ var CreateAlertPolicyRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} */ -var GetAlertPolicyRequest = { +const GetAlertPolicyRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -100,7 +100,7 @@ var GetAlertPolicyRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListAlertPoliciesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} */ -var ListAlertPoliciesRequest = { +const ListAlertPoliciesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -121,7 +121,7 @@ var ListAlertPoliciesRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListAlertPoliciesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} */ -var ListAlertPoliciesResponse = { +const ListAlertPoliciesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -165,7 +165,7 @@ var ListAlertPoliciesResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UpdateAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} */ -var UpdateAlertPolicyRequest = { +const UpdateAlertPolicyRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -183,6 +183,6 @@ var UpdateAlertPolicyRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.DeleteAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} */ -var DeleteAlertPolicyRequest = { +const DeleteAlertPolicyRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index 08d9aa4fba7..42f951278f0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js @@ -41,7 +41,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.TypedValue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} */ -var TypedValue = { +const TypedValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -66,7 +66,7 @@ var TypedValue = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.TimeInterval definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} */ -var TimeInterval = { +const TimeInterval = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -140,7 +140,7 @@ var TimeInterval = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.Aggregation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} */ -var Aggregation = { +const Aggregation = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -470,7 +470,7 @@ var Aggregation = { * @enum {number} * @memberof google.monitoring.v3 */ -var ComparisonType = { +const ComparisonType = { /** * No ordering relationship is specified. @@ -516,7 +516,7 @@ var ComparisonType = { * @enum {number} * @memberof google.monitoring.v3 */ -var ServiceTier = { +const ServiceTier = { /** * An invalid sentinel value, used to indicate that a tier has not diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js index 27e6f4c0f31..380e4f9b965 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js @@ -69,6 +69,6 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.Group definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group.proto} */ -var Group = { +const Group = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js index b1e42a5b7f9..155665e2a8b 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js @@ -52,7 +52,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListGroupsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var ListGroupsRequest = { +const ListGroupsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -73,7 +73,7 @@ var ListGroupsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListGroupsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var ListGroupsResponse = { +const ListGroupsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -88,7 +88,7 @@ var ListGroupsResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var GetGroupRequest = { +const GetGroupRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -112,7 +112,7 @@ var GetGroupRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var CreateGroupRequest = { +const CreateGroupRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -132,7 +132,7 @@ var CreateGroupRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UpdateGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var UpdateGroupRequest = { +const UpdateGroupRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -147,7 +147,7 @@ var UpdateGroupRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.DeleteGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var DeleteGroupRequest = { +const DeleteGroupRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -187,7 +187,7 @@ var DeleteGroupRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListGroupMembersRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var ListGroupMembersRequest = { +const ListGroupMembersRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -211,6 +211,6 @@ var ListGroupMembersRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListGroupMembersResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} */ -var ListGroupMembersResponse = { +const ListGroupMembersResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index b2d8d3aab5f..293bc322606 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js @@ -39,7 +39,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.Point definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} */ -var Point = { +const Point = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -107,6 +107,6 @@ var Point = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.TimeSeries definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} */ -var TimeSeries = { +const TimeSeries = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index 97757a828d4..dfdc7148eae 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -43,7 +43,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var ListMonitoredResourceDescriptorsRequest = { +const ListMonitoredResourceDescriptorsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -65,7 +65,7 @@ var ListMonitoredResourceDescriptorsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var ListMonitoredResourceDescriptorsResponse = { +const ListMonitoredResourceDescriptorsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -82,7 +82,7 @@ var ListMonitoredResourceDescriptorsResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetMonitoredResourceDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var GetMonitoredResourceDescriptorRequest = { +const GetMonitoredResourceDescriptorRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -115,7 +115,7 @@ var GetMonitoredResourceDescriptorRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListMetricDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var ListMetricDescriptorsRequest = { +const ListMetricDescriptorsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -137,7 +137,7 @@ var ListMetricDescriptorsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListMetricDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var ListMetricDescriptorsResponse = { +const ListMetricDescriptorsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -154,7 +154,7 @@ var ListMetricDescriptorsResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var GetMetricDescriptorRequest = { +const GetMetricDescriptorRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -175,7 +175,7 @@ var GetMetricDescriptorRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var CreateMetricDescriptorRequest = { +const CreateMetricDescriptorRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -192,7 +192,7 @@ var CreateMetricDescriptorRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.DeleteMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var DeleteMetricDescriptorRequest = { +const DeleteMetricDescriptorRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -251,7 +251,7 @@ var DeleteMetricDescriptorRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListTimeSeriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var ListTimeSeriesRequest = { +const ListTimeSeriesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -299,7 +299,7 @@ var ListTimeSeriesRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListTimeSeriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var ListTimeSeriesResponse = { +const ListTimeSeriesResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -323,7 +323,7 @@ var ListTimeSeriesResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateTimeSeriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var CreateTimeSeriesRequest = { +const CreateTimeSeriesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -347,6 +347,6 @@ var CreateTimeSeriesRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateTimeSeriesError definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} */ -var CreateTimeSeriesError = { +const CreateTimeSeriesError = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js index 2bd28743359..7fe41af78ca 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js @@ -30,6 +30,6 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.MutationRecord definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/mutation_record.proto} */ -var MutationRecord = { +const MutationRecord = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js index f592f06c8ea..a81594ca4fe 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js @@ -57,7 +57,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.NotificationChannelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} */ -var NotificationChannelDescriptor = { +const NotificationChannelDescriptor = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -144,7 +144,7 @@ var NotificationChannelDescriptor = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.NotificationChannel definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} */ -var NotificationChannel = { +const NotificationChannel = { // This is for documentation. Actual contents will be loaded by gRPC. /** diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js index 4e1d52a18d5..21b2b49f135 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js @@ -43,7 +43,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListNotificationChannelDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var ListNotificationChannelDescriptorsRequest = { +const ListNotificationChannelDescriptorsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -66,7 +66,7 @@ var ListNotificationChannelDescriptorsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListNotificationChannelDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var ListNotificationChannelDescriptorsResponse = { +const ListNotificationChannelDescriptorsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -81,7 +81,7 @@ var ListNotificationChannelDescriptorsResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetNotificationChannelDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var GetNotificationChannelDescriptorRequest = { +const GetNotificationChannelDescriptorRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -107,7 +107,7 @@ var GetNotificationChannelDescriptorRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var CreateNotificationChannelRequest = { +const CreateNotificationChannelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -151,7 +151,7 @@ var CreateNotificationChannelRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListNotificationChannelsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var ListNotificationChannelsRequest = { +const ListNotificationChannelsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -173,7 +173,7 @@ var ListNotificationChannelsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListNotificationChannelsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var ListNotificationChannelsResponse = { +const ListNotificationChannelsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -188,7 +188,7 @@ var ListNotificationChannelsResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var GetNotificationChannelRequest = { +const GetNotificationChannelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -212,7 +212,7 @@ var GetNotificationChannelRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UpdateNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var UpdateNotificationChannelRequest = { +const UpdateNotificationChannelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -233,7 +233,7 @@ var UpdateNotificationChannelRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.DeleteNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var DeleteNotificationChannelRequest = { +const DeleteNotificationChannelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -247,7 +247,7 @@ var DeleteNotificationChannelRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.SendNotificationChannelVerificationCodeRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var SendNotificationChannelVerificationCodeRequest = { +const SendNotificationChannelVerificationCodeRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -276,7 +276,7 @@ var SendNotificationChannelVerificationCodeRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetNotificationChannelVerificationCodeRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var GetNotificationChannelVerificationCodeRequest = { +const GetNotificationChannelVerificationCodeRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -300,7 +300,7 @@ var GetNotificationChannelVerificationCodeRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetNotificationChannelVerificationCodeResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var GetNotificationChannelVerificationCodeResponse = { +const GetNotificationChannelVerificationCodeResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -323,6 +323,6 @@ var GetNotificationChannelVerificationCodeResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.VerifyNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} */ -var VerifyNotificationChannelRequest = { +const VerifyNotificationChannelRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index f1415a32c7f..9eae0276a48 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -39,7 +39,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} */ -var InternalChecker = { +const InternalChecker = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -136,7 +136,7 @@ var InternalChecker = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UptimeCheckConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} */ -var UptimeCheckConfig = { +const UptimeCheckConfig = { // This is for documentation. Actual contents will be loaded by gRPC. /** @@ -285,7 +285,7 @@ var UptimeCheckConfig = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UptimeCheckIp definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} */ -var UptimeCheckIp = { +const UptimeCheckIp = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -295,7 +295,7 @@ var UptimeCheckIp = { * @enum {number} * @memberof google.monitoring.v3 */ -var UptimeCheckRegion = { +const UptimeCheckRegion = { /** * Default value if no region is specified. Will result in uptime checks @@ -336,7 +336,7 @@ var UptimeCheckRegion = { * @enum {number} * @memberof google.monitoring.v3 */ -var GroupResourceType = { +const GroupResourceType = { /** * Default value (not valid). diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index a948014d012..de301b145c0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js @@ -37,7 +37,7 @@ * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListUptimeCheckConfigsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var ListUptimeCheckConfigsRequest = { +const ListUptimeCheckConfigsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -64,7 +64,7 @@ var ListUptimeCheckConfigsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListUptimeCheckConfigsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var ListUptimeCheckConfigsResponse = { +const ListUptimeCheckConfigsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -79,7 +79,7 @@ var ListUptimeCheckConfigsResponse = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.GetUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var GetUptimeCheckConfigRequest = { +const GetUptimeCheckConfigRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -99,7 +99,7 @@ var GetUptimeCheckConfigRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.CreateUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var CreateUptimeCheckConfigRequest = { +const CreateUptimeCheckConfigRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -133,7 +133,7 @@ var CreateUptimeCheckConfigRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UpdateUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var UpdateUptimeCheckConfigRequest = { +const UpdateUptimeCheckConfigRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -148,7 +148,7 @@ var UpdateUptimeCheckConfigRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.DeleteUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var DeleteUptimeCheckConfigRequest = { +const DeleteUptimeCheckConfigRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -172,7 +172,7 @@ var DeleteUptimeCheckConfigRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListUptimeCheckIpsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var ListUptimeCheckIpsRequest = { +const ListUptimeCheckIpsRequest = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -197,6 +197,6 @@ var ListUptimeCheckIpsRequest = { * @memberof google.monitoring.v3 * @see [google.monitoring.v3.ListUptimeCheckIpsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} */ -var ListUptimeCheckIpsResponse = { +const ListUptimeCheckIpsResponse = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js index c5c5bbafa23..3accb1fc0d8 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js index 3ea5c376abb..c03ce2fb3df 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js index 5e3640e90d8..b1d6b5e32a9 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js index d700752b7c6..0cb35328962 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js index efcd8ac5af9..ddf7e5c95dc 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index 51d8f40f54d..1ebe2e6e1a5 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js index 791b600ab1d..363b6391ac1 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js @@ -27,7 +27,7 @@ * @memberof google.protobuf * @see [google.protobuf.DoubleValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var DoubleValue = { +const DoubleValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -43,7 +43,7 @@ var DoubleValue = { * @memberof google.protobuf * @see [google.protobuf.FloatValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var FloatValue = { +const FloatValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -59,7 +59,7 @@ var FloatValue = { * @memberof google.protobuf * @see [google.protobuf.Int64Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var Int64Value = { +const Int64Value = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -75,7 +75,7 @@ var Int64Value = { * @memberof google.protobuf * @see [google.protobuf.UInt64Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var UInt64Value = { +const UInt64Value = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -91,7 +91,7 @@ var UInt64Value = { * @memberof google.protobuf * @see [google.protobuf.Int32Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var Int32Value = { +const Int32Value = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -107,7 +107,7 @@ var Int32Value = { * @memberof google.protobuf * @see [google.protobuf.UInt32Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var UInt32Value = { +const UInt32Value = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -123,7 +123,7 @@ var UInt32Value = { * @memberof google.protobuf * @see [google.protobuf.BoolValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var BoolValue = { +const BoolValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -139,7 +139,7 @@ var BoolValue = { * @memberof google.protobuf * @see [google.protobuf.StringValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var StringValue = { +const StringValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; @@ -155,6 +155,6 @@ var StringValue = { * @memberof google.protobuf * @see [google.protobuf.BytesValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} */ -var BytesValue = { +const BytesValue = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js index 7122f1682e0..13cfcab1021 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js @@ -87,6 +87,6 @@ * @memberof google.rpc * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} */ -var Status = { +const Status = { // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 0236af9e8ed..ed588906798 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -270,16 +270,16 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * * client.listGroups({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -289,17 +289,17 @@ class GroupServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = 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]); * } @@ -373,11 +373,11 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * client.listGroupsStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) @@ -418,14 +418,14 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); * client.getGroup({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -472,19 +472,19 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); - * var group = {}; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const group = {}; + * const request = { * name: formattedName, * group: group, * }; * client.createGroup(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -529,14 +529,14 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * - * var group = {}; + * const group = {}; * client.updateGroup({group: group}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -573,11 +573,11 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); * client.deleteGroup({name: formattedName}).catch(err => { * console.error(err); * }); @@ -648,16 +648,16 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); * * client.listGroupMembers({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -667,17 +667,17 @@ class GroupServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); * * - * 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]); * } @@ -751,11 +751,11 @@ class GroupServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.GroupServiceClient({ + * const client = new monitoring.v3.GroupServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.groupPath('[PROJECT]', '[GROUP]'); + * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); * client.listGroupMembersStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 63077330d4a..d71327ac26e 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -267,16 +267,16 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * * client.listMonitoredResourceDescriptors({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -286,17 +286,17 @@ class MetricServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = 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]); * } @@ -367,11 +367,11 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * client.listMonitoredResourceDescriptorsStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) @@ -414,14 +414,14 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + * const formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); * client.getMonitoredResourceDescriptor({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -492,16 +492,16 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * * client.listMetricDescriptors({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -511,17 +511,17 @@ class MetricServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = 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]); * } @@ -593,11 +593,11 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * client.listMetricDescriptorsStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) @@ -640,14 +640,14 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + * const formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); * client.getMetricDescriptor({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -694,19 +694,19 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); - * var metricDescriptor = {}; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const metricDescriptor = {}; + * const request = { * name: formattedName, * metricDescriptor: metricDescriptor, * }; * client.createMetricDescriptor(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -750,11 +750,11 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); + * const formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); * client.deleteMetricDescriptor({name: formattedName}).catch(err => { * console.error(err); * }); @@ -841,16 +841,16 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); - * var filter = ''; - * var interval = {}; - * var view = 'FULL'; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const filter = ''; + * const interval = {}; + * const view = 'FULL'; + * const request = { * name: formattedName, * filter: filter, * interval: interval, @@ -859,7 +859,7 @@ class MetricServiceClient { * * client.listTimeSeries(request) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -869,11 +869,11 @@ class MetricServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); - * var filter = ''; - * var interval = {}; - * var view = 'FULL'; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const filter = ''; + * const interval = {}; + * const view = 'FULL'; + * const request = { * name: formattedName, * filter: filter, * interval: interval, @@ -881,14 +881,14 @@ class MetricServiceClient { * }; * * - * 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]); * } @@ -974,15 +974,15 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); - * var filter = ''; - * var interval = {}; - * var view = 'FULL'; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const filter = ''; + * const interval = {}; + * const view = 'FULL'; + * const request = { * name: formattedName, * filter: filter, * interval: interval, @@ -1036,13 +1036,13 @@ class MetricServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.MetricServiceClient({ + * const client = new monitoring.v3.MetricServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); - * var timeSeries = []; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const timeSeries = []; + * const request = { * name: formattedName, * timeSeries: timeSeries, * }; diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 6e9b98c47ad..dca625470e5 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -261,16 +261,16 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * * client.listNotificationChannelDescriptors({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -280,17 +280,17 @@ class NotificationChannelServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = 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]); * } @@ -360,11 +360,11 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * client.listNotificationChannelDescriptorsStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) @@ -406,14 +406,14 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.notificationChannelDescriptorPath('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + * const formattedName = client.notificationChannelDescriptorPath('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); * client.getNotificationChannelDescriptor({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -492,16 +492,16 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * * client.listNotificationChannels({name: formattedName}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -511,17 +511,17 @@ class NotificationChannelServiceClient { * }); * * // Or obtain the paged response. - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = 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]); * } @@ -601,11 +601,11 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); + * const formattedName = client.projectPath('[PROJECT]'); * client.listNotificationChannelsStream({name: formattedName}) * .on('data', element => { * // doThingsWith(element) @@ -650,14 +650,14 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); * client.getNotificationChannel({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -712,19 +712,19 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.projectPath('[PROJECT]'); - * var notificationChannel = {}; - * var request = { + * const formattedName = client.projectPath('[PROJECT]'); + * const notificationChannel = {}; + * const request = { * name: formattedName, * notificationChannel: notificationChannel, * }; * client.createNotificationChannel(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -777,14 +777,14 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var notificationChannel = {}; + * const notificationChannel = {}; * client.updateNotificationChannel({notificationChannel: notificationChannel}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -830,11 +830,11 @@ class NotificationChannelServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.NotificationChannelServiceClient({ + * const client = new monitoring.v3.NotificationChannelServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); * client.deleteNotificationChannel({name: formattedName}).catch(err => { * console.error(err); * }); diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json index aabbd7a73b8..1df993432d5 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json @@ -6,6 +6,7 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], + "no_retry": [], "non_idempotent": [] }, "retry_params": { diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 9be268aa451..286b0ce1539 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -256,16 +256,16 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * * client.listUptimeCheckConfigs({parent: formattedParent}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -275,17 +275,17 @@ class UptimeCheckServiceClient { * }); * * // 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]); * } @@ -348,11 +348,11 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); + * const formattedParent = client.projectPath('[PROJECT]'); * client.listUptimeCheckConfigsStream({parent: formattedParent}) * .on('data', element => { * // doThingsWith(element) @@ -393,14 +393,14 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + * const formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); * client.getUptimeCheckConfig({name: formattedName}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -444,19 +444,19 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * - * var formattedParent = client.projectPath('[PROJECT]'); - * var uptimeCheckConfig = {}; - * var request = { + * const formattedParent = client.projectPath('[PROJECT]'); + * const uptimeCheckConfig = {}; + * const request = { * parent: formattedParent, * uptimeCheckConfig: uptimeCheckConfig, * }; * client.createUptimeCheckConfig(request) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -521,14 +521,14 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * - * var uptimeCheckConfig = {}; + * const uptimeCheckConfig = {}; * client.updateUptimeCheckConfig({uptimeCheckConfig: uptimeCheckConfig}) * .then(responses => { - * var response = responses[0]; + * const response = responses[0]; * // doThingsWith(response) * }) * .catch(err => { @@ -571,11 +571,11 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * - * var formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + * const formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); * client.deleteUptimeCheckConfig({name: formattedName}).catch(err => { * console.error(err); * }); @@ -632,14 +632,14 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * * // Iterate over all elements. * client.listUptimeCheckIps({}) * .then(responses => { - * var resources = responses[0]; + * const resources = responses[0]; * for (let i = 0; i < resources.length; i += 1) { * // doThingsWith(resources[i]) * } @@ -650,14 +650,14 @@ class UptimeCheckServiceClient { * * // 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]); * } @@ -713,7 +713,7 @@ class UptimeCheckServiceClient { * * const monitoring = require('@google-cloud/monitoring'); * - * var client = new monitoring.v3.UptimeCheckServiceClient({ + * const client = new monitoring.v3.UptimeCheckServiceClient({ * // optional auth parameters. * }); * From 76f873e8b561390903c898fee13a2678d74f3dd1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 28 Oct 2018 08:34:37 -0700 Subject: [PATCH 141/422] chore(deps): update dependency eslint-plugin-node to v8 (#143) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8ddbfce071e..970be392d87 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -70,7 +70,7 @@ "codecov": "^3.0.0", "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", - "eslint-plugin-node": "^7.0.0", + "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", From b63099842b0a1c90630732247c2ee397dd4a88a1 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 30 Oct 2018 10:01:05 -0700 Subject: [PATCH 142/422] chore: include build in eslintignore (#148) --- packages/google-cloud-monitoring/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/.eslintignore b/packages/google-cloud-monitoring/.eslintignore index f6fac98b0a8..f08b0fd1c65 100644 --- a/packages/google-cloud-monitoring/.eslintignore +++ b/packages/google-cloud-monitoring/.eslintignore @@ -1,3 +1,4 @@ node_modules/* samples/node_modules/* src/**/doc/* +build/ From 69293e57068a275adc237bf2c27fe768bb70d2a9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 1 Nov 2018 12:03:47 -0700 Subject: [PATCH 143/422] chore: update CircleCI config (#151) --- packages/google-cloud-monitoring/.circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index da54155fc57..6735ebdaaa1 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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 6d17fb68eca1bbda7e845db25f4c6c8ff155c49d Mon Sep 17 00:00:00 2001 From: dpebot Date: Tue, 6 Nov 2018 04:16:31 -0800 Subject: [PATCH 144/422] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .../v3/alert_policy_service_client_config.json | 10 +++++----- .../src/v3/group_service_client_config.json | 12 ++++++------ .../src/v3/metric_service_client_config.json | 16 ++++++++-------- ...tification_channel_service_client_config.json | 15 +++++++-------- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json index d6101ccaae8..de7fdbc0fdc 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json @@ -21,27 +21,27 @@ }, "methods": { "ListAlertPolicies": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json index a57878c2ece..fde5e90f1d0 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json @@ -21,32 +21,32 @@ }, "methods": { "ListGroups": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListGroupMembers": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json index 15f82ab1547..7dd4607375c 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json @@ -21,42 +21,42 @@ }, "methods": { "ListMonitoredResourceDescriptors": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetMonitoredResourceDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListMetricDescriptors": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetMetricDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateMetricDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteMetricDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListTimeSeries": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateTimeSeries": { - "timeout_millis": 60000, + "timeout_millis": 12000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json index 1df993432d5..322f187b956 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json @@ -6,7 +6,6 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "no_retry": [], "non_idempotent": [] }, "retry_params": { @@ -22,37 +21,37 @@ }, "methods": { "ListNotificationChannelDescriptors": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetNotificationChannelDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListNotificationChannels": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" } From e38167ed57f3a6fccd6856a6147a75a84d468f12 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 9 Nov 2018 10:01:11 -0800 Subject: [PATCH 145/422] chore: drop contributors from multiple places (#156) --- packages/google-cloud-monitoring/.mailmap | 6 ------ packages/google-cloud-monitoring/CONTRIBUTORS | 21 ------------------- packages/google-cloud-monitoring/package.json | 18 ---------------- 3 files changed, 45 deletions(-) delete mode 100644 packages/google-cloud-monitoring/.mailmap delete mode 100644 packages/google-cloud-monitoring/CONTRIBUTORS diff --git a/packages/google-cloud-monitoring/.mailmap b/packages/google-cloud-monitoring/.mailmap deleted file mode 100644 index 3e47e2a07cd..00000000000 --- a/packages/google-cloud-monitoring/.mailmap +++ /dev/null @@ -1,6 +0,0 @@ -Bill Prin Bill Prin -Jason Dobry Jason Dobry -Jason Dobry Jason Dobry -Luke Sneeringer Luke Sneeringer -Stephen Sawchuk Stephen Sawchuk -Stephen Sawchuk Stephen Sawchuk diff --git a/packages/google-cloud-monitoring/CONTRIBUTORS b/packages/google-cloud-monitoring/CONTRIBUTORS deleted file mode 100644 index ad74b859d25..00000000000 --- a/packages/google-cloud-monitoring/CONTRIBUTORS +++ /dev/null @@ -1,21 +0,0 @@ -# The names of individuals who have contributed to this project. -# -# Names are formatted as: -# name -# -Ace Nassri -Alexander Fenster -Bill Prin -Dave Gramlich -Ernest Landrito -Evawere Ogbe -Jason Dobry -Jun Mukai -Luke Sneeringer -Song Wang -Stephen -Stephen Sawchuk -Takashi Matsuo -Tim Swast -djbelcher -greenkeeper[bot] diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 970be392d87..37d4359203a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -28,24 +28,6 @@ "monitoring", "Stackdriver Monitoring API" ], - "contributors": [ - "Ace Nassri ", - "Alexander Fenster ", - "Bill Prin ", - "Dave Gramlich ", - "Ernest Landrito ", - "Evawere Ogbe ", - "Jason Dobry ", - "Jun Mukai ", - "Luke Sneeringer ", - "Song Wang ", - "Stephen ", - "Stephen Sawchuk ", - "Takashi Matsuo ", - "Tim Swast ", - "djbelcher ", - "greenkeeper[bot] " - ], "scripts": { "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", From b684ce9d37c4f642cfa4d7bdeb6c49d23300b723 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 8 Nov 2018 19:04:28 -0800 Subject: [PATCH 146/422] refactor: remove unused deps --- packages/google-cloud-monitoring/package.json | 6 +----- packages/google-cloud-monitoring/samples/package.json | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 37d4359203a..6dfe43c558a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -33,7 +33,6 @@ "docs": "jsdoc -c .jsdoc.js", "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint '**/*.js'", - "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", @@ -41,14 +40,11 @@ "fix": "eslint '**/*.js' --fix" }, "dependencies": { - "extend": "^3.0", "google-gax": "^0.20.0", - "lodash.merge": "^4.6.0", - "lodash.union": "^4.6.0" + "lodash.merge": "^4.6.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", - "async": "^2.5.0", "codecov": "^3.0.0", "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index ff1765014b8..a2114acb01b 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -5,6 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "repository": "googleapis/nodejs-monitoring", + "files": [ "*.js" ], "engines": { "node": ">=8" }, From 77a333bf2c4654f8e072ba0ff248995c7c67d4c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 10 Nov 2018 10:50:16 -0800 Subject: [PATCH 147/422] chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#158) --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 6dfe43c558a..b22dc7a23c4 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -44,7 +44,7 @@ "lodash.merge": "^4.6.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.3.0", + "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.0", "eslint": "^5.0.0", "eslint-config-prettier": "^3.0.0", diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index a2114acb01b..7c4b0e85a65 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -17,7 +17,7 @@ "yargs": "^12.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^2.3.0", + "@google-cloud/nodejs-repo-tools": "^3.0.0", "ava": "^0.25.0", "proxyquire": "^2.0.1", "sinon": "^7.0.0" From daaf0a2d295c8045aa969a027e3dc44b91627d42 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Sun, 11 Nov 2018 15:02:59 -0800 Subject: [PATCH 148/422] docs: update proto comments (#159) docs: update proto comments --- .../protos/google/monitoring/v3/alert.proto | 3 +- .../google/monitoring/v3/alert_service.proto | 3 +- .../protos/google/monitoring/v3/common.proto | 11 ++-- .../google/monitoring/v3/dropped_labels.proto | 3 +- .../protos/google/monitoring/v3/group.proto | 3 +- .../google/monitoring/v3/group_service.proto | 3 +- .../protos/google/monitoring/v3/metric.proto | 3 +- .../google/monitoring/v3/metric_service.proto | 4 +- .../monitoring/v3/mutation_record.proto | 3 +- .../google/monitoring/v3/notification.proto | 3 +- .../monitoring/v3/notification_service.proto | 6 ++- .../google/monitoring/v3/span_context.proto | 3 +- .../protos/google/monitoring/v3/uptime.proto | 54 ++++++++++++------- .../google/monitoring/v3/uptime_service.proto | 3 +- .../v3/doc/google/monitoring/v3/doc_common.js | 8 +-- .../v3/doc/google/monitoring/v3/doc_uptime.js | 47 ++++++++++------ .../v3/notification_channel_service_client.js | 2 +- 17 files changed, 101 insertions(+), 61 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 4c995b13bcc..1e22e61c794 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index 4bcb9d36e86..c97e3dc0585 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 3e9653a8588..f33af523bd2 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; @@ -391,8 +392,8 @@ enum ComparisonType { COMPARISON_NE = 6; } -// The tier of service for a Stackdriver account. Please see the -// [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers) +// The tier of service for a Workspace. Please see the +// [service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers) // for more details. enum ServiceTier { option deprecated = true; @@ -404,12 +405,12 @@ enum ServiceTier { // The Stackdriver Basic tier, a free tier of service that provides basic // features, a moderate allotment of logs, and access to built-in metrics. // A number of features are not available in this tier. For more details, - // see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + // see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). SERVICE_TIER_BASIC = 1; // The Stackdriver Premium tier, a higher, more expensive tier of service // that provides access to all Stackdriver features, lets you use Stackdriver // with AWS accounts, and has a larger allotments for logs and metrics. For - // more details, see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + // more details, see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). SERVICE_TIER_PREMIUM = 2; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index bc3b8545b92..11287062e81 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index bad5016c199..f7f49615bd7 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 7cfae976940..4af7e3719a1 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 9d2d8d72e00..570313229cc 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 170c4eae2a9..faf758e14a3 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; @@ -236,7 +237,6 @@ message ListTimeSeriesRequest { // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND // metric.label.instance_name = "my-instance-name" - // string filter = 2; // The time interval for which results should be returned. Only time series diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index 3c979a17981..5f85864fe49 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index ed6a56f7886..ac042762d3d 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index 745e3984ce3..e2c6a0ea723 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; @@ -20,6 +21,7 @@ import "google/api/annotations.proto"; import "google/monitoring/v3/notification.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; @@ -68,7 +70,7 @@ service NotificationChannelService { } // Creates a new notification channel, representing a single notification - // endpoint such as an email address, SMS number, or pagerduty service. + // endpoint such as an email address, SMS number, or PagerDuty service. rpc CreateNotificationChannel(CreateNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*}/notificationChannels" diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto index c099bbb618e..e870d8f669c 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 4c280e9b8d8..4f1b7aaa114 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; @@ -27,24 +28,34 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; -// Nimbus InternalCheckers. +// An internal checker allows uptime checks to run on private/internal GCP +// resources. message InternalChecker { - // The GCP project ID. Not necessarily the same as the project_id for the - // config. - string project_id = 1; + // A unique resource name for this InternalChecker. The format is: + // + // + // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. + // + // PROJECT_ID is the stackdriver workspace project for the + // uptime check config associated with the internal checker. + string name = 1; + + // The checker's human-readable name. The display name + // should be unique within a Stackdriver Workspace in order to make it easier + // to identify; however, uniqueness is not enforced. + string display_name = 2; - // The internal network to perform this uptime check on. - string network = 2; + // The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + // internal resource lives (ex: "default"). + string network = 3; // The GCP zone the uptime check should egress from. Only respected for // internal uptime checks, where internal_network is specified. - string gcp_zone = 3; - - // The checker ID. - string checker_id = 4; + string gcp_zone = 4; - // The checker's human-readable name. - string display_name = 5; + // The GCP project_id where the internal checker lives. Not necessary + // the same as the workspace project. + string peer_project_id = 6; } // This message configures which resources and services to monitor for @@ -118,11 +129,10 @@ message UptimeCheckConfig { int32 port = 1; } - // Used to perform string matching. Currently, this matches on the exact - // content. In the future, it can be expanded to allow for regular expressions - // and more complex matching. + // Used to perform string matching. It allows substring and regular + // expressions, together with their negations. message ContentMatcher { - // String content to match (max 1024 bytes) + // String or regex content to match (max 1024 bytes) string content = 1; } @@ -137,7 +147,7 @@ message UptimeCheckConfig { string name = 1; // A human-friendly name for the uptime check configuration. The display name - // should be unique within a Stackdriver Account in order to make it easier + // should be unique within a Stackdriver Workspace in order to make it easier // to identify; however, uniqueness is not enforced. Required. string display_name = 2; @@ -185,17 +195,21 @@ message UptimeCheckConfig { repeated ContentMatcher content_matchers = 9; // The list of regions from which the check will be run. + // Some regions contain one location, and others contain more than one. // If this field is specified, enough regions to include a minimum of // 3 locations must be provided, or an error message is returned. // Not specifying this field will result in uptime checks running from all // regions. repeated UptimeCheckRegion selected_regions = 10; - // Denotes whether this is a check that egresses from InternalCheckers. + // If this is true, then checks are made only from the 'internal_checkers'. + // If it is false, then checks are made only from the 'selected_regions'. + // It is an error to provide 'selected_regions' when is_internal is true, + // or to provide 'internal_checkers' when is_internal is false. bool is_internal = 15; // The internal checkers that this check will egress from. If `is_internal` is - // true and this list is empty, the check will egress from all + // true and this list is empty, the check will egress from all the // InternalCheckers configured for the project that owns this CheckConfig. repeated InternalChecker internal_checkers = 14; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index 3293edaef15..e79488332fd 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// 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"; diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index 42f951278f0..4cc1740cdba 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js @@ -509,8 +509,8 @@ const ComparisonType = { }; /** - * The tier of service for a Stackdriver account. Please see the - * [service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers) + * The tier of service for a Workspace. Please see the + * [service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers) * for more details. * * @enum {number} @@ -528,7 +528,7 @@ const ServiceTier = { * The Stackdriver Basic tier, a free tier of service that provides basic * features, a moderate allotment of logs, and access to built-in metrics. * A number of features are not available in this tier. For more details, - * see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + * see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). */ SERVICE_TIER_BASIC: 1, @@ -536,7 +536,7 @@ const ServiceTier = { * The Stackdriver Premium tier, a higher, more expensive tier of service * that provides access to all Stackdriver features, lets you use Stackdriver * with AWS accounts, and has a larger allotments for logs and metrics. For - * more details, see [the service tiers documentation](https://cloud.google.com/monitoring/accounts/tiers). + * more details, see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). */ SERVICE_TIER_PREMIUM: 2 }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 9eae0276a48..5ad74c5df89 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -16,24 +16,34 @@ // to be loaded as the JS file. /** - * Nimbus InternalCheckers. + * An internal checker allows uptime checks to run on private/internal GCP + * resources. * - * @property {string} projectId - * The GCP project ID. Not necessarily the same as the project_id for the - * config. + * @property {string} name + * A unique resource name for this InternalChecker. The format is: + * + * + * `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. + * + * PROJECT_ID is the stackdriver workspace project for the + * uptime check config associated with the internal checker. + * + * @property {string} displayName + * The checker's human-readable name. The display name + * should be unique within a Stackdriver Workspace in order to make it easier + * to identify; however, uniqueness is not enforced. * * @property {string} network - * The internal network to perform this uptime check on. + * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + * internal resource lives (ex: "default"). * * @property {string} gcpZone * The GCP zone the uptime check should egress from. Only respected for * internal uptime checks, where internal_network is specified. * - * @property {string} checkerId - * The checker ID. - * - * @property {string} displayName - * The checker's human-readable name. + * @property {string} peerProjectId + * The GCP project_id where the internal checker lives. Not necessary + * the same as the workspace project. * * @typedef InternalChecker * @memberof google.monitoring.v3 @@ -59,7 +69,7 @@ const InternalChecker = { * * @property {string} displayName * A human-friendly name for the uptime check configuration. The display name - * should be unique within a Stackdriver Account in order to make it easier + * should be unique within a Stackdriver Workspace in order to make it easier * to identify; however, uniqueness is not enforced. Required. * * @property {Object} monitoredResource @@ -115,6 +125,7 @@ const InternalChecker = { * * @property {number[]} selectedRegions * The list of regions from which the check will be run. + * Some regions contain one location, and others contain more than one. * If this field is specified, enough regions to include a minimum of * 3 locations must be provided, or an error message is returned. * Not specifying this field will result in uptime checks running from all @@ -123,11 +134,14 @@ const InternalChecker = { * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * * @property {boolean} isInternal - * Denotes whether this is a check that egresses from InternalCheckers. + * If this is true, then checks are made only from the 'internal_checkers'. + * If it is false, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is true, + * or to provide 'internal_checkers' when is_internal is false. * * @property {Object[]} internalCheckers * The internal checkers that this check will egress from. If `is_internal` is - * true and this list is empty, the check will egress from all + * true and this list is empty, the check will egress from all the * InternalCheckers configured for the project that owns this CheckConfig. * * This object should have the same structure as [InternalChecker]{@link google.monitoring.v3.InternalChecker} @@ -244,12 +258,11 @@ const UptimeCheckConfig = { }, /** - * Used to perform string matching. Currently, this matches on the exact - * content. In the future, it can be expanded to allow for regular expressions - * and more complex matching. + * Used to perform string matching. It allows substring and regular + * expressions, together with their negations. * * @property {string} content - * String content to match (max 1024 bytes) + * String or regex content to match (max 1024 bytes) * * @typedef ContentMatcher * @memberof google.monitoring.v3 diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index dca625470e5..9e7580777e8 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -680,7 +680,7 @@ class NotificationChannelServiceClient { /** * Creates a new notification channel, representing a single notification - * endpoint such as an email address, SMS number, or pagerduty service. + * endpoint such as an email address, SMS number, or PagerDuty service. * * @param {Object} request * The request object that will be sent. From 7b8b91adc76d30acd0fdc85cf3bf416377b56ae8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 12 Nov 2018 15:54:47 -0800 Subject: [PATCH 149/422] chore: update eslintignore config (#160) --- packages/google-cloud-monitoring/.eslintignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.eslintignore b/packages/google-cloud-monitoring/.eslintignore index f08b0fd1c65..2f642cb6044 100644 --- a/packages/google-cloud-monitoring/.eslintignore +++ b/packages/google-cloud-monitoring/.eslintignore @@ -1,4 +1,3 @@ -node_modules/* -samples/node_modules/* +**/node_modules src/**/doc/* build/ From d67a1484f19c7d6d02f4f5cf600f3b180cd3c333 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 13 Nov 2018 21:06:47 -0800 Subject: [PATCH 150/422] fix(deps): update dependency google-gax to ^0.22.0 (#161) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b22dc7a23c4..78d0f07373c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,7 +40,7 @@ "fix": "eslint '**/*.js' --fix" }, "dependencies": { - "google-gax": "^0.20.0", + "google-gax": "^0.22.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From ba4ad10449e9173d6e958b516a088b7c3010999d Mon Sep 17 00:00:00 2001 From: muraliQlogic <38901089+muraliQlogic@users.noreply.github.com> Date: Sat, 17 Nov 2018 04:07:55 +0530 Subject: [PATCH 151/422] docs(samples): convert samples to async/await, and use mocha for tests (#146) --- .../samples/package.json | 4 +- .../samples/quickstart.js | 85 +++++++++---------- 2 files changed, 43 insertions(+), 46 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 7c4b0e85a65..11c7c8352f1 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -10,7 +10,7 @@ "node": ">=8" }, "scripts": { - "test": "ava -T 3m --verbose system-test/*.test.js" + "test": "mocha system-test/*.js --timeout 600000" }, "dependencies": { "@google-cloud/monitoring": "^0.6.0", @@ -18,7 +18,7 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", - "ava": "^0.25.0", + "mocha": "^5.0.0", "proxyquire": "^2.0.1", "sinon": "^7.0.0" } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index 31c0e6a9bce..fbd123c872f 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -18,56 +18,53 @@ // [START monitoring_quickstart] // Imports the Google Cloud client library const monitoring = require('@google-cloud/monitoring'); +async function quickStart() { + // Your Google Cloud Platform project ID + const projectId = 'YOUR_PROJECT_ID'; -// Your Google Cloud Platform project ID -const projectId = 'YOUR_PROJECT_ID'; + // Creates a client + const client = new monitoring.MetricServiceClient(); -// Creates a client -const client = new monitoring.MetricServiceClient(); - -// Prepares an individual data point -const dataPoint = { - interval: { - endTime: { - seconds: Date.now() / 1000, + // Prepares an individual data point + const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000, + }, + }, + value: { + // The amount of sales + doubleValue: 123.45, }, - }, - value: { - // The amount of sales - doubleValue: 123.45, - }, -}; + }; -// Prepares the time series request -const request = { - name: client.projectPath(projectId), - timeSeries: [ - { - // Ties the data point to a custom metric - metric: { - type: 'custom.googleapis.com/stores/daily_sales', - labels: { - store_id: 'Pittsburgh', + // Prepares the time series request + const request = { + name: client.projectPath(projectId), + timeSeries: [ + { + // Ties the data point to a custom metric + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh', + }, }, - }, - resource: { - type: 'global', - labels: { - project_id: projectId, + resource: { + type: 'global', + labels: { + project_id: projectId, + }, }, + points: [dataPoint], }, - points: [dataPoint], - }, - ], -}; + ], + }; + + // Writes time series data + const [result] = await client.createTimeSeries(request); + console.log(`Done writing time series data.`, result); +} -// Writes time series data -client - .createTimeSeries(request) - .then(results => { - console.log(`Done writing time series data.`, results[0]); - }) - .catch(err => { - console.error('ERROR:', err); - }); +quickStart().catch(console.error); // [END monitoring_quickstart] From 8cd09b7f06efc6cdae9476233e355f68e6906347 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 16 Nov 2018 15:58:29 -0800 Subject: [PATCH 152/422] test: fix failing tests due to leaks (#163) --- packages/google-cloud-monitoring/samples/package.json | 7 +++++-- packages/google-cloud-monitoring/smoke-test/.eslintrc.yml | 4 ++-- packages/google-cloud-monitoring/system-test/.eslintrc.yml | 1 - packages/google-cloud-monitoring/test/.eslintrc.yml | 2 -- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 11c7c8352f1..e4ec5035a9c 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -5,7 +5,9 @@ "license": "Apache-2.0", "author": "Google Inc.", "repository": "googleapis/nodejs-monitoring", - "files": [ "*.js" ], + "files": [ + "*.js" + ], "engines": { "node": ">=8" }, @@ -20,6 +22,7 @@ "@google-cloud/nodejs-repo-tools": "^3.0.0", "mocha": "^5.0.0", "proxyquire": "^2.0.1", - "sinon": "^7.0.0" + "sinon": "^7.0.0", + "uuid": "^3.3.2" } } diff --git a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml index f5a6b01f2cf..f9605165c0f 100644 --- a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml +++ b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml @@ -1,5 +1,5 @@ --- -rules: - no-console: off env: mocha: true +rules: + no-console: off diff --git a/packages/google-cloud-monitoring/system-test/.eslintrc.yml b/packages/google-cloud-monitoring/system-test/.eslintrc.yml index 2e6882e46d2..f9605165c0f 100644 --- a/packages/google-cloud-monitoring/system-test/.eslintrc.yml +++ b/packages/google-cloud-monitoring/system-test/.eslintrc.yml @@ -2,5 +2,4 @@ env: mocha: true rules: - node/no-unpublished-require: off no-console: off diff --git a/packages/google-cloud-monitoring/test/.eslintrc.yml b/packages/google-cloud-monitoring/test/.eslintrc.yml index 73f7bbc946f..6db2a46c535 100644 --- a/packages/google-cloud-monitoring/test/.eslintrc.yml +++ b/packages/google-cloud-monitoring/test/.eslintrc.yml @@ -1,5 +1,3 @@ --- env: mocha: true -rules: - node/no-unpublished-require: off From 8f816782dd5b2adbc44e0a94567eb18a75c7df42 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 19 Nov 2018 09:21:07 -0800 Subject: [PATCH 153/422] chore: add a synth.metadata chore: add a synth.metadata --- .../google-cloud-monitoring/synth.metadata | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/google-cloud-monitoring/synth.metadata diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata new file mode 100644 index 00000000000..f26e69af884 --- /dev/null +++ b/packages/google-cloud-monitoring/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 b50a2600664065812e9796c27844dfcc5ce779b6 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Sat, 1 Dec 2018 18:42:10 -0800 Subject: [PATCH 154/422] fix(build): fix system key decryption (#169) --- packages/google-cloud-monitoring/.circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml index 6735ebdaaa1..86c63432242 100644 --- a/packages/google-cloud-monitoring/.circleci/config.yml +++ b/packages/google-cloud-monitoring/.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 ffd9998e7b21ff6d1a233a95c511d6cc3ce2d852 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 3 Dec 2018 15:40:23 -0800 Subject: [PATCH 155/422] docs: update readme badges (#171) --- packages/google-cloud-monitoring/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 84f1b3950ff..0f2aae512b8 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -5,8 +5,7 @@ # [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![CircleCI](https://img.shields.io/circleci/project/github/googleapis/nodejs-monitoring.svg?style=flat)](https://circleci.com/gh/googleapis/nodejs-monitoring) -[![AppVeyor](https://ci.appveyor.com/api/projects/status/github/googleapis/nodejs-monitoring?branch=master&svg=true)](https://ci.appveyor.com/project/googleapis/nodejs-monitoring) +[![npm version](https://img.shields.io/npm/v/@google-cloud/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) > Node.js idiomatic client for [Monitoring][product-docs]. @@ -161,3 +160,4 @@ See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENS [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ [product-docs]: https://cloud.google.com/monitoring/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + From 6704dc6a9b14bd57d1f7dedf5253684c00224738 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Dec 2018 08:54:28 -0800 Subject: [PATCH 156/422] chore: update license file (#173) --- packages/google-cloud-monitoring/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/LICENSE b/packages/google-cloud-monitoring/LICENSE index 7a4a3ea2424..d6456956733 100644 --- a/packages/google-cloud-monitoring/LICENSE +++ b/packages/google-cloud-monitoring/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 8e227298c14d4e81e6fcd5f2f2b3706b7bc0039e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 5 Dec 2018 15:55:19 -0800 Subject: [PATCH 157/422] chore: nyc ignore build/test by default (#175) --- packages/google-cloud-monitoring/.nycrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index a1a8e6920ce..feb032400d4 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.nycrc @@ -3,7 +3,8 @@ "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", - "test/**/*.js" + "test/**/*.js", + "build/test" ], "watermarks": { "branches": [ From 78d0df3574f1f2b0d5a94bd2bb07589f9c8b9c62 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 10 Dec 2018 13:34:53 -0800 Subject: [PATCH 158/422] build: add Kokoro configs for autorelease (#180) * build: add Kokoro configs for autorelease * build: add Kokoro configs for autorelease * chore: remove CircleCI config --- .../.circleci/config.yml | 179 ------------------ .../.circleci/key.json.enc | Bin 2368 -> 0 bytes .../.circleci/npm-install-retry.js | 60 ------ 3 files changed, 239 deletions(-) delete mode 100644 packages/google-cloud-monitoring/.circleci/config.yml delete mode 100644 packages/google-cloud-monitoring/.circleci/key.json.enc delete mode 100755 packages/google-cloud-monitoring/.circleci/npm-install-retry.js diff --git a/packages/google-cloud-monitoring/.circleci/config.yml b/packages/google-cloud-monitoring/.circleci/config.yml deleted file mode 100644 index 86c63432242..00000000000 --- a/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.circleci/key.json.enc b/packages/google-cloud-monitoring/.circleci/key.json.enc deleted file mode 100644 index 72559a5251f74245329170fdba83bacccfde04a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2368 zcmV-G3BUGJVQh3|WM5xs5Wvrzg%}{96+WNJ3%jnaHc{Bf3ni3RHL&RHZCPQ@0t8^NE9HF?F4{5|Cgu4${N^_(v;fshb(f_!+d z8}i^b_#J&=)GK6Wrp9&h*tAec7G1tf$9*Pk9QR0h#x1zx=Mb*1)x|ODr>NYB__Di-l96C(=)CY7YdjMOE zK%c!mIFu#!BVN*<*#AQ1wvhJ$BbAkWDYuU8ouB!O)3tj~OwB<`fO`6zN`dH$S6hw=fK$SSn zb7U5fGZ09+3)LO}5pNRo!&daxH85Ko^S<0Fr$I#9zVLxb(H@DVJYP_n7ok=aN3DTx z)hanYF^l4-(tp-xTZ%D-vq~WQw5$=5*4q#`f zhJ4ojED~0$&0?D(*|EPRgMVWFc|Xkp>ez8kb1G>mDl54#3H^cb87U=Hi>D*ZG@(UgZ2oB5)}Dk}ZL%pJsZgs~nO` z$&8Ln41#K|sVjmK*7LI0XgNumH6XjT11sEj1_e-j=(D-J5Xzb1Q^1s1IyQ#|ffEHN zreaR07gJ6jbweYJ?HKN>?WX_-to8@*TWLNAOXex z7ms9@o5SNTpKWYU@R~wzhu`l^eMQgVXh`L!Z47K?EEz>A^frb+wwnWavcuX(prB17 zb6?>kh2Oc8(9?Q1xIb{hULg1cKeB1LTAi#>>+>itj(3J!Zu-P9f+Fx*XBY#QCV%)S zhaSP)osbK=PR_&=C519Ncp>S-Gm0p%NCqgU>%Tj$$0_^_Knz>A;X0I87#dd9NWJ-B z6k_Y?DWBa?{!dYk9109?+#HY0cCX#0RZ@2C6QWhO;2OqXuT!IPylSGo;xyixI5?aS zkiMC95lQWV`U^5P?YJL+42x)H51aCn02Kp@!sLfQ(h8hoo<_*rb8D*ARLNs3QtiaU zq0Xr7*f(9#Y;^1NY#wnygjh%6M7JgZ*T)fcJ((MYQ#E$Gd-M;t!DcpUEQ2#!n>lfI zZ@eC;DsuBdEI8JuthPzBnen&`zJD%O#kIzj>NE=L>8ts(ih0HAt6w+cjfJhnIDr7w zw|0C1ADp9PJObz=Fh%PzFqu_;<&c|m>HEwF1}h~L+Zk6SxGli4)t)N+lcAGp1BLii z5>&`2k8>7B=qpx%SV&*+NBvByxUrBJ=qfB`pm63%cpYtO$s#@!#C??_3U$Z82DhO zyMjhGNysi;q>S3#u!|?*ZqsXeT7%z#b2xMBF9Byy0pnj`tBnX=22hJ(QdsAo2nEe)x}mXzjp_>c^Pw6hsgsMJ;&pSs#lgHzA3$RE z5Yi#jwfNNdRif_Pyqo<<&j?G2@Ulscw4a2{ z&?sP#DIzqTR&3NA${w(L98gAJOP4B9-kf}jS9Wzco$*$tOF~bhQvWnZ78NHZvnKR;wP}Xv zHjh9Oi30z<3Wt;7h!%W?mhFr4T!}^Zgv;J^iFWd6hB%v6|9rE{hL|$6a;fu2#iahq zso=_+Q`x)y^D+>r^jL|-!7yI$sH)AJ(Q|Kb{%!SW%rrj)t*@oEyxkHFMsNdNuIUe< zZ`H9ho3sFBbV(4pdcF2%1;wGSNN+>YDEp%<8eag;JwBtll7FkvHVVqK%vK=&*(pmAX z!>3^y?B>5B=Cktk^j9CblQGw6X`i%vR}y>lOGHR9ll;)RfYz|`@=$dtN0nAaix(`; zy*l~km=wMi*nK9$&>`qdNY~Wa<~C*l9BQSkdZ0bYRT^q?@e8r7h(nGeDSgjhhEG^! z1Yj!~ofjGSA-{mywmG}^-!>hw=26e}m>rXgTR&&0WqSXzfVV7lxjU0q_T_5mbD`WS z59&E15HWD$xN5Hly{diEFPY5-v&}TMu00 [... 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); - } -})(); From e80b2141ff012178a49c2e688083d1d0497d43b7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 11 Dec 2018 10:34:23 -0800 Subject: [PATCH 159/422] chore: update nyc and eslint configs (#184) --- packages/google-cloud-monitoring/.eslintignore | 1 + packages/google-cloud-monitoring/.nycrc | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/google-cloud-monitoring/.eslintignore b/packages/google-cloud-monitoring/.eslintignore index 2f642cb6044..f0c7aead4bf 100644 --- a/packages/google-cloud-monitoring/.eslintignore +++ b/packages/google-cloud-monitoring/.eslintignore @@ -1,3 +1,4 @@ **/node_modules src/**/doc/* build/ +docs/ diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index feb032400d4..88b001cb587 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.nycrc @@ -1,5 +1,6 @@ { "report-dir": "./.coverage", + "reporter": "lcov", "exclude": [ "src/*{/*,/**/*}.js", "src/*/v*/*.js", From 36131d022c7d4f280ace460d64dcfd404a6c823a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 19 Dec 2018 10:22:41 -0800 Subject: [PATCH 160/422] refactor: modernize and fix the sample tests (#193) --- packages/google-cloud-monitoring/samples/package.json | 9 ++++----- packages/google-cloud-monitoring/samples/quickstart.js | 9 +++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index e4ec5035a9c..7128c148db0 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -1,6 +1,5 @@ { "name": "nodejs-docs-samples-monitoring", - "version": "0.0.1", "private": true, "license": "Apache-2.0", "author": "Google Inc.", @@ -12,17 +11,17 @@ "node": ">=8" }, "scripts": { - "test": "mocha system-test/*.js --timeout 600000" + "test": "mocha system-test --timeout 600000" }, "dependencies": { "@google-cloud/monitoring": "^0.6.0", "yargs": "^12.0.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.0.0", + "chai": "^4.2.0", + "execa": "^1.0.0", "mocha": "^5.0.0", - "proxyquire": "^2.0.1", - "sinon": "^7.0.0", + "p-retry": "^3.0.0", "uuid": "^3.3.2" } } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index fbd123c872f..924691c0f47 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -18,9 +18,10 @@ // [START monitoring_quickstart] // Imports the Google Cloud client library const monitoring = require('@google-cloud/monitoring'); -async function quickStart() { + +async function quickstart() { // Your Google Cloud Platform project ID - const projectId = 'YOUR_PROJECT_ID'; + const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID'; // Creates a client const client = new monitoring.MetricServiceClient(); @@ -65,6 +66,6 @@ async function quickStart() { const [result] = await client.createTimeSeries(request); console.log(`Done writing time series data.`, result); } - -quickStart().catch(console.error); // [END monitoring_quickstart] + +quickstart().catch(console.error); From 5e9573bef053fc85cee6a7948f77b60782561a80 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:12:11 -0800 Subject: [PATCH 161/422] doc: remove unused gRPC types doc: remove unused gRPC types --- .../monitoring/v3/doc_metric_service.js | 24 ---- .../v3/doc/google/monitoring/v3/doc_uptime.js | 58 ++++---- .../v3/doc/google/protobuf/doc_wrappers.js | 128 ------------------ .../google-cloud-monitoring/synth.metadata | 36 +++-- 4 files changed, 53 insertions(+), 193 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index dfdc7148eae..7709523b0c4 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -325,28 +325,4 @@ const ListTimeSeriesResponse = { */ const CreateTimeSeriesRequest = { // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Describes the result of a failed request to write data to a time series. - * - * @property {Object} timeSeries - * The time series, including the `Metric`, `MonitoredResource`, - * and `Point`s (including timestamp and value) that resulted - * in the error. This field provides all of the context that - * would be needed to retry the operation. - * - * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} - * - * @property {Object} status - * The status of the requested write operation. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @typedef CreateTimeSeriesError - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateTimeSeriesError definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const CreateTimeSeriesError = { - // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 5ad74c5df89..1ebdef55921 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -302,6 +302,35 @@ const UptimeCheckIp = { // This is for documentation. Actual contents will be loaded by gRPC. }; +/** + * The supported resource types that can be used as values of + * `group_resource.resource_type`. + * `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. + * The resource types `gae_app` and `uptime_url` are not valid here because + * group checks on App Engine modules and URLs are not allowed. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ +const GroupResourceType = { + + /** + * Default value (not valid). + */ + RESOURCE_TYPE_UNSPECIFIED: 0, + + /** + * A group of instances from Google Cloud Platform (GCP) or + * Amazon Web Services (AWS). + */ + INSTANCE: 1, + + /** + * A group of Amazon ELB load balancers. + */ + AWS_ELB_LOAD_BALANCER: 2 +}; + /** * The regions from which an uptime check can be run. * @@ -337,33 +366,4 @@ const UptimeCheckRegion = { * Singapore). */ ASIA_PACIFIC: 4 -}; - -/** - * The supported resource types that can be used as values of - * `group_resource.resource_type`. - * `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. - * The resource types `gae_app` and `uptime_url` are not valid here because - * group checks on App Engine modules and URLs are not allowed. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ -const GroupResourceType = { - - /** - * Default value (not valid). - */ - RESOURCE_TYPE_UNSPECIFIED: 0, - - /** - * A group of instances from Google Cloud Platform (GCP) or - * Amazon Web Services (AWS). - */ - INSTANCE: 1, - - /** - * A group of Amazon ELB load balancers. - */ - AWS_ELB_LOAD_BALANCER: 2 }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js index 363b6391ac1..fcc6b670309 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js @@ -15,102 +15,6 @@ // Note: this file is purely for documentation. Any contents are not expected // to be loaded as the JS file. -/** - * Wrapper message for `double`. - * - * The JSON representation for `DoubleValue` is JSON number. - * - * @property {number} value - * The double value. - * - * @typedef DoubleValue - * @memberof google.protobuf - * @see [google.protobuf.DoubleValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const DoubleValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `float`. - * - * The JSON representation for `FloatValue` is JSON number. - * - * @property {number} value - * The float value. - * - * @typedef FloatValue - * @memberof google.protobuf - * @see [google.protobuf.FloatValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const FloatValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `int64`. - * - * The JSON representation for `Int64Value` is JSON string. - * - * @property {number} value - * The int64 value. - * - * @typedef Int64Value - * @memberof google.protobuf - * @see [google.protobuf.Int64Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const Int64Value = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `uint64`. - * - * The JSON representation for `UInt64Value` is JSON string. - * - * @property {number} value - * The uint64 value. - * - * @typedef UInt64Value - * @memberof google.protobuf - * @see [google.protobuf.UInt64Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const UInt64Value = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `int32`. - * - * The JSON representation for `Int32Value` is JSON number. - * - * @property {number} value - * The int32 value. - * - * @typedef Int32Value - * @memberof google.protobuf - * @see [google.protobuf.Int32Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const Int32Value = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `uint32`. - * - * The JSON representation for `UInt32Value` is JSON number. - * - * @property {number} value - * The uint32 value. - * - * @typedef UInt32Value - * @memberof google.protobuf - * @see [google.protobuf.UInt32Value definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const UInt32Value = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - /** * Wrapper message for `bool`. * @@ -125,36 +29,4 @@ const UInt32Value = { */ const BoolValue = { // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `string`. - * - * The JSON representation for `StringValue` is JSON string. - * - * @property {string} value - * The string value. - * - * @typedef StringValue - * @memberof google.protobuf - * @see [google.protobuf.StringValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const StringValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Wrapper message for `bytes`. - * - * The JSON representation for `BytesValue` is JSON string. - * - * @property {string} value - * The bytes value. - * - * @typedef BytesValue - * @memberof google.protobuf - * @see [google.protobuf.BytesValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const BytesValue = { - // This is for documentation. Actual contents will be loaded by gRPC. }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index f26e69af884..8527d43a172 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,26 +1,38 @@ { + "updateTime": "2019-01-03T17:49:35.509597Z", "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": "monitoring", + "apiVersion": "v3", + "language": "nodejs", + "generator": "gapic", + "config": "google/monitoring/artman_monitoring.yaml" } } ] From 686329f88eebc0009010fe320653160c4942529e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 14 Jan 2019 12:02:52 -0800 Subject: [PATCH 162/422] fix(deps): update dependency google-gax to ^0.23.0 (#196) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 78d0f07373c..1f81bf0fe2b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,7 +40,7 @@ "fix": "eslint '**/*.js' --fix" }, "dependencies": { - "google-gax": "^0.22.0", + "google-gax": "^0.23.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 9b4222340b77123868cc0f280eee6aa7f712375c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 14 Jan 2019 15:33:04 -0800 Subject: [PATCH 163/422] Release v0.6.0 (#197) --- packages/google-cloud-monitoring/CHANGELOG.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 4ddfbecbe4c..6c8cd21ff42 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -6,6 +6,68 @@ ## v0.6.0 +01-14-2019 14:34 PST + +### Dependencies +- fix(deps): update dependency google-gax to ^0.23.0 ([#196](https://github.com/googleapis/nodejs-monitoring/pull/196)) +- refactor: remove unused deps + +### Documentation +- docs: remove unused gRPC types +- docs(samples): add samples for channel notification ([#185](https://github.com/googleapis/nodejs-monitoring/pull/185)) +- docs: update readme badges ([#171](https://github.com/googleapis/nodejs-monitoring/pull/171)) +- docs(samples): convert samples to async/await, and use mocha for tests ([#146](https://github.com/googleapis/nodejs-monitoring/pull/146)) +- docs: update proto comments ([#159](https://github.com/googleapis/nodejs-monitoring/pull/159)) +- docs: fix link in changelog ([#132](https://github.com/googleapis/nodejs-monitoring/pull/132)) + +### Internal / Testing Changes +- refactor: modernize and fix the sample tests ([#193](https://github.com/googleapis/nodejs-monitoring/pull/193)) +- chore: fix name of region tag ([#188](https://github.com/googleapis/nodejs-monitoring/pull/188)) +- chore: fix region tags ([#187](https://github.com/googleapis/nodejs-monitoring/pull/187)) +- chore(build): inject yoshi automation key ([#186](https://github.com/googleapis/nodejs-monitoring/pull/186)) +- chore: update nyc and eslint configs ([#184](https://github.com/googleapis/nodejs-monitoring/pull/184)) +- chore: fix publish.sh permission +x ([#182](https://github.com/googleapis/nodejs-monitoring/pull/182)) +- fix(build): fix Kokoro release script ([#181](https://github.com/googleapis/nodejs-monitoring/pull/181)) +- build: add Kokoro configs for autorelease ([#180](https://github.com/googleapis/nodejs-monitoring/pull/180)) +- chore: always nyc report before calling codecov ([#177](https://github.com/googleapis/nodejs-monitoring/pull/177)) +- chore: nyc ignore build/test by default ([#175](https://github.com/googleapis/nodejs-monitoring/pull/175)) +- chore: update license file ([#173](https://github.com/googleapis/nodejs-monitoring/pull/173)) +- fix(build): fix system key decryption ([#169](https://github.com/googleapis/nodejs-monitoring/pull/169)) +- chore: add a synth.metadata +- test: fix failing tests due to leaks ([#163](https://github.com/googleapis/nodejs-monitoring/pull/163)) +- chore: update eslintignore config ([#160](https://github.com/googleapis/nodejs-monitoring/pull/160)) +- chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 ([#158](https://github.com/googleapis/nodejs-monitoring/pull/158)) +- chore: drop contributors from multiple places ([#156](https://github.com/googleapis/nodejs-monitoring/pull/156)) +- chore: use latest npm on Windows ([#154](https://github.com/googleapis/nodejs-monitoring/pull/154)) +- chore: update CircleCI config ([#151](https://github.com/googleapis/nodejs-monitoring/pull/151)) +- chore: include build in eslintignore ([#148](https://github.com/googleapis/nodejs-monitoring/pull/148)) +- chore(deps): update dependency eslint-plugin-node to v8 ([#143](https://github.com/googleapis/nodejs-monitoring/pull/143)) +- chore: update new issue templates +- chore(build): fix the synth file and generation +- chore: remove old issue template ([#140](https://github.com/googleapis/nodejs-monitoring/pull/140)) +- build: run tests on node11 ([#139](https://github.com/googleapis/nodejs-monitoring/pull/139)) +- chores(build): do not collect sponge.xml from windows builds ([#138](https://github.com/googleapis/nodejs-monitoring/pull/138)) +- chores(build): run codecov on continuous builds ([#137](https://github.com/googleapis/nodejs-monitoring/pull/137)) +- build: fix codecov uploading on Kokoro ([#134](https://github.com/googleapis/nodejs-monitoring/pull/134)) +- chore(deps): update dependency sinon to v7 ([#133](https://github.com/googleapis/nodejs-monitoring/pull/133)) +- chore(deps): update dependency eslint-plugin-prettier to v3 ([#131](https://github.com/googleapis/nodejs-monitoring/pull/131)) +- test: remove appveyor config ([#127](https://github.com/googleapis/nodejs-monitoring/pull/127)) +- Fix failing sample tests ([#126](https://github.com/googleapis/nodejs-monitoring/pull/126)) +- Enable prefer-const in the eslint config ([#124](https://github.com/googleapis/nodejs-monitoring/pull/124)) +- Fix the linter ([#123](https://github.com/googleapis/nodejs-monitoring/pull/123)) +- Enable no-var in eslint ([#122](https://github.com/googleapis/nodejs-monitoring/pull/122)) +- run synth.py to fix system-test ([#117](https://github.com/googleapis/nodejs-monitoring/pull/117)) +- Retry npm install in CI ([#115](https://github.com/googleapis/nodejs-monitoring/pull/115)) +- Update CircleCI and Kokoro config ([#113](https://github.com/googleapis/nodejs-monitoring/pull/113)) +- chore(deps): update dependency nyc to v13 ([#111](https://github.com/googleapis/nodejs-monitoring/pull/111)) +- Update the CI config ([#109](https://github.com/googleapis/nodejs-monitoring/pull/109)) +- chore: make the CircleCI config consistent +- fix(deps): update dependency @google-cloud/monitoring to ^0.6.0 ([#104](https://github.com/googleapis/nodejs-monitoring/pull/104)) +- chore(build): make the CircleCI config consistent +- build: node templates ([#101](https://github.com/googleapis/nodejs-monitoring/pull/101)) + +## v0.6.0 + ### Implementation Changes BREAKING CHANGE - fix: drop support for node.js 4.x and 9.x (#72) From 427433bf201beebf5a6d24d9c0c8372c73a679ec Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Mon, 14 Jan 2019 19:20:24 -0800 Subject: [PATCH 164/422] build: check broken links in generated docs (#194) --- packages/google-cloud-monitoring/.jsdoc.js | 2 +- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/src/index.js | 2 +- .../src/v3/doc/google/api/doc_distribution.js | 2 +- .../src/v3/doc/google/protobuf/doc_timestamp.js | 6 ++---- packages/google-cloud-monitoring/synth.py | 15 +++++++++++++++ 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 10ceab0f822..94e2a2d5e50 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 1f81bf0fe2b..2b25aaff431 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -50,7 +50,7 @@ "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "ink-docstrap": "^1.3.0", + "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.0.0", diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js index 9944aa3fd20..828a9aadba0 100644 --- a/packages/google-cloud-monitoring/src/index.js +++ b/packages/google-cloud-monitoring/src/index.js @@ -28,7 +28,7 @@ * @namespace google.rpc */ /** - * @namespace google.type + * @namespace google.api */ 'use strict'; diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js index dd297f6f840..036e6aeed66 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index 1ebe2e6e1a5..1cc64cbed80 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index 86c12f1e540..eecaea25a76 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -31,5 +31,20 @@ templates = common_templates.node_library() 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/**/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") + + subprocess.run(["npm", "install"]) subprocess.run(["npm", "run", "fix"]) From 6ae79dc96bb3fd4854dfcb0a3a2cd87181ccbf0b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 15 Jan 2019 09:57:52 -0800 Subject: [PATCH 165/422] Release v0.7.0 (#199) --- packages/google-cloud-monitoring/CHANGELOG.md | 64 +++++++++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 6c8cd21ff42..6a3c211e9b9 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,70 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## v0.7.0 + +01-15-2019 09:35 PST + +### Dependencies +- fix(deps): update dependency google-gax to ^0.23.0 ([#196](https://github.com/googleapis/nodejs-monitoring/pull/196)) +- refactor: remove unused deps + +### Documentation +- doc: remove unused gRPC types +- docs: add samples for channel notification ([#185](https://github.com/googleapis/nodejs-monitoring/pull/185)) +- docs: update readme badges ([#171](https://github.com/googleapis/nodejs-monitoring/pull/171)) +- docs(samples): convert samples to async/await, and use mocha for tests ([#146](https://github.com/googleapis/nodejs-monitoring/pull/146)) +- docs: update proto comments ([#159](https://github.com/googleapis/nodejs-monitoring/pull/159)) +- docs: fix link in changelog ([#132](https://github.com/googleapis/nodejs-monitoring/pull/132)) + +### Internal / Testing Changes +- build: check broken links in generated docs ([#194](https://github.com/googleapis/nodejs-monitoring/pull/194)) +- refactor: modernize and fix the sample tests ([#193](https://github.com/googleapis/nodejs-monitoring/pull/193)) +- chore: fix name of region tag ([#188](https://github.com/googleapis/nodejs-monitoring/pull/188)) +- chore: fix region tags ([#187](https://github.com/googleapis/nodejs-monitoring/pull/187)) +- chore(build): inject yoshi automation key ([#186](https://github.com/googleapis/nodejs-monitoring/pull/186)) +- chore: update nyc and eslint configs ([#184](https://github.com/googleapis/nodejs-monitoring/pull/184)) +- chore: fix publish.sh permission +x ([#182](https://github.com/googleapis/nodejs-monitoring/pull/182)) +- fix(build): fix Kokoro release script ([#181](https://github.com/googleapis/nodejs-monitoring/pull/181)) +- build: add Kokoro configs for autorelease ([#180](https://github.com/googleapis/nodejs-monitoring/pull/180)) +- chore: always nyc report before calling codecov ([#177](https://github.com/googleapis/nodejs-monitoring/pull/177)) +- chore: nyc ignore build/test by default ([#175](https://github.com/googleapis/nodejs-monitoring/pull/175)) +- chore: update license file ([#173](https://github.com/googleapis/nodejs-monitoring/pull/173)) +- fix(build): fix system key decryption ([#169](https://github.com/googleapis/nodejs-monitoring/pull/169)) +- chore: add a synth.metadata +- test: fix failing tests due to leaks ([#163](https://github.com/googleapis/nodejs-monitoring/pull/163)) +- chore: update eslintignore config ([#160](https://github.com/googleapis/nodejs-monitoring/pull/160)) +- chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 ([#158](https://github.com/googleapis/nodejs-monitoring/pull/158)) +- chore: drop contributors from multiple places ([#156](https://github.com/googleapis/nodejs-monitoring/pull/156)) +- chore: use latest npm on Windows ([#154](https://github.com/googleapis/nodejs-monitoring/pull/154)) +- chore: update CircleCI config ([#151](https://github.com/googleapis/nodejs-monitoring/pull/151)) +- chore: include build in eslintignore ([#148](https://github.com/googleapis/nodejs-monitoring/pull/148)) +- chore(deps): update dependency eslint-plugin-node to v8 ([#143](https://github.com/googleapis/nodejs-monitoring/pull/143)) +- feat: run the generator +- chore: update new issue templates +- chore(build): fix the synth file and generation +- chore: remove old issue template ([#140](https://github.com/googleapis/nodejs-monitoring/pull/140)) +- build: run tests on node11 ([#139](https://github.com/googleapis/nodejs-monitoring/pull/139)) +- chores(build): do not collect sponge.xml from windows builds ([#138](https://github.com/googleapis/nodejs-monitoring/pull/138)) +- chores(build): run codecov on continuous builds ([#137](https://github.com/googleapis/nodejs-monitoring/pull/137)) +- build: fix codecov uploading on Kokoro ([#134](https://github.com/googleapis/nodejs-monitoring/pull/134)) +- chore(deps): update dependency sinon to v7 ([#133](https://github.com/googleapis/nodejs-monitoring/pull/133)) +- chore(deps): update dependency eslint-plugin-prettier to v3 ([#131](https://github.com/googleapis/nodejs-monitoring/pull/131)) +- test: remove appveyor config ([#127](https://github.com/googleapis/nodejs-monitoring/pull/127)) +- Fix failing sample tests ([#126](https://github.com/googleapis/nodejs-monitoring/pull/126)) +- Enable prefer-const in the eslint config ([#124](https://github.com/googleapis/nodejs-monitoring/pull/124)) +- Fix the linter ([#123](https://github.com/googleapis/nodejs-monitoring/pull/123)) +- Enable no-var in eslint ([#122](https://github.com/googleapis/nodejs-monitoring/pull/122)) +- run synth.py to fix system-test ([#117](https://github.com/googleapis/nodejs-monitoring/pull/117)) +- Retry npm install in CI ([#115](https://github.com/googleapis/nodejs-monitoring/pull/115)) +- Update CircleCI and Kokoro config ([#113](https://github.com/googleapis/nodejs-monitoring/pull/113)) +- chore(deps): update dependency nyc to v13 ([#111](https://github.com/googleapis/nodejs-monitoring/pull/111)) +- Update the CI config ([#109](https://github.com/googleapis/nodejs-monitoring/pull/109)) +- chore: make the CircleCI config consistent +- fix(deps): update dependency @google-cloud/monitoring to ^0.6.0 ([#104](https://github.com/googleapis/nodejs-monitoring/pull/104)) +- chore(build): make the CircleCI config consistent +- build: node templates ([#101](https://github.com/googleapis/nodejs-monitoring/pull/101)) + ## v0.6.0 01-14-2019 14:34 PST diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2b25aaff431..7b17596480b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.6.0", + "version": "0.7.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 7128c148db0..e468f8646ab 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha system-test --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^0.6.0", + "@google-cloud/monitoring": "^0.7.0", "yargs": "^12.0.0" }, "devDependencies": { From 4202da2c710509c364a55848b8a3003cab1992f0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 17 Jan 2019 08:38:31 -0800 Subject: [PATCH 166/422] chore: update year in the license headers. (#200) --- .../smoke-test/metric_service_smoke_test.js | 2 +- .../src/v3/alert_policy_service_client.js | 2 +- .../src/v3/doc/google/api/doc_distribution.js | 2 +- .../src/v3/doc/google/api/doc_label.js | 2 +- .../src/v3/doc/google/api/doc_metric.js | 2 +- .../src/v3/doc/google/api/doc_monitored_resource.js | 2 +- .../src/v3/doc/google/monitoring/v3/doc_alert.js | 2 +- .../v3/doc/google/monitoring/v3/doc_alert_service.js | 2 +- .../src/v3/doc/google/monitoring/v3/doc_common.js | 2 +- .../src/v3/doc/google/monitoring/v3/doc_group.js | 2 +- .../v3/doc/google/monitoring/v3/doc_group_service.js | 2 +- .../src/v3/doc/google/monitoring/v3/doc_metric.js | 2 +- .../doc/google/monitoring/v3/doc_metric_service.js | 2 +- .../doc/google/monitoring/v3/doc_mutation_record.js | 2 +- .../v3/doc/google/monitoring/v3/doc_notification.js | 2 +- .../google/monitoring/v3/doc_notification_service.js | 2 +- .../src/v3/doc/google/monitoring/v3/doc_uptime.js | 2 +- .../doc/google/monitoring/v3/doc_uptime_service.js | 2 +- .../src/v3/doc/google/protobuf/doc_any.js | 2 +- .../src/v3/doc/google/protobuf/doc_duration.js | 2 +- .../src/v3/doc/google/protobuf/doc_empty.js | 2 +- .../src/v3/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v3/doc/google/protobuf/doc_struct.js | 2 +- .../src/v3/doc/google/protobuf/doc_timestamp.js | 2 +- .../src/v3/doc/google/protobuf/doc_wrappers.js | 2 +- .../src/v3/doc/google/rpc/doc_status.js | 2 +- .../src/v3/group_service_client.js | 2 +- packages/google-cloud-monitoring/src/v3/index.js | 2 +- .../src/v3/metric_service_client.js | 2 +- .../src/v3/notification_channel_service_client.js | 2 +- .../src/v3/uptime_check_service_client.js | 2 +- packages/google-cloud-monitoring/synth.metadata | 12 ++++++------ packages/google-cloud-monitoring/test/gapic-v3.js | 2 +- 33 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index 685a7b593a3..dd1b94e2598 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.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/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 84a3a224758..6b81577f1c4 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js index 036e6aeed66..6ce7539c64c 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js index b26faacb2d3..74d87098038 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index ec52c27bf2a..7d9e9378153 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 5c185bc5cdc..24321d640b0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index 5a7e7f3d249..88fa07ac3ef 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js index 606df7121d5..c8a5ea983c1 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index 4cc1740cdba..eb0c6f30813 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js index 380e4f9b965..8ee70c9b4f3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js index 155665e2a8b..370c844e4ca 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index 293bc322606..e93cedc3a69 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index 7709523b0c4..aa044573d78 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js index 7fe41af78ca..c4b4104ba3e 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js index a81594ca4fe..36da41c303e 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js index 21b2b49f135..d7867eb523c 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 1ebdef55921..6e735b9cfc4 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index de301b145c0..5c7172be165 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js index 3accb1fc0d8..f3278b34e66 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js index c03ce2fb3df..1275f8f4d13 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js index b1d6b5e32a9..0b446dd9ce4 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js index 0cb35328962..d55d97e6e38 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js index ddf7e5c95dc..ae7e4ef1ff6 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index 1cc64cbed80..b47f41c2b30 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js index fcc6b670309..6ecf67beb7e 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.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/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js index 13cfcab1021..fc4b5be93f0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.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/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index ed588906798..d5790557411 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_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/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index 40a23717c9b..9845e3fa484 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index d71327ac26e..d8aa458ce1e 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 9e7580777e8..c58f900929c 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 286b0ce1539..f65f4c9e609 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 8527d43a172..34f74582776 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-01-03T17:49:35.509597Z", + "updateTime": "2019-01-17T12:51:39.445183Z", "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/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 75f630a7144..f354ef93e22 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.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 482370c8e1effbb5d9cea68460b22c0678ad2a18 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 25 Jan 2019 09:51:45 -0800 Subject: [PATCH 167/422] fix(deps): update dependency google-gax to ^0.24.0 (#202) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 7b17596480b..e6bf01bab66 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,7 +40,7 @@ "fix": "eslint '**/*.js' --fix" }, "dependencies": { - "google-gax": "^0.23.0", + "google-gax": "^0.24.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From a5e70222dae9374ca3f0a92040b68d4394c103e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 26 Jan 2019 10:38:50 -0800 Subject: [PATCH 168/422] chore(deps): update dependency eslint-config-prettier to v4 (#203) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e6bf01bab66..c31d4928711 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -47,7 +47,7 @@ "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.0", "eslint": "^5.0.0", - "eslint-config-prettier": "^3.0.0", + "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", From a466fd2c3cc74b0653ddd8a8c359ef3878238b34 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Wed, 30 Jan 2019 12:19:15 -0800 Subject: [PATCH 169/422] fix(deps): update dependency google-gax to ^0.25.0 (#204) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c31d4928711..e37f9037db4 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,7 +40,7 @@ "fix": "eslint '**/*.js' --fix" }, "dependencies": { - "google-gax": "^0.24.0", + "google-gax": "^0.25.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From d24d0f443f5ceb413d6ea793d7b9a531a483b8f7 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Feb 2019 15:40:01 -0800 Subject: [PATCH 170/422] chore: move CONTRIBUTING.md to root (#209) --- .../google-cloud-monitoring/CONTRIBUTING.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/google-cloud-monitoring/CONTRIBUTING.md diff --git a/packages/google-cloud-monitoring/CONTRIBUTING.md b/packages/google-cloud-monitoring/CONTRIBUTING.md new file mode 100644 index 00000000000..b958f235007 --- /dev/null +++ b/packages/google-cloud-monitoring/CONTRIBUTING.md @@ -0,0 +1,57 @@ +# 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 + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup From 8f2c75fa55bf9351a2cec7a88397156618bb99b9 Mon Sep 17 00:00:00 2001 From: Dave Gramlich Date: Thu, 7 Feb 2019 18:47:33 -0800 Subject: [PATCH 171/422] docs: update contributing path in README (#210) --- packages/google-cloud-monitoring/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 0f2aae512b8..4b9acea14ae 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -149,7 +149,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/blob/master/.github/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/blob/master/CONTRIBUTING.md). ## License From cd2b916368ab05a67a98cd9bf0b7344b4e83717c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 10 Feb 2019 20:53:55 -0800 Subject: [PATCH 172/422] build: create docs test npm scripts (#212) --- packages/google-cloud-monitoring/package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e37f9037db4..40534015d99 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -37,7 +37,9 @@ "system-test": "mocha system-test/*.js --timeout 600000", "test-no-cover": "mocha test/*.js", "test": "npm run cover", - "fix": "eslint '**/*.js' --fix" + "fix": "eslint '**/*.js' --fix", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "dependencies": { "google-gax": "^0.25.0", @@ -56,6 +58,7 @@ "mocha": "^5.0.0", "nyc": "^13.0.0", "power-assert": "^1.4.4", - "prettier": "^1.7.4" + "prettier": "^1.7.4", + "broken-link-checker-local": "^0.2.0" } } From aa675eae23c1d699d1a48ccbb40301f35abbe208 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Tue, 12 Feb 2019 12:07:32 -0500 Subject: [PATCH 173/422] fix(deps): update dependency yargs to v13 (#213) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index e468f8646ab..43f7060eeaf 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@google-cloud/monitoring": "^0.7.0", - "yargs": "^12.0.0" + "yargs": "^13.0.0" }, "devDependencies": { "chai": "^4.2.0", From 7fe13c256c2eab0fb8a8db8959095118e4ae4ce4 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 08:49:49 -0800 Subject: [PATCH 174/422] docs: update links in contrib guide (#215) --- packages/google-cloud-monitoring/CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/CONTRIBUTING.md b/packages/google-cloud-monitoring/CONTRIBUTING.md index b958f235007..78aaa61b269 100644 --- a/packages/google-cloud-monitoring/CONTRIBUTING.md +++ b/packages/google-cloud-monitoring/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 c56216a52452e6f4d28de6f8a843a282e071fc9f Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Feb 2019 13:24:11 -0800 Subject: [PATCH 175/422] build: use linkinator for docs test (#214) --- packages/google-cloud-monitoring/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 40534015d99..0b44aa11d2a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -38,7 +38,7 @@ "test-no-cover": "mocha test/*.js", "test": "npm run cover", "fix": "eslint '**/*.js' --fix", - "docs-test": "blcl docs -r --exclude www.googleapis.com", + "docs-test": "linkinator docs -r --skip www.googleapis.com", "predocs-test": "npm run docs" }, "dependencies": { @@ -59,6 +59,6 @@ "nyc": "^13.0.0", "power-assert": "^1.4.4", "prettier": "^1.7.4", - "broken-link-checker-local": "^0.2.0" + "linkinator": "^1.1.2" } } From c272dfb18c188abbda24667d1c5139430966bee4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 14 Feb 2019 14:45:53 -0800 Subject: [PATCH 176/422] refactor: update the generated code style (#208) --- .../smoke-test/metric_service_smoke_test.js | 8 +++---- .../src/v3/alert_policy_service_client.js | 8 +++---- .../src/v3/group_service_client.js | 16 ++++++------- .../src/v3/metric_service_client.js | 24 +++++++++---------- .../v3/notification_channel_service_client.js | 16 ++++++------- .../src/v3/uptime_check_service_client.js | 16 ++++++------- .../google-cloud-monitoring/synth.metadata | 10 ++++---- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index dd1b94e2598..7ae9786e0c1 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -34,8 +34,8 @@ describe('MetricServiceSmokeTest', () => { .listMonitoredResourceDescriptors({name: formattedName}) .then(responses => { const resources = responses[0]; - for (let i = 0; i < resources.length; i += 1) { - console.log(resources[i]); + for (const resource of resources) { + console.log(resource); } }) .then(done) @@ -60,8 +60,8 @@ describe('MetricServiceSmokeTest', () => { const nextRequest = responses[1]; // The actual response object, if necessary. // const rawResponse = responses[2]; - for (let i = 0; i < resources.length; i += 1) { - console.log(resources[i]); + for (const resource of resources) { + console.log(resource); } if (nextRequest) { // Fetch the next page. diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 6b81577f1c4..14076bbfa44 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -283,8 +283,8 @@ class AlertPolicyServiceClient { * client.listAlertPolicies({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -303,8 +303,8 @@ class AlertPolicyServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index d5790557411..e3f829f72fa 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -280,8 +280,8 @@ class GroupServiceClient { * client.listGroups({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -300,8 +300,8 @@ class GroupServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -658,8 +658,8 @@ class GroupServiceClient { * client.listGroupMembers({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -678,8 +678,8 @@ class GroupServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index d8aa458ce1e..abbe6f2228c 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -277,8 +277,8 @@ class MetricServiceClient { * client.listMonitoredResourceDescriptors({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -297,8 +297,8 @@ class MetricServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -502,8 +502,8 @@ class MetricServiceClient { * client.listMetricDescriptors({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -522,8 +522,8 @@ class MetricServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -860,8 +860,8 @@ class MetricServiceClient { * client.listTimeSeries(request) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -889,8 +889,8 @@ class MetricServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index c58f900929c..47a2b17077c 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -271,8 +271,8 @@ class NotificationChannelServiceClient { * client.listNotificationChannelDescriptors({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -291,8 +291,8 @@ class NotificationChannelServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -502,8 +502,8 @@ class NotificationChannelServiceClient { * client.listNotificationChannels({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -522,8 +522,8 @@ class NotificationChannelServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index f65f4c9e609..8a5bcbe8b41 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -266,8 +266,8 @@ class UptimeCheckServiceClient { * client.listUptimeCheckConfigs({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -286,8 +286,8 @@ class UptimeCheckServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. @@ -640,8 +640,8 @@ class UptimeCheckServiceClient { * client.listUptimeCheckIps({}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]) + * for (const resource of resources) { + * // doThingsWith(resource) * } * }) * .catch(err => { @@ -658,8 +658,8 @@ class UptimeCheckServiceClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { - * // doThingsWith(resources[i]); + * for (const resource of resources) { + * // doThingsWith(resource); * } * if (nextRequest) { * // Fetch the next page. diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 34f74582776..73fde67d84c 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-01-17T12:51:39.445183Z", + "updateTime": "2019-02-07T12:18:18.054766Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.6", - "dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e" + "version": "0.16.10", + "dockerImage": "googleapis/artman@sha256:0954ba3e40d694e631bb2f39460d502a3d9f3a66d40b7a9a67f4b30012195beb" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05", - "internalRef": "229626798" + "sha": "49b7906ba5f15c1bc52bf5febc3bd0645d29b980", + "internalRef": "232773383" } }, { From d029913777ca85fd41a593d48c3de72c1cd3611d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 15 Feb 2019 08:49:29 -0800 Subject: [PATCH 177/422] fix: throw on invalid credentials (#216) --- .../src/v3/alert_policy_service_client.js | 4 ++++ .../src/v3/group_service_client.js | 4 ++++ .../src/v3/metric_service_client.js | 4 ++++ .../src/v3/notification_channel_service_client.js | 4 ++++ .../src/v3/uptime_check_service_client.js | 4 ++++ packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 14076bbfa44..0c4b321992d 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -164,6 +164,10 @@ class AlertPolicyServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index e3f829f72fa..1331280ad1b 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -166,6 +166,10 @@ class GroupServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index abbe6f2228c..c1ef61e5dc5 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -170,6 +170,10 @@ class MetricServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 47a2b17077c..e0758287312 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -164,6 +164,10 @@ class NotificationChannelServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 8a5bcbe8b41..55d18eec15d 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -166,6 +166,10 @@ class UptimeCheckServiceClient { function() { const args = Array.prototype.slice.call(arguments, 0); return stub[methodName].apply(stub, args); + }, + err => + function() { + throw err; } ), defaults[methodName], diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 73fde67d84c..67ab68628e2 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-07T12:18:18.054766Z", + "updateTime": "2019-02-15T12:17:48.322500Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.10", - "dockerImage": "googleapis/artman@sha256:0954ba3e40d694e631bb2f39460d502a3d9f3a66d40b7a9a67f4b30012195beb" + "version": "0.16.13", + "dockerImage": "googleapis/artman@sha256:5fd9aee1d82a00cebf425c8fa431f5457539562f5867ad9c54370f0ec9a7ccaa" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "49b7906ba5f15c1bc52bf5febc3bd0645d29b980", - "internalRef": "232773383" + "sha": "0b81123e2e0e6a5097102a765c54d7c771781461", + "internalRef": "233777126" } }, { From 1fbd2c80c234cf9634c7689aeab059ca08acac82 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 24 Feb 2019 20:57:49 -0800 Subject: [PATCH 178/422] chore(deps): update dependency mocha to v6 (#217) --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 0b44aa11d2a..a20a95998b2 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -55,7 +55,7 @@ "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^5.0.0", + "mocha": "^6.0.0", "nyc": "^13.0.0", "power-assert": "^1.4.4", "prettier": "^1.7.4", diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 43f7060eeaf..a9184bc83be 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -20,7 +20,7 @@ "devDependencies": { "chai": "^4.2.0", "execa": "^1.0.0", - "mocha": "^5.0.0", + "mocha": "^6.0.0", "p-retry": "^3.0.0", "uuid": "^3.3.2" } From 6a64cd5781bc29741c6fa3c6c32b59ac4974dfec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 26 Feb 2019 05:49:36 -0800 Subject: [PATCH 179/422] chore: update proto docs and code style --- .../protos/google/monitoring/v3/alert.proto | 13 ++++--- .../google/monitoring/v3/alert_service.proto | 7 ++-- .../protos/google/monitoring/v3/common.proto | 12 +++--- .../google/monitoring/v3/dropped_labels.proto | 1 - .../protos/google/monitoring/v3/group.proto | 4 +- .../google/monitoring/v3/group_service.proto | 10 ++--- .../protos/google/monitoring/v3/metric.proto | 1 - .../google/monitoring/v3/metric_service.proto | 37 ++++++++++++------- .../monitoring/v3/mutation_record.proto | 1 - .../google/monitoring/v3/notification.proto | 9 +++-- .../monitoring/v3/notification_service.proto | 37 +++++++++++++------ .../google/monitoring/v3/span_context.proto | 1 - .../protos/google/monitoring/v3/uptime.proto | 1 - .../google/monitoring/v3/uptime_service.proto | 19 ++++++---- .../src/v3/doc/google/api/doc_metric.js | 5 ++- .../doc/google/api/doc_monitored_resource.js | 37 +++++++++++-------- .../v3/doc/google/monitoring/v3/doc_alert.js | 12 ++++-- .../v3/doc/google/monitoring/v3/doc_common.js | 11 ++++-- .../v3/doc/google/monitoring/v3/doc_group.js | 3 +- .../google/monitoring/v3/doc_notification.js | 8 ++-- .../monitoring/v3/doc_notification_service.js | 3 +- .../src/v3/doc/google/rpc/doc_status.js | 31 +++++++++------- .../src/v3/metric_service_client.js | 15 +++++--- .../v3/notification_channel_service_client.js | 6 ++- .../google-cloud-monitoring/synth.metadata | 10 ++--- 25 files changed, 176 insertions(+), 118 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 1e22e61c794..3b3e1dca29f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -30,7 +30,6 @@ option java_outer_classname = "AlertProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // A description of the conditions under which some aspect of your system is // considered to be "unhealthy" and the ways to notify people or services about // this state. For an overview of alert policies, see @@ -93,8 +92,10 @@ message AlertPolicy { // are applied in the order specified. // // This field is similar to the one in the - // [`MetricService.ListTimeSeries` request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - // It is advisable to use the `ListTimeSeries` method when debugging this field. + // [`MetricService.ListTimeSeries` + // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It + // is advisable to use the `ListTimeSeries` method when debugging this + // field. repeated Aggregation aggregations = 8; // A [filter](/monitoring/api/v3/filters) that identifies a time @@ -188,8 +189,10 @@ message AlertPolicy { // are applied in the order specified. // // This field is similar to the - // one in the [`MetricService.ListTimeSeries` request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - // It is advisable to use the `ListTimeSeries` method when debugging this field. + // one in the [`MetricService.ListTimeSeries` + // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It + // is advisable to use the `ListTimeSeries` method when debugging this + // field. repeated Aggregation aggregations = 5; // The amount of time that a time series must fail to report new diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index c97e3dc0585..0dedca1139d 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -29,7 +29,6 @@ option java_outer_classname = "AlertServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The AlertPolicyService API is used to manage (list, create, delete, // edit) alert policies in Stackdriver Monitoring. An alerting policy is // a description of the conditions under which some aspect of your @@ -41,7 +40,8 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // [Cloud Console](https://console.cloud.google.com/). service AlertPolicyService { // Lists the existing alerting policies for the project. - rpc ListAlertPolicies(ListAlertPoliciesRequest) returns (ListAlertPoliciesResponse) { + rpc ListAlertPolicies(ListAlertPoliciesRequest) + returns (ListAlertPoliciesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/alertPolicies" }; @@ -63,7 +63,8 @@ service AlertPolicyService { } // Deletes an alerting policy. - rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) returns (google.protobuf.Empty) { + rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/alertPolicies/*}" }; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index f33af523bd2..73ca2c4ade6 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -29,7 +29,6 @@ option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // A single strongly-typed value. message TypedValue { // The typed value field. @@ -393,8 +392,9 @@ enum ComparisonType { } // The tier of service for a Workspace. Please see the -// [service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers) -// for more details. +// [service tiers +// documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more +// details. enum ServiceTier { option deprecated = true; @@ -405,12 +405,14 @@ enum ServiceTier { // The Stackdriver Basic tier, a free tier of service that provides basic // features, a moderate allotment of logs, and access to built-in metrics. // A number of features are not available in this tier. For more details, - // see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). + // see [the service tiers + // documentation](https://cloud.google.com/monitoring/workspaces/tiers). SERVICE_TIER_BASIC = 1; // The Stackdriver Premium tier, a higher, more expensive tier of service // that provides access to all Stackdriver features, lets you use Stackdriver // with AWS accounts, and has a larger allotments for logs and metrics. For - // more details, see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). + // more details, see [the service tiers + // documentation](https://cloud.google.com/monitoring/workspaces/tiers). SERVICE_TIER_PREMIUM = 2; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index 11287062e81..d832aa45452 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -21,7 +21,6 @@ import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; - // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during // aggregation. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index f7f49615bd7..ca46a0c0d6d 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -24,7 +24,6 @@ option java_outer_classname = "GroupProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The description of a dynamic collection of monitored resources. Each group // has a filter that is matched against monitored resources and their associated // metadata. If a group's filter matches an available monitored resource, then @@ -67,7 +66,8 @@ message Group { // For groups with no parent, `parentName` is the empty string, `""`. string parent_name = 3; - // The filter used to determine which monitored resources belong to this group. + // The filter used to determine which monitored resources belong to this + // group. string filter = 5; // If true, the members of this group are considered to be a cluster. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 4af7e3719a1..34e1d9e997e 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -30,7 +30,6 @@ option java_outer_classname = "GroupServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The Group API lets you inspect and manage your // [groups](#google.monitoring.v3.Group). // @@ -83,7 +82,8 @@ service GroupService { } // Lists the monitored resources that are members of a group. - rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) { + rpc ListGroupMembers(ListGroupMembersRequest) + returns (ListGroupMembersResponse) { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; @@ -96,9 +96,9 @@ message ListGroupsRequest { // `"projects/{project_id_or_number}"`. string name = 7; - // An optional filter consisting of a single group name. The filters limit the - // groups returned based on their parent-child relationship with the specified - // group. If no filter is specified, all groups are returned. + // An optional filter consisting of a single group name. The filters limit + // the groups returned based on their parent-child relationship with the + // specified group. If no filter is specified, all groups are returned. oneof filter { // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. // Returns groups whose `parentName` field contains the group diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 570313229cc..c111d4fb4df 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -30,7 +30,6 @@ option java_outer_classname = "MetricProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // A single data point in a time series. message Point { // The time interval to which the data point applies. For `GAUGE` metrics, diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index faf758e14a3..febd3f7b54a 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -33,33 +33,40 @@ option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // Manages metric descriptors, monitored resource descriptors, and // time series data. service MetricService { - // Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { + // Lists monitored resource descriptors that match a filter. This method does + // not require a Stackdriver account. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) + returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; } - // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. - rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { + // Gets a single monitored resource descriptor. This method does not require a + // Stackdriver account. + rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) + returns (google.api.MonitoredResourceDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" }; } - // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. - rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { + // Lists metric descriptors that match a filter. This method does not require + // a Stackdriver account. + rpc ListMetricDescriptors(ListMetricDescriptorsRequest) + returns (ListMetricDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; } - // Gets a single metric descriptor. This method does not require a Stackdriver account. - rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { + // Gets a single metric descriptor. This method does not require a Stackdriver + // account. + rpc GetMetricDescriptor(GetMetricDescriptorRequest) + returns (google.api.MetricDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; @@ -68,7 +75,8 @@ service MetricService { // Creates a new metric descriptor. // User-created metric descriptors define // [custom metrics](/monitoring/custom-metrics). - rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { + rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) + returns (google.api.MetricDescriptor) { option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" @@ -77,13 +85,15 @@ service MetricService { // Deletes a metric descriptor. Only user-created // [custom metrics](/monitoring/custom-metrics) can be deleted. - rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { + rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; } - // Lists time series that match a filter. This method does not require a Stackdriver account. + // Lists time series that match a filter. This method does not require a + // Stackdriver account. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" @@ -94,7 +104,8 @@ service MetricService { // The response is empty if all time series in the request were written. // If any time series could not be written, a corresponding failure message is // included in the error response. - rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) { + rpc CreateTimeSeries(CreateTimeSeriesRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index 5f85864fe49..c87e2ebcc6e 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto @@ -26,7 +26,6 @@ option java_outer_classname = "MutationRecordProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // Describes a change made to a configuration. message MutationRecord { // When the change occurred. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index ac042762d3d..f2812548e9d 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -29,7 +29,6 @@ option java_outer_classname = "NotificationProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // A description of a notification channel. The descriptor includes // the properties of the channel and the set of labels or fields that // must be specified to configure channels of a given type. @@ -95,7 +94,9 @@ message NotificationChannel { } // The type of the notification channel. This field matches the - // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. + // value of the + // [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] + // field. string type = 1; // The full REST resource name for this channel. The syntax is: @@ -118,8 +119,8 @@ message NotificationChannel { // Configuration fields that define the channel and its behavior. The // permissible and required labels are specified in the - // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the - // `NotificationChannelDescriptor` corresponding to the `type` field. + // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] + // of the `NotificationChannelDescriptor` corresponding to the `type` field. map labels = 5; // User-supplied key/value data that does not need to conform to diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index e2c6a0ea723..e178e0cad07 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -31,13 +31,14 @@ option java_outer_classname = "NotificationServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The Notification Channel API provides access to configuration that // controls how messages related to incidents are sent. service NotificationChannelService { // Lists the descriptors for supported channel types. The use of descriptors // makes it possible for new channel types to be dynamically added. - rpc ListNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest) returns (ListNotificationChannelDescriptorsResponse) { + rpc ListNotificationChannelDescriptors( + ListNotificationChannelDescriptorsRequest) + returns (ListNotificationChannelDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannelDescriptors" }; @@ -45,14 +46,16 @@ service NotificationChannelService { // Gets a single channel descriptor. The descriptor indicates which fields // are expected / permitted for a notification channel of the given type. - rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) returns (NotificationChannelDescriptor) { + rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) + returns (NotificationChannelDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannelDescriptors/*}" }; } // Lists the notification channels that have been created for the project. - rpc ListNotificationChannels(ListNotificationChannelsRequest) returns (ListNotificationChannelsResponse) { + rpc ListNotificationChannels(ListNotificationChannelsRequest) + returns (ListNotificationChannelsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannels" }; @@ -63,7 +66,8 @@ service NotificationChannelService { // response may truncate or omit passwords, API keys, or other private key // matter and thus the response may not be 100% identical to the information // that was supplied in the call to the create method. - rpc GetNotificationChannel(GetNotificationChannelRequest) returns (NotificationChannel) { + rpc GetNotificationChannel(GetNotificationChannelRequest) + returns (NotificationChannel) { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannels/*}" }; @@ -71,7 +75,8 @@ service NotificationChannelService { // Creates a new notification channel, representing a single notification // endpoint such as an email address, SMS number, or PagerDuty service. - rpc CreateNotificationChannel(CreateNotificationChannelRequest) returns (NotificationChannel) { + rpc CreateNotificationChannel(CreateNotificationChannelRequest) + returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*}/notificationChannels" body: "notification_channel" @@ -80,7 +85,8 @@ service NotificationChannelService { // Updates a notification channel. Fields not specified in the field mask // remain unchanged. - rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) returns (NotificationChannel) { + rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) + returns (NotificationChannel) { option (google.api.http) = { patch: "/v3/{notification_channel.name=projects/*/notificationChannels/*}" body: "notification_channel" @@ -88,7 +94,8 @@ service NotificationChannelService { } // Deletes a notification channel. - rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) returns (google.protobuf.Empty) { + rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/notificationChannels/*}" }; @@ -96,7 +103,9 @@ service NotificationChannelService { // Causes a verification code to be delivered to the channel. The code // can then be supplied in `VerifyNotificationChannel` to verify the channel. - rpc SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest) returns (google.protobuf.Empty) { + rpc SendNotificationChannelVerificationCode( + SendNotificationChannelVerificationCodeRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode" body: "*" @@ -124,7 +133,9 @@ service NotificationChannelService { // have a shorter expiration (e.g. codes such as "G-123456") whereas // GetVerificationCode() will typically return a much longer, websafe base // 64 encoded string that has a longer expiration time. - rpc GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest) returns (GetNotificationChannelVerificationCodeResponse) { + rpc GetNotificationChannelVerificationCode( + GetNotificationChannelVerificationCodeRequest) + returns (GetNotificationChannelVerificationCodeResponse) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode" body: "*" @@ -134,7 +145,8 @@ service NotificationChannelService { // Verifies a `NotificationChannel` by proving receipt of the code // delivered to the channel as a result of calling // `SendNotificationChannelVerificationCode`. - rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) returns (NotificationChannel) { + rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) + returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:verify" body: "*" @@ -209,7 +221,8 @@ message ListNotificationChannelsRequest { // in which to look for the notification channels; it does not name a // specific channel. To query a specific channel by REST resource name, use // the - // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] operation. + // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + // operation. string name = 5; // If provided, this field specifies the criteria that must be met by diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto index e870d8f669c..f7977c288a1 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto @@ -24,7 +24,6 @@ option java_outer_classname = "SpanContextProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The context of a span, attached to google.api.Distribution.Exemplars // in google.api.Distribution values during aggregation. // diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 4f1b7aaa114..2850301ac12 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -27,7 +27,6 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // An internal checker allows uptime checks to run on private/internal GCP // resources. message InternalChecker { diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index e79488332fd..ed59114d0c2 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -29,7 +29,6 @@ option java_outer_classname = "UptimeServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; - // The UptimeCheckService API is used to manage (list, create, delete, edit) // uptime check configurations in the Stackdriver Monitoring product. An uptime // check is a piece of configuration that determines which resources and @@ -41,21 +40,24 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; service UptimeCheckService { // Lists the existing valid uptime check configurations for the project, // leaving out any invalid configurations. - rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { + rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) + returns (ListUptimeCheckConfigsResponse) { option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; } // Gets a single uptime check configuration. - rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { + rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) + returns (UptimeCheckConfig) { option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; } // Creates a new uptime check configuration. - rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { + rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) + returns (UptimeCheckConfig) { option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" @@ -66,7 +68,8 @@ service UptimeCheckService { // configuration with a new one or replace only certain fields in the current // configuration by specifying the fields to be updated via `"updateMask"`. // Returns the updated configuration. - rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { + rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) + returns (UptimeCheckConfig) { option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" @@ -76,14 +79,16 @@ service UptimeCheckService { // Deletes an uptime check configuration. Note that this method will fail // if the uptime check configuration is referenced by an alert policy or // other dependent configs that would be rendered invalid by the deletion. - rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { + rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; } // Returns the list of IPs that checkers run from - rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { + rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) + returns (ListUptimeCheckIpsResponse) { option (google.api.http) = { get: "/v3/uptimeCheckIps" }; diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 7d9e9378153..331c328eec0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js @@ -259,8 +259,9 @@ const MetricDescriptor = { * labels of a `MetricDescriptor`. * * @property {string} type - * An existing metric type, see google.api.MetricDescriptor. - * For example, `custom.googleapis.com/invoice/paid/amount`. + * 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 diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 24321d640b0..29ad2b03aec 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index 88fa07ac3ef..e32a1c1c8b5 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -234,8 +234,10 @@ const AlertPolicy = { * are applied in the order specified. * * This field is similar to the one in the - * [`MetricService.ListTimeSeries` request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this field. + * [`MetricService.ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It + * is advisable to use the `ListTimeSeries` method when debugging this + * field. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @@ -347,8 +349,10 @@ const AlertPolicy = { * are applied in the order specified. * * This field is similar to the - * one in the [`MetricService.ListTimeSeries` request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this field. + * one in the [`MetricService.ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It + * is advisable to use the `ListTimeSeries` method when debugging this + * field. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index eb0c6f30813..dcccf12de5e 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js @@ -510,8 +510,9 @@ const ComparisonType = { /** * The tier of service for a Workspace. Please see the - * [service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers) - * for more details. + * [service tiers + * documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more + * details. * * @enum {number} * @memberof google.monitoring.v3 @@ -528,7 +529,8 @@ const ServiceTier = { * The Stackdriver Basic tier, a free tier of service that provides basic * features, a moderate allotment of logs, and access to built-in metrics. * A number of features are not available in this tier. For more details, - * see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). + * see [the service tiers + * documentation](https://cloud.google.com/monitoring/workspaces/tiers). */ SERVICE_TIER_BASIC: 1, @@ -536,7 +538,8 @@ const ServiceTier = { * The Stackdriver Premium tier, a higher, more expensive tier of service * that provides access to all Stackdriver features, lets you use Stackdriver * with AWS accounts, and has a larger allotments for logs and metrics. For - * more details, see [the service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers). + * more details, see [the service tiers + * documentation](https://cloud.google.com/monitoring/workspaces/tiers). */ SERVICE_TIER_PREMIUM: 2 }; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js index 8ee70c9b4f3..2e6c17e4e8e 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js @@ -59,7 +59,8 @@ * For groups with no parent, `parentName` is the empty string, `""`. * * @property {string} filter - * The filter used to determine which monitored resources belong to this group. + * The filter used to determine which monitored resources belong to this + * group. * * @property {boolean} isCluster * If true, the members of this group are considered to be a cluster. diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js index 36da41c303e..463a6624bac 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js @@ -70,7 +70,9 @@ const NotificationChannelDescriptor = { * * @property {string} type * The type of the notification channel. This field matches the - * value of the NotificationChannelDescriptor.type field. + * value of the + * NotificationChannelDescriptor.type + * field. * * @property {string} name * The full REST resource name for this channel. The syntax is: @@ -93,8 +95,8 @@ const NotificationChannelDescriptor = { * @property {Object.} labels * Configuration fields that define the channel and its behavior. The * permissible and required labels are specified in the - * NotificationChannelDescriptor.labels of the - * `NotificationChannelDescriptor` corresponding to the `type` field. + * NotificationChannelDescriptor.labels + * of the `NotificationChannelDescriptor` corresponding to the `type` field. * * @property {Object.} userLabels * User-supplied key/value data that does not need to conform to diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js index d7867eb523c..04587966ba7 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js @@ -120,7 +120,8 @@ const CreateNotificationChannelRequest = { * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use * the - * `GetNotificationChannel` operation. + * `GetNotificationChannel` + * operation. * * @property {string} filter * If provided, this field specifies the criteria that must be met by diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js index fc4b5be93f0..432ab6bb928 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js @@ -16,24 +16,25 @@ // to be loaded as the JS file. /** - * The `Status` type defines a logical error model that is suitable for different - * programming environments, including REST APIs and RPC APIs. It is used by - * [gRPC](https://github.com/grpc). The error model is designed to be: + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: * * - Simple to use and understand for most users * - Flexible enough to meet unexpected needs * * # Overview * - * The `Status` message contains three pieces of data: error code, error message, - * and error details. The error code should be an enum value of - * google.rpc.Code, but it may accept additional error codes if needed. The - * error message should be a developer-facing English message that helps - * developers *understand* and *resolve* the error. If a localized user-facing - * error message is needed, put the localized message in the error details or - * localize it in the client. The optional error details may contain arbitrary - * information about the error. There is a predefined set of error detail types - * in the package `google.rpc` that can be used for common error conditions. + * The `Status` message contains three pieces of data: error code, error + * message, and error details. The error code should be an enum value of + * google.rpc.Code, but it may accept additional error codes + * if needed. The error message should be a developer-facing English message + * that helps developers *understand* and *resolve* the error. If a localized + * user-facing error message is needed, put the localized message in the error + * details or localize it in the client. The optional error details may contain + * arbitrary information about the error. There is a predefined set of error + * detail types in the package `google.rpc` that can be used for common error + * conditions. * * # Language mapping * @@ -70,12 +71,14 @@ * be used directly after any stripping needed for security/privacy reasons. * * @property {number} code - * The status code, which should be an enum value of google.rpc.Code. + * The status code, which should be an enum value of + * google.rpc.Code. * * @property {string} message * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized by the client. + * google.rpc.Status.details field, or localized + * by the client. * * @property {Object[]} details * A list of messages that carry the error details. There is a common set of diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index c1ef61e5dc5..71c3edf2370 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -223,7 +223,8 @@ class MetricServiceClient { // ------------------- /** - * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + * Lists monitored resource descriptors that match a filter. This method does + * not require a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -394,7 +395,8 @@ class MetricServiceClient { } /** - * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + * Gets a single monitored resource descriptor. This method does not require a + * Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -447,7 +449,8 @@ class MetricServiceClient { } /** - * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + * Lists metric descriptors that match a filter. This method does not require + * a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -620,7 +623,8 @@ class MetricServiceClient { } /** - * Gets a single metric descriptor. This method does not require a Stackdriver account. + * Gets a single metric descriptor. This method does not require a Stackdriver + * account. * * @param {Object} request * The request object that will be sent. @@ -778,7 +782,8 @@ class MetricServiceClient { } /** - * Lists time series that match a filter. This method does not require a Stackdriver account. + * Lists time series that match a filter. This method does not require a + * Stackdriver account. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index e0758287312..561ef1ec1e8 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -449,7 +449,8 @@ class NotificationChannelServiceClient { * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use * the - * `GetNotificationChannel` operation. + * `GetNotificationChannel` + * operation. * @param {string} [request.filter] * If provided, this field specifies the criteria that must be met by * notification channels to be included in the response. @@ -575,7 +576,8 @@ class NotificationChannelServiceClient { * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use * the - * `GetNotificationChannel` operation. + * `GetNotificationChannel` + * operation. * @param {string} [request.filter] * If provided, this field specifies the criteria that must be met by * notification channels to be included in the response. diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 67ab68628e2..b07a2d98575 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-02-15T12:17:48.322500Z", + "updateTime": "2019-02-26T12:33:51.744444Z", "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": "0b81123e2e0e6a5097102a765c54d7c771781461", - "internalRef": "233777126" + "sha": "29f098cb03a9983cc9cb15993de5da64419046f2", + "internalRef": "235621085" } }, { From 2fc1a0671bee623016a7ceb075f379f61cd3c814 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 5 Mar 2019 16:42:28 -0800 Subject: [PATCH 180/422] build: update release configuration --- packages/google-cloud-monitoring/synth.metadata | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index b07a2d98575..aa944fb7db2 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-02-26T12:33:51.744444Z", + "updateTime": "2019-03-05T12:19:26.159012Z", "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 4e19574cde7c6e9c14ea3d032c0f55a795ed7fd7 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Thu, 7 Mar 2019 18:05:19 -0800 Subject: [PATCH 181/422] build: Add docuploader credentials to node publish jobs (#221) --- .../google-cloud-monitoring/synth.metadata | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index aa944fb7db2..670f10261b4 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,38 +1,18 @@ { - "updateTime": "2019-03-05T12:19:26.159012Z", + "updateTime": "2019-03-08T00:45:42.931120Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.14", - "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" + "version": "0.16.15", + "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" } }, { "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": "monitoring", - "apiVersion": "v3", - "language": "nodejs", - "generator": "gapic", - "config": "google/monitoring/artman_monitoring.yaml" + "sha": "c986e1d9618ac41343962b353d136201d72626ae" } } ] From e41e0803c4c4fffeb8e9b0a6c77764a970a3d1ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 11 Mar 2019 09:02:29 -0700 Subject: [PATCH 182/422] chore(deps): update dependency p-retry to v4 (#223) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index a9184bc83be..66165c107ed 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -21,7 +21,7 @@ "chai": "^4.2.0", "execa": "^1.0.0", "mocha": "^6.0.0", - "p-retry": "^3.0.0", + "p-retry": "^4.0.0", "uuid": "^3.3.2" } } From c7f5872c7b3809168a9054a8db844b416df4aa62 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 12 Mar 2019 10:43:28 -0700 Subject: [PATCH 183/422] refactor: update json import paths (#224) --- .../src/v3/alert_policy_service_client.js | 2 +- .../src/v3/group_service_client.js | 2 +- .../src/v3/metric_service_client.js | 2 +- .../v3/notification_channel_service_client.js | 2 +- .../src/v3/uptime_check_service_client.js | 2 +- .../google-cloud-monitoring/synth.metadata | 28 ++++++++++++++++--- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 0c4b321992d..ad45d7e4721 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./alert_policy_service_client_config'); +const gapicConfig = require('./alert_policy_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 1331280ad1b..c66fe267c0b 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./group_service_client_config'); +const gapicConfig = require('./group_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 71c3edf2370..208951ff8c4 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./metric_service_client_config'); +const gapicConfig = require('./metric_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 561ef1ec1e8..55bba927176 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./notification_channel_service_client_config'); +const gapicConfig = require('./notification_channel_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 55d18eec15d..18c2553f68f 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -14,7 +14,7 @@ 'use strict'; -const gapicConfig = require('./uptime_check_service_client_config'); +const gapicConfig = require('./uptime_check_service_client_config.json'); const gax = require('google-gax'); const merge = require('lodash.merge'); const path = require('path'); diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 670f10261b4..1e19be17ab4 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,18 +1,38 @@ { - "updateTime": "2019-03-08T00:45:42.931120Z", + "updateTime": "2019-03-12T11:19:17.129785Z", "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": "c986e1d9618ac41343962b353d136201d72626ae" + "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", + "internalRef": "237945492" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.2.26" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "monitoring", + "apiVersion": "v3", + "language": "nodejs", + "generator": "gapic", + "config": "google/monitoring/artman_monitoring.yaml" } } ] From ad6b94528507c9f6d0c897192c056e0ac26002d7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 13 Mar 2019 17:45:11 -0700 Subject: [PATCH 184/422] Release v0.7.1 (#225) --- packages/google-cloud-monitoring/CHANGELOG.md | 33 +++++++++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 6a3c211e9b9..0e80a98a58c 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,39 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## v0.7.1 + +03-13-2019 15:05 PDT + +### Bug Fixes +- fix: throw on invalid credentials ([#216](https://github.com/googleapis/nodejs-monitoring/pull/216)) + +### Dependencies +- fix(deps): update dependency google-gax to ^0.25.0 ([#204](https://github.com/googleapis/nodejs-monitoring/pull/204)) + +### Documentation +- docs: update links in contrib guide ([#215](https://github.com/googleapis/nodejs-monitoring/pull/215)) +- docs: update contributing path in README ([#210](https://github.com/googleapis/nodejs-monitoring/pull/210)) +- docs: move CONTRIBUTING.md to root ([#209](https://github.com/googleapis/nodejs-monitoring/pull/209)) +- docs: add lint/fix example to contributing guide ([#206](https://github.com/googleapis/nodejs-monitoring/pull/206)) + +### Internal / Testing Changes +- refactor: update json import paths ([#224](https://github.com/googleapis/nodejs-monitoring/pull/224)) +- chore(deps): update dependency p-retry to v4 ([#223](https://github.com/googleapis/nodejs-monitoring/pull/223)) +- build: Add docuploader credentials to node publish jobs ([#221](https://github.com/googleapis/nodejs-monitoring/pull/221)) +- build: use node10 to run samples-test, system-test etc ([#220](https://github.com/googleapis/nodejs-monitoring/pull/220)) +- build: update release configuration +- chore: update proto docs and code style +- chore(deps): update dependency mocha to v6 ([#217](https://github.com/googleapis/nodejs-monitoring/pull/217)) +- refactor: update the generated code style ([#208](https://github.com/googleapis/nodejs-monitoring/pull/208)) +- build: use linkinator for docs test ([#214](https://github.com/googleapis/nodejs-monitoring/pull/214)) +- fix(deps): update dependency yargs to v13 ([#213](https://github.com/googleapis/nodejs-monitoring/pull/213)) +- build: create docs test npm scripts ([#212](https://github.com/googleapis/nodejs-monitoring/pull/212)) +- build: test using @grpc/grpc-js in CI ([#211](https://github.com/googleapis/nodejs-monitoring/pull/211)) +- chore(deps): update dependency eslint-config-prettier to v4 ([#203](https://github.com/googleapis/nodejs-monitoring/pull/203)) +- build: ignore googleapis.com in doc link check ([#201](https://github.com/googleapis/nodejs-monitoring/pull/201)) +- chore: update year in the license headers. ([#200](https://github.com/googleapis/nodejs-monitoring/pull/200)) + ## v0.7.0 01-15-2019 09:35 PST diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a20a95998b2..4b42a1cece2 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.7.0", + "version": "0.7.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 66165c107ed..6facf3c6d36 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha system-test --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^0.7.0", + "@google-cloud/monitoring": "^0.7.1", "yargs": "^13.0.0" }, "devDependencies": { From ced66bc95a6a841b0b1dd05c6b47b0c7b1fd8138 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 28 Mar 2019 15:15:54 -0700 Subject: [PATCH 185/422] fix: include 'x-goog-request-params' header in requests (#233) --- .../google/monitoring/v3/dropped_labels.proto | 3 + .../src/v3/alert_policy_service_client.js | 35 ++++++++++++ .../src/v3/group_service_client.js | 42 ++++++++++++++ .../src/v3/metric_service_client.js | 56 +++++++++++++++++++ .../v3/notification_channel_service_client.js | 49 ++++++++++++++++ .../src/v3/uptime_check_service_client.js | 35 ++++++++++++ .../google-cloud-monitoring/synth.metadata | 10 ++-- 7 files changed, 225 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index d832aa45452..acbe8cf25ad 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -20,6 +20,9 @@ package google.monitoring.v3; import "google/api/annotations.proto"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "DroppedLabelsProto"; +option java_package = "com.google.monitoring.v3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index ad45d7e4721..a5ef4e4e390 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -327,6 +327,13 @@ class AlertPolicyServiceClient { 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.listAlertPolicies(request, options, callback); } @@ -451,6 +458,13 @@ class AlertPolicyServiceClient { 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.getAlertPolicy(request, options, callback); } @@ -515,6 +529,13 @@ class AlertPolicyServiceClient { 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.createAlertPolicy(request, options, callback); } @@ -557,6 +578,13 @@ class AlertPolicyServiceClient { 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.deleteAlertPolicy(request, options, callback); } @@ -635,6 +663,13 @@ class AlertPolicyServiceClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'alert_policy.name': request.alertPolicy.name, + }); return this._innerApiCalls.updateAlertPolicy(request, options, callback); } diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index c66fe267c0b..364dff7da79 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -324,6 +324,13 @@ class GroupServiceClient { 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.listGroups(request, options, callback); } @@ -442,6 +449,13 @@ class GroupServiceClient { 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.getGroup(request, options, callback); } @@ -501,6 +515,13 @@ class GroupServiceClient { 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.createGroup(request, options, callback); } @@ -553,6 +574,13 @@ class GroupServiceClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'group.name': request.group.name, + }); return this._innerApiCalls.updateGroup(request, options, callback); } @@ -592,6 +620,13 @@ class GroupServiceClient { 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.deleteGroup(request, options, callback); } @@ -702,6 +737,13 @@ class GroupServiceClient { 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.listGroupMembers(request, options, callback); } diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 208951ff8c4..4ca5ecbf221 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -322,6 +322,13 @@ class MetricServiceClient { 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.listMonitoredResourceDescriptors( request, @@ -440,6 +447,13 @@ class MetricServiceClient { 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.getMonitoredResourceDescriptor( request, @@ -549,6 +563,13 @@ class MetricServiceClient { 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.listMetricDescriptors( request, @@ -668,6 +689,13 @@ class MetricServiceClient { 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.getMetricDescriptor(request, options, callback); } @@ -727,6 +755,13 @@ class MetricServiceClient { 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.createMetricDescriptor( request, @@ -773,6 +808,13 @@ class MetricServiceClient { 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.deleteMetricDescriptor( request, @@ -918,6 +960,13 @@ class MetricServiceClient { 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.listTimeSeries(request, options, callback); } @@ -1065,6 +1114,13 @@ class MetricServiceClient { 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.createTimeSeries(request, options, callback); } diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 55bba927176..782599d2130 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -315,6 +315,13 @@ class NotificationChannelServiceClient { 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.listNotificationChannelDescriptors( request, @@ -430,6 +437,13 @@ class NotificationChannelServiceClient { 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.getNotificationChannelDescriptor( request, @@ -547,6 +561,13 @@ class NotificationChannelServiceClient { 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.listNotificationChannels( request, @@ -676,6 +697,13 @@ class NotificationChannelServiceClient { 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.getNotificationChannel( request, @@ -743,6 +771,13 @@ class NotificationChannelServiceClient { 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.createNotificationChannel( request, @@ -803,6 +838,13 @@ class NotificationChannelServiceClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'notification_channel.name': request.notificationChannel.name, + }); return this._innerApiCalls.updateNotificationChannel( request, @@ -851,6 +893,13 @@ class NotificationChannelServiceClient { 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.deleteNotificationChannel( request, diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 18c2553f68f..c25f4d96117 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -310,6 +310,13 @@ class UptimeCheckServiceClient { 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.listUptimeCheckConfigs( request, @@ -417,6 +424,13 @@ class UptimeCheckServiceClient { 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.getUptimeCheckConfig(request, options, callback); } @@ -473,6 +487,13 @@ class UptimeCheckServiceClient { 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.createUptimeCheckConfig( request, @@ -545,6 +566,13 @@ class UptimeCheckServiceClient { options = {}; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + 'uptime_check_config.name': request.uptimeCheckConfig.name, + }); return this._innerApiCalls.updateUptimeCheckConfig( request, @@ -590,6 +618,13 @@ class UptimeCheckServiceClient { 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.deleteUptimeCheckConfig( request, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 1e19be17ab4..fb058222be9 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-12T11:19:17.129785Z", + "updateTime": "2019-03-28T11:36:52.709163Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.16", - "dockerImage": "googleapis/artman@sha256:30babbfce7f05a62b1892c63c575aa2c8c502eb4bcc8f3bb90ec83e955d5d319" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "abd1c9a99c5cd7179d8e5e0c8d4c8e761054cc78", - "internalRef": "237945492" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } }, { From caef6e0bb7dd58dfc73de1337d6ae703c1fc4fde Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 9 Apr 2019 20:16:47 -0700 Subject: [PATCH 186/422] refactor: use execSync for tests (#234) --- .../samples/package.json | 3 +- .../samples/test/quickstart.test.js | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-monitoring/samples/test/quickstart.test.js diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 6facf3c6d36..67486ca5157 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -11,7 +11,7 @@ "node": ">=8" }, "scripts": { - "test": "mocha system-test --timeout 600000" + "test": "mocha --timeout 600000" }, "dependencies": { "@google-cloud/monitoring": "^0.7.1", @@ -19,7 +19,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "execa": "^1.0.0", "mocha": "^6.0.0", "p-retry": "^4.0.0", "uuid": "^3.3.2" diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js new file mode 100644 index 00000000000..8048b0d48ca --- /dev/null +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -0,0 +1,40 @@ +/** + * 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. + */ + +'use strict'; + +const {assert} = require('chai'); +const cp = require('child_process'); +const retry = require('p-retry'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +describe('quickstart', () => { + it('should run the quickstart', async () => { + // The write in the quickstart appears to be very, very flaky. + // This should not be needed. The tracking bug is here: + // https://github.com/googleapis/nodejs-monitoring/issues/191 + await retry( + async () => { + const result = execSync('node quickstart'); + assert.match(result, /Done writing time series data/); + }, + { + retries: 10, + onFailedAttempt: () => console.warn('Write failed, retrying...'), + } + ); + }); +}); From f590ac0fc712e240e9dddfcfa6accef0d68c4361 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:09:35 -0700 Subject: [PATCH 187/422] chore(docs): formatting updates (#236) --- .../src/v3/doc/google/protobuf/doc_any.js | 3 +- .../v3/doc/google/protobuf/doc_field_mask.js | 44 ++++++++----------- .../v3/doc/google/protobuf/doc_timestamp.js | 26 ++++++----- .../google-cloud-monitoring/synth.metadata | 12 ++--- 4 files changed, 40 insertions(+), 45 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js index f3278b34e66..9ff5d007807 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js index d55d97e6e38..011207b8626 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index b47f41c2b30..98c19dbf0d3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index fb058222be9..e48cb76a095 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-03-28T11:36:52.709163Z", + "updateTime": "2019-04-21T11:48:03.442102Z", "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 3ec1eec40ba5ea09c6a39ebf1054f723824573c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Mon, 22 Apr 2019 15:20:26 -0400 Subject: [PATCH 188/422] chore(deps): update dependency nyc to v14 (#235) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 4b42a1cece2..f8d22056fd1 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -56,7 +56,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^6.0.0", - "nyc": "^13.0.0", + "nyc": "^14.0.0", "power-assert": "^1.4.4", "prettier": "^1.7.4", "linkinator": "^1.1.2" From 14b5348e2fe1b30f6813fc06068b80fa462353d5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Tue, 23 Apr 2019 15:13:06 -0700 Subject: [PATCH 189/422] chore: re-order template utils (#237) --- .../src/v3/alert_policy_service_client.js | 38 +++++++++---------- .../src/v3/group_service_client.js | 38 +++++++++---------- .../src/v3/metric_service_client.js | 38 +++++++++---------- .../v3/notification_channel_service_client.js | 38 +++++++++---------- .../google-cloud-monitoring/synth.metadata | 10 ++--- 5 files changed, 81 insertions(+), 81 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index a5ef4e4e390..fdc04b6da68 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -108,13 +108,13 @@ class AlertPolicyServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), alertPolicyPathTemplate: new gax.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), alertPolicyConditionPathTemplate: new gax.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, @@ -678,18 +678,6 @@ class AlertPolicyServiceClient { // -- 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 alert_policy resource name string. * @@ -721,14 +709,15 @@ class AlertPolicyServiceClient { } /** - * 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, + }); } /** @@ -793,6 +782,17 @@ class AlertPolicyServiceClient { alertPolicyConditionName ).condition; } + + /** + * 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 = AlertPolicyServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 364dff7da79..e628a143954 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -111,10 +111,10 @@ class GroupServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), groupPathTemplate: new gax.PathTemplate( 'projects/{project}/groups/{group}' ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, @@ -823,18 +823,6 @@ class GroupServiceClient { // -- 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 group resource name string. * @@ -850,14 +838,15 @@ class GroupServiceClient { } /** - * 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, + }); } /** @@ -881,6 +870,17 @@ class GroupServiceClient { matchGroupFromGroupName(groupName) { return this._pathTemplates.groupPathTemplate.match(groupName).group; } + + /** + * 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 = GroupServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 4ca5ecbf221..2b0947c5e7d 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -101,13 +101,13 @@ class MetricServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), metricDescriptorPathTemplate: new gax.PathTemplate( 'projects/{project}/metricDescriptors/{metric_descriptor=**}' ), monitoredResourceDescriptorPathTemplate: new gax.PathTemplate( 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, @@ -1129,18 +1129,6 @@ class MetricServiceClient { // -- 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_descriptor resource name string. * @@ -1170,14 +1158,15 @@ class MetricServiceClient { } /** - * 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, + }); } /** @@ -1235,6 +1224,17 @@ class MetricServiceClient { monitoredResourceDescriptorName ).monitored_resource_descriptor; } + + /** + * 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 = MetricServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 782599d2130..48910d386d3 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -101,13 +101,13 @@ class NotificationChannelServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), notificationChannelPathTemplate: new gax.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), notificationChannelDescriptorPathTemplate: new gax.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), + projectPathTemplate: new gax.PathTemplate('projects/{project}'), }; // Some of the methods on this service return "paged" results, @@ -912,18 +912,6 @@ class NotificationChannelServiceClient { // -- 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 notification_channel resource name string. * @@ -955,14 +943,15 @@ class NotificationChannelServiceClient { } /** - * 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, + }); } /** @@ -1020,6 +1009,17 @@ class NotificationChannelServiceClient { notificationChannelDescriptorName ).channel_descriptor; } + + /** + * 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 = NotificationChannelServiceClient; diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index e48cb76a095..b773cfaa681 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-04-21T11:48:03.442102Z", + "updateTime": "2019-04-23T11:15:47.168949Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.26", - "dockerImage": "googleapis/artman@sha256:314eae2a40f6f7822db77365cf5f45bd513d628ae17773fd0473f460e7c2a665" + "version": "0.17.0", + "dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3369c803f56d52662ea3792076deb8545183bdb0", - "internalRef": "244282812" + "sha": "547e19e7df398e9290e8e3674d7351efc500f9b0", + "internalRef": "244712781" } }, { From 3993ebe843cb4417aa1b75105fdcafc5bebbdbd1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 25 Apr 2019 09:03:48 -0700 Subject: [PATCH 190/422] chore(docs): formatting updates (#238) --- .../src/v3/doc/google/api/doc_distribution.js | 2 +- .../src/v3/doc/google/api/doc_metric.js | 5 +-- .../doc/google/api/doc_monitored_resource.js | 37 ++++++++----------- .../google-cloud-monitoring/synth.metadata | 6 +-- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js index 6ce7539c64c..95e6d5596e2 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js @@ -248,7 +248,7 @@ const Distribution = { * @property {Object[]} attachments * Contextual information about the example value. Examples are: * - * Trace ID: type.googleapis.com/google.devtools.cloudtrace.v1.Trace + * Trace: type.googleapis.com/google.monitoring.v3.SpanContext * * Literal string: type.googleapis.com/google.protobuf.StringValue * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 331c328eec0..7d9e9378153 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js @@ -259,9 +259,8 @@ const MetricDescriptor = { * labels of a `MetricDescriptor`. * * @property {string} type - * An existing metric type, see - * google.api.MetricDescriptor. For example, - * `custom.googleapis.com/invoice/paid/amount`. + * 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 diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 29ad2b03aec..24321d640b0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index b773cfaa681..7943a5e2e16 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-04-23T11:15:47.168949Z", + "updateTime": "2019-04-25T11:36:18.815488Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "547e19e7df398e9290e8e3674d7351efc500f9b0", - "internalRef": "244712781" + "sha": "25cbfd4a5386742f5968d69bd276a0436d23bd97", + "internalRef": "245137805" } }, { From 7475bbc422f7372ff6afd70075f8be19dbe93b1e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 29 Apr 2019 15:04:13 -0700 Subject: [PATCH 191/422] update to .nycrc with --all enabled (#239) --- packages/google-cloud-monitoring/.nycrc | 40 +++++++++++-------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index 88b001cb587..bfe4073a6ab 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.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 174f9fa263a76bc1f6ac12777b05085adcd5af67 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 2 May 2019 09:15:53 -0700 Subject: [PATCH 192/422] fix(deps): update dependency google-gax to ^0.26.0 (#240) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f8d22056fd1..b2b84f83357 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^0.25.0", + "google-gax": "^0.26.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 7b8af89218dcc346ec4068dd8120dfe0e9fc7fe6 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 2 May 2019 11:30:25 -0700 Subject: [PATCH 193/422] build!: upgrade engines field to >=8.10.0 (#241) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b2b84f83357..cd8358df2fe 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/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-monitoring", "main": "src/index.js", From e952f14a9d84481a978d1296e1618f0c9ceeedbc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Fri, 3 May 2019 08:20:53 -0700 Subject: [PATCH 194/422] chore(deps): update dependency eslint-plugin-node to v9 (#244) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cd8358df2fe..9643134f262 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -50,7 +50,7 @@ "codecov": "^3.0.0", "eslint": "^5.0.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", "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", From 1ce987412446b46dd338d9628fbd4d56dfca3b4e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 10 May 2019 15:43:52 -0700 Subject: [PATCH 195/422] build: only pipe to codecov if tests run on Node 10 (#245) --- packages/google-cloud-monitoring/synth.metadata | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7943a5e2e16..21fc8cde6ce 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-04-25T11:36:18.815488Z", + "updateTime": "2019-05-04T11:17:55.111186Z", "sources": [ { "generator": { "name": "artman", - "version": "0.17.0", - "dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2" + "version": "0.18.0", + "dockerImage": "googleapis/artman@sha256:29bd82cc42c43825fde408e63fc955f3f9d07ff9989243d7aa0f91a35c7884dc" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "25cbfd4a5386742f5968d69bd276a0436d23bd97", - "internalRef": "245137805" + "sha": "39c876cca5403e7e8282ce2229033cc3cc02962c", + "internalRef": "246561601" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.4.10" + "version": "2019.5.2" } } ], From 530ad612ae526f2b1e6cfc9e00831847bc2064b3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Sat, 11 May 2019 15:41:33 -0700 Subject: [PATCH 196/422] docs: update jsdoc formatting (#250) --- .../src/v3/doc/google/api/doc_metric.js | 6 ++++++ .../src/v3/doc/google/api/doc_monitored_resource.js | 5 +++++ packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 7d9e9378153..6280578f493 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 24321d640b0..8d5e132a417 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 21fc8cde6ce..770c7ee4911 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-04T11:17:55.111186Z", + "updateTime": "2019-05-11T11:18:47.991857Z", "sources": [ { "generator": { "name": "artman", - "version": "0.18.0", - "dockerImage": "googleapis/artman@sha256:29bd82cc42c43825fde408e63fc955f3f9d07ff9989243d7aa0f91a35c7884dc" + "version": "0.19.0", + "dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "39c876cca5403e7e8282ce2229033cc3cc02962c", - "internalRef": "246561601" + "sha": "32b08107fa1710f46287c17d5bb2016e443ed3ba", + "internalRef": "247684466" } }, { From b7677df50e69cb1fbb3e5ee7f65d4fa96e44393c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sat, 11 May 2019 15:50:06 -0700 Subject: [PATCH 197/422] fix(deps): update dependency google-gax to v1 (#249) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 9643134f262..102a1c3c976 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^0.26.0", + "google-gax": "^1.0.0", "lodash.merge": "^4.6.0" }, "devDependencies": { From 153d1d8768f8b39efb6bff2cd2febeb98c3f0d42 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 08:25:38 -0700 Subject: [PATCH 198/422] build: add new kokoro config for coverage and release-please (#251) --- packages/google-cloud-monitoring/synth.metadata | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 770c7ee4911..48f8c92a7b7 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-11T11:18:47.991857Z", + "updateTime": "2019-05-17T01:08:29.317885Z", "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 ba4c3a7e62fbabd6cf3133eea5d47d9117b078ad Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 16:49:37 -0700 Subject: [PATCH 199/422] build: updated kokoro config for coverage and release-please (#252) --- packages/google-cloud-monitoring/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 48f8c92a7b7..240341442a4 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-17T01:08:29.317885Z", + "updateTime": "2019-05-17T19:47:58.058496Z", "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 24062c7d1c79a35b2ae6a150caa79a0f54144964 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 May 2019 07:52:38 -0700 Subject: [PATCH 200/422] chore: release 1.0.0 (#256) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-monitoring/CHANGELOG.md | 19 ++++++++++++++++++- packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 0e80a98a58c..ac16e6a2f62 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,24 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.0.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v0.7.1...v1.0.0) (2019-05-20) + + +### ⚠ BREAKING CHANGES + +* upgrade engines field to >=8.10.0 (#241) + +### Bug Fixes + +* include 'x-goog-request-params' header in requests ([#233](https://www.github.com/googleapis/nodejs-monitoring/issues/233)) ([54733ef](https://www.github.com/googleapis/nodejs-monitoring/commit/54733ef)) +* **deps:** update dependency google-gax to ^0.26.0 ([#240](https://www.github.com/googleapis/nodejs-monitoring/issues/240)) ([da50ee8](https://www.github.com/googleapis/nodejs-monitoring/commit/da50ee8)) +* **deps:** update dependency google-gax to v1 ([#249](https://www.github.com/googleapis/nodejs-monitoring/issues/249)) ([896141a](https://www.github.com/googleapis/nodejs-monitoring/commit/896141a)) + + +### Build System + +* upgrade engines field to >=8.10.0 ([#241](https://www.github.com/googleapis/nodejs-monitoring/issues/241)) ([6e7587d](https://www.github.com/googleapis/nodejs-monitoring/commit/6e7587d)) + ## v0.7.1 03-13-2019 15:05 PDT @@ -204,4 +222,3 @@ Bring in some documentation changes inside protos (see #96) - Fix region tags. (#42) - Add Alerting samples. (#41) - chore: test on node10 (#40) - diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 102a1c3c976..632cc14a385 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "0.7.1", + "version": "1.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 67486ca5157..f1270e913eb 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^0.7.1", + "@google-cloud/monitoring": "^1.0.0", "yargs": "^13.0.0" }, "devDependencies": { From 74a88d6cf44965b80daad3fd7fcb2a51ca064490 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 May 2019 10:04:00 -0700 Subject: [PATCH 201/422] refactor: drop dependency on lodash.merge and update links (#258) --- packages/google-cloud-monitoring/package.json | 3 +- .../src/v3/alert_policy_service_client.js | 22 ++++++------- .../src/v3/group_service_client.js | 26 +++++++-------- .../src/v3/metric_service_client.js | 32 ++++++++----------- .../v3/notification_channel_service_client.js | 28 +++++++--------- .../src/v3/uptime_check_service_client.js | 26 +++++++-------- .../google-cloud-monitoring/synth.metadata | 12 +++---- 7 files changed, 64 insertions(+), 85 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 632cc14a385..b1a33e23769 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -42,8 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.0.0", - "lodash.merge": "^4.6.0" + "google-gax": "^1.0.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index fdc04b6da68..394b5efcd9d 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./alert_policy_service_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../package.json').version; @@ -96,12 +95,9 @@ class AlertPolicyServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/monitoring/v3/alert_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/monitoring/v3/alert_service.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -252,7 +248,7 @@ class AlertPolicyServiceClient { * 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. * @@ -384,7 +380,7 @@ class AlertPolicyServiceClient { * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} on 'data' event. * @@ -425,7 +421,7 @@ class AlertPolicyServiceClient { * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_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. * @@ -491,7 +487,7 @@ class AlertPolicyServiceClient { * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -553,7 +549,7 @@ class AlertPolicyServiceClient { * For more information, see AlertPolicy. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. @@ -630,7 +626,7 @@ class AlertPolicyServiceClient { * 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. * diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index e628a143954..950c0bf07fa 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./group_service_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../package.json').version; @@ -99,12 +98,9 @@ class GroupServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/monitoring/v3/group_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/monitoring/v3/group_service.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -249,7 +245,7 @@ class GroupServiceClient { * 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. * @@ -376,7 +372,7 @@ class GroupServiceClient { * 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 [Group]{@link google.monitoring.v3.Group} on 'data' event. * @@ -416,7 +412,7 @@ class GroupServiceClient { * `"projects/{project_id_or_number}/groups/{group_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 GroupServiceClient { * If true, validate this request but do not create the group. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -541,7 +537,7 @@ class GroupServiceClient { * If true, validate this request but do not update the existing group. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -595,7 +591,7 @@ class GroupServiceClient { * `"projects/{project_id_or_number}/groups/{group_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. @@ -662,7 +658,7 @@ class GroupServiceClient { * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -789,7 +785,7 @@ class GroupServiceClient { * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * @param {Object} [options] * Optional parameters. You can override the default settings for 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 [MonitoredResource]{@link google.api.MonitoredResource} on 'data' event. * diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 2b0947c5e7d..964ad1ff618 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./metric_service_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 MetricServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/monitoring/v3/metric_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/monitoring/v3/metric_service.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -247,7 +243,7 @@ class MetricServiceClient { * 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. * @@ -371,7 +367,7 @@ class MetricServiceClient { * 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. * @@ -414,7 +410,7 @@ class MetricServiceClient { * `cloudsql_database`. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -488,7 +484,7 @@ class MetricServiceClient { * 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. * @@ -613,7 +609,7 @@ class MetricServiceClient { * 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 [MetricDescriptor]{@link google.api.MetricDescriptor} on 'data' event. * @@ -656,7 +652,7 @@ class MetricServiceClient { * `"compute.googleapis.com/instance/disk/read_bytes_count"`. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -717,7 +713,7 @@ class MetricServiceClient { * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -783,7 +779,7 @@ class MetricServiceClient { * `"custom.googleapis.com/my_test_metric"`. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. @@ -867,7 +863,7 @@ class MetricServiceClient { * 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. * @@ -1024,7 +1020,7 @@ class MetricServiceClient { * 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} on 'data' event. * @@ -1084,7 +1080,7 @@ class MetricServiceClient { * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} * @param {Object} [options] * Optional parameters. You can override the default settings for 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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 48910d386d3..e12ed048c94 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./notification_channel_service_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 NotificationChannelServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/monitoring/v3/notification_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/monitoring/v3/notification_service.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -240,7 +236,7 @@ class NotificationChannelServiceClient { * 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. * @@ -363,7 +359,7 @@ class NotificationChannelServiceClient { * 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} on 'data' event. * @@ -404,7 +400,7 @@ class NotificationChannelServiceClient { * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -486,7 +482,7 @@ class NotificationChannelServiceClient { * 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. * @@ -620,7 +616,7 @@ class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} on 'data' event. * @@ -664,7 +660,7 @@ class NotificationChannelServiceClient { * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_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. * @@ -733,7 +729,7 @@ class NotificationChannelServiceClient { * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -805,7 +801,7 @@ class NotificationChannelServiceClient { * 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. * @@ -868,7 +864,7 @@ class NotificationChannelServiceClient { * alerting policy will fail to be deleted in a delete operation. * @param {Object} [options] * Optional parameters. You can override the default settings for 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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index c25f4d96117..bd3809063f1 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -16,7 +16,6 @@ const gapicConfig = require('./uptime_check_service_client_config.json'); const gax = require('google-gax'); -const merge = require('lodash.merge'); const path = require('path'); const VERSION = require('../../package.json').version; @@ -95,12 +94,9 @@ class UptimeCheckServiceClient { } // Load the applicable protos. - const protos = merge( - {}, - gaxGrpc.loadProto( - path.join(__dirname, '..', '..', 'protos'), - 'google/monitoring/v3/uptime_service.proto' - ) + const protos = gaxGrpc.loadProto( + path.join(__dirname, '..', '..', 'protos'), + ['google/monitoring/v3/uptime_service.proto'] ); // This API contains "path templates"; forward-slash-separated @@ -235,7 +231,7 @@ class UptimeCheckServiceClient { * 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. * @@ -351,7 +347,7 @@ class UptimeCheckServiceClient { * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} on 'data' event. * @@ -391,7 +387,7 @@ class UptimeCheckServiceClient { * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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. * @@ -449,7 +445,7 @@ class UptimeCheckServiceClient { * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @param {Object} [options] * Optional parameters. You can override the default settings for 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. * @@ -533,7 +529,7 @@ class UptimeCheckServiceClient { * 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. * @@ -593,7 +589,7 @@ class UptimeCheckServiceClient { * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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. @@ -646,7 +642,7 @@ class UptimeCheckServiceClient { * 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. * @@ -744,7 +740,7 @@ class UptimeCheckServiceClient { * 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} on 'data' event. * diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 240341442a4..8c3ef7e7cf0 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-05-17T19:47:58.058496Z", + "updateTime": "2019-05-21T11:19:41.536473Z", "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 99a3839abe05caa7adea02a2fc2a63c4332563bc Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 May 2019 02:39:03 +0000 Subject: [PATCH 202/422] chore: use published jsdoc-baseline package (#259) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b1a33e23769..2c55322aa54 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -51,7 +51,7 @@ "eslint-config-prettier": "^4.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", - "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", + "jsdoc-baseline": "^0.1.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^6.0.0", From 643ae22553a39f7248eda5e5873df73fa1c2d5d5 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 28 May 2019 20:39:38 +0000 Subject: [PATCH 203/422] build: ignore proto files in test coverage (#261) --- packages/google-cloud-monitoring/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index bfe4073a6ab..83a421a0628 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.nycrc @@ -10,6 +10,7 @@ "**/samples", "**/scripts", "**/src/**/v*/**/*.js", + "**/protos", "**/test", ".jsdoc.js", "**/.jsdoc.js", From 597d33ed51791b5215ef72dc3e088eb4efcfa1d6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 08:47:55 -0700 Subject: [PATCH 204/422] feat: support apiEndpoint override in client constructor (#265) --- .../src/v3/alert_policy_service_client.js | 14 ++- .../src/v3/group_service_client.js | 14 ++- .../src/v3/metric_service_client.js | 14 ++- .../v3/notification_channel_service_client.js | 14 ++- .../src/v3/uptime_check_service_client.js | 14 ++- .../google-cloud-monitoring/synth.metadata | 10 +- .../google-cloud-monitoring/test/gapic-v3.js | 111 ++++++++++++++++++ 7 files changed, 181 insertions(+), 10 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 394b5efcd9d..013119c6cdf 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -63,14 +63,18 @@ class AlertPolicyServiceClient { * 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 ); @@ -179,6 +183,14 @@ class AlertPolicyServiceClient { return 'monitoring.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 950c0bf07fa..f7d9c3c11d8 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -66,14 +66,18 @@ class GroupServiceClient { * 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 ); @@ -181,6 +185,14 @@ class GroupServiceClient { return 'monitoring.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 964ad1ff618..b7f93437a77 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -56,14 +56,18 @@ class MetricServiceClient { * 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 ); @@ -185,6 +189,14 @@ class MetricServiceClient { return 'monitoring.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index e12ed048c94..6329410d630 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -56,14 +56,18 @@ class NotificationChannelServiceClient { * 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 ); @@ -179,6 +183,14 @@ class NotificationChannelServiceClient { return 'monitoring.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index bd3809063f1..4b3d50b3628 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -62,14 +62,18 @@ class UptimeCheckServiceClient { * 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 ); @@ -181,6 +185,14 @@ class UptimeCheckServiceClient { return 'monitoring.googleapis.com'; } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.googleapis.com'; + } + /** * The port for this API service. */ diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 8c3ef7e7cf0..c6a7cc23fa7 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-05-21T11:19:41.536473Z", + "updateTime": "2019-06-05T14:21:51.749900Z", "sources": [ { "generator": { "name": "artman", - "version": "0.20.0", - "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec" + "version": "0.23.1", + "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160", - "internalRef": "249058354" + "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", + "internalRef": "251635729" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index f354ef93e22..91b49a450bc 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -23,6 +23,29 @@ const error = new Error(); error.code = FAKE_STATUS_CODE; describe('AlertPolicyServiceClient', () => { + it('has servicePath', () => { + const servicePath = + monitoringModule.v3.AlertPolicyServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + monitoringModule.v3.AlertPolicyServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = monitoringModule.v3.AlertPolicyServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new monitoringModule.v3.AlertPolicyServiceClient(); + assert(client); + }); + describe('listAlertPolicies', () => { it('invokes listAlertPolicies without error', done => { const client = new monitoringModule.v3.AlertPolicyServiceClient({ @@ -342,6 +365,27 @@ describe('AlertPolicyServiceClient', () => { }); }); describe('GroupServiceClient', () => { + it('has servicePath', () => { + const servicePath = monitoringModule.v3.GroupServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = monitoringModule.v3.GroupServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = monitoringModule.v3.GroupServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new monitoringModule.v3.GroupServiceClient(); + assert(client); + }); + describe('listGroups', () => { it('invokes listGroups without error', done => { const client = new monitoringModule.v3.GroupServiceClient({ @@ -732,6 +776,27 @@ describe('GroupServiceClient', () => { }); }); describe('MetricServiceClient', () => { + it('has servicePath', () => { + const servicePath = monitoringModule.v3.MetricServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = monitoringModule.v3.MetricServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = monitoringModule.v3.MetricServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new monitoringModule.v3.MetricServiceClient(); + assert(client); + }); + describe('listMonitoredResourceDescriptors', () => { it('invokes listMonitoredResourceDescriptors without error', done => { const client = new monitoringModule.v3.MetricServiceClient({ @@ -1274,6 +1339,29 @@ describe('MetricServiceClient', () => { }); }); describe('NotificationChannelServiceClient', () => { + it('has servicePath', () => { + const servicePath = + monitoringModule.v3.NotificationChannelServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + monitoringModule.v3.NotificationChannelServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = monitoringModule.v3.NotificationChannelServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new monitoringModule.v3.NotificationChannelServiceClient(); + assert(client); + }); + describe('listNotificationChannelDescriptors', () => { it('invokes listNotificationChannelDescriptors without error', done => { const client = new monitoringModule.v3.NotificationChannelServiceClient({ @@ -1746,6 +1834,29 @@ describe('NotificationChannelServiceClient', () => { }); }); describe('UptimeCheckServiceClient', () => { + it('has servicePath', () => { + const servicePath = + monitoringModule.v3.UptimeCheckServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + monitoringModule.v3.UptimeCheckServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = monitoringModule.v3.UptimeCheckServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new monitoringModule.v3.UptimeCheckServiceClient(); + assert(client); + }); + describe('listUptimeCheckConfigs', () => { it('invokes listUptimeCheckConfigs without error', done => { const client = new monitoringModule.v3.UptimeCheckServiceClient({ From 5b350a4fd55be5e267379736846a4a1d3ff35b02 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 5 Jun 2019 09:51:18 -0700 Subject: [PATCH 205/422] chore: release 1.1.0 (#266) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index ac16e6a2f62..be17b4a96f2 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.1.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.0.0...v1.1.0) (2019-06-05) + + +### Features + +* support apiEndpoint override in client constructor ([#265](https://www.github.com/googleapis/nodejs-monitoring/issues/265)) ([8a413bc](https://www.github.com/googleapis/nodejs-monitoring/commit/8a413bc)) + ## [1.0.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v0.7.1...v1.0.0) (2019-05-20) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2c55322aa54..3ea62634c91 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.0.0", + "version": "1.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index f1270e913eb..1ffb730da81 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.0.0", + "@google-cloud/monitoring": "^1.1.0", "yargs": "^13.0.0" }, "devDependencies": { From d0bd7b776a7e349cb31e43e49b8a8b3f34d70c38 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 6 Jun 2019 18:01:24 +0200 Subject: [PATCH 206/422] feat: add .repo-metadata for README generation (#263) --- packages/google-cloud-monitoring/.gitignore | 1 + .../.readme-partials.yml | 4 + .../.repo-metadata.json | 13 ++ packages/google-cloud-monitoring/README.md | 149 +++++++------- .../google-cloud-monitoring/samples/README.md | 187 ++++++------------ 5 files changed, 154 insertions(+), 200 deletions(-) create mode 100644 packages/google-cloud-monitoring/.readme-partials.yml create mode 100644 packages/google-cloud-monitoring/.repo-metadata.json diff --git a/packages/google-cloud-monitoring/.gitignore b/packages/google-cloud-monitoring/.gitignore index 531c77e628b..a4b7d6a3c59 100644 --- a/packages/google-cloud-monitoring/.gitignore +++ b/packages/google-cloud-monitoring/.gitignore @@ -12,3 +12,4 @@ system-test/*key.json google-cloud-logging-winston-*.tgz google-cloud-logging-bunyan-*.tgz package-lock.json +__pycache__ diff --git a/packages/google-cloud-monitoring/.readme-partials.yml b/packages/google-cloud-monitoring/.readme-partials.yml new file mode 100644 index 00000000000..7d23bee5856 --- /dev/null +++ b/packages/google-cloud-monitoring/.readme-partials.yml @@ -0,0 +1,4 @@ +introduction: |- + [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from + Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, + and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json new file mode 100644 index 00000000000..2d8f760bf5a --- /dev/null +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "monitoring", + "name_pretty": "Stackdriver Monitoring", + "product_documentation": "https://cloud.google.com/monitoring/docs", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/monitoring/latest/", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-monitoring", + "distribution_name": "@google-cloud/monitoring", + "api_id": "monitoring.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 4b9acea14ae..18eef4eb583 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -1,21 +1,24 @@ [//]: # "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 Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) -> Node.js idiomatic client for [Monitoring][product-docs]. -[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. -* [Monitoring Node.js Client API Reference][client-docs] +[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from +Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, +and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. + + +* [Stackdriver Monitoring Node.js Client API Reference][client-docs] +* [Stackdriver Monitoring Documentation][product-docs] * [github.com/googleapis/nodejs-monitoring](https://github.com/googleapis/nodejs-monitoring) -* [Monitoring 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 +27,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,29 +41,18 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. ### Before you begin -1. Select or create a Cloud Platform project. - - [Go to the projects page][projects] - -1. Enable billing for your project. - - [Enable billing][billing] - -1. Enable the Stackdriver Monitoring API. - - [Enable the API][enable_api] - +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Stackdriver Monitoring API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. -[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=monitoring.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started - ### Installing the client library - npm install --save @google-cloud/monitoring +```bash +npm install @google-cloud/monitoring +``` + ### Using the client library @@ -67,59 +60,58 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. // Imports the Google Cloud client library const monitoring = require('@google-cloud/monitoring'); -// Your Google Cloud Platform project ID -const projectId = 'YOUR_PROJECT_ID'; +async function quickstart() { + // Your Google Cloud Platform project ID + const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID'; -// Creates a client -const client = new monitoring.MetricServiceClient(); + // Creates a client + const client = new monitoring.MetricServiceClient(); -// Prepares an individual data point -const dataPoint = { - interval: { - endTime: { - seconds: Date.now() / 1000, + // Prepares an individual data point + const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000, + }, + }, + value: { + // The amount of sales + doubleValue: 123.45, }, - }, - value: { - // The amount of sales - doubleValue: 123.45, - }, -}; - -// Prepares the time series request -const request = { - name: client.projectPath(projectId), - timeSeries: [ - { - // Ties the data point to a custom metric - metric: { - type: 'custom.googleapis.com/stores/daily_sales', - labels: { - store_id: 'Pittsburgh', + }; + + // Prepares the time series request + const request = { + name: client.projectPath(projectId), + timeSeries: [ + { + // Ties the data point to a custom metric + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh', + }, }, - }, - resource: { - type: 'global', - labels: { - project_id: projectId, + resource: { + type: 'global', + labels: { + project_id: projectId, + }, }, + points: [dataPoint], }, - points: [dataPoint], - }, - ], -}; - -// Writes time series data -client - .createTimeSeries(request) - .then(results => { - console.log(`Done writing time series data.`, results[0]); - }) - .catch(err => { - console.error('ERROR:', err); - }); + ], + }; + + // Writes time series data + const [result] = await client.createTimeSeries(request); + console.log(`Done writing time series data.`, result); +} + ``` + + ## Samples Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/tree/master/samples) directory. The samples' `README.md` @@ -127,22 +119,30 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Alert Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) | +| Alerts | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) | | Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) | -| Uptime Config | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | + -The [Monitoring Node.js Client API Reference][client-docs] documentation + +The [Stackdriver Monitoring 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 in **beta**. This means it is expected to be mostly stable while we work toward a general availability release; however, complete stability is not guaranteed. We will address issues and requests against beta libraries with a high priority. + + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages @@ -160,4 +160,7 @@ See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENS [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ [product-docs]: https://cloud.google.com/monitoring/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=monitoring.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index a3e44bb5206..7d6f61cf4a6 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -1,167 +1,100 @@ [//]: # "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 Monitoring: Node.js Samples +# [Stackdriver Monitoring: Node.js Samples](https://github.com/googleapis/nodejs-monitoring) [![Open in Cloud Shell][shell_img]][shell_link] -[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. +[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from +Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, +and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. ## Table of Contents * [Before you begin](#before-you-begin) * [Samples](#samples) - * [Alert Policies](#alert-policies) + * [Alerts](#alerts) * [Metrics](#metrics) - * [Uptime Config](#uptime-config) + * [Quickstart](#quickstart) + * [Uptime](#uptime) ## Before you begin -Before running the samples, make sure you've followed the steps in the -[Before you begin section](../README.md#before-you-begin) of the client -library's README. +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-monitoring#using-the-client-library). ## Samples -### Alert Policies -View the [source code][alerts_0_code]. + +### Alerts + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) -__Usage:__ `node alerts.js --help` - -``` -alerts.js - -Commands: - alerts.js backup Save alert policies to a ./policies_backup.json file. - alerts.js restore Restore alert policies from a ./policies_backup.json file. - alerts.js replace Replace the notification channels of the specified alert policy. - alerts.js disable [filter] Disables policies that match the given filter. - alerts.js enable [filter] Enables policies that match the given filter. - alerts.js list Lists alert policies in the specified project. - -Options: - --version Show version number [boolean] - --alertPolicyName [string] - --help Show help [boolean] - -Examples: - node alerts.js backup my-project-id Backup policies. - node alerts.js restore my-project-id Restore policies. - node alerts.js replace Replace the notification channels of the specified alert - projects/my-project-id/alertPolicies/12345 channel-1 policy. - channel-2 channel-3 - node alerts.js disable my-project-id "(NOT Disables policies that match the given filter. - display_name.empty OR NOT description.empty) AND - user_labels='active'" - node alerts.js disable my-project-id "description:'cloud'" Disables policies that match the given filter. - node alerts.js disable my-project-id Disables policies that match the given filter. - "display_name=monitoring.regex.full_match('Temp \d{4}')" - node alerts.js enable my-project-id "(NOT display_name.empty Enables policies that match the given filter. - OR NOT description.empty) AND user_labels='active'" - node alerts.js enable my-project-id "description:'cloud'" Enables policies that match the given filter. - node alerts.js enable my-project-id Enables policies that match the given filter. - "display_name=monitoring.regex.full_match('Temp \d{4}')" - -For more information, see https://cloud.google.com/monitoring/docs/ -``` - -[alerts_0_docs]: https://cloud.google.com/monitoring/docs -[alerts_0_code]: alerts.js +__Usage:__ + + +`node alerts.js` + + +----- + + + ### Metrics -View the [source code][metrics_1_code]. +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) -__Usage:__ `node metrics.js --help` - -``` -metrics.js - -Commands: - metrics.js create [projectId] Creates an example 'custom.googleapis.com/stores/daily_sales' - custom metric descriptor. - metrics.js list [projectId] Lists metric descriptors. - metrics.js get [projectId] Get a metric descriptor. - metrics.js delete [projectId] Deletes a custom metric descriptor. - metrics.js write [projectId] Writes example time series data to - 'custom.googleapis.com/stores/daily_sales'. - metrics.js read [projectId] Reads time series data that matches the given filter. - metrics.js read-fields [projectId] Reads headers of time series data that matches - 'compute.googleapis.com/instance/cpu/utilization'. - metrics.js read-aggregate [projectId] Aggregates time series data that matches - 'compute.googleapis.com/instance/cpu/utilization'. - metrics.js read-reduce [projectId] Reduces time series data that matches - 'compute.googleapis.com/instance/cpu/utilization'. - metrics.js list-resources [projectId] Lists monitored resource descriptors. - metrics.js get-resource [projectId] Get a monitored resource descriptor. - -Options: - --version Show version number [boolean] - --projectId, -p [string] [default: "nodejs-docs-samples"] - --help Show help [boolean] - -Examples: - node metrics.js create - node metrics.js list - node metrics.js get logging.googleapis.com/log_entry_count - node metrics.js delete custom.googleapis.com/stores/daily_sales - node metrics.js list-resources - node metrics.js get-resource cloudsql_database - node metrics.js write - node metrics.js read 'metric.type="compute.googleapis.com/instance/cpu/utilization"' - node metrics.js read-fields - node metrics.js read-aggregate - node metrics.js read-reduce - -For more information, see https://cloud.google.com/monitoring/docs -``` - -[metrics_1_docs]: https://cloud.google.com/monitoring/docs -[metrics_1_code]: metrics.js - -### Uptime Config - -View the [source code][uptime_2_code]. +__Usage:__ + + +`node metrics.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node quickstart.js` + + +----- + + + + +### Uptime + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) -__Usage:__ `node uptime.js --help` +__Usage:__ + -``` -uptime.js +`node uptime.js` -Commands: - uptime.js create [projectId] Creates an uptime check config. - uptime.js list [projectId] Lists uptime check configs. - uptime.js list-ips Lists uptime check config IPs. - uptime.js get [projectId] Gets an uptime check config. - uptime.js delete [projectId] Deletes an uptime check config. -Options: - --version Show version number [boolean] - --projectId, -p [string] [default: "nodejs-docs-samples"] - --help Show help [boolean] -Examples: - node uptime.js create mydomain.com Create an uptime check. - node uptime.js list List all uptime check configs. - node uptime.js list "resource.type = gce_instance AND List all uptime check configs for a specific GCE - resource.label.instance_id = mongodb" instance. - node uptime.js list-ips - node uptime.js get My-Uptime-Check - node uptime.js delete My-Uptime-Check -For more information, see https://cloud.google.com/monitoring/uptime-checks/ -``` -[uptime_2_docs]: https://cloud.google.com/monitoring/docs -[uptime_2_code]: uptime.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/nodejs-monitoring&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/monitoring/docs \ No newline at end of file From 39a0ff7363cc826361b74d4cc981718724bbb262 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 6 Jun 2019 09:11:11 -0700 Subject: [PATCH 207/422] chore: release 1.2.0 (#267) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index be17b4a96f2..08391933e34 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.2.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.1.0...v1.2.0) (2019-06-06) + + +### Features + +* add .repo-metadata for README generation ([#263](https://www.github.com/googleapis/nodejs-monitoring/issues/263)) ([d966bd6](https://www.github.com/googleapis/nodejs-monitoring/commit/d966bd6)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.0.0...v1.1.0) (2019-06-05) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 3ea62634c91..eac744bbf4a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.1.0", + "version": "1.2.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 1ffb730da81..9ab348a4cbb 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.1.0", + "@google-cloud/monitoring": "^1.2.0", "yargs": "^13.0.0" }, "devDependencies": { From 8b614c2895f9a805383102773786c4b43bb1590f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Jun 2019 08:07:38 -0700 Subject: [PATCH 208/422] docs: update return type in jsdoc for Buffers (#268) --- .../src/v3/doc/google/protobuf/doc_any.js | 2 +- packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js index 9ff5d007807..cdd2fc80e49 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index c6a7cc23fa7..5aa6352df6a 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-05T14:21:51.749900Z", + "updateTime": "2019-06-12T11:19:44.886743Z", "sources": [ { "generator": { "name": "artman", - "version": "0.23.1", - "dockerImage": "googleapis/artman@sha256:9d5cae1454da64ac3a87028f8ef486b04889e351c83bb95e83b8fab3959faed0" + "version": "0.24.1", + "dockerImage": "googleapis/artman@sha256:6018498e15310260dc9b03c9d576608908ed9fbabe42e1494ff3d827fea27b19" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "47c142a7cecc6efc9f6f8af804b8be55392b795b", - "internalRef": "251635729" + "sha": "f117dac435e96ebe58d85280a3faf2350c4d4219", + "internalRef": "252714985" } }, { From c96a90137fb1a758d45c2352a5711293726a7a95 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 12 Jun 2019 22:10:18 -0700 Subject: [PATCH 209/422] fix(docs): move to new client docs URL (#269) --- packages/google-cloud-monitoring/.repo-metadata.json | 4 ++-- packages/google-cloud-monitoring/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json index 2d8f760bf5a..b987ce38e50 100644 --- a/packages/google-cloud-monitoring/.repo-metadata.json +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "monitoring", "name_pretty": "Stackdriver Monitoring", "product_documentation": "https://cloud.google.com/monitoring/docs", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/monitoring/latest/", + "client_documentation": "https://googleapis.dev/nodejs/monitoring/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", "release_level": "beta", "language": "nodejs", @@ -10,4 +10,4 @@ "distribution_name": "@google-cloud/monitoring", "api_id": "monitoring.googleapis.com", "requires_billing": true -} +} \ No newline at end of file diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 18eef4eb583..6a19db276d9 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -157,7 +157,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENSE) -[client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest/ +[client-docs]: https://googleapis.dev/nodejs/monitoring/latest [product-docs]: https://cloud.google.com/monitoring/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 4d4a9be736e13a80741069261008408e198492f9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 14 Jun 2019 07:47:04 -0700 Subject: [PATCH 210/422] chore: release 1.2.1 (#270) * updated CHANGELOG.md * updated package.json * updated samples/package.json --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 08391933e34..fe2f1349f0c 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [1.2.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.0...v1.2.1) (2019-06-14) + + +### Bug Fixes + +* **docs:** move to new client docs URL ([#269](https://www.github.com/googleapis/nodejs-monitoring/issues/269)) ([cba6442](https://www.github.com/googleapis/nodejs-monitoring/commit/cba6442)) + ## [1.2.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.1.0...v1.2.0) (2019-06-06) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index eac744bbf4a..71a4bb97990 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.2.0", + "version": "1.2.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 9ab348a4cbb..d86f5d3e5a4 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.2.0", + "@google-cloud/monitoring": "^1.2.1", "yargs": "^13.0.0" }, "devDependencies": { From acb55373ff35f12595cd439b82ef515d7e681f0f Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 18 Jun 2019 10:05:12 -0700 Subject: [PATCH 211/422] build: switch to GitHub magic proxy (#272) --- packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 5aa6352df6a..a60d09e3e35 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-12T11:19:44.886743Z", + "updateTime": "2019-06-18T01:02:38.061357Z", "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": "f117dac435e96ebe58d85280a3faf2350c4d4219", - "internalRef": "252714985" + "sha": "384aa843867c4d17756d14a01f047b6368494d32", + "internalRef": "253675319" } }, { From ed0cc10e87df9a7c6ce809f5c736b9be2e578570 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 25 Jun 2019 16:42:32 -0700 Subject: [PATCH 212/422] fix(docs): link to reference docs section on googleapis.dev (#273) * fix(docs): reference docs should link to section of googleapis.dev with API reference * fix(docs): make anchors work in jsdoc --- packages/google-cloud-monitoring/.jsdoc.js | 3 +++ packages/google-cloud-monitoring/README.md | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 94e2a2d5e50..3c904e839a0 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.jsdoc.js @@ -41,5 +41,8 @@ module.exports = { sourceFiles: false, systemName: '@google-cloud/monitoring', theme: 'lumen' + }, + markdown: { + idInHeadings: true } }; diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 6a19db276d9..c1b88298fb8 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -157,10 +157,12 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/monitoring/latest +[client-docs]: https://googleapis.dev/nodejs/monitoring/latest#reference [product-docs]: https://cloud.google.com/monitoring/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=monitoring.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 846882bb43de9a1a5c247fe1bb575dad1c9871bb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 26 Jun 2019 15:11:31 -0700 Subject: [PATCH 213/422] chore: release 1.2.2 (#274) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index fe2f1349f0c..edd67064cee 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [1.2.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.1...v1.2.2) (2019-06-26) + + +### Bug Fixes + +* **docs:** link to reference docs section on googleapis.dev ([#273](https://www.github.com/googleapis/nodejs-monitoring/issues/273)) ([d4056d6](https://www.github.com/googleapis/nodejs-monitoring/commit/d4056d6)) + ### [1.2.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.0...v1.2.1) (2019-06-14) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 71a4bb97990..a4c15c8d068 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.2.1", + "version": "1.2.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index d86f5d3e5a4..cfdeb779a80 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.2.1", + "@google-cloud/monitoring": "^1.2.2", "yargs": "^13.0.0" }, "devDependencies": { From 72e109c3c74b3d15e31dd936ea90b738549caf96 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 28 Jun 2019 11:27:43 -0700 Subject: [PATCH 214/422] build: use config file for linkinator (#275) --- packages/google-cloud-monitoring/linkinator.config.json | 7 +++++++ packages/google-cloud-monitoring/package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-monitoring/linkinator.config.json diff --git a/packages/google-cloud-monitoring/linkinator.config.json b/packages/google-cloud-monitoring/linkinator.config.json new file mode 100644 index 00000000000..d780d6bfff5 --- /dev/null +++ b/packages/google-cloud-monitoring/linkinator.config.json @@ -0,0 +1,7 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com" + ] +} diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a4c15c8d068..e6ec9459cc9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -38,7 +38,7 @@ "test-no-cover": "mocha test/*.js", "test": "npm run cover", "fix": "eslint '**/*.js' --fix", - "docs-test": "linkinator docs -r --skip www.googleapis.com", + "docs-test": "linkinator docs", "predocs-test": "npm run docs" }, "dependencies": { @@ -58,6 +58,6 @@ "nyc": "^14.0.0", "power-assert": "^1.4.4", "prettier": "^1.7.4", - "linkinator": "^1.1.2" + "linkinator": "^1.5.0" } } From 6aeba980be8e0c76f87b2ffd684dcea77c4c2451 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 26 Jul 2019 18:58:27 +0300 Subject: [PATCH 215/422] chore(deps): update linters (#276) --- packages/google-cloud-monitoring/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e6ec9459cc9..c21d269d544 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -47,8 +47,8 @@ "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", "codecov": "^3.0.0", - "eslint": "^5.0.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", "jsdoc-baseline": "^0.1.0", From d7026222872200ae22a0d7dc4c104ede20a2ee1b Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 09:00:54 -0700 Subject: [PATCH 216/422] docs: use the jsdoc-fresh theme (#277) --- packages/google-cloud-monitoring/.jsdoc.js | 2 +- packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 3c904e839a0..ca434e9064b 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c21d269d544..c7d8436788d 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -51,7 +51,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^9.0.0", "eslint-plugin-prettier": "^3.0.0", - "jsdoc-baseline": "^0.1.0", + "jsdoc-fresh": "^1.0.1", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^6.0.0", From b4fc148a3c27cfdfd92394601f8336ebb603297d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 31 Jul 2019 16:07:08 -0700 Subject: [PATCH 217/422] docs: document apiEndpoint over servicePath (#278) --- .../src/v3/alert_policy_service_client.js | 2 +- packages/google-cloud-monitoring/src/v3/group_service_client.js | 2 +- .../google-cloud-monitoring/src/v3/metric_service_client.js | 2 +- .../src/v3/notification_channel_service_client.js | 2 +- .../src/v3/uptime_check_service_client.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 013119c6cdf..e2eb598a752 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -59,7 +59,7 @@ class AlertPolicyServiceClient { * 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/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index f7d9c3c11d8..fa5291aa52b 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -62,7 +62,7 @@ class GroupServiceClient { * 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/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index b7f93437a77..136d5d95041 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -52,7 +52,7 @@ class MetricServiceClient { * 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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 6329410d630..4534154534c 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -52,7 +52,7 @@ class NotificationChannelServiceClient { * 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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 4b3d50b3628..caf47124f8d 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -58,7 +58,7 @@ class UptimeCheckServiceClient { * 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 37f7cb5892e8eb3490e43b7858b687d1c91efb08 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Aug 2019 10:52:57 -0700 Subject: [PATCH 218/422] fix: allow calls with no request, add JSON proto --- .../src/service_proto_list.json | 1 + .../src/v3/alert_policy_service_client.js | 5 + .../src/v3/group_service_client.js | 6 + .../src/v3/metric_service_client.js | 8 + .../v3/notification_channel_service_client.js | 226 ++++++++++++++++++ ...ication_channel_service_client_config.json | 15 ++ .../src/v3/uptime_check_service_client.js | 6 + .../google-cloud-monitoring/synth.metadata | 10 +- .../google-cloud-monitoring/test/gapic-v3.js | 205 ++++++++++++++++ 9 files changed, 477 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-monitoring/src/service_proto_list.json diff --git a/packages/google-cloud-monitoring/src/service_proto_list.json b/packages/google-cloud-monitoring/src/service_proto_list.json new file mode 100644 index 00000000000..85e5782241e --- /dev/null +++ b/packages/google-cloud-monitoring/src/service_proto_list.json @@ -0,0 +1 @@ +["../protos/google/monitoring/v3/group_service.proto", "../protos/google/monitoring/v3/metric.proto", "../protos/google/monitoring/v3/alert_service.proto", "../protos/google/monitoring/v3/dropped_labels.proto", "../protos/google/monitoring/v3/group.proto", "../protos/google/monitoring/v3/common.proto", "../protos/google/monitoring/v3/notification.proto", "../protos/google/monitoring/v3/metric_service.proto", "../protos/google/monitoring/v3/alert.proto", "../protos/google/monitoring/v3/uptime_service.proto", "../protos/google/monitoring/v3/mutation_record.proto", "../protos/google/monitoring/v3/uptime.proto", "../protos/google/monitoring/v3/span_context.proto", "../protos/google/monitoring/v3/notification_service.proto"] \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index e2eb598a752..e547be7b399 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -334,6 +334,7 @@ class AlertPolicyServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -465,6 +466,7 @@ class AlertPolicyServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -536,6 +538,7 @@ class AlertPolicyServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -585,6 +588,7 @@ class AlertPolicyServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -670,6 +674,7 @@ class AlertPolicyServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index fa5291aa52b..afb17b7d9f2 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -331,6 +331,7 @@ class GroupServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -456,6 +457,7 @@ class GroupServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -522,6 +524,7 @@ class GroupServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -581,6 +584,7 @@ class GroupServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -627,6 +631,7 @@ class GroupServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -744,6 +749,7 @@ class GroupServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 136d5d95041..aa8c0761ed1 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -329,6 +329,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -454,6 +455,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -570,6 +572,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -696,6 +699,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -762,6 +766,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -815,6 +820,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -967,6 +973,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -1121,6 +1128,7 @@ class MetricServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 4534154534c..03dfc7ad356 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -156,6 +156,9 @@ class NotificationChannelServiceClient { 'createNotificationChannel', 'updateNotificationChannel', 'deleteNotificationChannel', + 'sendNotificationChannelVerificationCode', + 'getNotificationChannelVerificationCode', + 'verifyNotificationChannel', ]; for (const methodName of notificationChannelServiceStubMethods) { this._innerApiCalls[methodName] = gax.createApiCall( @@ -322,6 +325,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -444,6 +448,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -568,6 +573,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -704,6 +710,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -778,6 +785,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -845,6 +853,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -900,6 +909,7 @@ class NotificationChannelServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -916,6 +926,222 @@ class NotificationChannelServiceClient { ); } + /** + * Causes a verification code to be delivered to the channel. The code + * can then be supplied in `VerifyNotificationChannel` to verify the channel. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The notification channel to which to send a verification code. + * @param {Object} [options] + * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * client.sendNotificationChannelVerificationCode({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + sendNotificationChannelVerificationCode(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.sendNotificationChannelVerificationCode( + request, + options, + callback + ); + } + + /** + * Requests a verification code for an already verified channel that can then + * be used in a call to VerifyNotificationChannel() on a different channel + * with an equivalent identity in the same or in a different project. This + * makes it possible to copy a channel between projects without requiring + * manual reverification of the channel. If the channel is not in the + * verified state, this method will fail (in other words, this may only be + * used if the SendNotificationChannelVerificationCode and + * VerifyNotificationChannel paths have already been used to put the given + * channel into the verified state). + * + * There is no guarantee that the verification codes returned by this method + * will be of a similar structure or form as the ones that are delivered + * to the channel via SendNotificationChannelVerificationCode; while + * VerifyNotificationChannel() will recognize both the codes delivered via + * SendNotificationChannelVerificationCode() and returned from + * GetNotificationChannelVerificationCode(), it is typically the case that + * the verification codes delivered via + * SendNotificationChannelVerificationCode() will be shorter and also + * have a shorter expiration (e.g. codes such as "G-123456") whereas + * GetVerificationCode() will typically return a much longer, websafe base + * 64 encoded string that has a longer expiration time. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The notification channel for which a verification code is to be generated + * and retrieved. This must name a channel that is already verified; if + * the specified channel is not verified, the request will fail. + * @param {Object} [request.expireTime] + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * @param {Object} [options] + * Optional parameters. You 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 [GetNotificationChannelVerificationCodeResponse]{@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [GetNotificationChannelVerificationCodeResponse]{@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * client.getNotificationChannelVerificationCode({name: formattedName}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getNotificationChannelVerificationCode(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.getNotificationChannelVerificationCode( + request, + options, + callback + ); + } + + /** + * Verifies a `NotificationChannel` by proving receipt of the code + * delivered to the channel as a result of calling + * `SendNotificationChannelVerificationCode`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The notification channel to verify. + * @param {string} request.code + * The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * @param {Object} [options] + * Optional parameters. You 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.NotificationChannelServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * const code = ''; + * const request = { + * name: formattedName, + * code: code, + * }; + * client.verifyNotificationChannel(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + verifyNotificationChannel(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.verifyNotificationChannel( + request, + options, + callback + ); + } + // -------------------- // -- Path templates -- // -------------------- diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json index 322f187b956..4a0f4bdc195 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json @@ -54,6 +54,21 @@ "timeout_millis": 30000, "retry_codes_name": "idempotent", "retry_params_name": "default" + }, + "SendNotificationChannelVerificationCode": { + "timeout_millis": 30000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetNotificationChannelVerificationCode": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "VerifyNotificationChannel": { + "timeout_millis": 30000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index caf47124f8d..03434c211c1 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -317,6 +317,7 @@ class UptimeCheckServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -431,6 +432,7 @@ class UptimeCheckServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -494,6 +496,7 @@ class UptimeCheckServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -573,6 +576,7 @@ class UptimeCheckServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -625,6 +629,7 @@ class UptimeCheckServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; @@ -724,6 +729,7 @@ class UptimeCheckServiceClient { callback = options; options = {}; } + request = request || {}; options = options || {}; return this._innerApiCalls.listUptimeCheckIps(request, options, callback); diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index a60d09e3e35..a4bfbc015b1 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-18T01:02:38.061357Z", + "updateTime": "2019-08-02T11:20:05.053704Z", "sources": [ { "generator": { "name": "artman", - "version": "0.26.0", - "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" + "version": "0.32.0", + "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "384aa843867c4d17756d14a01f047b6368494d32", - "internalRef": "253675319" + "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", + "internalRef": "261297518" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 91b49a450bc..a28095409d9 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -1832,6 +1832,211 @@ describe('NotificationChannelServiceClient', () => { }); }); }); + + describe('sendNotificationChannelVerificationCode', () => { + it('invokes sendNotificationChannelVerificationCode without error', done => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request + ); + + client.sendNotificationChannelVerificationCode(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes sendNotificationChannelVerificationCode with error', done => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.sendNotificationChannelVerificationCode(request, err => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('getNotificationChannelVerificationCode', () => { + it('invokes getNotificationChannelVerificationCode without error', done => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + const request = { + name: formattedName, + }; + + // Mock response + const code = 'code3059181'; + const expectedResponse = { + code: code, + }; + + // Mock Grpc layer + client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getNotificationChannelVerificationCode( + request, + (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + + it('invokes getNotificationChannelVerificationCode with error', done => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getNotificationChannelVerificationCode( + request, + (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + + describe('verifyNotificationChannel', () => { + it('invokes verifyNotificationChannel without error', done => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + const code = 'code3059181'; + const request = { + name: formattedName, + code: code, + }; + + // Mock response + const type = 'type3575610'; + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const description = 'description-1724546052'; + const expectedResponse = { + type: type, + name: name2, + displayName: displayName, + description: description, + }; + + // Mock Grpc layer + client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.verifyNotificationChannel(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes verifyNotificationChannel with error', done => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.notificationChannelPath( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + const code = 'code3059181'; + const request = { + name: formattedName, + code: code, + }; + + // Mock Grpc layer + client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.verifyNotificationChannel(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); }); describe('UptimeCheckServiceClient', () => { it('has servicePath', () => { From 89ad6115fc0988352a9f145c18429e87d4ee6c38 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 3 Aug 2019 16:05:06 -0700 Subject: [PATCH 219/422] chore: release 1.2.3 (#282) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index edd67064cee..aa8333a5d26 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [1.2.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.2...v1.2.3) (2019-08-03) + + +### Bug Fixes + +* allow calls with no request, add JSON proto ([3a8a89b](https://www.github.com/googleapis/nodejs-monitoring/commit/3a8a89b)) + ### [1.2.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.1...v1.2.2) (2019-06-26) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c7d8436788d..c73c9dc5e86 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.2.2", + "version": "1.2.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index cfdeb779a80..b4d8ed1059e 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.2.2", + "@google-cloud/monitoring": "^1.2.3", "yargs": "^13.0.0" }, "devDependencies": { From 2580059bb3cd4728307ec235451b739d6c948398 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 20 Aug 2019 20:23:24 +0300 Subject: [PATCH 220/422] fix(deps): update dependency yargs to v14 --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index b4d8ed1059e..594389e7b2b 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@google-cloud/monitoring": "^1.2.3", - "yargs": "^13.0.0" + "yargs": "^14.0.0" }, "devDependencies": { "chai": "^4.2.0", From d4acc3b9093e8b54c82e0c47680d4a0a21e7ce7b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 25 Aug 2019 18:07:18 -0700 Subject: [PATCH 221/422] fix: include the correct version of node in a header (#286) --- .../src/v3/alert_policy_service_client.js | 2 +- .../src/v3/group_service_client.js | 2 +- .../src/v3/metric_service_client.js | 2 +- .../src/v3/notification_channel_service_client.js | 2 +- .../src/v3/uptime_check_service_client.js | 2 +- packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index e547be7b399..4b07d3b979d 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -89,7 +89,7 @@ class AlertPolicyServiceClient { // 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/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index afb17b7d9f2..af81da64e38 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -92,7 +92,7 @@ class GroupServiceClient { // 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/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index aa8c0761ed1..933cc4f04f5 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -82,7 +82,7 @@ class MetricServiceClient { // 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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 03dfc7ad356..786f376294e 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -82,7 +82,7 @@ class NotificationChannelServiceClient { // 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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 03434c211c1..d203b52f723 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -88,7 +88,7 @@ class UptimeCheckServiceClient { // 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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index a4bfbc015b1..95d2d45b33e 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-02T11:20:05.053704Z", + "updateTime": "2019-08-21T11:17:27.920783Z", "sources": [ { "generator": { "name": "artman", - "version": "0.32.0", - "dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d" + "version": "0.34.0", + "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a40d3a5f5e5a33fd49888a8a33ed021f65c0ccf", - "internalRef": "261297518" + "sha": "11592a15391951348a64f5c303399733b1c5b3b2", + "internalRef": "264425502" } }, { From 26b7a3923285541c091bed538d77910b54c1890f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Aug 2019 07:35:59 -0700 Subject: [PATCH 222/422] docs: update function documentation --- .../src/v3/doc/google/protobuf/doc_timestamp.js | 10 ++++++---- packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index 98c19dbf0d3..c457acc0c7d 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 95d2d45b33e..a59fffcc3cd 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-21T11:17:27.920783Z", + "updateTime": "2019-08-27T11:15:49.539069Z", "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": "11592a15391951348a64f5c303399733b1c5b3b2", - "internalRef": "264425502" + "sha": "650caad718bb063f189405c23972dc9818886358", + "internalRef": "265565344" } }, { From 3ac89e2b0b18c06e29b1ec1fdcfedae650ed2669 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Aug 2019 12:57:39 -0700 Subject: [PATCH 223/422] docs: update link to client docs (#288) --- packages/google-cloud-monitoring/README.md | 4 +--- packages/google-cloud-monitoring/synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index c1b88298fb8..56e5e65ce69 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -157,12 +157,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/monitoring/latest#reference +[client-docs]: https://googleapis.dev/nodejs/monitoring/latest [product-docs]: https://cloud.google.com/monitoring/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=monitoring.googleapis.com [auth]: https://cloud.google.com/docs/authentication/getting-started - - diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index a59fffcc3cd..ed49ad7ea15 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-08-27T11:15:49.539069Z", + "updateTime": "2019-08-28T11:17:10.716938Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "650caad718bb063f189405c23972dc9818886358", - "internalRef": "265565344" + "sha": "dbd38035c35083507e2f0b839985cf17e212cb1c", + "internalRef": "265796259" } }, { From 24aa50f85751d19ad8537dc66d387d6704d05f96 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 3 Sep 2019 14:05:32 -0700 Subject: [PATCH 224/422] feat: load protos from JSON, grpc-fallback support * [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fixes * fix webpack.config.js --- .../protos/protos.json | 3152 +++++++++++++++++ .../google-cloud-monitoring/src/browser.js | 21 + .../src/service_proto_list.json | 1 - .../src/v3/alert_policy_service_client.js | 77 +- .../v3/alert_policy_service_proto_list.json | 3 + .../src/v3/group_service_client.js | 81 +- .../src/v3/group_service_proto_list.json | 3 + .../src/v3/metric_service_client.js | 81 +- .../src/v3/metric_service_proto_list.json | 3 + .../v3/notification_channel_service_client.js | 81 +- ...tification_channel_service_proto_list.json | 3 + .../src/v3/uptime_check_service_client.js | 77 +- .../v3/uptime_check_service_proto_list.json | 3 + .../google-cloud-monitoring/synth.metadata | 10 +- .../google-cloud-monitoring/test/gapic-v3.js | 33 + .../google-cloud-monitoring/webpack.config.js | 46 + 16 files changed, 3536 insertions(+), 139 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/protos.json create mode 100644 packages/google-cloud-monitoring/src/browser.js delete mode 100644 packages/google-cloud-monitoring/src/service_proto_list.json create mode 100644 packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json create mode 100644 packages/google-cloud-monitoring/src/v3/group_service_proto_list.json create mode 100644 packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json create mode 100644 packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json create mode 100644 packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json create mode 100644 packages/google-cloud-monitoring/webpack.config.js diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json new file mode 100644 index 00000000000..5ab00ee2874 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -0,0 +1,3152 @@ +{ + "nested": { + "google": { + "nested": { + "monitoring": { + "nested": { + "v3": { + "options": { + "csharp_namespace": "Google.Cloud.Monitoring.V3", + "go_package": "google.golang.org/genproto/googleapis/monitoring/v3;monitoring", + "java_multiple_files": true, + "java_outer_classname": "UptimeProto", + "java_package": "com.google.monitoring.v3", + "php_namespace": "Google\\Cloud\\Monitoring\\V3" + }, + "nested": { + "AlertPolicyService": { + "methods": { + "ListAlertPolicies": { + "requestType": "ListAlertPoliciesRequest", + "responseType": "ListAlertPoliciesResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/alertPolicies" + } + }, + "GetAlertPolicy": { + "requestType": "GetAlertPolicyRequest", + "responseType": "AlertPolicy", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/alertPolicies/*}" + } + }, + "CreateAlertPolicy": { + "requestType": "CreateAlertPolicyRequest", + "responseType": "AlertPolicy", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/alertPolicies", + "(google.api.http).body": "alert_policy" + } + }, + "DeleteAlertPolicy": { + "requestType": "DeleteAlertPolicyRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/alertPolicies/*}" + } + }, + "UpdateAlertPolicy": { + "requestType": "UpdateAlertPolicyRequest", + "responseType": "AlertPolicy", + "options": { + "(google.api.http).patch": "/v3/{alert_policy.name=projects/*/alertPolicies/*}", + "(google.api.http).body": "alert_policy" + } + } + } + }, + "CreateAlertPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "alertPolicy": { + "type": "AlertPolicy", + "id": 2 + } + } + }, + "GetAlertPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "ListAlertPoliciesRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + }, + "orderBy": { + "type": "string", + "id": 6 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListAlertPoliciesResponse": { + "fields": { + "alertPolicies": { + "rule": "repeated", + "type": "AlertPolicy", + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateAlertPolicyRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "alertPolicy": { + "type": "AlertPolicy", + "id": 3 + } + } + }, + "DeleteAlertPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "AlertPolicy": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "documentation": { + "type": "Documentation", + "id": 13 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 16 + }, + "conditions": { + "rule": "repeated", + "type": "Condition", + "id": 12 + }, + "combiner": { + "type": "ConditionCombinerType", + "id": 6 + }, + "enabled": { + "type": "google.protobuf.BoolValue", + "id": 17 + }, + "notificationChannels": { + "rule": "repeated", + "type": "string", + "id": 14 + }, + "creationRecord": { + "type": "MutationRecord", + "id": 10 + }, + "mutationRecord": { + "type": "MutationRecord", + "id": 11 + } + }, + "nested": { + "Documentation": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "mimeType": { + "type": "string", + "id": 2 + } + } + }, + "Condition": { + "oneofs": { + "condition": { + "oneof": [ + "conditionThreshold", + "conditionAbsent" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 12 + }, + "displayName": { + "type": "string", + "id": 6 + }, + "conditionThreshold": { + "type": "MetricThreshold", + "id": 1 + }, + "conditionAbsent": { + "type": "MetricAbsence", + "id": 2 + } + }, + "nested": { + "Trigger": { + "oneofs": { + "type": { + "oneof": [ + "count", + "percent" + ] + } + }, + "fields": { + "count": { + "type": "int32", + "id": 1 + }, + "percent": { + "type": "double", + "id": 2 + } + } + }, + "MetricThreshold": { + "fields": { + "filter": { + "type": "string", + "id": 2 + }, + "aggregations": { + "rule": "repeated", + "type": "Aggregation", + "id": 8 + }, + "denominatorFilter": { + "type": "string", + "id": 9 + }, + "denominatorAggregations": { + "rule": "repeated", + "type": "Aggregation", + "id": 10 + }, + "comparison": { + "type": "ComparisonType", + "id": 4 + }, + "thresholdValue": { + "type": "double", + "id": 5 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 6 + }, + "trigger": { + "type": "Trigger", + "id": 7 + } + } + }, + "MetricAbsence": { + "fields": { + "filter": { + "type": "string", + "id": 1 + }, + "aggregations": { + "rule": "repeated", + "type": "Aggregation", + "id": 5 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "trigger": { + "type": "Trigger", + "id": 3 + } + } + } + } + }, + "ConditionCombinerType": { + "values": { + "COMBINE_UNSPECIFIED": 0, + "AND": 1, + "OR": 2, + "AND_WITH_MATCHING_RESOURCE": 3 + } + } + } + }, + "TypedValue": { + "oneofs": { + "value": { + "oneof": [ + "boolValue", + "int64Value", + "doubleValue", + "stringValue", + "distributionValue" + ] + } + }, + "fields": { + "boolValue": { + "type": "bool", + "id": 1 + }, + "int64Value": { + "type": "int64", + "id": 2 + }, + "doubleValue": { + "type": "double", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + }, + "distributionValue": { + "type": "google.api.Distribution", + "id": 5 + } + } + }, + "TimeInterval": { + "fields": { + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + } + } + }, + "Aggregation": { + "fields": { + "alignmentPeriod": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "perSeriesAligner": { + "type": "Aligner", + "id": 2 + }, + "crossSeriesReducer": { + "type": "Reducer", + "id": 4 + }, + "groupByFields": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "Aligner": { + "values": { + "ALIGN_NONE": 0, + "ALIGN_DELTA": 1, + "ALIGN_RATE": 2, + "ALIGN_INTERPOLATE": 3, + "ALIGN_NEXT_OLDER": 4, + "ALIGN_MIN": 10, + "ALIGN_MAX": 11, + "ALIGN_MEAN": 12, + "ALIGN_COUNT": 13, + "ALIGN_SUM": 14, + "ALIGN_STDDEV": 15, + "ALIGN_COUNT_TRUE": 16, + "ALIGN_COUNT_FALSE": 24, + "ALIGN_FRACTION_TRUE": 17, + "ALIGN_PERCENTILE_99": 18, + "ALIGN_PERCENTILE_95": 19, + "ALIGN_PERCENTILE_50": 20, + "ALIGN_PERCENTILE_05": 21, + "ALIGN_PERCENT_CHANGE": 23 + } + }, + "Reducer": { + "values": { + "REDUCE_NONE": 0, + "REDUCE_MEAN": 1, + "REDUCE_MIN": 2, + "REDUCE_MAX": 3, + "REDUCE_SUM": 4, + "REDUCE_STDDEV": 5, + "REDUCE_COUNT": 6, + "REDUCE_COUNT_TRUE": 7, + "REDUCE_COUNT_FALSE": 15, + "REDUCE_FRACTION_TRUE": 8, + "REDUCE_PERCENTILE_99": 9, + "REDUCE_PERCENTILE_95": 10, + "REDUCE_PERCENTILE_50": 11, + "REDUCE_PERCENTILE_05": 12 + } + } + } + }, + "ComparisonType": { + "values": { + "COMPARISON_UNSPECIFIED": 0, + "COMPARISON_GT": 1, + "COMPARISON_GE": 2, + "COMPARISON_LT": 3, + "COMPARISON_LE": 4, + "COMPARISON_EQ": 5, + "COMPARISON_NE": 6 + } + }, + "ServiceTier": { + "options": { + "deprecated": true + }, + "values": { + "SERVICE_TIER_UNSPECIFIED": 0, + "SERVICE_TIER_BASIC": 1, + "SERVICE_TIER_PREMIUM": 2 + } + }, + "MutationRecord": { + "fields": { + "mutateTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "mutatedBy": { + "type": "string", + "id": 2 + } + } + }, + "GroupService": { + "methods": { + "ListGroups": { + "requestType": "ListGroupsRequest", + "responseType": "ListGroupsResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/groups" + } + }, + "GetGroup": { + "requestType": "GetGroupRequest", + "responseType": "Group", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/groups/*}" + } + }, + "CreateGroup": { + "requestType": "CreateGroupRequest", + "responseType": "Group", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/groups", + "(google.api.http).body": "group" + } + }, + "UpdateGroup": { + "requestType": "UpdateGroupRequest", + "responseType": "Group", + "options": { + "(google.api.http).put": "/v3/{group.name=projects/*/groups/*}", + "(google.api.http).body": "group" + } + }, + "DeleteGroup": { + "requestType": "DeleteGroupRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/groups/*}" + } + }, + "ListGroupMembers": { + "requestType": "ListGroupMembersRequest", + "responseType": "ListGroupMembersResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/groups/*}/members" + } + } + } + }, + "ListGroupsRequest": { + "oneofs": { + "filter": { + "oneof": [ + "childrenOfGroup", + "ancestorsOfGroup", + "descendantsOfGroup" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 7 + }, + "childrenOfGroup": { + "type": "string", + "id": 2 + }, + "ancestorsOfGroup": { + "type": "string", + "id": 3 + }, + "descendantsOfGroup": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 5 + }, + "pageToken": { + "type": "string", + "id": 6 + } + } + }, + "ListGroupsResponse": { + "fields": { + "group": { + "rule": "repeated", + "type": "Group", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "CreateGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "group": { + "type": "Group", + "id": 2 + }, + "validateOnly": { + "type": "bool", + "id": 3 + } + } + }, + "UpdateGroupRequest": { + "fields": { + "group": { + "type": "Group", + "id": 2 + }, + "validateOnly": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "ListGroupMembersRequest": { + "fields": { + "name": { + "type": "string", + "id": 7 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + }, + "interval": { + "type": "TimeInterval", + "id": 6 + } + } + }, + "ListGroupMembersResponse": { + "fields": { + "members": { + "rule": "repeated", + "type": "google.api.MonitoredResource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "Group": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "parentName": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 5 + }, + "isCluster": { + "type": "bool", + "id": 6 + } + } + }, + "MetricService": { + "methods": { + "ListMonitoredResourceDescriptors": { + "requestType": "ListMonitoredResourceDescriptorsRequest", + "responseType": "ListMonitoredResourceDescriptorsResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/monitoredResourceDescriptors" + } + }, + "GetMonitoredResourceDescriptor": { + "requestType": "GetMonitoredResourceDescriptorRequest", + "responseType": "google.api.MonitoredResourceDescriptor", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + } + }, + "ListMetricDescriptors": { + "requestType": "ListMetricDescriptorsRequest", + "responseType": "ListMetricDescriptorsResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/metricDescriptors" + } + }, + "GetMetricDescriptor": { + "requestType": "GetMetricDescriptorRequest", + "responseType": "google.api.MetricDescriptor", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/metricDescriptors/**}" + } + }, + "CreateMetricDescriptor": { + "requestType": "CreateMetricDescriptorRequest", + "responseType": "google.api.MetricDescriptor", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/metricDescriptors", + "(google.api.http).body": "metric_descriptor" + } + }, + "DeleteMetricDescriptor": { + "requestType": "DeleteMetricDescriptorRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/metricDescriptors/**}" + } + }, + "ListTimeSeries": { + "requestType": "ListTimeSeriesRequest", + "responseType": "ListTimeSeriesResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/timeSeries" + } + }, + "CreateTimeSeries": { + "requestType": "CreateTimeSeriesRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/timeSeries", + "(google.api.http).body": "*" + } + } + } + }, + "ListMonitoredResourceDescriptorsRequest": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListMonitoredResourceDescriptorsResponse": { + "fields": { + "resourceDescriptors": { + "rule": "repeated", + "type": "google.api.MonitoredResourceDescriptor", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetMonitoredResourceDescriptorRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "ListMetricDescriptorsRequest": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListMetricDescriptorsResponse": { + "fields": { + "metricDescriptors": { + "rule": "repeated", + "type": "google.api.MetricDescriptor", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetMetricDescriptorRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "CreateMetricDescriptorRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "metricDescriptor": { + "type": "google.api.MetricDescriptor", + "id": 2 + } + } + }, + "DeleteMetricDescriptorRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "ListTimeSeriesRequest": { + "fields": { + "name": { + "type": "string", + "id": 10 + }, + "filter": { + "type": "string", + "id": 2 + }, + "interval": { + "type": "TimeInterval", + "id": 4 + }, + "aggregation": { + "type": "Aggregation", + "id": 5 + }, + "orderBy": { + "type": "string", + "id": 6 + }, + "view": { + "type": "TimeSeriesView", + "id": 7 + }, + "pageSize": { + "type": "int32", + "id": 8 + }, + "pageToken": { + "type": "string", + "id": 9 + } + }, + "nested": { + "TimeSeriesView": { + "values": { + "FULL": 0, + "HEADERS": 1 + } + } + } + }, + "ListTimeSeriesResponse": { + "fields": { + "timeSeries": { + "rule": "repeated", + "type": "TimeSeries", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "executionErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 3 + } + } + }, + "CreateTimeSeriesRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "timeSeries": { + "rule": "repeated", + "type": "TimeSeries", + "id": 2 + } + } + }, + "CreateTimeSeriesError": { + "fields": { + "timeSeries": { + "type": "TimeSeries", + "id": 1 + }, + "status": { + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "Point": { + "fields": { + "interval": { + "type": "TimeInterval", + "id": 1 + }, + "value": { + "type": "TypedValue", + "id": 2 + } + } + }, + "TimeSeries": { + "fields": { + "metric": { + "type": "google.api.Metric", + "id": 1 + }, + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 + }, + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 7 + }, + "metricKind": { + "type": "google.api.MetricDescriptor.MetricKind", + "id": 3 + }, + "valueType": { + "type": "google.api.MetricDescriptor.ValueType", + "id": 4 + }, + "points": { + "rule": "repeated", + "type": "Point", + "id": 5 + } + } + }, + "NotificationChannelService": { + "methods": { + "ListNotificationChannelDescriptors": { + "requestType": "ListNotificationChannelDescriptorsRequest", + "responseType": "ListNotificationChannelDescriptorsResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/notificationChannelDescriptors" + } + }, + "GetNotificationChannelDescriptor": { + "requestType": "GetNotificationChannelDescriptorRequest", + "responseType": "NotificationChannelDescriptor", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/notificationChannelDescriptors/*}" + } + }, + "ListNotificationChannels": { + "requestType": "ListNotificationChannelsRequest", + "responseType": "ListNotificationChannelsResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/notificationChannels" + } + }, + "GetNotificationChannel": { + "requestType": "GetNotificationChannelRequest", + "responseType": "NotificationChannel", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/notificationChannels/*}" + } + }, + "CreateNotificationChannel": { + "requestType": "CreateNotificationChannelRequest", + "responseType": "NotificationChannel", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/notificationChannels", + "(google.api.http).body": "notification_channel" + } + }, + "UpdateNotificationChannel": { + "requestType": "UpdateNotificationChannelRequest", + "responseType": "NotificationChannel", + "options": { + "(google.api.http).patch": "/v3/{notification_channel.name=projects/*/notificationChannels/*}", + "(google.api.http).body": "notification_channel" + } + }, + "DeleteNotificationChannel": { + "requestType": "DeleteNotificationChannelRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/notificationChannels/*}" + } + }, + "SendNotificationChannelVerificationCode": { + "requestType": "SendNotificationChannelVerificationCodeRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode", + "(google.api.http).body": "*" + } + }, + "GetNotificationChannelVerificationCode": { + "requestType": "GetNotificationChannelVerificationCodeRequest", + "responseType": "GetNotificationChannelVerificationCodeResponse", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode", + "(google.api.http).body": "*" + } + }, + "VerifyNotificationChannel": { + "requestType": "VerifyNotificationChannelRequest", + "responseType": "NotificationChannel", + "options": { + "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:verify", + "(google.api.http).body": "*" + } + } + } + }, + "ListNotificationChannelDescriptorsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListNotificationChannelDescriptorsResponse": { + "fields": { + "channelDescriptors": { + "rule": "repeated", + "type": "NotificationChannelDescriptor", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetNotificationChannelDescriptorRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "CreateNotificationChannelRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "notificationChannel": { + "type": "NotificationChannel", + "id": 2 + } + } + }, + "ListNotificationChannelsRequest": { + "fields": { + "name": { + "type": "string", + "id": 5 + }, + "filter": { + "type": "string", + "id": 6 + }, + "orderBy": { + "type": "string", + "id": 7 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListNotificationChannelsResponse": { + "fields": { + "notificationChannels": { + "rule": "repeated", + "type": "NotificationChannel", + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetNotificationChannelRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + } + } + }, + "UpdateNotificationChannelRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "notificationChannel": { + "type": "NotificationChannel", + "id": 3 + } + } + }, + "DeleteNotificationChannelRequest": { + "fields": { + "name": { + "type": "string", + "id": 3 + }, + "force": { + "type": "bool", + "id": 5 + } + } + }, + "SendNotificationChannelVerificationCodeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "GetNotificationChannelVerificationCodeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "GetNotificationChannelVerificationCodeResponse": { + "fields": { + "code": { + "type": "string", + "id": 1 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "VerifyNotificationChannelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "code": { + "type": "string", + "id": 2 + } + } + }, + "NotificationChannelDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 6 + }, + "type": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "labels": { + "rule": "repeated", + "type": "google.api.LabelDescriptor", + "id": 4 + }, + "supportedTiers": { + "rule": "repeated", + "type": "ServiceTier", + "id": 5, + "options": { + "deprecated": true + } + } + } + }, + "NotificationChannel": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "name": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 3 + }, + "description": { + "type": "string", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 8 + }, + "verificationStatus": { + "type": "VerificationStatus", + "id": 9 + }, + "enabled": { + "type": "google.protobuf.BoolValue", + "id": 11 + } + }, + "nested": { + "VerificationStatus": { + "values": { + "VERIFICATION_STATUS_UNSPECIFIED": 0, + "UNVERIFIED": 1, + "VERIFIED": 2 + } + } + } + }, + "UptimeCheckService": { + "methods": { + "ListUptimeCheckConfigs": { + "requestType": "ListUptimeCheckConfigsRequest", + "responseType": "ListUptimeCheckConfigsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*}/uptimeCheckConfigs" + } + }, + "GetUptimeCheckConfig": { + "requestType": "GetUptimeCheckConfigRequest", + "responseType": "UptimeCheckConfig", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/uptimeCheckConfigs/*}" + } + }, + "CreateUptimeCheckConfig": { + "requestType": "CreateUptimeCheckConfigRequest", + "responseType": "UptimeCheckConfig", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*}/uptimeCheckConfigs", + "(google.api.http).body": "uptime_check_config" + } + }, + "UpdateUptimeCheckConfig": { + "requestType": "UpdateUptimeCheckConfigRequest", + "responseType": "UptimeCheckConfig", + "options": { + "(google.api.http).patch": "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}", + "(google.api.http).body": "uptime_check_config" + } + }, + "DeleteUptimeCheckConfig": { + "requestType": "DeleteUptimeCheckConfigRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}" + } + }, + "ListUptimeCheckIps": { + "requestType": "ListUptimeCheckIpsRequest", + "responseType": "ListUptimeCheckIpsResponse", + "options": { + "(google.api.http).get": "/v3/uptimeCheckIps" + } + } + } + }, + "ListUptimeCheckConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListUptimeCheckConfigsResponse": { + "fields": { + "uptimeCheckConfigs": { + "rule": "repeated", + "type": "UptimeCheckConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } + }, + "GetUptimeCheckConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateUptimeCheckConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "uptimeCheckConfig": { + "type": "UptimeCheckConfig", + "id": 2 + } + } + }, + "UpdateUptimeCheckConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "uptimeCheckConfig": { + "type": "UptimeCheckConfig", + "id": 3 + } + } + }, + "DeleteUptimeCheckConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListUptimeCheckIpsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListUptimeCheckIpsResponse": { + "fields": { + "uptimeCheckIps": { + "rule": "repeated", + "type": "UptimeCheckIp", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "InternalChecker": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "network": { + "type": "string", + "id": 3 + }, + "gcpZone": { + "type": "string", + "id": 4 + }, + "peerProjectId": { + "type": "string", + "id": 6 + } + } + }, + "UptimeCheckConfig": { + "oneofs": { + "resource": { + "oneof": [ + "monitoredResource", + "resourceGroup" + ] + }, + "checkRequestType": { + "oneof": [ + "httpCheck", + "tcpCheck" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "monitoredResource": { + "type": "google.api.MonitoredResource", + "id": 3 + }, + "resourceGroup": { + "type": "ResourceGroup", + "id": 4 + }, + "httpCheck": { + "type": "HttpCheck", + "id": 5 + }, + "tcpCheck": { + "type": "TcpCheck", + "id": 6 + }, + "period": { + "type": "google.protobuf.Duration", + "id": 7 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "contentMatchers": { + "rule": "repeated", + "type": "ContentMatcher", + "id": 9 + }, + "selectedRegions": { + "rule": "repeated", + "type": "UptimeCheckRegion", + "id": 10 + }, + "isInternal": { + "type": "bool", + "id": 15 + }, + "internalCheckers": { + "rule": "repeated", + "type": "InternalChecker", + "id": 14 + } + }, + "nested": { + "ResourceGroup": { + "fields": { + "groupId": { + "type": "string", + "id": 1 + }, + "resourceType": { + "type": "GroupResourceType", + "id": 2 + } + } + }, + "HttpCheck": { + "fields": { + "useSsl": { + "type": "bool", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + }, + "port": { + "type": "int32", + "id": 3 + }, + "authInfo": { + "type": "BasicAuthentication", + "id": 4 + }, + "maskHeaders": { + "type": "bool", + "id": 5 + }, + "headers": { + "keyType": "string", + "type": "string", + "id": 6 + } + }, + "nested": { + "BasicAuthentication": { + "fields": { + "username": { + "type": "string", + "id": 1 + }, + "password": { + "type": "string", + "id": 2 + } + } + } + } + }, + "TcpCheck": { + "fields": { + "port": { + "type": "int32", + "id": 1 + } + } + }, + "ContentMatcher": { + "fields": { + "content": { + "type": "string", + "id": 1 + } + } + } + } + }, + "UptimeCheckIp": { + "fields": { + "region": { + "type": "UptimeCheckRegion", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3 + } + } + }, + "UptimeCheckRegion": { + "values": { + "REGION_UNSPECIFIED": 0, + "USA": 1, + "EUROPE": 2, + "SOUTH_AMERICA": 3, + "ASIA_PACIFIC": 4 + } + }, + "GroupResourceType": { + "values": { + "RESOURCE_TYPE_UNSPECIFIED": 0, + "INSTANCE": 1, + "AWS_ELB_LOAD_BALANCER": 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": { + "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 + } + } + }, + "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 + } + } + } + } + }, + "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 + } + }, + "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 + } + } + } + } + }, + "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 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "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 + } + } + } + } + }, + "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/packages/google-cloud-monitoring/src/browser.js b/packages/google-cloud-monitoring/src/browser.js new file mode 100644 index 00000000000..ddbcd7ecb9a --- /dev/null +++ b/packages/google-cloud-monitoring/src/browser.js @@ -0,0 +1,21 @@ +// 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'; + +// Set a flag that we are running in a browser bundle. +global.isBrowser = true; + +// Re-export all exports from ./index.js. +module.exports = require('./index'); diff --git a/packages/google-cloud-monitoring/src/service_proto_list.json b/packages/google-cloud-monitoring/src/service_proto_list.json deleted file mode 100644 index 85e5782241e..00000000000 --- a/packages/google-cloud-monitoring/src/service_proto_list.json +++ /dev/null @@ -1 +0,0 @@ -["../protos/google/monitoring/v3/group_service.proto", "../protos/google/monitoring/v3/metric.proto", "../protos/google/monitoring/v3/alert_service.proto", "../protos/google/monitoring/v3/dropped_labels.proto", "../protos/google/monitoring/v3/group.proto", "../protos/google/monitoring/v3/common.proto", "../protos/google/monitoring/v3/notification.proto", "../protos/google/monitoring/v3/metric_service.proto", "../protos/google/monitoring/v3/alert.proto", "../protos/google/monitoring/v3/uptime_service.proto", "../protos/google/monitoring/v3/mutation_record.proto", "../protos/google/monitoring/v3/uptime.proto", "../protos/google/monitoring/v3/span_context.proto", "../protos/google/monitoring/v3/notification_service.proto"] \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 4b07d3b979d..0f75c006f95 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -66,6 +66,16 @@ class AlertPolicyServiceClient { 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; @@ -82,46 +92,61 @@ class AlertPolicyServiceClient { // 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/monitoring/v3/alert_service.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 = { - alertPolicyPathTemplate: new gax.PathTemplate( + alertPolicyPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - alertPolicyConditionPathTemplate: new gax.PathTemplate( + alertPolicyConditionPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - 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 = { - listAlertPolicies: new gax.PageDescriptor( + listAlertPolicies: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'alertPolicies' @@ -144,7 +169,9 @@ class AlertPolicyServiceClient { // Put together the "service stub" for // google.monitoring.v3.AlertPolicyService. const alertPolicyServiceStub = gaxGrpc.createStub( - protos.google.monitoring.v3.AlertPolicyService, + opts.fallback + ? protos.lookupService('google.monitoring.v3.AlertPolicyService') + : protos.google.monitoring.v3.AlertPolicyService, opts ); @@ -158,18 +185,16 @@ class AlertPolicyServiceClient { 'updateAlertPolicy', ]; for (const methodName of alertPolicyServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - alertPolicyServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = alertPolicyServiceStub.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/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json new file mode 100644 index 00000000000..7e6fbb33ced --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/monitoring/v3/alert_service.proto" +] diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index af81da64e38..83110c7deb0 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -69,6 +69,16 @@ class GroupServiceClient { 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; @@ -85,44 +95,63 @@ class GroupServiceClient { // 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/monitoring/v3/group_service.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 = { - groupPathTemplate: new gax.PathTemplate( + groupPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - 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 = { - listGroups: new gax.PageDescriptor('pageToken', 'nextPageToken', 'group'), - listGroupMembers: new gax.PageDescriptor( + listGroups: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'group' + ), + listGroupMembers: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'members' @@ -145,7 +174,9 @@ class GroupServiceClient { // Put together the "service stub" for // google.monitoring.v3.GroupService. const groupServiceStub = gaxGrpc.createStub( - protos.google.monitoring.v3.GroupService, + opts.fallback + ? protos.lookupService('google.monitoring.v3.GroupService') + : protos.google.monitoring.v3.GroupService, opts ); @@ -160,18 +191,16 @@ class GroupServiceClient { 'listGroupMembers', ]; for (const methodName of groupServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - groupServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = groupServiceStub.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/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json new file mode 100644 index 00000000000..589717a46f4 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/monitoring/v3/group_service.proto" +] diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 933cc4f04f5..6b0536502b8 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -59,6 +59,16 @@ class MetricServiceClient { 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,56 +85,71 @@ class MetricServiceClient { // 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/monitoring/v3/metric_service.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 = { - metricDescriptorPathTemplate: new gax.PathTemplate( + metricDescriptorPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/metricDescriptors/{metric_descriptor=**}' ), - monitoredResourceDescriptorPathTemplate: new gax.PathTemplate( + monitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' ), - 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 = { - listMonitoredResourceDescriptors: new gax.PageDescriptor( + listMonitoredResourceDescriptors: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'resourceDescriptors' ), - listMetricDescriptors: new gax.PageDescriptor( + listMetricDescriptors: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'metricDescriptors' ), - listTimeSeries: new gax.PageDescriptor( + listTimeSeries: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'timeSeries' @@ -147,7 +172,9 @@ class MetricServiceClient { // Put together the "service stub" for // google.monitoring.v3.MetricService. const metricServiceStub = gaxGrpc.createStub( - protos.google.monitoring.v3.MetricService, + opts.fallback + ? protos.lookupService('google.monitoring.v3.MetricService') + : protos.google.monitoring.v3.MetricService, opts ); @@ -164,18 +191,16 @@ class MetricServiceClient { 'createTimeSeries', ]; for (const methodName of metricServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - metricServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = metricServiceStub.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/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json new file mode 100644 index 00000000000..495ef207a60 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/monitoring/v3/metric_service.proto" +] diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 786f376294e..86dbbbac584 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -59,6 +59,16 @@ class NotificationChannelServiceClient { 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,51 +85,66 @@ class NotificationChannelServiceClient { // 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/monitoring/v3/notification_service.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 = { - notificationChannelPathTemplate: new gax.PathTemplate( + notificationChannelPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - notificationChannelDescriptorPathTemplate: new gax.PathTemplate( + notificationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - 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 = { - listNotificationChannelDescriptors: new gax.PageDescriptor( + listNotificationChannelDescriptors: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'channelDescriptors' ), - listNotificationChannels: new gax.PageDescriptor( + listNotificationChannels: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'notificationChannels' @@ -142,7 +167,11 @@ class NotificationChannelServiceClient { // Put together the "service stub" for // google.monitoring.v3.NotificationChannelService. const notificationChannelServiceStub = gaxGrpc.createStub( - protos.google.monitoring.v3.NotificationChannelService, + opts.fallback + ? protos.lookupService( + 'google.monitoring.v3.NotificationChannelService' + ) + : protos.google.monitoring.v3.NotificationChannelService, opts ); @@ -161,18 +190,16 @@ class NotificationChannelServiceClient { 'verifyNotificationChannel', ]; for (const methodName of notificationChannelServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - notificationChannelServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = notificationChannelServiceStub.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/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json new file mode 100644 index 00000000000..0de383ffbb9 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/monitoring/v3/notification_service.proto" +] diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index d203b52f723..9976b5c407c 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -65,6 +65,16 @@ class UptimeCheckServiceClient { 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; @@ -81,34 +91,49 @@ class UptimeCheckServiceClient { // 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/monitoring/v3/uptime_service.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 = { - projectPathTemplate: new gax.PathTemplate('projects/{project}'), - uptimeCheckConfigPathTemplate: new gax.PathTemplate( + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + uptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -117,12 +142,12 @@ class UptimeCheckServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listUptimeCheckConfigs: new gax.PageDescriptor( + listUptimeCheckConfigs: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'uptimeCheckConfigs' ), - listUptimeCheckIps: new gax.PageDescriptor( + listUptimeCheckIps: new gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'uptimeCheckIps' @@ -145,7 +170,9 @@ class UptimeCheckServiceClient { // Put together the "service stub" for // google.monitoring.v3.UptimeCheckService. const uptimeCheckServiceStub = gaxGrpc.createStub( - protos.google.monitoring.v3.UptimeCheckService, + opts.fallback + ? protos.lookupService('google.monitoring.v3.UptimeCheckService') + : protos.google.monitoring.v3.UptimeCheckService, opts ); @@ -160,18 +187,16 @@ class UptimeCheckServiceClient { 'listUptimeCheckIps', ]; for (const methodName of uptimeCheckServiceStubMethods) { - this._innerApiCalls[methodName] = gax.createApiCall( - uptimeCheckServiceStub.then( - stub => - function() { - const args = Array.prototype.slice.call(arguments, 0); - return stub[methodName].apply(stub, args); - }, - err => - function() { - throw err; - } - ), + const innerCallPromise = uptimeCheckServiceStub.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/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json new file mode 100644 index 00000000000..f504a3c2a3b --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/monitoring/v3/uptime_service.proto" +] diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index ed49ad7ea15..756897b0796 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-28T11:17:10.716938Z", + "updateTime": "2019-08-31T11:14:27.717107Z", "sources": [ { "generator": { "name": "artman", - "version": "0.35.1", - "dockerImage": "googleapis/artman@sha256:b11c7ea0d0831c54016fb50f4b796d24d1971439b30fbc32a369ba1ac887c384" + "version": "0.36.1", + "dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dbd38035c35083507e2f0b839985cf17e212cb1c", - "internalRef": "265796259" + "sha": "82809578652607c8ee29d9e199c21f28f81a03e0", + "internalRef": "266247326" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index a28095409d9..f9411f5f7a6 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -46,6 +46,13 @@ describe('AlertPolicyServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v3.AlertPolicyServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('listAlertPolicies', () => { it('invokes listAlertPolicies without error', done => { const client = new monitoringModule.v3.AlertPolicyServiceClient({ @@ -386,6 +393,11 @@ describe('GroupServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v3.GroupServiceClient({fallback: true}); + assert(client); + }); + describe('listGroups', () => { it('invokes listGroups without error', done => { const client = new monitoringModule.v3.GroupServiceClient({ @@ -797,6 +809,13 @@ describe('MetricServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v3.MetricServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('listMonitoredResourceDescriptors', () => { it('invokes listMonitoredResourceDescriptors without error', done => { const client = new monitoringModule.v3.MetricServiceClient({ @@ -1362,6 +1381,13 @@ describe('NotificationChannelServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v3.NotificationChannelServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('listNotificationChannelDescriptors', () => { it('invokes listNotificationChannelDescriptors without error', done => { const client = new monitoringModule.v3.NotificationChannelServiceClient({ @@ -2062,6 +2088,13 @@ describe('UptimeCheckServiceClient', () => { assert(client); }); + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v3.UptimeCheckServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('listUptimeCheckConfigs', () => { it('invokes listUptimeCheckConfigs without error', done => { const client = new monitoringModule.v3.UptimeCheckServiceClient({ diff --git a/packages/google-cloud-monitoring/webpack.config.js b/packages/google-cloud-monitoring/webpack.config.js new file mode 100644 index 00000000000..316a28deb69 --- /dev/null +++ b/packages/google-cloud-monitoring/webpack.config.js @@ -0,0 +1,46 @@ +// 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. + +module.exports = { + entry: './src/browser.js', + output: { + library: 'monitoring', + filename: './monitoring.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + extensions: ['.js', '.json'], + }, + module: { + rules: [ + { + 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 630bb1f06bda9b1ba43c82b3f7fafc6368bbf683 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 5 Sep 2019 21:41:40 +0300 Subject: [PATCH 225/422] chore(deps): update dependency eslint-plugin-node to v10 (#291) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c73c9dc5e86..27c237b02d4 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -49,7 +49,7 @@ "codecov": "^3.0.0", "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", "jsdoc-fresh": "^1.0.1", "intelli-espower-loader": "^1.0.1", From 184c8629b178bc26db03691e51630acfa60c4877 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Sep 2019 18:11:42 -0400 Subject: [PATCH 226/422] update .nycrc ignore rules (#292) --- packages/google-cloud-monitoring/.nycrc | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index 83a421a0628..23e322204ec 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.nycrc @@ -6,6 +6,7 @@ "**/.coverage", "**/apis", "**/benchmark", + "**/conformance", "**/docs", "**/samples", "**/scripts", From 1e9b09029bb704f02023a589d283c3c898fba8de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 12 Sep 2019 05:07:06 -0700 Subject: [PATCH 227/422] feat(GroupServiceClient): support recursive option when deleting group (#294) --- .../protos/google/monitoring/v3/alert.proto | 8 +- .../google/monitoring/v3/alert_service.proto | 15 +- .../protos/google/monitoring/v3/common.proto | 23 ++- .../google/monitoring/v3/dropped_labels.proto | 7 +- .../protos/google/monitoring/v3/group.proto | 2 +- .../google/monitoring/v3/group_service.proto | 20 ++- .../protos/google/monitoring/v3/metric.proto | 4 +- .../google/monitoring/v3/metric_service.proto | 51 +++--- .../monitoring/v3/mutation_record.proto | 2 +- .../google/monitoring/v3/notification.proto | 13 +- .../monitoring/v3/notification_service.proto | 42 +++-- .../google/monitoring/v3/span_context.proto | 2 +- .../protos/google/monitoring/v3/uptime.proto | 145 ++++++++++++------ .../google/monitoring/v3/uptime_service.proto | 28 ++-- .../protos/protos.json | 40 +++++ .../v3/doc/google/monitoring/v3/doc_alert.js | 6 + .../v3/doc/google/monitoring/v3/doc_common.js | 20 ++- .../google/monitoring/v3/doc_group_service.js | 8 +- .../monitoring/v3/doc_metric_service.js | 4 +- .../google/monitoring/v3/doc_notification.js | 10 +- .../v3/doc/google/monitoring/v3/doc_uptime.js | 95 ++++++++++-- .../src/v3/group_service_client.js | 4 + .../src/v3/metric_service_client.js | 21 ++- .../google-cloud-monitoring/synth.metadata | 10 +- .../google-cloud-monitoring/test/gapic-v3.js | 6 - 25 files changed, 396 insertions(+), 190 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 3b3e1dca29f..885ee2c087f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.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,11 +17,11 @@ syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/mutation_record.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -325,6 +325,10 @@ message AlertPolicy { // a field projection has been specified that strips it out. google.protobuf.BoolValue enabled = 17; + // Read-only description of how the alert policy is invalid. OK if the alert + // policy is valid. If not OK, the alert policy will not generate incidents. + google.rpc.Status validity = 18; + // Identifies the notification channels to which notifications should be sent // when incidents are opened or closed or when new violations occur on // an already opened incident. Each element of this array corresponds to diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index 0dedca1139d..de5a30f0293 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.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. @@ -21,6 +21,7 @@ import "google/api/annotations.proto"; import "google/monitoring/v3/alert.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -39,9 +40,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // which can be reached by clicking the "Monitoring" tab in // [Cloud Console](https://console.cloud.google.com/). service AlertPolicyService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the existing alerting policies for the project. - rpc ListAlertPolicies(ListAlertPoliciesRequest) - returns (ListAlertPoliciesResponse) { + rpc ListAlertPolicies(ListAlertPoliciesRequest) returns (ListAlertPoliciesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/alertPolicies" }; @@ -63,8 +69,7 @@ service AlertPolicyService { } // Deletes an alerting policy. - rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) - returns (google.protobuf.Empty) { + rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/alertPolicies/*}" }; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 73ca2c4ade6..17b73fcf46b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.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,7 +17,6 @@ syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; import "google/api/distribution.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -52,9 +51,23 @@ message TypedValue { } } -// A time interval extending just after a start time through an end time. -// If the start time is the same as the end time, then the interval -// represents a single point in time. +// A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time. +// +// * For a `GAUGE` metric, the `startTime` value is technically optional; if +// no value is specified, the start time defaults to the value of the +// end time, and the interval represents a single point in time. Such an +// interval is valid only for `GAUGE` metrics, which are point-in-time +// measurements. +// +// * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier +// than the end time. +// +// * In all cases, the start time of the next interval must be +// at least a microsecond after the end time of the previous interval. +// Because the interval is closed, if the start time of a new interval +// is the same as the end time of the previous interval, data written +// at the new start time could overwrite data written at the previous +// end time. message TimeInterval { // Required. The end of the time interval. google.protobuf.Timestamp end_time = 2; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index acbe8cf25ad..0754051a174 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.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,12 +17,7 @@ syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; - option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; -option java_multiple_files = true; -option java_outer_classname = "DroppedLabelsProto"; -option java_package = "com.google.monitoring.v3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index ca46a0c0d6d..716b270e116 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 34e1d9e997e..bf91a916018 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.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. @@ -22,6 +22,7 @@ import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/group.proto"; import "google/protobuf/empty.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -43,6 +44,12 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // updated automatically as monitored resources are added and removed // from the infrastructure. service GroupService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the existing groups. rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { option (google.api.http) = { @@ -82,8 +89,7 @@ service GroupService { } // Lists the monitored resources that are members of a group. - rpc ListGroupMembers(ListGroupMembersRequest) - returns (ListGroupMembersResponse) { + rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; @@ -170,11 +176,17 @@ message UpdateGroupRequest { bool validate_only = 3; } -// The `DeleteGroup` request. You can only delete a group if it has no children. +// The `DeleteGroup` request. The default behavior is to be able to delete a +// single group without any descendants. message DeleteGroupRequest { // The group to delete. The format is // `"projects/{project_id_or_number}/groups/{group_id}"`. string name = 3; + + // If this field is true, then the request means to delete a group with all + // its descendants. Otherwise, the request means to delete a group only when + // it has no descendants. The default value is false. + bool recursive = 4; } // The `ListGroupMembers` request. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index c111d4fb4df..3ace1f96454 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.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,7 +17,7 @@ syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; +import "google/api/distribution.proto"; import "google/api/label.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index febd3f7b54a..3dc20be9aa5 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.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. @@ -20,11 +20,13 @@ package google.monitoring.v3; import "google/api/annotations.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; +import "google/monitoring/v3/alert.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/metric.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -36,37 +38,36 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // Manages metric descriptors, monitored resource descriptors, and // time series data. service MetricService { - // Lists monitored resource descriptors that match a filter. This method does - // not require a Stackdriver account. - rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) - returns (ListMonitoredResourceDescriptorsResponse) { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read," + "https://www.googleapis.com/auth/monitoring.write"; + + // Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; } - // Gets a single monitored resource descriptor. This method does not require a - // Stackdriver account. - rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) - returns (google.api.MonitoredResourceDescriptor) { + // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" }; } - // Lists metric descriptors that match a filter. This method does not require - // a Stackdriver account. - rpc ListMetricDescriptors(ListMetricDescriptorsRequest) - returns (ListMetricDescriptorsResponse) { + // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; } - // Gets a single metric descriptor. This method does not require a Stackdriver - // account. - rpc GetMetricDescriptor(GetMetricDescriptorRequest) - returns (google.api.MetricDescriptor) { + // Gets a single metric descriptor. This method does not require a Stackdriver account. + rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; @@ -75,8 +76,7 @@ service MetricService { // Creates a new metric descriptor. // User-created metric descriptors define // [custom metrics](/monitoring/custom-metrics). - rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) - returns (google.api.MetricDescriptor) { + rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" @@ -85,15 +85,13 @@ service MetricService { // Deletes a metric descriptor. Only user-created // [custom metrics](/monitoring/custom-metrics) can be deleted. - rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) - returns (google.protobuf.Empty) { + rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; } - // Lists time series that match a filter. This method does not require a - // Stackdriver account. + // Lists time series that match a filter. This method does not require a Stackdriver account. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" @@ -104,8 +102,7 @@ service MetricService { // The response is empty if all time series in the request were written. // If any time series could not be written, a corresponding failure message is // included in the error response. - rpc CreateTimeSeries(CreateTimeSeriesRequest) - returns (google.protobuf.Empty) { + rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v3/{name=projects/*}/timeSeries" body: "*" @@ -247,7 +244,7 @@ message ListTimeSeriesRequest { // example: // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - // metric.label.instance_name = "my-instance-name" + // metric.labels.instance_name = "my-instance-name" string filter = 2; // The time interval for which results should be returned. Only time series @@ -306,6 +303,8 @@ message CreateTimeSeriesRequest { // point must be more recent than any other point in its time series. Each // `TimeSeries` value must fully specify a unique time series by supplying // all label values for the metric and the monitored resource. + // + // The maximum number of `TimeSeries` objects per `Create` request is 200. repeated TimeSeries time_series = 2; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index c87e2ebcc6e..eab1f37d2e9 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index f2812548e9d..4ee97b8f6e5 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.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,7 +17,6 @@ syntax = "proto3"; package google.monitoring.v3; -import "google/api/annotations.proto"; import "google/api/label.proto"; import "google/monitoring/v3/common.proto"; import "google/protobuf/wrappers.proto"; @@ -94,9 +93,7 @@ message NotificationChannel { } // The type of the notification channel. This field matches the - // value of the - // [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] - // field. + // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. string type = 1; // The full REST resource name for this channel. The syntax is: @@ -114,13 +111,13 @@ message NotificationChannel { // An optional human-readable description of this notification channel. This // description may provide additional details, beyond the display - // name, for the channel. This may not exceeed 1024 Unicode characters. + // name, for the channel. This may not exceed 1024 Unicode characters. string description = 4; // Configuration fields that define the channel and its behavior. The // permissible and required labels are specified in the - // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] - // of the `NotificationChannelDescriptor` corresponding to the `type` field. + // [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] of the + // `NotificationChannelDescriptor` corresponding to the `type` field. map labels = 5; // User-supplied key/value data that does not need to conform to diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index e178e0cad07..263acf83b62 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.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. @@ -23,6 +23,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -34,11 +35,15 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The Notification Channel API provides access to configuration that // controls how messages related to incidents are sent. service NotificationChannelService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the descriptors for supported channel types. The use of descriptors // makes it possible for new channel types to be dynamically added. - rpc ListNotificationChannelDescriptors( - ListNotificationChannelDescriptorsRequest) - returns (ListNotificationChannelDescriptorsResponse) { + rpc ListNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest) returns (ListNotificationChannelDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannelDescriptors" }; @@ -46,16 +51,14 @@ service NotificationChannelService { // Gets a single channel descriptor. The descriptor indicates which fields // are expected / permitted for a notification channel of the given type. - rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) - returns (NotificationChannelDescriptor) { + rpc GetNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest) returns (NotificationChannelDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannelDescriptors/*}" }; } // Lists the notification channels that have been created for the project. - rpc ListNotificationChannels(ListNotificationChannelsRequest) - returns (ListNotificationChannelsResponse) { + rpc ListNotificationChannels(ListNotificationChannelsRequest) returns (ListNotificationChannelsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannels" }; @@ -66,8 +69,7 @@ service NotificationChannelService { // response may truncate or omit passwords, API keys, or other private key // matter and thus the response may not be 100% identical to the information // that was supplied in the call to the create method. - rpc GetNotificationChannel(GetNotificationChannelRequest) - returns (NotificationChannel) { + rpc GetNotificationChannel(GetNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannels/*}" }; @@ -75,8 +77,7 @@ service NotificationChannelService { // Creates a new notification channel, representing a single notification // endpoint such as an email address, SMS number, or PagerDuty service. - rpc CreateNotificationChannel(CreateNotificationChannelRequest) - returns (NotificationChannel) { + rpc CreateNotificationChannel(CreateNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*}/notificationChannels" body: "notification_channel" @@ -85,8 +86,7 @@ service NotificationChannelService { // Updates a notification channel. Fields not specified in the field mask // remain unchanged. - rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) - returns (NotificationChannel) { + rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { patch: "/v3/{notification_channel.name=projects/*/notificationChannels/*}" body: "notification_channel" @@ -94,8 +94,7 @@ service NotificationChannelService { } // Deletes a notification channel. - rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) - returns (google.protobuf.Empty) { + rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/notificationChannels/*}" }; @@ -103,9 +102,7 @@ service NotificationChannelService { // Causes a verification code to be delivered to the channel. The code // can then be supplied in `VerifyNotificationChannel` to verify the channel. - rpc SendNotificationChannelVerificationCode( - SendNotificationChannelVerificationCodeRequest) - returns (google.protobuf.Empty) { + rpc SendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode" body: "*" @@ -133,9 +130,7 @@ service NotificationChannelService { // have a shorter expiration (e.g. codes such as "G-123456") whereas // GetVerificationCode() will typically return a much longer, websafe base // 64 encoded string that has a longer expiration time. - rpc GetNotificationChannelVerificationCode( - GetNotificationChannelVerificationCodeRequest) - returns (GetNotificationChannelVerificationCodeResponse) { + rpc GetNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest) returns (GetNotificationChannelVerificationCodeResponse) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode" body: "*" @@ -145,8 +140,7 @@ service NotificationChannelService { // Verifies a `NotificationChannel` by proving receipt of the code // delivered to the channel as a result of calling // `SendNotificationChannelVerificationCode`. - rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) - returns (NotificationChannel) { + rpc VerifyNotificationChannel(VerifyNotificationChannelRequest) returns (NotificationChannel) { option (google.api.http) = { post: "/v3/{name=projects/*/notificationChannels/*}:verify" body: "*" diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto index f7977c288a1..cbcb8f72e87 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.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. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 2850301ac12..5820aa32a99 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.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. @@ -27,12 +27,52 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +// The regions from which an uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // An internal checker allows uptime checks to run on private/internal GCP // resources. message InternalChecker { + option deprecated = true; + + // Operational states for an internal checker. + enum State { + // An internal checker should never be in the unspecified state. + UNSPECIFIED = 0; + + // The checker is being created, provisioned, and configured. A checker in + // this state can be returned by ListInternalCheckers or GetInternalChecker, + // as well as by examining the longrunning.Operation that created it. + CREATING = 1; + + // The checker is running and available for use. A checker in this state + // can be returned by ListInternalCheckers or GetInternalChecker as well + // as by examining the longrunning.Operation that created it. + // If a checker is being torn down, it is neither visible nor usable, so + // there is no "deleting" or "down" state. + RUNNING = 2; + } + // A unique resource name for this InternalChecker. The format is: // - // // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. // // PROJECT_ID is the stackdriver workspace project for the @@ -55,6 +95,26 @@ message InternalChecker { // The GCP project_id where the internal checker lives. Not necessary // the same as the workspace project. string peer_project_id = 6; + + // The current operational state of the internal checker. + State state = 7; +} + +// The supported resource types that can be used as values of +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. +enum GroupResourceType { + // Default value (not valid). + RESOURCE_TYPE_UNSPECIFIED = 0; + + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). + INSTANCE = 1; + + // A group of Amazon ELB load balancers. + AWS_ELB_LOAD_BALANCER = 2; } // This message configures which resources and services to monitor for @@ -89,7 +149,8 @@ message UptimeCheckConfig { // The path to the page to run the check against. Will be combined with the // host (specified within the MonitoredResource) and port to construct the - // full URL. Optional (defaults to "/"). + // full URL. Optional (defaults to "/"). If the provided path does not + // begin with "/", it will be prepended automatically. string path = 2; // The port to the page to run the check against. Will be combined with host @@ -118,6 +179,11 @@ message UptimeCheckConfig { // cause the first to be overwritten by the second. // The maximum number of headers allowed is 100. map headers = 6; + + // Boolean specifying whether to validate SSL certificates. + // Only applies to uptime_url checks. If use_ssl is false, setting this to + // true has no effect. + bool validate_ssl = 7; } // Information required for a TCP uptime check request. @@ -131,8 +197,33 @@ message UptimeCheckConfig { // Used to perform string matching. It allows substring and regular // expressions, together with their negations. message ContentMatcher { + // Options to perform content matching. + enum ContentMatcherOption { + // No content macher option specified. Treated as CONTAINS_STRING. + CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; + + // Allows checking substring matching. + // Default value for previous versions without option. + CONTAINS_STRING = 1; + + // Allows checking negation of substring matching (doesn't contain the + // substring). + NOT_CONTAINS_STRING = 2; + + // Allows checking regular expression matching. + MATCHES_REGEX = 3; + + // Allows checking negation of regular expression matching. + NOT_MATCHES_REGEX = 4; + } + // String or regex content to match (max 1024 bytes) string content = 1; + + // The matcher representing content match options which the check will run + // with. If the field is not specified (in previous versions), the option is + // set to be CONTAINS_STRING which performs content substring matching. + ContentMatcherOption matcher = 2; } // A unique resource name for this UptimeCheckConfig. The format is: @@ -179,7 +270,7 @@ message UptimeCheckConfig { // How often, in seconds, the uptime check is performed. // Currently, the only supported values are `60s` (1 minute), `300s` // (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - // defaults to `300s`. + // defaults to `60s`. google.protobuf.Duration period = 7; // The maximum amount of time to wait for the request to complete (must be @@ -201,16 +292,10 @@ message UptimeCheckConfig { // regions. repeated UptimeCheckRegion selected_regions = 10; - // If this is true, then checks are made only from the 'internal_checkers'. - // If it is false, then checks are made only from the 'selected_regions'. - // It is an error to provide 'selected_regions' when is_internal is true, - // or to provide 'internal_checkers' when is_internal is false. - bool is_internal = 15; - // The internal checkers that this check will egress from. If `is_internal` is // true and this list is empty, the check will egress from all the // InternalCheckers configured for the project that owns this CheckConfig. - repeated InternalChecker internal_checkers = 14; + repeated InternalChecker internal_checkers = 14 [deprecated = true]; } // Contains the region, location, and list of IP @@ -231,41 +316,3 @@ message UptimeCheckIp { // interpreting this field in either IPv4 or IPv6 format. string ip_address = 3; } - -// The regions from which an uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - -// The supported resource types that can be used as values of -// `group_resource.resource_type`. -// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. -// The resource types `gae_app` and `uptime_url` are not valid here because -// group checks on App Engine modules and URLs are not allowed. -enum GroupResourceType { - // Default value (not valid). - RESOURCE_TYPE_UNSPECIFIED = 0; - - // A group of instances from Google Cloud Platform (GCP) or - // Amazon Web Services (AWS). - INSTANCE = 1; - - // A group of Amazon ELB load balancers. - AWS_ELB_LOAD_BALANCER = 2; -} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index ed59114d0c2..2b5105cb71b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.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. @@ -19,8 +19,10 @@ package google.monitoring.v3; import "google/api/annotations.proto"; import "google/monitoring/v3/uptime.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -38,26 +40,29 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, // and then clicking on "Uptime". service UptimeCheckService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + // Lists the existing valid uptime check configurations for the project, // leaving out any invalid configurations. - rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) - returns (ListUptimeCheckConfigsResponse) { + rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; } // Gets a single uptime check configuration. - rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) - returns (UptimeCheckConfig) { + rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; } // Creates a new uptime check configuration. - rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) - returns (UptimeCheckConfig) { + rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" @@ -68,8 +73,7 @@ service UptimeCheckService { // configuration with a new one or replace only certain fields in the current // configuration by specifying the fields to be updated via `"updateMask"`. // Returns the updated configuration. - rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) - returns (UptimeCheckConfig) { + rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" @@ -79,16 +83,14 @@ service UptimeCheckService { // Deletes an uptime check configuration. Note that this method will fail // if the uptime check configuration is referenced by an alert policy or // other dependent configs that would be rendered invalid by the deletion. - rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) - returns (google.protobuf.Empty) { + rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; } // Returns the list of IPs that checkers run from - rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) - returns (ListUptimeCheckIpsResponse) { + rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { option (google.api.http) = { get: "/v3/uptimeCheckIps" }; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 5ab00ee2874..150edcdf26b 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -15,6 +15,10 @@ }, "nested": { "AlertPolicyService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, "methods": { "ListAlertPolicies": { "requestType": "ListAlertPoliciesRequest", @@ -455,6 +459,10 @@ } }, "GroupService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, "methods": { "ListGroups": { "requestType": "ListGroupsRequest", @@ -593,6 +601,10 @@ "name": { "type": "string", "id": 3 + }, + "recursive": { + "type": "bool", + "id": 4 } } }, @@ -662,6 +674,10 @@ } }, "MetricService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read,https://www.googleapis.com/auth/monitoring.write" + }, "methods": { "ListMonitoredResourceDescriptors": { "requestType": "ListMonitoredResourceDescriptorsRequest", @@ -954,6 +970,10 @@ } }, "NotificationChannelService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, "methods": { "ListNotificationChannelDescriptors": { "requestType": "ListNotificationChannelDescriptorsRequest", @@ -1275,6 +1295,10 @@ } }, "UptimeCheckService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, "methods": { "ListUptimeCheckConfigs": { "requestType": "ListUptimeCheckConfigsRequest", @@ -1852,6 +1876,22 @@ } } }, + "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" + }, "MonitoredResourceDescriptor": { "fields": { "name": { diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index e32a1c1c8b5..a1b99d28d21 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -80,6 +80,12 @@ * * This object should have the same structure as [BoolValue]{@link google.protobuf.BoolValue} * + * @property {Object} validity + * Read-only description of how the alert policy is invalid. OK if the alert + * policy is valid. If not OK, the alert policy will not generate incidents. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * * @property {string[]} notificationChannels * Identifies the notification channels to which notifications should be sent * when incidents are opened or closed or when new violations occur on diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index dcccf12de5e..89e4b9b04b3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js @@ -46,9 +46,23 @@ const TypedValue = { }; /** - * A time interval extending just after a start time through an end time. - * If the start time is the same as the end time, then the interval - * represents a single point in time. + * A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time. + * + * * For a `GAUGE` metric, the `startTime` value is technically optional; if + * no value is specified, the start time defaults to the value of the + * end time, and the interval represents a single point in time. Such an + * interval is valid only for `GAUGE` metrics, which are point-in-time + * measurements. + * + * * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier + * than the end time. + * + * * In all cases, the start time of the next interval must be + * at least a microsecond after the end time of the previous interval. + * Because the interval is closed, if the start time of a new interval + * is the same as the end time of the previous interval, data written + * at the new start time could overwrite data written at the previous + * end time. * * @property {Object} endTime * Required. The end of the time interval. diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js index 370c844e4ca..2a96d95f761 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js @@ -137,12 +137,18 @@ const UpdateGroupRequest = { }; /** - * The `DeleteGroup` request. You can only delete a group if it has no children. + * The `DeleteGroup` request. The default behavior is to be able to delete a + * single group without any descendants. * * @property {string} name * The group to delete. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * + * @property {boolean} recursive + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * * @typedef DeleteGroupRequest * @memberof google.monitoring.v3 * @see [google.monitoring.v3.DeleteGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index aa044573d78..c19c916ec16 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -210,7 +210,7 @@ const DeleteMetricDescriptorRequest = { * example: * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.label.instance_name = "my-instance-name" + * metric.labels.instance_name = "my-instance-name" * * @property {Object} interval * The time interval for which results should be returned. Only time series @@ -317,6 +317,8 @@ const ListTimeSeriesResponse = { * `TimeSeries` value must fully specify a unique time series by supplying * all label values for the metric and the monitored resource. * + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} * * @typedef CreateTimeSeriesRequest diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js index 463a6624bac..ec50625c3b4 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js @@ -70,9 +70,7 @@ const NotificationChannelDescriptor = { * * @property {string} type * The type of the notification channel. This field matches the - * value of the - * NotificationChannelDescriptor.type - * field. + * value of the NotificationChannelDescriptor.type field. * * @property {string} name * The full REST resource name for this channel. The syntax is: @@ -90,13 +88,13 @@ const NotificationChannelDescriptor = { * @property {string} description * An optional human-readable description of this notification channel. This * description may provide additional details, beyond the display - * name, for the channel. This may not exceeed 1024 Unicode characters. + * name, for the channel. This may not exceed 1024 Unicode characters. * * @property {Object.} labels * Configuration fields that define the channel and its behavior. The * permissible and required labels are specified in the - * NotificationChannelDescriptor.labels - * of the `NotificationChannelDescriptor` corresponding to the `type` field. + * NotificationChannelDescriptor.labels of the + * `NotificationChannelDescriptor` corresponding to the `type` field. * * @property {Object.} userLabels * User-supplied key/value data that does not need to conform to diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 6e735b9cfc4..31dc58ced99 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -22,7 +22,6 @@ * @property {string} name * A unique resource name for this InternalChecker. The format is: * - * * `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. * * PROJECT_ID is the stackdriver workspace project for the @@ -45,12 +44,47 @@ * The GCP project_id where the internal checker lives. Not necessary * the same as the workspace project. * + * @property {number} state + * The current operational state of the internal checker. + * + * The number should be among the values of [State]{@link google.monitoring.v3.State} + * * @typedef InternalChecker * @memberof google.monitoring.v3 * @see [google.monitoring.v3.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} */ const InternalChecker = { // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Operational states for an internal checker. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ + State: { + + /** + * An internal checker should never be in the unspecified state. + */ + UNSPECIFIED: 0, + + /** + * The checker is being created, provisioned, and configured. A checker in + * this state can be returned by ListInternalCheckers or GetInternalChecker, + * as well as by examining the longrunning.Operation that created it. + */ + CREATING: 1, + + /** + * The checker is running and available for use. A checker in this state + * can be returned by ListInternalCheckers or GetInternalChecker as well + * as by examining the longrunning.Operation that created it. + * If a checker is being torn down, it is neither visible nor usable, so + * there is no "deleting" or "down" state. + */ + RUNNING: 2 + } }; /** @@ -104,7 +138,7 @@ const InternalChecker = { * How often, in seconds, the uptime check is performed. * Currently, the only supported values are `60s` (1 minute), `300s` * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - * defaults to `300s`. + * defaults to `60s`. * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * @@ -133,12 +167,6 @@ const InternalChecker = { * * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * - * @property {boolean} isInternal - * If this is true, then checks are made only from the 'internal_checkers'. - * If it is false, then checks are made only from the 'selected_regions'. - * It is an error to provide 'selected_regions' when is_internal is true, - * or to provide 'internal_checkers' when is_internal is false. - * * @property {Object[]} internalCheckers * The internal checkers that this check will egress from. If `is_internal` is * true and this list is empty, the check will egress from all the @@ -183,7 +211,8 @@ const UptimeCheckConfig = { * @property {string} path * The path to the page to run the check against. Will be combined with the * host (specified within the MonitoredResource) and port to construct the - * full URL. Optional (defaults to "/"). + * full URL. Optional (defaults to "/"). If the provided path does not + * begin with "/", it will be prepended automatically. * * @property {number} port * The port to the page to run the check against. Will be combined with host @@ -214,6 +243,11 @@ const UptimeCheckConfig = { * cause the first to be overwritten by the second. * The maximum number of headers allowed is 100. * + * @property {boolean} validateSsl + * Boolean specifying whether to validate SSL certificates. + * Only applies to uptime_url checks. If use_ssl is false, setting this to + * true has no effect. + * * @typedef HttpCheck * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UptimeCheckConfig.HttpCheck definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} @@ -264,12 +298,55 @@ const UptimeCheckConfig = { * @property {string} content * String or regex content to match (max 1024 bytes) * + * @property {number} matcher + * The matcher representing content match options which the check will run + * with. If the field is not specified (in previous versions), the option is + * set to be CONTAINS_STRING which performs content substring matching. + * + * The number should be among the values of [ContentMatcherOption]{@link google.monitoring.v3.ContentMatcherOption} + * * @typedef ContentMatcher * @memberof google.monitoring.v3 * @see [google.monitoring.v3.UptimeCheckConfig.ContentMatcher definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} */ ContentMatcher: { // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Options to perform content matching. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ + ContentMatcherOption: { + + /** + * No content macher option specified. Treated as CONTAINS_STRING. + */ + CONTENT_MATCHER_OPTION_UNSPECIFIED: 0, + + /** + * Allows checking substring matching. + * Default value for previous versions without option. + */ + CONTAINS_STRING: 1, + + /** + * Allows checking negation of substring matching (doesn't contain the + * substring). + */ + NOT_CONTAINS_STRING: 2, + + /** + * Allows checking regular expression matching. + */ + MATCHES_REGEX: 3, + + /** + * Allows checking negation of regular expression matching. + */ + NOT_MATCHES_REGEX: 4 + } } }; diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 83110c7deb0..b6f056c85a5 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -634,6 +634,10 @@ class GroupServiceClient { * @param {string} request.name * The group to delete. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. + * @param {boolean} [request.recursive] + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default 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/interfaces/CallOptions.html} for the details. diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 6b0536502b8..bc948eb8200 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -256,8 +256,7 @@ class MetricServiceClient { // ------------------- /** - * Lists monitored resource descriptors that match a filter. This method does - * not require a Stackdriver account. + * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -436,8 +435,7 @@ class MetricServiceClient { } /** - * Gets a single monitored resource descriptor. This method does not require a - * Stackdriver account. + * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -498,8 +496,7 @@ class MetricServiceClient { } /** - * Lists metric descriptors that match a filter. This method does not require - * a Stackdriver account. + * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -680,8 +677,7 @@ class MetricServiceClient { } /** - * Gets a single metric descriptor. This method does not require a Stackdriver - * account. + * Gets a single metric descriptor. This method does not require a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -863,8 +859,7 @@ class MetricServiceClient { } /** - * Lists time series that match a filter. This method does not require a - * Stackdriver account. + * Lists time series that match a filter. This method does not require a Stackdriver account. * * @param {Object} request * The request object that will be sent. @@ -878,7 +873,7 @@ class MetricServiceClient { * example: * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.label.instance_name = "my-instance-name" + * metric.labels.instance_name = "my-instance-name" * @param {Object} request.interval * The time interval for which results should be returned. Only time series * that contain data points in the specified interval are included @@ -1036,7 +1031,7 @@ class MetricServiceClient { * example: * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.label.instance_name = "my-instance-name" + * metric.labels.instance_name = "my-instance-name" * @param {Object} request.interval * The time interval for which results should be returned. Only time series * that contain data points in the specified interval are included @@ -1121,6 +1116,8 @@ class MetricServiceClient { * `TimeSeries` value must fully specify a unique time series by supplying * all label values for the metric and the monitored resource. * + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 756897b0796..af04b8f2473 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-31T11:14:27.717107Z", + "updateTime": "2019-09-12T11:20:43.445733Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.1", - "dockerImage": "googleapis/artman@sha256:7c20f006c7a62d9d782e2665647d52290c37a952ef3cd134624d5dd62b3f71bd" + "version": "0.36.2", + "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "82809578652607c8ee29d9e199c21f28f81a03e0", - "internalRef": "266247326" + "sha": "1cb29d0fd49437d8e5d7de327e258739e998f01c", + "internalRef": "268598527" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index f9411f5f7a6..fa88116cc9e 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -2183,11 +2183,9 @@ describe('UptimeCheckServiceClient', () => { // Mock response const name2 = 'name2-1052831874'; const displayName = 'displayName1615086568'; - const isInternal = true; const expectedResponse = { name: name2, displayName: displayName, - isInternal: isInternal, }; // Mock Grpc layer @@ -2252,11 +2250,9 @@ describe('UptimeCheckServiceClient', () => { // Mock response const name = 'name3373707'; const displayName = 'displayName1615086568'; - const isInternal = true; const expectedResponse = { name: name, displayName: displayName, - isInternal: isInternal, }; // Mock Grpc layer @@ -2318,11 +2314,9 @@ describe('UptimeCheckServiceClient', () => { // Mock response const name = 'name3373707'; const displayName = 'displayName1615086568'; - const isInternal = true; const expectedResponse = { name: name, displayName: displayName, - isInternal: isInternal, }; // Mock Grpc layer From 6cadfb84f00ec9cefb26c58622694b3f8519bd20 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Sep 2019 09:55:08 -0700 Subject: [PATCH 228/422] chore: release 1.3.0 (#290) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-monitoring/CHANGELOG.md | 14 ++++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index aa8333a5d26..f9fae4831d9 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,20 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.3.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.3...v1.3.0) (2019-09-16) + + +### Bug Fixes + +* **deps:** update dependency yargs to v14 ([68a0867](https://www.github.com/googleapis/nodejs-monitoring/commit/68a0867)) +* include the correct version of node in a header ([#286](https://www.github.com/googleapis/nodejs-monitoring/issues/286)) ([0c758f9](https://www.github.com/googleapis/nodejs-monitoring/commit/0c758f9)) + + +### Features + +* load protos from JSON, grpc-fallback support ([435c5d0](https://www.github.com/googleapis/nodejs-monitoring/commit/435c5d0)) +* **GroupServiceClient:** support recursive option when deleting group ([#294](https://www.github.com/googleapis/nodejs-monitoring/issues/294)) ([f7749af](https://www.github.com/googleapis/nodejs-monitoring/commit/f7749af)) + ### [1.2.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.2...v1.2.3) (2019-08-03) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 27c237b02d4..c3474872a5b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.2.3", + "version": "1.3.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 594389e7b2b..a412031c765 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.2.3", + "@google-cloud/monitoring": "^1.3.0", "yargs": "^14.0.0" }, "devDependencies": { From 89d2daddc5d14e64476ce7ade19867af51562aa8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 27 Sep 2019 10:15:20 -0700 Subject: [PATCH 229/422] feat: .d.ts for protos (#298) --- .../google-cloud-monitoring/.eslintignore | 1 + .../protos/protos.d.ts | 14834 +++++++ .../google-cloud-monitoring/protos/protos.js | 36554 ++++++++++++++++ .../google-cloud-monitoring/synth.metadata | 10 +- 4 files changed, 51394 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/protos.d.ts create mode 100644 packages/google-cloud-monitoring/protos/protos.js diff --git a/packages/google-cloud-monitoring/.eslintignore b/packages/google-cloud-monitoring/.eslintignore index f0c7aead4bf..09b31fe735a 100644 --- a/packages/google-cloud-monitoring/.eslintignore +++ b/packages/google-cloud-monitoring/.eslintignore @@ -2,3 +2,4 @@ src/**/doc/* build/ docs/ +protos/ diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts new file mode 100644 index 00000000000..adee550a3d2 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -0,0 +1,14834 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace monitoring. */ + namespace monitoring { + + /** Namespace v3. */ + namespace v3 { + + /** Represents an AlertPolicyService */ + class AlertPolicyService extends $protobuf.rpc.Service { + + /** + * Constructs a new AlertPolicyService 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 AlertPolicyService 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): AlertPolicyService; + + /** + * Calls ListAlertPolicies. + * @param request ListAlertPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAlertPoliciesResponse + */ + public listAlertPolicies(request: google.monitoring.v3.IListAlertPoliciesRequest, callback: google.monitoring.v3.AlertPolicyService.ListAlertPoliciesCallback): void; + + /** + * Calls ListAlertPolicies. + * @param request ListAlertPoliciesRequest message or plain object + * @returns Promise + */ + public listAlertPolicies(request: google.monitoring.v3.IListAlertPoliciesRequest): Promise; + + /** + * Calls GetAlertPolicy. + * @param request GetAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AlertPolicy + */ + public getAlertPolicy(request: google.monitoring.v3.IGetAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.GetAlertPolicyCallback): void; + + /** + * Calls GetAlertPolicy. + * @param request GetAlertPolicyRequest message or plain object + * @returns Promise + */ + public getAlertPolicy(request: google.monitoring.v3.IGetAlertPolicyRequest): Promise; + + /** + * Calls CreateAlertPolicy. + * @param request CreateAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AlertPolicy + */ + public createAlertPolicy(request: google.monitoring.v3.ICreateAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.CreateAlertPolicyCallback): void; + + /** + * Calls CreateAlertPolicy. + * @param request CreateAlertPolicyRequest message or plain object + * @returns Promise + */ + public createAlertPolicy(request: google.monitoring.v3.ICreateAlertPolicyRequest): Promise; + + /** + * Calls DeleteAlertPolicy. + * @param request DeleteAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAlertPolicy(request: google.monitoring.v3.IDeleteAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.DeleteAlertPolicyCallback): void; + + /** + * Calls DeleteAlertPolicy. + * @param request DeleteAlertPolicyRequest message or plain object + * @returns Promise + */ + public deleteAlertPolicy(request: google.monitoring.v3.IDeleteAlertPolicyRequest): Promise; + + /** + * Calls UpdateAlertPolicy. + * @param request UpdateAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AlertPolicy + */ + public updateAlertPolicy(request: google.monitoring.v3.IUpdateAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.UpdateAlertPolicyCallback): void; + + /** + * Calls UpdateAlertPolicy. + * @param request UpdateAlertPolicyRequest message or plain object + * @returns Promise + */ + public updateAlertPolicy(request: google.monitoring.v3.IUpdateAlertPolicyRequest): Promise; + } + + namespace AlertPolicyService { + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. + * @param error Error, if any + * @param [response] ListAlertPoliciesResponse + */ + type ListAlertPoliciesCallback = (error: (Error|null), response?: google.monitoring.v3.ListAlertPoliciesResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. + * @param error Error, if any + * @param [response] AlertPolicy + */ + type GetAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. + * @param error Error, if any + * @param [response] AlertPolicy + */ + type CreateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAlertPolicyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. + * @param error Error, if any + * @param [response] AlertPolicy + */ + type UpdateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; + } + + /** Properties of a CreateAlertPolicyRequest. */ + interface ICreateAlertPolicyRequest { + + /** CreateAlertPolicyRequest name */ + name?: (string|null); + + /** CreateAlertPolicyRequest alertPolicy */ + alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + } + + /** Represents a CreateAlertPolicyRequest. */ + class CreateAlertPolicyRequest implements ICreateAlertPolicyRequest { + + /** + * Constructs a new CreateAlertPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateAlertPolicyRequest); + + /** CreateAlertPolicyRequest name. */ + public name: string; + + /** CreateAlertPolicyRequest alertPolicy. */ + public alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + + /** + * Creates a new CreateAlertPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAlertPolicyRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateAlertPolicyRequest): google.monitoring.v3.CreateAlertPolicyRequest; + + /** + * Encodes the specified CreateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @param message CreateAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @param message CreateAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateAlertPolicyRequest; + + /** + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateAlertPolicyRequest; + + /** + * Verifies a CreateAlertPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAlertPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateAlertPolicyRequest; + + /** + * Creates a plain object from a CreateAlertPolicyRequest message. Also converts values to other types if specified. + * @param message CreateAlertPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAlertPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetAlertPolicyRequest. */ + interface IGetAlertPolicyRequest { + + /** GetAlertPolicyRequest name */ + name?: (string|null); + } + + /** Represents a GetAlertPolicyRequest. */ + class GetAlertPolicyRequest implements IGetAlertPolicyRequest { + + /** + * Constructs a new GetAlertPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetAlertPolicyRequest); + + /** GetAlertPolicyRequest name. */ + public name: string; + + /** + * Creates a new GetAlertPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAlertPolicyRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetAlertPolicyRequest): google.monitoring.v3.GetAlertPolicyRequest; + + /** + * Encodes the specified GetAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. + * @param message GetAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. + * @param message GetAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetAlertPolicyRequest; + + /** + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetAlertPolicyRequest; + + /** + * Verifies a GetAlertPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAlertPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetAlertPolicyRequest; + + /** + * Creates a plain object from a GetAlertPolicyRequest message. Also converts values to other types if specified. + * @param message GetAlertPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAlertPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAlertPoliciesRequest. */ + interface IListAlertPoliciesRequest { + + /** ListAlertPoliciesRequest name */ + name?: (string|null); + + /** ListAlertPoliciesRequest filter */ + filter?: (string|null); + + /** ListAlertPoliciesRequest orderBy */ + orderBy?: (string|null); + + /** ListAlertPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListAlertPoliciesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAlertPoliciesRequest. */ + class ListAlertPoliciesRequest implements IListAlertPoliciesRequest { + + /** + * Constructs a new ListAlertPoliciesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListAlertPoliciesRequest); + + /** ListAlertPoliciesRequest name. */ + public name: string; + + /** ListAlertPoliciesRequest filter. */ + public filter: string; + + /** ListAlertPoliciesRequest orderBy. */ + public orderBy: string; + + /** ListAlertPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListAlertPoliciesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAlertPoliciesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAlertPoliciesRequest instance + */ + public static create(properties?: google.monitoring.v3.IListAlertPoliciesRequest): google.monitoring.v3.ListAlertPoliciesRequest; + + /** + * Encodes the specified ListAlertPoliciesRequest message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. + * @param message ListAlertPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListAlertPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAlertPoliciesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. + * @param message ListAlertPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListAlertPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAlertPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListAlertPoliciesRequest; + + /** + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAlertPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListAlertPoliciesRequest; + + /** + * Verifies a ListAlertPoliciesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAlertPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAlertPoliciesRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListAlertPoliciesRequest; + + /** + * Creates a plain object from a ListAlertPoliciesRequest message. Also converts values to other types if specified. + * @param message ListAlertPoliciesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListAlertPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAlertPoliciesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListAlertPoliciesResponse. */ + interface IListAlertPoliciesResponse { + + /** ListAlertPoliciesResponse alertPolicies */ + alertPolicies?: (google.monitoring.v3.IAlertPolicy[]|null); + + /** ListAlertPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAlertPoliciesResponse. */ + class ListAlertPoliciesResponse implements IListAlertPoliciesResponse { + + /** + * Constructs a new ListAlertPoliciesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListAlertPoliciesResponse); + + /** ListAlertPoliciesResponse alertPolicies. */ + public alertPolicies: google.monitoring.v3.IAlertPolicy[]; + + /** ListAlertPoliciesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAlertPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAlertPoliciesResponse instance + */ + public static create(properties?: google.monitoring.v3.IListAlertPoliciesResponse): google.monitoring.v3.ListAlertPoliciesResponse; + + /** + * Encodes the specified ListAlertPoliciesResponse message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. + * @param message ListAlertPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListAlertPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAlertPoliciesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. + * @param message ListAlertPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListAlertPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAlertPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListAlertPoliciesResponse; + + /** + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAlertPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListAlertPoliciesResponse; + + /** + * Verifies a ListAlertPoliciesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAlertPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAlertPoliciesResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListAlertPoliciesResponse; + + /** + * Creates a plain object from a ListAlertPoliciesResponse message. Also converts values to other types if specified. + * @param message ListAlertPoliciesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListAlertPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAlertPoliciesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateAlertPolicyRequest. */ + interface IUpdateAlertPolicyRequest { + + /** UpdateAlertPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAlertPolicyRequest alertPolicy */ + alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + } + + /** Represents an UpdateAlertPolicyRequest. */ + class UpdateAlertPolicyRequest implements IUpdateAlertPolicyRequest { + + /** + * Constructs a new UpdateAlertPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateAlertPolicyRequest); + + /** UpdateAlertPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAlertPolicyRequest alertPolicy. */ + public alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + + /** + * Creates a new UpdateAlertPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAlertPolicyRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateAlertPolicyRequest): google.monitoring.v3.UpdateAlertPolicyRequest; + + /** + * Encodes the specified UpdateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. + * @param message UpdateAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. + * @param message UpdateAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateAlertPolicyRequest; + + /** + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateAlertPolicyRequest; + + /** + * Verifies an UpdateAlertPolicyRequest message. + * @param message Plain 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 UpdateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAlertPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateAlertPolicyRequest; + + /** + * Creates a plain object from an UpdateAlertPolicyRequest message. Also converts values to other types if specified. + * @param message UpdateAlertPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAlertPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteAlertPolicyRequest. */ + interface IDeleteAlertPolicyRequest { + + /** DeleteAlertPolicyRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAlertPolicyRequest. */ + class DeleteAlertPolicyRequest implements IDeleteAlertPolicyRequest { + + /** + * Constructs a new DeleteAlertPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteAlertPolicyRequest); + + /** DeleteAlertPolicyRequest name. */ + public name: string; + + /** + * Creates a new DeleteAlertPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAlertPolicyRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteAlertPolicyRequest): google.monitoring.v3.DeleteAlertPolicyRequest; + + /** + * Encodes the specified DeleteAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. + * @param message DeleteAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. + * @param message DeleteAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteAlertPolicyRequest; + + /** + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteAlertPolicyRequest; + + /** + * Verifies a DeleteAlertPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAlertPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteAlertPolicyRequest; + + /** + * Creates a plain object from a DeleteAlertPolicyRequest message. Also converts values to other types if specified. + * @param message DeleteAlertPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAlertPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AlertPolicy. */ + interface IAlertPolicy { + + /** AlertPolicy name */ + name?: (string|null); + + /** AlertPolicy displayName */ + displayName?: (string|null); + + /** AlertPolicy documentation */ + documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null); + + /** AlertPolicy userLabels */ + userLabels?: ({ [k: string]: string }|null); + + /** AlertPolicy conditions */ + conditions?: (google.monitoring.v3.AlertPolicy.ICondition[]|null); + + /** AlertPolicy combiner */ + combiner?: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|null); + + /** AlertPolicy enabled */ + enabled?: (google.protobuf.IBoolValue|null); + + /** AlertPolicy notificationChannels */ + notificationChannels?: (string[]|null); + + /** AlertPolicy creationRecord */ + creationRecord?: (google.monitoring.v3.IMutationRecord|null); + + /** AlertPolicy mutationRecord */ + mutationRecord?: (google.monitoring.v3.IMutationRecord|null); + } + + /** Represents an AlertPolicy. */ + class AlertPolicy implements IAlertPolicy { + + /** + * Constructs a new AlertPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IAlertPolicy); + + /** AlertPolicy name. */ + public name: string; + + /** AlertPolicy displayName. */ + public displayName: string; + + /** AlertPolicy documentation. */ + public documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null); + + /** AlertPolicy userLabels. */ + public userLabels: { [k: string]: string }; + + /** AlertPolicy conditions. */ + public conditions: google.monitoring.v3.AlertPolicy.ICondition[]; + + /** AlertPolicy combiner. */ + public combiner: google.monitoring.v3.AlertPolicy.ConditionCombinerType; + + /** AlertPolicy enabled. */ + public enabled?: (google.protobuf.IBoolValue|null); + + /** AlertPolicy notificationChannels. */ + public notificationChannels: string[]; + + /** AlertPolicy creationRecord. */ + public creationRecord?: (google.monitoring.v3.IMutationRecord|null); + + /** AlertPolicy mutationRecord. */ + public mutationRecord?: (google.monitoring.v3.IMutationRecord|null); + + /** + * Creates a new AlertPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AlertPolicy instance + */ + public static create(properties?: google.monitoring.v3.IAlertPolicy): google.monitoring.v3.AlertPolicy; + + /** + * Encodes the specified AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. + * @param message AlertPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. + * @param message AlertPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlertPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlertPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy; + + /** + * Decodes an AlertPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlertPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy; + + /** + * Verifies an AlertPolicy message. + * @param message Plain 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 AlertPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlertPolicy + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy; + + /** + * Creates a plain object from an AlertPolicy message. Also converts values to other types if specified. + * @param message AlertPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlertPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AlertPolicy { + + /** Properties of a Documentation. */ + interface IDocumentation { + + /** Documentation content */ + content?: (string|null); + + /** Documentation mimeType */ + mimeType?: (string|null); + } + + /** Represents a Documentation. */ + class Documentation implements IDocumentation { + + /** + * Constructs a new Documentation. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.IDocumentation); + + /** Documentation content. */ + public content: string; + + /** Documentation mimeType. */ + public mimeType: string; + + /** + * Creates a new Documentation instance using the specified properties. + * @param [properties] Properties to set + * @returns Documentation instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.IDocumentation): google.monitoring.v3.AlertPolicy.Documentation; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Documentation; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Documentation; + + /** + * Verifies a Documentation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Documentation + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Documentation; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @param message Documentation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Documentation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Condition. */ + interface ICondition { + + /** Condition name */ + name?: (string|null); + + /** Condition displayName */ + displayName?: (string|null); + + /** Condition conditionThreshold */ + conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null); + + /** Condition conditionAbsent */ + conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + } + + /** Represents a Condition. */ + class Condition implements ICondition { + + /** + * Constructs a new Condition. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.ICondition); + + /** Condition name. */ + public name: string; + + /** Condition displayName. */ + public displayName: string; + + /** Condition conditionThreshold. */ + public conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null); + + /** Condition conditionAbsent. */ + public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + + /** Condition condition. */ + public condition?: ("conditionThreshold"|"conditionAbsent"); + + /** + * Creates a new Condition instance using the specified properties. + * @param [properties] Properties to set + * @returns Condition instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.ICondition): google.monitoring.v3.AlertPolicy.Condition; + + /** + * Encodes the specified Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Condition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition; + + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition; + + /** + * Verifies a Condition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Condition + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition; + + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @param message Condition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Condition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Condition { + + /** Properties of a Trigger. */ + interface ITrigger { + + /** Trigger count */ + count?: (number|null); + + /** Trigger percent */ + percent?: (number|null); + } + + /** Represents a Trigger. */ + class Trigger implements ITrigger { + + /** + * Constructs a new Trigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger); + + /** Trigger count. */ + public count: number; + + /** Trigger percent. */ + public percent: number; + + /** Trigger type. */ + public type?: ("count"|"percent"); + + /** + * Creates a new Trigger instance using the specified properties. + * @param [properties] Properties to set + * @returns Trigger instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger): google.monitoring.v3.AlertPolicy.Condition.Trigger; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.Trigger; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.Trigger; + + /** + * Verifies a Trigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trigger + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.Trigger; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @param message Trigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MetricThreshold. */ + interface IMetricThreshold { + + /** MetricThreshold filter */ + filter?: (string|null); + + /** MetricThreshold aggregations */ + aggregations?: (google.monitoring.v3.IAggregation[]|null); + + /** MetricThreshold denominatorFilter */ + denominatorFilter?: (string|null); + + /** MetricThreshold denominatorAggregations */ + denominatorAggregations?: (google.monitoring.v3.IAggregation[]|null); + + /** MetricThreshold comparison */ + comparison?: (google.monitoring.v3.ComparisonType|null); + + /** MetricThreshold thresholdValue */ + thresholdValue?: (number|null); + + /** MetricThreshold duration */ + duration?: (google.protobuf.IDuration|null); + + /** MetricThreshold trigger */ + trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + } + + /** Represents a MetricThreshold. */ + class MetricThreshold implements IMetricThreshold { + + /** + * Constructs a new MetricThreshold. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold); + + /** MetricThreshold filter. */ + public filter: string; + + /** MetricThreshold aggregations. */ + public aggregations: google.monitoring.v3.IAggregation[]; + + /** MetricThreshold denominatorFilter. */ + public denominatorFilter: string; + + /** MetricThreshold denominatorAggregations. */ + public denominatorAggregations: google.monitoring.v3.IAggregation[]; + + /** MetricThreshold comparison. */ + public comparison: google.monitoring.v3.ComparisonType; + + /** MetricThreshold thresholdValue. */ + public thresholdValue: number; + + /** MetricThreshold duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** MetricThreshold trigger. */ + public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + + /** + * Creates a new MetricThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricThreshold instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; + + /** + * Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @param message MetricThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @param message MetricThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricThreshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; + + /** + * Decodes a MetricThreshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; + + /** + * Verifies a MetricThreshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricThreshold + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; + + /** + * Creates a plain object from a MetricThreshold message. Also converts values to other types if specified. + * @param message MetricThreshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricThreshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MetricAbsence. */ + interface IMetricAbsence { + + /** MetricAbsence filter */ + filter?: (string|null); + + /** MetricAbsence aggregations */ + aggregations?: (google.monitoring.v3.IAggregation[]|null); + + /** MetricAbsence duration */ + duration?: (google.protobuf.IDuration|null); + + /** MetricAbsence trigger */ + trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + } + + /** Represents a MetricAbsence. */ + class MetricAbsence implements IMetricAbsence { + + /** + * Constructs a new MetricAbsence. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence); + + /** MetricAbsence filter. */ + public filter: string; + + /** MetricAbsence aggregations. */ + public aggregations: google.monitoring.v3.IAggregation[]; + + /** MetricAbsence duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** MetricAbsence trigger. */ + public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + + /** + * Creates a new MetricAbsence instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricAbsence instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Encodes the specified MetricAbsence message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @param message MetricAbsence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricAbsence message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @param message MetricAbsence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Verifies a MetricAbsence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricAbsence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricAbsence + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Creates a plain object from a MetricAbsence message. Also converts values to other types if specified. + * @param message MetricAbsence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricAbsence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricAbsence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** ConditionCombinerType enum. */ + enum ConditionCombinerType { + COMBINE_UNSPECIFIED = 0, + AND = 1, + OR = 2, + AND_WITH_MATCHING_RESOURCE = 3 + } + } + + /** Properties of a TypedValue. */ + interface ITypedValue { + + /** TypedValue boolValue */ + boolValue?: (boolean|null); + + /** TypedValue int64Value */ + int64Value?: (number|Long|null); + + /** TypedValue doubleValue */ + doubleValue?: (number|null); + + /** TypedValue stringValue */ + stringValue?: (string|null); + + /** TypedValue distributionValue */ + distributionValue?: (google.api.IDistribution|null); + } + + /** Represents a TypedValue. */ + class TypedValue implements ITypedValue { + + /** + * Constructs a new TypedValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ITypedValue); + + /** TypedValue boolValue. */ + public boolValue: boolean; + + /** TypedValue int64Value. */ + public int64Value: (number|Long); + + /** TypedValue doubleValue. */ + public doubleValue: number; + + /** TypedValue stringValue. */ + public stringValue: string; + + /** TypedValue distributionValue. */ + public distributionValue?: (google.api.IDistribution|null); + + /** TypedValue value. */ + public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); + + /** + * Creates a new TypedValue instance using the specified properties. + * @param [properties] Properties to set + * @returns TypedValue instance + */ + public static create(properties?: google.monitoring.v3.ITypedValue): google.monitoring.v3.TypedValue; + + /** + * Encodes the specified TypedValue message. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TypedValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TypedValue; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TypedValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TypedValue; + + /** + * Verifies a TypedValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TypedValue + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TypedValue; + + /** + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * @param message TypedValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TypedValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeInterval. */ + interface ITimeInterval { + + /** TimeInterval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** TimeInterval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeInterval. */ + class TimeInterval implements ITimeInterval { + + /** + * Constructs a new TimeInterval. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ITimeInterval); + + /** TimeInterval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** TimeInterval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TimeInterval instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeInterval instance + */ + public static create(properties?: google.monitoring.v3.ITimeInterval): google.monitoring.v3.TimeInterval; + + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeInterval; + + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeInterval; + + /** + * Verifies a TimeInterval message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeInterval + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeInterval; + + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @param message TimeInterval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeInterval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Aggregation. */ + interface IAggregation { + + /** Aggregation alignmentPeriod */ + alignmentPeriod?: (google.protobuf.IDuration|null); + + /** Aggregation perSeriesAligner */ + perSeriesAligner?: (google.monitoring.v3.Aggregation.Aligner|null); + + /** Aggregation crossSeriesReducer */ + crossSeriesReducer?: (google.monitoring.v3.Aggregation.Reducer|null); + + /** Aggregation groupByFields */ + groupByFields?: (string[]|null); + } + + /** Represents an Aggregation. */ + class Aggregation implements IAggregation { + + /** + * Constructs a new Aggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IAggregation); + + /** Aggregation alignmentPeriod. */ + public alignmentPeriod?: (google.protobuf.IDuration|null); + + /** Aggregation perSeriesAligner. */ + public perSeriesAligner: google.monitoring.v3.Aggregation.Aligner; + + /** Aggregation crossSeriesReducer. */ + public crossSeriesReducer: google.monitoring.v3.Aggregation.Reducer; + + /** Aggregation groupByFields. */ + public groupByFields: string[]; + + /** + * Creates a new Aggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregation instance + */ + public static create(properties?: google.monitoring.v3.IAggregation): google.monitoring.v3.Aggregation; + + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Aggregation; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Aggregation; + + /** + * Verifies an Aggregation message. + * @param message Plain 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 Aggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregation + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Aggregation; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @param message Aggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Aggregation { + + /** Aligner enum. */ + enum Aligner { + ALIGN_NONE = 0, + ALIGN_DELTA = 1, + ALIGN_RATE = 2, + ALIGN_INTERPOLATE = 3, + ALIGN_NEXT_OLDER = 4, + ALIGN_MIN = 10, + ALIGN_MAX = 11, + ALIGN_MEAN = 12, + ALIGN_COUNT = 13, + ALIGN_SUM = 14, + ALIGN_STDDEV = 15, + ALIGN_COUNT_TRUE = 16, + ALIGN_COUNT_FALSE = 24, + ALIGN_FRACTION_TRUE = 17, + ALIGN_PERCENTILE_99 = 18, + ALIGN_PERCENTILE_95 = 19, + ALIGN_PERCENTILE_50 = 20, + ALIGN_PERCENTILE_05 = 21, + ALIGN_PERCENT_CHANGE = 23 + } + + /** Reducer enum. */ + enum Reducer { + REDUCE_NONE = 0, + REDUCE_MEAN = 1, + REDUCE_MIN = 2, + REDUCE_MAX = 3, + REDUCE_SUM = 4, + REDUCE_STDDEV = 5, + REDUCE_COUNT = 6, + REDUCE_COUNT_TRUE = 7, + REDUCE_COUNT_FALSE = 15, + REDUCE_FRACTION_TRUE = 8, + REDUCE_PERCENTILE_99 = 9, + REDUCE_PERCENTILE_95 = 10, + REDUCE_PERCENTILE_50 = 11, + REDUCE_PERCENTILE_05 = 12 + } + } + + /** ComparisonType enum. */ + enum ComparisonType { + COMPARISON_UNSPECIFIED = 0, + COMPARISON_GT = 1, + COMPARISON_GE = 2, + COMPARISON_LT = 3, + COMPARISON_LE = 4, + COMPARISON_EQ = 5, + COMPARISON_NE = 6 + } + + /** ServiceTier enum. */ + enum ServiceTier { + SERVICE_TIER_UNSPECIFIED = 0, + SERVICE_TIER_BASIC = 1, + SERVICE_TIER_PREMIUM = 2 + } + + /** Properties of a MutationRecord. */ + interface IMutationRecord { + + /** MutationRecord mutateTime */ + mutateTime?: (google.protobuf.ITimestamp|null); + + /** MutationRecord mutatedBy */ + mutatedBy?: (string|null); + } + + /** Represents a MutationRecord. */ + class MutationRecord implements IMutationRecord { + + /** + * Constructs a new MutationRecord. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IMutationRecord); + + /** MutationRecord mutateTime. */ + public mutateTime?: (google.protobuf.ITimestamp|null); + + /** MutationRecord mutatedBy. */ + public mutatedBy: string; + + /** + * Creates a new MutationRecord instance using the specified properties. + * @param [properties] Properties to set + * @returns MutationRecord instance + */ + public static create(properties?: google.monitoring.v3.IMutationRecord): google.monitoring.v3.MutationRecord; + + /** + * Encodes the specified MutationRecord message. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @param message MutationRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IMutationRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutationRecord message, length delimited. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @param message MutationRecord message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IMutationRecord, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutationRecord message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.MutationRecord; + + /** + * Decodes a MutationRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.MutationRecord; + + /** + * Verifies a MutationRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutationRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutationRecord + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.MutationRecord; + + /** + * Creates a plain object from a MutationRecord message. Also converts values to other types if specified. + * @param message MutationRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.MutationRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutationRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a GroupService */ + class GroupService extends $protobuf.rpc.Service { + + /** + * Constructs a new GroupService 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 GroupService 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): GroupService; + + /** + * Calls ListGroups. + * @param request ListGroupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGroupsResponse + */ + public listGroups(request: google.monitoring.v3.IListGroupsRequest, callback: google.monitoring.v3.GroupService.ListGroupsCallback): void; + + /** + * Calls ListGroups. + * @param request ListGroupsRequest message or plain object + * @returns Promise + */ + public listGroups(request: google.monitoring.v3.IListGroupsRequest): Promise; + + /** + * Calls GetGroup. + * @param request GetGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Group + */ + public getGroup(request: google.monitoring.v3.IGetGroupRequest, callback: google.monitoring.v3.GroupService.GetGroupCallback): void; + + /** + * Calls GetGroup. + * @param request GetGroupRequest message or plain object + * @returns Promise + */ + public getGroup(request: google.monitoring.v3.IGetGroupRequest): Promise; + + /** + * Calls CreateGroup. + * @param request CreateGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Group + */ + public createGroup(request: google.monitoring.v3.ICreateGroupRequest, callback: google.monitoring.v3.GroupService.CreateGroupCallback): void; + + /** + * Calls CreateGroup. + * @param request CreateGroupRequest message or plain object + * @returns Promise + */ + public createGroup(request: google.monitoring.v3.ICreateGroupRequest): Promise; + + /** + * Calls UpdateGroup. + * @param request UpdateGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Group + */ + public updateGroup(request: google.monitoring.v3.IUpdateGroupRequest, callback: google.monitoring.v3.GroupService.UpdateGroupCallback): void; + + /** + * Calls UpdateGroup. + * @param request UpdateGroupRequest message or plain object + * @returns Promise + */ + public updateGroup(request: google.monitoring.v3.IUpdateGroupRequest): Promise; + + /** + * Calls DeleteGroup. + * @param request DeleteGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteGroup(request: google.monitoring.v3.IDeleteGroupRequest, callback: google.monitoring.v3.GroupService.DeleteGroupCallback): void; + + /** + * Calls DeleteGroup. + * @param request DeleteGroupRequest message or plain object + * @returns Promise + */ + public deleteGroup(request: google.monitoring.v3.IDeleteGroupRequest): Promise; + + /** + * Calls ListGroupMembers. + * @param request ListGroupMembersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGroupMembersResponse + */ + public listGroupMembers(request: google.monitoring.v3.IListGroupMembersRequest, callback: google.monitoring.v3.GroupService.ListGroupMembersCallback): void; + + /** + * Calls ListGroupMembers. + * @param request ListGroupMembersRequest message or plain object + * @returns Promise + */ + public listGroupMembers(request: google.monitoring.v3.IListGroupMembersRequest): Promise; + } + + namespace GroupService { + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. + * @param error Error, if any + * @param [response] ListGroupsResponse + */ + type ListGroupsCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. + * @param error Error, if any + * @param [response] Group + */ + type GetGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. + * @param error Error, if any + * @param [response] Group + */ + type CreateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. + * @param error Error, if any + * @param [response] Group + */ + type UpdateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. + * @param error Error, if any + * @param [response] ListGroupMembersResponse + */ + type ListGroupMembersCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupMembersResponse) => void; + } + + /** Properties of a ListGroupsRequest. */ + interface IListGroupsRequest { + + /** ListGroupsRequest name */ + name?: (string|null); + + /** ListGroupsRequest childrenOfGroup */ + childrenOfGroup?: (string|null); + + /** ListGroupsRequest ancestorsOfGroup */ + ancestorsOfGroup?: (string|null); + + /** ListGroupsRequest descendantsOfGroup */ + descendantsOfGroup?: (string|null); + + /** ListGroupsRequest pageSize */ + pageSize?: (number|null); + + /** ListGroupsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListGroupsRequest. */ + class ListGroupsRequest implements IListGroupsRequest { + + /** + * Constructs a new ListGroupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListGroupsRequest); + + /** ListGroupsRequest name. */ + public name: string; + + /** ListGroupsRequest childrenOfGroup. */ + public childrenOfGroup: string; + + /** ListGroupsRequest ancestorsOfGroup. */ + public ancestorsOfGroup: string; + + /** ListGroupsRequest descendantsOfGroup. */ + public descendantsOfGroup: string; + + /** ListGroupsRequest pageSize. */ + public pageSize: number; + + /** ListGroupsRequest pageToken. */ + public pageToken: string; + + /** ListGroupsRequest filter. */ + public filter?: ("childrenOfGroup"|"ancestorsOfGroup"|"descendantsOfGroup"); + + /** + * Creates a new ListGroupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGroupsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListGroupsRequest): google.monitoring.v3.ListGroupsRequest; + + /** + * Encodes the specified ListGroupsRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * @param message ListGroupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGroupsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * @param message ListGroupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGroupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupsRequest; + + /** + * Decodes a ListGroupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupsRequest; + + /** + * Verifies a ListGroupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGroupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupsRequest; + + /** + * Creates a plain object from a ListGroupsRequest message. Also converts values to other types if specified. + * @param message ListGroupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGroupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListGroupsResponse. */ + interface IListGroupsResponse { + + /** ListGroupsResponse group */ + group?: (google.monitoring.v3.IGroup[]|null); + + /** ListGroupsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListGroupsResponse. */ + class ListGroupsResponse implements IListGroupsResponse { + + /** + * Constructs a new ListGroupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListGroupsResponse); + + /** ListGroupsResponse group. */ + public group: google.monitoring.v3.IGroup[]; + + /** ListGroupsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListGroupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGroupsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListGroupsResponse): google.monitoring.v3.ListGroupsResponse; + + /** + * Encodes the specified ListGroupsResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * @param message ListGroupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGroupsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * @param message ListGroupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGroupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupsResponse; + + /** + * Decodes a ListGroupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupsResponse; + + /** + * Verifies a ListGroupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGroupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGroupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupsResponse; + + /** + * Creates a plain object from a ListGroupsResponse message. Also converts values to other types if specified. + * @param message ListGroupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGroupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetGroupRequest. */ + interface IGetGroupRequest { + + /** GetGroupRequest name */ + name?: (string|null); + } + + /** Represents a GetGroupRequest. */ + class GetGroupRequest implements IGetGroupRequest { + + /** + * Constructs a new GetGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetGroupRequest); + + /** GetGroupRequest name. */ + public name: string; + + /** + * Creates a new GetGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGroupRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetGroupRequest): google.monitoring.v3.GetGroupRequest; + + /** + * Encodes the specified GetGroupRequest message. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * @param message GetGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * @param message GetGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetGroupRequest; + + /** + * Decodes a GetGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetGroupRequest; + + /** + * Verifies a GetGroupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetGroupRequest; + + /** + * Creates a plain object from a GetGroupRequest message. Also converts values to other types if specified. + * @param message GetGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateGroupRequest. */ + interface ICreateGroupRequest { + + /** CreateGroupRequest name */ + name?: (string|null); + + /** CreateGroupRequest group */ + group?: (google.monitoring.v3.IGroup|null); + + /** CreateGroupRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateGroupRequest. */ + class CreateGroupRequest implements ICreateGroupRequest { + + /** + * Constructs a new CreateGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateGroupRequest); + + /** CreateGroupRequest name. */ + public name: string; + + /** CreateGroupRequest group. */ + public group?: (google.monitoring.v3.IGroup|null); + + /** CreateGroupRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateGroupRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateGroupRequest): google.monitoring.v3.CreateGroupRequest; + + /** + * Encodes the specified CreateGroupRequest message. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. + * @param message CreateGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. + * @param message CreateGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateGroupRequest; + + /** + * Decodes a CreateGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateGroupRequest; + + /** + * Verifies a CreateGroupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateGroupRequest; + + /** + * Creates a plain object from a CreateGroupRequest message. Also converts values to other types if specified. + * @param message CreateGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateGroupRequest. */ + interface IUpdateGroupRequest { + + /** UpdateGroupRequest group */ + group?: (google.monitoring.v3.IGroup|null); + + /** UpdateGroupRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateGroupRequest. */ + class UpdateGroupRequest implements IUpdateGroupRequest { + + /** + * Constructs a new UpdateGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateGroupRequest); + + /** UpdateGroupRequest group. */ + public group?: (google.monitoring.v3.IGroup|null); + + /** UpdateGroupRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGroupRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateGroupRequest): google.monitoring.v3.UpdateGroupRequest; + + /** + * Encodes the specified UpdateGroupRequest message. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @param message UpdateGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @param message UpdateGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateGroupRequest; + + /** + * Decodes an UpdateGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateGroupRequest; + + /** + * Verifies an UpdateGroupRequest message. + * @param message Plain 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 UpdateGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateGroupRequest; + + /** + * Creates a plain object from an UpdateGroupRequest message. Also converts values to other types if specified. + * @param message UpdateGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteGroupRequest. */ + interface IDeleteGroupRequest { + + /** DeleteGroupRequest name */ + name?: (string|null); + + /** DeleteGroupRequest recursive */ + recursive?: (boolean|null); + } + + /** Represents a DeleteGroupRequest. */ + class DeleteGroupRequest implements IDeleteGroupRequest { + + /** + * Constructs a new DeleteGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteGroupRequest); + + /** DeleteGroupRequest name. */ + public name: string; + + /** DeleteGroupRequest recursive. */ + public recursive: boolean; + + /** + * Creates a new DeleteGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteGroupRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteGroupRequest): google.monitoring.v3.DeleteGroupRequest; + + /** + * Encodes the specified DeleteGroupRequest message. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * @param message DeleteGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * @param message DeleteGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteGroupRequest; + + /** + * Decodes a DeleteGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteGroupRequest; + + /** + * Verifies a DeleteGroupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteGroupRequest; + + /** + * Creates a plain object from a DeleteGroupRequest message. Also converts values to other types if specified. + * @param message DeleteGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListGroupMembersRequest. */ + interface IListGroupMembersRequest { + + /** ListGroupMembersRequest name */ + name?: (string|null); + + /** ListGroupMembersRequest pageSize */ + pageSize?: (number|null); + + /** ListGroupMembersRequest pageToken */ + pageToken?: (string|null); + + /** ListGroupMembersRequest filter */ + filter?: (string|null); + + /** ListGroupMembersRequest interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); + } + + /** Represents a ListGroupMembersRequest. */ + class ListGroupMembersRequest implements IListGroupMembersRequest { + + /** + * Constructs a new ListGroupMembersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListGroupMembersRequest); + + /** ListGroupMembersRequest name. */ + public name: string; + + /** ListGroupMembersRequest pageSize. */ + public pageSize: number; + + /** ListGroupMembersRequest pageToken. */ + public pageToken: string; + + /** ListGroupMembersRequest filter. */ + public filter: string; + + /** ListGroupMembersRequest interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); + + /** + * Creates a new ListGroupMembersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGroupMembersRequest instance + */ + public static create(properties?: google.monitoring.v3.IListGroupMembersRequest): google.monitoring.v3.ListGroupMembersRequest; + + /** + * Encodes the specified ListGroupMembersRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * @param message ListGroupMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGroupMembersRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * @param message ListGroupMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGroupMembersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGroupMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupMembersRequest; + + /** + * Decodes a ListGroupMembersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGroupMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupMembersRequest; + + /** + * Verifies a ListGroupMembersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGroupMembersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGroupMembersRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupMembersRequest; + + /** + * Creates a plain object from a ListGroupMembersRequest message. Also converts values to other types if specified. + * @param message ListGroupMembersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListGroupMembersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGroupMembersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListGroupMembersResponse. */ + interface IListGroupMembersResponse { + + /** ListGroupMembersResponse members */ + members?: (google.api.IMonitoredResource[]|null); + + /** ListGroupMembersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListGroupMembersResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListGroupMembersResponse. */ + class ListGroupMembersResponse implements IListGroupMembersResponse { + + /** + * Constructs a new ListGroupMembersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListGroupMembersResponse); + + /** ListGroupMembersResponse members. */ + public members: google.api.IMonitoredResource[]; + + /** ListGroupMembersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListGroupMembersResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListGroupMembersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGroupMembersResponse instance + */ + public static create(properties?: google.monitoring.v3.IListGroupMembersResponse): google.monitoring.v3.ListGroupMembersResponse; + + /** + * Encodes the specified ListGroupMembersResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * @param message ListGroupMembersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGroupMembersResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * @param message ListGroupMembersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGroupMembersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGroupMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupMembersResponse; + + /** + * Decodes a ListGroupMembersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGroupMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupMembersResponse; + + /** + * Verifies a ListGroupMembersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGroupMembersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGroupMembersResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupMembersResponse; + + /** + * Creates a plain object from a ListGroupMembersResponse message. Also converts values to other types if specified. + * @param message ListGroupMembersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListGroupMembersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGroupMembersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Group. */ + interface IGroup { + + /** Group name */ + name?: (string|null); + + /** Group displayName */ + displayName?: (string|null); + + /** Group parentName */ + parentName?: (string|null); + + /** Group filter */ + filter?: (string|null); + + /** Group isCluster */ + isCluster?: (boolean|null); + } + + /** Represents a Group. */ + class Group implements IGroup { + + /** + * Constructs a new Group. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGroup); + + /** Group name. */ + public name: string; + + /** Group displayName. */ + public displayName: string; + + /** Group parentName. */ + public parentName: string; + + /** Group filter. */ + public filter: string; + + /** Group isCluster. */ + public isCluster: boolean; + + /** + * Creates a new Group instance using the specified properties. + * @param [properties] Properties to set + * @returns Group instance + */ + public static create(properties?: google.monitoring.v3.IGroup): google.monitoring.v3.Group; + + /** + * Encodes the specified Group message. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * @param message Group message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Group message, length delimited. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * @param message Group message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Group message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Group + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Group; + + /** + * Decodes a Group message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Group + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Group; + + /** + * Verifies a Group message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Group message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Group + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Group; + + /** + * Creates a plain object from a Group message. Also converts values to other types if specified. + * @param message Group + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Group, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Group to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a MetricService */ + class MetricService extends $protobuf.rpc.Service { + + /** + * Constructs a new MetricService 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 MetricService 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): MetricService; + + /** + * 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback): void; + + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise + */ + public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): Promise; + + /** + * Calls GetMonitoredResourceDescriptor. + * @param request GetMonitoredResourceDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + */ + public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback): void; + + /** + * Calls GetMonitoredResourceDescriptor. + * @param request GetMonitoredResourceDescriptorRequest message or plain object + * @returns Promise + */ + public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): Promise; + + /** + * Calls ListMetricDescriptors. + * @param request ListMetricDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + */ + public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMetricDescriptorsCallback): void; + + /** + * Calls ListMetricDescriptors. + * @param request ListMetricDescriptorsRequest message or plain object + * @returns Promise + */ + public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest): Promise; + + /** + * Calls GetMetricDescriptor. + * @param request GetMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetricDescriptor + */ + public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMetricDescriptorCallback): void; + + /** + * Calls GetMetricDescriptor. + * @param request GetMetricDescriptorRequest message or plain object + * @returns Promise + */ + public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest): Promise; + + /** + * Calls CreateMetricDescriptor. + * @param request CreateMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetricDescriptor + */ + public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.CreateMetricDescriptorCallback): void; + + /** + * Calls CreateMetricDescriptor. + * @param request CreateMetricDescriptorRequest message or plain object + * @returns Promise + */ + public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest): Promise; + + /** + * Calls DeleteMetricDescriptor. + * @param request DeleteMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback): void; + + /** + * Calls DeleteMetricDescriptor. + * @param request DeleteMetricDescriptorRequest message or plain object + * @returns Promise + */ + public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest): Promise; + + /** + * Calls ListTimeSeries. + * @param request ListTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + */ + public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest, callback: google.monitoring.v3.MetricService.ListTimeSeriesCallback): void; + + /** + * Calls ListTimeSeries. + * @param request ListTimeSeriesRequest message or plain object + * @returns Promise + */ + public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest): Promise; + + /** + * Calls CreateTimeSeries. + * @param request CreateTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest, callback: google.monitoring.v3.MetricService.CreateTimeSeriesCallback): void; + + /** + * Calls CreateTimeSeries. + * @param request CreateTimeSeriesRequest message or plain object + * @returns Promise + */ + public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest): Promise; + } + + namespace MetricService { + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse + */ + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * @param error Error, if any + * @param [response] MonitoredResourceDescriptor + */ + type GetMonitoredResourceDescriptorCallback = (error: (Error|null), response?: google.api.MonitoredResourceDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. + * @param error Error, if any + * @param [response] ListMetricDescriptorsResponse + */ + type ListMetricDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMetricDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * @param error Error, if any + * @param [response] MetricDescriptor + */ + type GetMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * @param error Error, if any + * @param [response] MetricDescriptor + */ + type CreateMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMetricDescriptorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * @param error Error, if any + * @param [response] ListTimeSeriesResponse + */ + type ListTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.ListTimeSeriesResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * @param error Error, if any + * @param [response] Empty + */ + type CreateTimeSeriesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { + + /** ListMonitoredResourceDescriptorsRequest name */ + name?: (string|null); + + /** ListMonitoredResourceDescriptorsRequest filter */ + filter?: (string|null); + + /** 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest); + + /** ListMonitoredResourceDescriptorsRequest name. */ + public name: string; + + /** ListMonitoredResourceDescriptorsRequest filter. */ + public filter: string; + + /** 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsResponse): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetMonitoredResourceDescriptorRequest. */ + interface IGetMonitoredResourceDescriptorRequest { + + /** GetMonitoredResourceDescriptorRequest name */ + name?: (string|null); + } + + /** Represents a GetMonitoredResourceDescriptorRequest. */ + class GetMonitoredResourceDescriptorRequest implements IGetMonitoredResourceDescriptorRequest { + + /** + * Constructs a new GetMonitoredResourceDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest); + + /** GetMonitoredResourceDescriptorRequest name. */ + public name: string; + + /** + * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMonitoredResourceDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMonitoredResourceDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMonitoredResourceDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Verifies a GetMonitoredResourceDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMonitoredResourceDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. + * @param message GetMonitoredResourceDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetMonitoredResourceDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMonitoredResourceDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMetricDescriptorsRequest. */ + interface IListMetricDescriptorsRequest { + + /** ListMetricDescriptorsRequest name */ + name?: (string|null); + + /** ListMetricDescriptorsRequest filter */ + filter?: (string|null); + + /** ListMetricDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMetricDescriptorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMetricDescriptorsRequest. */ + class ListMetricDescriptorsRequest implements IListMetricDescriptorsRequest { + + /** + * Constructs a new ListMetricDescriptorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListMetricDescriptorsRequest); + + /** ListMetricDescriptorsRequest name. */ + public name: string; + + /** ListMetricDescriptorsRequest filter. */ + public filter: string; + + /** ListMetricDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMetricDescriptorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMetricDescriptorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetricDescriptorsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListMetricDescriptorsRequest): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @param message ListMetricDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @param message ListMetricDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetricDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetricDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Verifies a ListMetricDescriptorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetricDescriptorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMetricDescriptorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListMetricDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMetricDescriptorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMetricDescriptorsResponse. */ + interface IListMetricDescriptorsResponse { + + /** ListMetricDescriptorsResponse metricDescriptors */ + metricDescriptors?: (google.api.IMetricDescriptor[]|null); + + /** ListMetricDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMetricDescriptorsResponse. */ + class ListMetricDescriptorsResponse implements IListMetricDescriptorsResponse { + + /** + * Constructs a new ListMetricDescriptorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListMetricDescriptorsResponse); + + /** ListMetricDescriptorsResponse metricDescriptors. */ + public metricDescriptors: google.api.IMetricDescriptor[]; + + /** ListMetricDescriptorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMetricDescriptorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetricDescriptorsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListMetricDescriptorsResponse): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @param message ListMetricDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @param message ListMetricDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetricDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetricDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Verifies a ListMetricDescriptorsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetricDescriptorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMetricDescriptorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListMetricDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMetricDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetMetricDescriptorRequest. */ + interface IGetMetricDescriptorRequest { + + /** GetMetricDescriptorRequest name */ + name?: (string|null); + } + + /** Represents a GetMetricDescriptorRequest. */ + class GetMetricDescriptorRequest implements IGetMetricDescriptorRequest { + + /** + * Constructs a new GetMetricDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetMetricDescriptorRequest); + + /** GetMetricDescriptorRequest name. */ + public name: string; + + /** + * Creates a new GetMetricDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetricDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetMetricDescriptorRequest): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @param message GetMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @param message GetMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Verifies a GetMetricDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetricDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message GetMetricDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMetricDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateMetricDescriptorRequest. */ + interface ICreateMetricDescriptorRequest { + + /** CreateMetricDescriptorRequest name */ + name?: (string|null); + + /** CreateMetricDescriptorRequest metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); + } + + /** Represents a CreateMetricDescriptorRequest. */ + class CreateMetricDescriptorRequest implements ICreateMetricDescriptorRequest { + + /** + * Constructs a new CreateMetricDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest); + + /** CreateMetricDescriptorRequest name. */ + public name: string; + + /** CreateMetricDescriptorRequest metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); + + /** + * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMetricDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest): google.monitoring.v3.CreateMetricDescriptorRequest; + + /** + * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @param message CreateMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @param message CreateMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateMetricDescriptorRequest; + + /** + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateMetricDescriptorRequest; + + /** + * Verifies a CreateMetricDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMetricDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateMetricDescriptorRequest; + + /** + * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message CreateMetricDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMetricDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteMetricDescriptorRequest. */ + interface IDeleteMetricDescriptorRequest { + + /** DeleteMetricDescriptorRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMetricDescriptorRequest. */ + class DeleteMetricDescriptorRequest implements IDeleteMetricDescriptorRequest { + + /** + * Constructs a new DeleteMetricDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest); + + /** DeleteMetricDescriptorRequest name. */ + public name: string; + + /** + * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMetricDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest): google.monitoring.v3.DeleteMetricDescriptorRequest; + + /** + * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @param message DeleteMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @param message DeleteMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteMetricDescriptorRequest; + + /** + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteMetricDescriptorRequest; + + /** + * Verifies a DeleteMetricDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMetricDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteMetricDescriptorRequest; + + /** + * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message DeleteMetricDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMetricDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListTimeSeriesRequest. */ + interface IListTimeSeriesRequest { + + /** ListTimeSeriesRequest name */ + name?: (string|null); + + /** ListTimeSeriesRequest filter */ + filter?: (string|null); + + /** ListTimeSeriesRequest interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); + + /** ListTimeSeriesRequest aggregation */ + aggregation?: (google.monitoring.v3.IAggregation|null); + + /** ListTimeSeriesRequest orderBy */ + orderBy?: (string|null); + + /** ListTimeSeriesRequest view */ + view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); + + /** ListTimeSeriesRequest pageSize */ + pageSize?: (number|null); + + /** ListTimeSeriesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTimeSeriesRequest. */ + class ListTimeSeriesRequest implements IListTimeSeriesRequest { + + /** + * Constructs a new ListTimeSeriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListTimeSeriesRequest); + + /** ListTimeSeriesRequest name. */ + public name: string; + + /** ListTimeSeriesRequest filter. */ + public filter: string; + + /** ListTimeSeriesRequest interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); + + /** ListTimeSeriesRequest aggregation. */ + public aggregation?: (google.monitoring.v3.IAggregation|null); + + /** ListTimeSeriesRequest orderBy. */ + public orderBy: string; + + /** ListTimeSeriesRequest view. */ + public view: google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView; + + /** ListTimeSeriesRequest pageSize. */ + public pageSize: number; + + /** ListTimeSeriesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTimeSeriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTimeSeriesRequest instance + */ + public static create(properties?: google.monitoring.v3.IListTimeSeriesRequest): google.monitoring.v3.ListTimeSeriesRequest; + + /** + * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @param message ListTimeSeriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @param message ListTimeSeriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesRequest; + + /** + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesRequest; + + /** + * Verifies a ListTimeSeriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTimeSeriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesRequest; + + /** + * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. + * @param message ListTimeSeriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTimeSeriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListTimeSeriesRequest { + + /** TimeSeriesView enum. */ + enum TimeSeriesView { + FULL = 0, + HEADERS = 1 + } + } + + /** Properties of a ListTimeSeriesResponse. */ + interface IListTimeSeriesResponse { + + /** ListTimeSeriesResponse timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + + /** ListTimeSeriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTimeSeriesResponse executionErrors */ + executionErrors?: (google.rpc.IStatus[]|null); + } + + /** Represents a ListTimeSeriesResponse. */ + class ListTimeSeriesResponse implements IListTimeSeriesResponse { + + /** + * Constructs a new ListTimeSeriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListTimeSeriesResponse); + + /** ListTimeSeriesResponse timeSeries. */ + public timeSeries: google.monitoring.v3.ITimeSeries[]; + + /** ListTimeSeriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTimeSeriesResponse executionErrors. */ + public executionErrors: google.rpc.IStatus[]; + + /** + * Creates a new ListTimeSeriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTimeSeriesResponse instance + */ + public static create(properties?: google.monitoring.v3.IListTimeSeriesResponse): google.monitoring.v3.ListTimeSeriesResponse; + + /** + * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @param message ListTimeSeriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @param message ListTimeSeriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesResponse; + + /** + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesResponse; + + /** + * Verifies a ListTimeSeriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTimeSeriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesResponse; + + /** + * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * @param message ListTimeSeriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListTimeSeriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTimeSeriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTimeSeriesRequest. */ + interface ICreateTimeSeriesRequest { + + /** CreateTimeSeriesRequest name */ + name?: (string|null); + + /** CreateTimeSeriesRequest timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + } + + /** Represents a CreateTimeSeriesRequest. */ + class CreateTimeSeriesRequest implements ICreateTimeSeriesRequest { + + /** + * Constructs a new CreateTimeSeriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesRequest); + + /** CreateTimeSeriesRequest name. */ + public name: string; + + /** CreateTimeSeriesRequest timeSeries. */ + public timeSeries: google.monitoring.v3.ITimeSeries[]; + + /** + * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTimeSeriesRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesRequest): google.monitoring.v3.CreateTimeSeriesRequest; + + /** + * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @param message CreateTimeSeriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @param message CreateTimeSeriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesRequest; + + /** + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesRequest; + + /** + * Verifies a CreateTimeSeriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTimeSeriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesRequest; + + /** + * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * @param message CreateTimeSeriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTimeSeriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTimeSeriesError. */ + interface ICreateTimeSeriesError { + + /** CreateTimeSeriesError timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries|null); + + /** CreateTimeSeriesError status */ + status?: (google.rpc.IStatus|null); + } + + /** Represents a CreateTimeSeriesError. */ + class CreateTimeSeriesError implements ICreateTimeSeriesError { + + /** + * Constructs a new CreateTimeSeriesError. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesError); + + /** CreateTimeSeriesError timeSeries. */ + public timeSeries?: (google.monitoring.v3.ITimeSeries|null); + + /** CreateTimeSeriesError status. */ + public status?: (google.rpc.IStatus|null); + + /** + * Creates a new CreateTimeSeriesError instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTimeSeriesError instance + */ + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesError): google.monitoring.v3.CreateTimeSeriesError; + + /** + * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @param message CreateTimeSeriesError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @param message CreateTimeSeriesError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesError; + + /** + * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesError; + + /** + * Verifies a CreateTimeSeriesError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTimeSeriesError + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesError; + + /** + * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * @param message CreateTimeSeriesError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateTimeSeriesError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTimeSeriesError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Point. */ + interface IPoint { + + /** Point interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); + + /** Point value */ + value?: (google.monitoring.v3.ITypedValue|null); + } + + /** Represents a Point. */ + class Point implements IPoint { + + /** + * Constructs a new Point. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IPoint); + + /** Point interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); + + /** Point value. */ + public value?: (google.monitoring.v3.ITypedValue|null); + + /** + * Creates a new Point instance using the specified properties. + * @param [properties] Properties to set + * @returns Point instance + */ + public static create(properties?: google.monitoring.v3.IPoint): google.monitoring.v3.Point; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Point message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Point; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Point; + + /** + * Verifies a Point message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Point + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Point; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @param message Point + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Point to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeSeries. */ + interface ITimeSeries { + + /** TimeSeries metric */ + metric?: (google.api.IMetric|null); + + /** TimeSeries resource */ + resource?: (google.api.IMonitoredResource|null); + + /** TimeSeries metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** TimeSeries metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|null); + + /** TimeSeries valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|null); + + /** TimeSeries points */ + points?: (google.monitoring.v3.IPoint[]|null); + } + + /** Represents a TimeSeries. */ + class TimeSeries implements ITimeSeries { + + /** + * Constructs a new TimeSeries. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ITimeSeries); + + /** TimeSeries metric. */ + public metric?: (google.api.IMetric|null); + + /** TimeSeries resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** TimeSeries metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** TimeSeries metricKind. */ + public metricKind: google.api.MetricDescriptor.MetricKind; + + /** TimeSeries valueType. */ + public valueType: google.api.MetricDescriptor.ValueType; + + /** TimeSeries points. */ + public points: google.monitoring.v3.IPoint[]; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeries instance + */ + public static create(properties?: google.monitoring.v3.ITimeSeries): google.monitoring.v3.TimeSeries; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeries; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeries; + + /** + * Verifies a TimeSeries message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeries + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeries; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @param message TimeSeries + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeries to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a NotificationChannelService */ + class NotificationChannelService extends $protobuf.rpc.Service { + + /** + * Constructs a new NotificationChannelService 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 NotificationChannelService 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): NotificationChannelService; + + /** + * Calls ListNotificationChannelDescriptors. + * @param request ListNotificationChannelDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotificationChannelDescriptorsResponse + */ + public listNotificationChannelDescriptors(request: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, callback: google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptorsCallback): void; + + /** + * Calls ListNotificationChannelDescriptors. + * @param request ListNotificationChannelDescriptorsRequest message or plain object + * @returns Promise + */ + public listNotificationChannelDescriptors(request: google.monitoring.v3.IListNotificationChannelDescriptorsRequest): Promise; + + /** + * Calls GetNotificationChannelDescriptor. + * @param request GetNotificationChannelDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannelDescriptor + */ + public getNotificationChannelDescriptor(request: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptorCallback): void; + + /** + * Calls GetNotificationChannelDescriptor. + * @param request GetNotificationChannelDescriptorRequest message or plain object + * @returns Promise + */ + public getNotificationChannelDescriptor(request: google.monitoring.v3.IGetNotificationChannelDescriptorRequest): Promise; + + /** + * Calls ListNotificationChannels. + * @param request ListNotificationChannelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotificationChannelsResponse + */ + public listNotificationChannels(request: google.monitoring.v3.IListNotificationChannelsRequest, callback: google.monitoring.v3.NotificationChannelService.ListNotificationChannelsCallback): void; + + /** + * Calls ListNotificationChannels. + * @param request ListNotificationChannelsRequest message or plain object + * @returns Promise + */ + public listNotificationChannels(request: google.monitoring.v3.IListNotificationChannelsRequest): Promise; + + /** + * Calls GetNotificationChannel. + * @param request GetNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public getNotificationChannel(request: google.monitoring.v3.IGetNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelCallback): void; + + /** + * Calls GetNotificationChannel. + * @param request GetNotificationChannelRequest message or plain object + * @returns Promise + */ + public getNotificationChannel(request: google.monitoring.v3.IGetNotificationChannelRequest): Promise; + + /** + * Calls CreateNotificationChannel. + * @param request CreateNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public createNotificationChannel(request: google.monitoring.v3.ICreateNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.CreateNotificationChannelCallback): void; + + /** + * Calls CreateNotificationChannel. + * @param request CreateNotificationChannelRequest message or plain object + * @returns Promise + */ + public createNotificationChannel(request: google.monitoring.v3.ICreateNotificationChannelRequest): Promise; + + /** + * Calls UpdateNotificationChannel. + * @param request UpdateNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public updateNotificationChannel(request: google.monitoring.v3.IUpdateNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.UpdateNotificationChannelCallback): void; + + /** + * Calls UpdateNotificationChannel. + * @param request UpdateNotificationChannelRequest message or plain object + * @returns Promise + */ + public updateNotificationChannel(request: google.monitoring.v3.IUpdateNotificationChannelRequest): Promise; + + /** + * Calls DeleteNotificationChannel. + * @param request DeleteNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteNotificationChannel(request: google.monitoring.v3.IDeleteNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.DeleteNotificationChannelCallback): void; + + /** + * Calls DeleteNotificationChannel. + * @param request DeleteNotificationChannelRequest message or plain object + * @returns Promise + */ + public deleteNotificationChannel(request: google.monitoring.v3.IDeleteNotificationChannelRequest): Promise; + + /** + * Calls SendNotificationChannelVerificationCode. + * @param request SendNotificationChannelVerificationCodeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public sendNotificationChannelVerificationCode(request: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, callback: google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCodeCallback): void; + + /** + * Calls SendNotificationChannelVerificationCode. + * @param request SendNotificationChannelVerificationCodeRequest message or plain object + * @returns Promise + */ + public sendNotificationChannelVerificationCode(request: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest): Promise; + + /** + * Calls GetNotificationChannelVerificationCode. + * @param request GetNotificationChannelVerificationCodeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetNotificationChannelVerificationCodeResponse + */ + public getNotificationChannelVerificationCode(request: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCodeCallback): void; + + /** + * Calls GetNotificationChannelVerificationCode. + * @param request GetNotificationChannelVerificationCodeRequest message or plain object + * @returns Promise + */ + public getNotificationChannelVerificationCode(request: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest): Promise; + + /** + * Calls VerifyNotificationChannel. + * @param request VerifyNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public verifyNotificationChannel(request: google.monitoring.v3.IVerifyNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.VerifyNotificationChannelCallback): void; + + /** + * Calls VerifyNotificationChannel. + * @param request VerifyNotificationChannelRequest message or plain object + * @returns Promise + */ + public verifyNotificationChannel(request: google.monitoring.v3.IVerifyNotificationChannelRequest): Promise; + } + + namespace NotificationChannelService { + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. + * @param error Error, if any + * @param [response] ListNotificationChannelDescriptorsResponse + */ + type ListNotificationChannelDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. + * @param error Error, if any + * @param [response] NotificationChannelDescriptor + */ + type GetNotificationChannelDescriptorCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannelDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. + * @param error Error, if any + * @param [response] ListNotificationChannelsResponse + */ + type ListNotificationChannelsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel + */ + type GetNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel + */ + type CreateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#updateNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel + */ + type UpdateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteNotificationChannelCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. + * @param error Error, if any + * @param [response] Empty + */ + type SendNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. + * @param error Error, if any + * @param [response] GetNotificationChannelVerificationCodeResponse + */ + type GetNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel + */ + type VerifyNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + } + + /** Properties of a ListNotificationChannelDescriptorsRequest. */ + interface IListNotificationChannelDescriptorsRequest { + + /** ListNotificationChannelDescriptorsRequest name */ + name?: (string|null); + + /** ListNotificationChannelDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListNotificationChannelDescriptorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListNotificationChannelDescriptorsRequest. */ + class ListNotificationChannelDescriptorsRequest implements IListNotificationChannelDescriptorsRequest { + + /** + * Constructs a new ListNotificationChannelDescriptorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsRequest); + + /** ListNotificationChannelDescriptorsRequest name. */ + public name: string; + + /** ListNotificationChannelDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListNotificationChannelDescriptorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListNotificationChannelDescriptorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotificationChannelDescriptorsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsRequest): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + + /** + * Encodes the specified ListNotificationChannelDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNotificationChannelDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotificationChannelDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + + /** + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotificationChannelDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + + /** + * Verifies a ListNotificationChannelDescriptorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNotificationChannelDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotificationChannelDescriptorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + + /** + * Creates a plain object from a ListNotificationChannelDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListNotificationChannelDescriptorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListNotificationChannelDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNotificationChannelDescriptorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListNotificationChannelDescriptorsResponse. */ + interface IListNotificationChannelDescriptorsResponse { + + /** ListNotificationChannelDescriptorsResponse channelDescriptors */ + channelDescriptors?: (google.monitoring.v3.INotificationChannelDescriptor[]|null); + + /** ListNotificationChannelDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListNotificationChannelDescriptorsResponse. */ + class ListNotificationChannelDescriptorsResponse implements IListNotificationChannelDescriptorsResponse { + + /** + * Constructs a new ListNotificationChannelDescriptorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsResponse); + + /** ListNotificationChannelDescriptorsResponse channelDescriptors. */ + public channelDescriptors: google.monitoring.v3.INotificationChannelDescriptor[]; + + /** ListNotificationChannelDescriptorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListNotificationChannelDescriptorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotificationChannelDescriptorsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsResponse): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + + /** + * Encodes the specified ListNotificationChannelDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListNotificationChannelDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNotificationChannelDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotificationChannelDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + + /** + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotificationChannelDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + + /** + * Verifies a ListNotificationChannelDescriptorsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNotificationChannelDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotificationChannelDescriptorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + + /** + * Creates a plain object from a ListNotificationChannelDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListNotificationChannelDescriptorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListNotificationChannelDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNotificationChannelDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetNotificationChannelDescriptorRequest. */ + interface IGetNotificationChannelDescriptorRequest { + + /** GetNotificationChannelDescriptorRequest name */ + name?: (string|null); + } + + /** Represents a GetNotificationChannelDescriptorRequest. */ + class GetNotificationChannelDescriptorRequest implements IGetNotificationChannelDescriptorRequest { + + /** + * Constructs a new GetNotificationChannelDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetNotificationChannelDescriptorRequest); + + /** GetNotificationChannelDescriptorRequest name. */ + public name: string; + + /** + * Creates a new GetNotificationChannelDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationChannelDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetNotificationChannelDescriptorRequest): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + + /** + * Encodes the specified GetNotificationChannelDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * @param message GetNotificationChannelDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNotificationChannelDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * @param message GetNotificationChannelDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationChannelDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + + /** + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationChannelDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + + /** + * Verifies a GetNotificationChannelDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNotificationChannelDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationChannelDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + + /** + * Creates a plain object from a GetNotificationChannelDescriptorRequest message. Also converts values to other types if specified. + * @param message GetNotificationChannelDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetNotificationChannelDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNotificationChannelDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateNotificationChannelRequest. */ + interface ICreateNotificationChannelRequest { + + /** CreateNotificationChannelRequest name */ + name?: (string|null); + + /** CreateNotificationChannelRequest notificationChannel */ + notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + } + + /** Represents a CreateNotificationChannelRequest. */ + class CreateNotificationChannelRequest implements ICreateNotificationChannelRequest { + + /** + * Constructs a new CreateNotificationChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateNotificationChannelRequest); + + /** CreateNotificationChannelRequest name. */ + public name: string; + + /** CreateNotificationChannelRequest notificationChannel. */ + public notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + + /** + * Creates a new CreateNotificationChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateNotificationChannelRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateNotificationChannelRequest): google.monitoring.v3.CreateNotificationChannelRequest; + + /** + * Encodes the specified CreateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * @param message CreateNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * @param message CreateNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateNotificationChannelRequest; + + /** + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateNotificationChannelRequest; + + /** + * Verifies a CreateNotificationChannelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateNotificationChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateNotificationChannelRequest; + + /** + * Creates a plain object from a CreateNotificationChannelRequest message. Also converts values to other types if specified. + * @param message CreateNotificationChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateNotificationChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListNotificationChannelsRequest. */ + interface IListNotificationChannelsRequest { + + /** ListNotificationChannelsRequest name */ + name?: (string|null); + + /** ListNotificationChannelsRequest filter */ + filter?: (string|null); + + /** ListNotificationChannelsRequest orderBy */ + orderBy?: (string|null); + + /** ListNotificationChannelsRequest pageSize */ + pageSize?: (number|null); + + /** ListNotificationChannelsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListNotificationChannelsRequest. */ + class ListNotificationChannelsRequest implements IListNotificationChannelsRequest { + + /** + * Constructs a new ListNotificationChannelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListNotificationChannelsRequest); + + /** ListNotificationChannelsRequest name. */ + public name: string; + + /** ListNotificationChannelsRequest filter. */ + public filter: string; + + /** ListNotificationChannelsRequest orderBy. */ + public orderBy: string; + + /** ListNotificationChannelsRequest pageSize. */ + public pageSize: number; + + /** ListNotificationChannelsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListNotificationChannelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotificationChannelsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListNotificationChannelsRequest): google.monitoring.v3.ListNotificationChannelsRequest; + + /** + * Encodes the specified ListNotificationChannelsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * @param message ListNotificationChannelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListNotificationChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNotificationChannelsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * @param message ListNotificationChannelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotificationChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelsRequest; + + /** + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotificationChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelsRequest; + + /** + * Verifies a ListNotificationChannelsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNotificationChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotificationChannelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelsRequest; + + /** + * Creates a plain object from a ListNotificationChannelsRequest message. Also converts values to other types if specified. + * @param message ListNotificationChannelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListNotificationChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNotificationChannelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListNotificationChannelsResponse. */ + interface IListNotificationChannelsResponse { + + /** ListNotificationChannelsResponse notificationChannels */ + notificationChannels?: (google.monitoring.v3.INotificationChannel[]|null); + + /** ListNotificationChannelsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListNotificationChannelsResponse. */ + class ListNotificationChannelsResponse implements IListNotificationChannelsResponse { + + /** + * Constructs a new ListNotificationChannelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListNotificationChannelsResponse); + + /** ListNotificationChannelsResponse notificationChannels. */ + public notificationChannels: google.monitoring.v3.INotificationChannel[]; + + /** ListNotificationChannelsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListNotificationChannelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListNotificationChannelsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListNotificationChannelsResponse): google.monitoring.v3.ListNotificationChannelsResponse; + + /** + * Encodes the specified ListNotificationChannelsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * @param message ListNotificationChannelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListNotificationChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListNotificationChannelsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * @param message ListNotificationChannelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListNotificationChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelsResponse; + + /** + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListNotificationChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelsResponse; + + /** + * Verifies a ListNotificationChannelsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListNotificationChannelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListNotificationChannelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelsResponse; + + /** + * Creates a plain object from a ListNotificationChannelsResponse message. Also converts values to other types if specified. + * @param message ListNotificationChannelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListNotificationChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListNotificationChannelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetNotificationChannelRequest. */ + interface IGetNotificationChannelRequest { + + /** GetNotificationChannelRequest name */ + name?: (string|null); + } + + /** Represents a GetNotificationChannelRequest. */ + class GetNotificationChannelRequest implements IGetNotificationChannelRequest { + + /** + * Constructs a new GetNotificationChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetNotificationChannelRequest); + + /** GetNotificationChannelRequest name. */ + public name: string; + + /** + * Creates a new GetNotificationChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationChannelRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetNotificationChannelRequest): google.monitoring.v3.GetNotificationChannelRequest; + + /** + * Encodes the specified GetNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. + * @param message GetNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. + * @param message GetNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelRequest; + + /** + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelRequest; + + /** + * Verifies a GetNotificationChannelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelRequest; + + /** + * Creates a plain object from a GetNotificationChannelRequest message. Also converts values to other types if specified. + * @param message GetNotificationChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNotificationChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateNotificationChannelRequest. */ + interface IUpdateNotificationChannelRequest { + + /** UpdateNotificationChannelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateNotificationChannelRequest notificationChannel */ + notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + } + + /** Represents an UpdateNotificationChannelRequest. */ + class UpdateNotificationChannelRequest implements IUpdateNotificationChannelRequest { + + /** + * Constructs a new UpdateNotificationChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateNotificationChannelRequest); + + /** UpdateNotificationChannelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateNotificationChannelRequest notificationChannel. */ + public notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + + /** + * Creates a new UpdateNotificationChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateNotificationChannelRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateNotificationChannelRequest): google.monitoring.v3.UpdateNotificationChannelRequest; + + /** + * Encodes the specified UpdateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @param message UpdateNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @param message UpdateNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateNotificationChannelRequest; + + /** + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateNotificationChannelRequest; + + /** + * Verifies an UpdateNotificationChannelRequest message. + * @param message Plain 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 UpdateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateNotificationChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateNotificationChannelRequest; + + /** + * Creates a plain object from an UpdateNotificationChannelRequest message. Also converts values to other types if specified. + * @param message UpdateNotificationChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateNotificationChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteNotificationChannelRequest. */ + interface IDeleteNotificationChannelRequest { + + /** DeleteNotificationChannelRequest name */ + name?: (string|null); + + /** DeleteNotificationChannelRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteNotificationChannelRequest. */ + class DeleteNotificationChannelRequest implements IDeleteNotificationChannelRequest { + + /** + * Constructs a new DeleteNotificationChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteNotificationChannelRequest); + + /** DeleteNotificationChannelRequest name. */ + public name: string; + + /** DeleteNotificationChannelRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteNotificationChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteNotificationChannelRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteNotificationChannelRequest): google.monitoring.v3.DeleteNotificationChannelRequest; + + /** + * Encodes the specified DeleteNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * @param message DeleteNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * @param message DeleteNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteNotificationChannelRequest; + + /** + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteNotificationChannelRequest; + + /** + * Verifies a DeleteNotificationChannelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteNotificationChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteNotificationChannelRequest; + + /** + * Creates a plain object from a DeleteNotificationChannelRequest message. Also converts values to other types if specified. + * @param message DeleteNotificationChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteNotificationChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SendNotificationChannelVerificationCodeRequest. */ + interface ISendNotificationChannelVerificationCodeRequest { + + /** SendNotificationChannelVerificationCodeRequest name */ + name?: (string|null); + } + + /** Represents a SendNotificationChannelVerificationCodeRequest. */ + class SendNotificationChannelVerificationCodeRequest implements ISendNotificationChannelVerificationCodeRequest { + + /** + * Constructs a new SendNotificationChannelVerificationCodeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest); + + /** SendNotificationChannelVerificationCodeRequest name. */ + public name: string; + + /** + * Creates a new SendNotificationChannelVerificationCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SendNotificationChannelVerificationCodeRequest instance + */ + public static create(properties?: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + + /** + * Encodes the specified SendNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SendNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SendNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + + /** + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SendNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + + /** + * Verifies a SendNotificationChannelVerificationCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SendNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SendNotificationChannelVerificationCodeRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + + /** + * Creates a plain object from a SendNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * @param message SendNotificationChannelVerificationCodeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.SendNotificationChannelVerificationCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SendNotificationChannelVerificationCodeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetNotificationChannelVerificationCodeRequest. */ + interface IGetNotificationChannelVerificationCodeRequest { + + /** GetNotificationChannelVerificationCodeRequest name */ + name?: (string|null); + + /** GetNotificationChannelVerificationCodeRequest expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GetNotificationChannelVerificationCodeRequest. */ + class GetNotificationChannelVerificationCodeRequest implements IGetNotificationChannelVerificationCodeRequest { + + /** + * Constructs a new GetNotificationChannelVerificationCodeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest); + + /** GetNotificationChannelVerificationCodeRequest name. */ + public name: string; + + /** GetNotificationChannelVerificationCodeRequest expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new GetNotificationChannelVerificationCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationChannelVerificationCodeRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + + /** + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + + /** + * Verifies a GetNotificationChannelVerificationCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationChannelVerificationCodeRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + + /** + * Creates a plain object from a GetNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * @param message GetNotificationChannelVerificationCodeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetNotificationChannelVerificationCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNotificationChannelVerificationCodeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetNotificationChannelVerificationCodeResponse. */ + interface IGetNotificationChannelVerificationCodeResponse { + + /** GetNotificationChannelVerificationCodeResponse code */ + code?: (string|null); + + /** GetNotificationChannelVerificationCodeResponse expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GetNotificationChannelVerificationCodeResponse. */ + class GetNotificationChannelVerificationCodeResponse implements IGetNotificationChannelVerificationCodeResponse { + + /** + * Constructs a new GetNotificationChannelVerificationCodeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse); + + /** GetNotificationChannelVerificationCodeResponse code. */ + public code: string; + + /** GetNotificationChannelVerificationCodeResponse expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new GetNotificationChannelVerificationCodeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationChannelVerificationCodeResponse instance + */ + public static create(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeResponse message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationChannelVerificationCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + + /** + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationChannelVerificationCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + + /** + * Verifies a GetNotificationChannelVerificationCodeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetNotificationChannelVerificationCodeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationChannelVerificationCodeResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + + /** + * Creates a plain object from a GetNotificationChannelVerificationCodeResponse message. Also converts values to other types if specified. + * @param message GetNotificationChannelVerificationCodeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNotificationChannelVerificationCodeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a VerifyNotificationChannelRequest. */ + interface IVerifyNotificationChannelRequest { + + /** VerifyNotificationChannelRequest name */ + name?: (string|null); + + /** VerifyNotificationChannelRequest code */ + code?: (string|null); + } + + /** Represents a VerifyNotificationChannelRequest. */ + class VerifyNotificationChannelRequest implements IVerifyNotificationChannelRequest { + + /** + * Constructs a new VerifyNotificationChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IVerifyNotificationChannelRequest); + + /** VerifyNotificationChannelRequest name. */ + public name: string; + + /** VerifyNotificationChannelRequest code. */ + public code: string; + + /** + * Creates a new VerifyNotificationChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyNotificationChannelRequest instance + */ + public static create(properties?: google.monitoring.v3.IVerifyNotificationChannelRequest): google.monitoring.v3.VerifyNotificationChannelRequest; + + /** + * Encodes the specified VerifyNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * @param message VerifyNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IVerifyNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * @param message VerifyNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IVerifyNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.VerifyNotificationChannelRequest; + + /** + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.VerifyNotificationChannelRequest; + + /** + * Verifies a VerifyNotificationChannelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerifyNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyNotificationChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.VerifyNotificationChannelRequest; + + /** + * Creates a plain object from a VerifyNotificationChannelRequest message. Also converts values to other types if specified. + * @param message VerifyNotificationChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.VerifyNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyNotificationChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NotificationChannelDescriptor. */ + interface INotificationChannelDescriptor { + + /** NotificationChannelDescriptor name */ + name?: (string|null); + + /** NotificationChannelDescriptor type */ + type?: (string|null); + + /** NotificationChannelDescriptor displayName */ + displayName?: (string|null); + + /** NotificationChannelDescriptor description */ + description?: (string|null); + + /** NotificationChannelDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** NotificationChannelDescriptor supportedTiers */ + supportedTiers?: (google.monitoring.v3.ServiceTier[]|null); + } + + /** Represents a NotificationChannelDescriptor. */ + class NotificationChannelDescriptor implements INotificationChannelDescriptor { + + /** + * Constructs a new NotificationChannelDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.INotificationChannelDescriptor); + + /** NotificationChannelDescriptor name. */ + public name: string; + + /** NotificationChannelDescriptor type. */ + public type: string; + + /** NotificationChannelDescriptor displayName. */ + public displayName: string; + + /** NotificationChannelDescriptor description. */ + public description: string; + + /** NotificationChannelDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** NotificationChannelDescriptor supportedTiers. */ + public supportedTiers: google.monitoring.v3.ServiceTier[]; + + /** + * Creates a new NotificationChannelDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationChannelDescriptor instance + */ + public static create(properties?: google.monitoring.v3.INotificationChannelDescriptor): google.monitoring.v3.NotificationChannelDescriptor; + + /** + * Encodes the specified NotificationChannelDescriptor message. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * @param message NotificationChannelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.INotificationChannelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationChannelDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * @param message NotificationChannelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.INotificationChannelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationChannelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.NotificationChannelDescriptor; + + /** + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationChannelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.NotificationChannelDescriptor; + + /** + * Verifies a NotificationChannelDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationChannelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationChannelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.NotificationChannelDescriptor; + + /** + * Creates a plain object from a NotificationChannelDescriptor message. Also converts values to other types if specified. + * @param message NotificationChannelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.NotificationChannelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationChannelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NotificationChannel. */ + interface INotificationChannel { + + /** NotificationChannel type */ + type?: (string|null); + + /** NotificationChannel name */ + name?: (string|null); + + /** NotificationChannel displayName */ + displayName?: (string|null); + + /** NotificationChannel description */ + description?: (string|null); + + /** NotificationChannel labels */ + labels?: ({ [k: string]: string }|null); + + /** NotificationChannel userLabels */ + userLabels?: ({ [k: string]: string }|null); + + /** NotificationChannel verificationStatus */ + verificationStatus?: (google.monitoring.v3.NotificationChannel.VerificationStatus|null); + + /** NotificationChannel enabled */ + enabled?: (google.protobuf.IBoolValue|null); + } + + /** Represents a NotificationChannel. */ + class NotificationChannel implements INotificationChannel { + + /** + * Constructs a new NotificationChannel. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.INotificationChannel); + + /** NotificationChannel type. */ + public type: string; + + /** NotificationChannel name. */ + public name: string; + + /** NotificationChannel displayName. */ + public displayName: string; + + /** NotificationChannel description. */ + public description: string; + + /** NotificationChannel labels. */ + public labels: { [k: string]: string }; + + /** NotificationChannel userLabels. */ + public userLabels: { [k: string]: string }; + + /** NotificationChannel verificationStatus. */ + public verificationStatus: google.monitoring.v3.NotificationChannel.VerificationStatus; + + /** NotificationChannel enabled. */ + public enabled?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new NotificationChannel instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationChannel instance + */ + public static create(properties?: google.monitoring.v3.INotificationChannel): google.monitoring.v3.NotificationChannel; + + /** + * Encodes the specified NotificationChannel message. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * @param message NotificationChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.INotificationChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationChannel message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * @param message NotificationChannel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.INotificationChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationChannel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.NotificationChannel; + + /** + * Decodes a NotificationChannel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.NotificationChannel; + + /** + * Verifies a NotificationChannel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationChannel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationChannel + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.NotificationChannel; + + /** + * Creates a plain object from a NotificationChannel message. Also converts values to other types if specified. + * @param message NotificationChannel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.NotificationChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationChannel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace NotificationChannel { + + /** VerificationStatus enum. */ + enum VerificationStatus { + VERIFICATION_STATUS_UNSPECIFIED = 0, + UNVERIFIED = 1, + VERIFIED = 2 + } + } + + /** Represents an UptimeCheckService */ + class UptimeCheckService extends $protobuf.rpc.Service { + + /** + * Constructs a new UptimeCheckService 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 UptimeCheckService 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): UptimeCheckService; + + /** + * Calls ListUptimeCheckConfigs. + * @param request ListUptimeCheckConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUptimeCheckConfigsResponse + */ + public listUptimeCheckConfigs(request: google.monitoring.v3.IListUptimeCheckConfigsRequest, callback: google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigsCallback): void; + + /** + * Calls ListUptimeCheckConfigs. + * @param request ListUptimeCheckConfigsRequest message or plain object + * @returns Promise + */ + public listUptimeCheckConfigs(request: google.monitoring.v3.IListUptimeCheckConfigsRequest): Promise; + + /** + * Calls GetUptimeCheckConfig. + * @param request GetUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + */ + public getUptimeCheckConfig(request: google.monitoring.v3.IGetUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfigCallback): void; + + /** + * Calls GetUptimeCheckConfig. + * @param request GetUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public getUptimeCheckConfig(request: google.monitoring.v3.IGetUptimeCheckConfigRequest): Promise; + + /** + * Calls CreateUptimeCheckConfig. + * @param request CreateUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + */ + public createUptimeCheckConfig(request: google.monitoring.v3.ICreateUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfigCallback): void; + + /** + * Calls CreateUptimeCheckConfig. + * @param request CreateUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public createUptimeCheckConfig(request: google.monitoring.v3.ICreateUptimeCheckConfigRequest): Promise; + + /** + * Calls UpdateUptimeCheckConfig. + * @param request UpdateUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + */ + public updateUptimeCheckConfig(request: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfigCallback): void; + + /** + * Calls UpdateUptimeCheckConfig. + * @param request UpdateUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public updateUptimeCheckConfig(request: google.monitoring.v3.IUpdateUptimeCheckConfigRequest): Promise; + + /** + * Calls DeleteUptimeCheckConfig. + * @param request DeleteUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUptimeCheckConfig(request: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfigCallback): void; + + /** + * Calls DeleteUptimeCheckConfig. + * @param request DeleteUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public deleteUptimeCheckConfig(request: google.monitoring.v3.IDeleteUptimeCheckConfigRequest): Promise; + + /** + * Calls ListUptimeCheckIps. + * @param request ListUptimeCheckIpsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUptimeCheckIpsResponse + */ + public listUptimeCheckIps(request: google.monitoring.v3.IListUptimeCheckIpsRequest, callback: google.monitoring.v3.UptimeCheckService.ListUptimeCheckIpsCallback): void; + + /** + * Calls ListUptimeCheckIps. + * @param request ListUptimeCheckIpsRequest message or plain object + * @returns Promise + */ + public listUptimeCheckIps(request: google.monitoring.v3.IListUptimeCheckIpsRequest): Promise; + } + + namespace UptimeCheckService { + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. + * @param error Error, if any + * @param [response] ListUptimeCheckConfigsResponse + */ + type ListUptimeCheckConfigsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckConfigsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. + * @param error Error, if any + * @param [response] UptimeCheckConfig + */ + type GetUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. + * @param error Error, if any + * @param [response] UptimeCheckConfig + */ + type CreateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. + * @param error Error, if any + * @param [response] UptimeCheckConfig + */ + type UpdateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUptimeCheckConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. + * @param error Error, if any + * @param [response] ListUptimeCheckIpsResponse + */ + type ListUptimeCheckIpsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckIpsResponse) => void; + } + + /** Properties of a ListUptimeCheckConfigsRequest. */ + interface IListUptimeCheckConfigsRequest { + + /** ListUptimeCheckConfigsRequest parent */ + parent?: (string|null); + + /** ListUptimeCheckConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListUptimeCheckConfigsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUptimeCheckConfigsRequest. */ + class ListUptimeCheckConfigsRequest implements IListUptimeCheckConfigsRequest { + + /** + * Constructs a new ListUptimeCheckConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckConfigsRequest); + + /** ListUptimeCheckConfigsRequest parent. */ + public parent: string; + + /** ListUptimeCheckConfigsRequest pageSize. */ + public pageSize: number; + + /** ListUptimeCheckConfigsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUptimeCheckConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUptimeCheckConfigsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListUptimeCheckConfigsRequest): google.monitoring.v3.ListUptimeCheckConfigsRequest; + + /** + * Encodes the specified ListUptimeCheckConfigsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @param message ListUptimeCheckConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListUptimeCheckConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUptimeCheckConfigsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @param message ListUptimeCheckConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUptimeCheckConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckConfigsRequest; + + /** + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUptimeCheckConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckConfigsRequest; + + /** + * Verifies a ListUptimeCheckConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUptimeCheckConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUptimeCheckConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckConfigsRequest; + + /** + * Creates a plain object from a ListUptimeCheckConfigsRequest message. Also converts values to other types if specified. + * @param message ListUptimeCheckConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListUptimeCheckConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUptimeCheckConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListUptimeCheckConfigsResponse. */ + interface IListUptimeCheckConfigsResponse { + + /** ListUptimeCheckConfigsResponse uptimeCheckConfigs */ + uptimeCheckConfigs?: (google.monitoring.v3.IUptimeCheckConfig[]|null); + + /** ListUptimeCheckConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListUptimeCheckConfigsResponse totalSize */ + totalSize?: (number|null); + } + + /** Represents a ListUptimeCheckConfigsResponse. */ + class ListUptimeCheckConfigsResponse implements IListUptimeCheckConfigsResponse { + + /** + * Constructs a new ListUptimeCheckConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckConfigsResponse); + + /** ListUptimeCheckConfigsResponse uptimeCheckConfigs. */ + public uptimeCheckConfigs: google.monitoring.v3.IUptimeCheckConfig[]; + + /** ListUptimeCheckConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListUptimeCheckConfigsResponse totalSize. */ + public totalSize: number; + + /** + * Creates a new ListUptimeCheckConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUptimeCheckConfigsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListUptimeCheckConfigsResponse): google.monitoring.v3.ListUptimeCheckConfigsResponse; + + /** + * Encodes the specified ListUptimeCheckConfigsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @param message ListUptimeCheckConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListUptimeCheckConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUptimeCheckConfigsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @param message ListUptimeCheckConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckConfigsResponse; + + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckConfigsResponse; + + /** + * Verifies a ListUptimeCheckConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUptimeCheckConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUptimeCheckConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckConfigsResponse; + + /** + * Creates a plain object from a ListUptimeCheckConfigsResponse message. Also converts values to other types if specified. + * @param message ListUptimeCheckConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListUptimeCheckConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUptimeCheckConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetUptimeCheckConfigRequest. */ + interface IGetUptimeCheckConfigRequest { + + /** GetUptimeCheckConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetUptimeCheckConfigRequest. */ + class GetUptimeCheckConfigRequest implements IGetUptimeCheckConfigRequest { + + /** + * Constructs a new GetUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetUptimeCheckConfigRequest); + + /** GetUptimeCheckConfigRequest name. */ + public name: string; + + /** + * Creates a new GetUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetUptimeCheckConfigRequest): google.monitoring.v3.GetUptimeCheckConfigRequest; + + /** + * Encodes the specified GetUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @param message GetUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @param message GetUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetUptimeCheckConfigRequest; + + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetUptimeCheckConfigRequest; + + /** + * Verifies a GetUptimeCheckConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetUptimeCheckConfigRequest; + + /** + * Creates a plain object from a GetUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message GetUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateUptimeCheckConfigRequest. */ + interface ICreateUptimeCheckConfigRequest { + + /** CreateUptimeCheckConfigRequest parent */ + parent?: (string|null); + + /** CreateUptimeCheckConfigRequest uptimeCheckConfig */ + uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + } + + /** Represents a CreateUptimeCheckConfigRequest. */ + class CreateUptimeCheckConfigRequest implements ICreateUptimeCheckConfigRequest { + + /** + * Constructs a new CreateUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateUptimeCheckConfigRequest); + + /** CreateUptimeCheckConfigRequest parent. */ + public parent: string; + + /** CreateUptimeCheckConfigRequest uptimeCheckConfig. */ + public uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + + /** + * Creates a new CreateUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateUptimeCheckConfigRequest): google.monitoring.v3.CreateUptimeCheckConfigRequest; + + /** + * Encodes the specified CreateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @param message CreateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @param message CreateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateUptimeCheckConfigRequest; + + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateUptimeCheckConfigRequest; + + /** + * Verifies a CreateUptimeCheckConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateUptimeCheckConfigRequest; + + /** + * Creates a plain object from a CreateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message CreateUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateUptimeCheckConfigRequest. */ + interface IUpdateUptimeCheckConfigRequest { + + /** UpdateUptimeCheckConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateUptimeCheckConfigRequest uptimeCheckConfig */ + uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + } + + /** Represents an UpdateUptimeCheckConfigRequest. */ + class UpdateUptimeCheckConfigRequest implements IUpdateUptimeCheckConfigRequest { + + /** + * Constructs a new UpdateUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateUptimeCheckConfigRequest); + + /** UpdateUptimeCheckConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateUptimeCheckConfigRequest uptimeCheckConfig. */ + public uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + + /** + * Creates a new UpdateUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateUptimeCheckConfigRequest): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @param message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @param message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + + /** + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + + /** + * Verifies an UpdateUptimeCheckConfigRequest message. + * @param message Plain 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 UpdateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + + /** + * Creates a plain object from an UpdateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message UpdateUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteUptimeCheckConfigRequest. */ + interface IDeleteUptimeCheckConfigRequest { + + /** DeleteUptimeCheckConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteUptimeCheckConfigRequest. */ + class DeleteUptimeCheckConfigRequest implements IDeleteUptimeCheckConfigRequest { + + /** + * Constructs a new DeleteUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteUptimeCheckConfigRequest); + + /** DeleteUptimeCheckConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteUptimeCheckConfigRequest): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + + /** + * Encodes the specified DeleteUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @param message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @param message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + + /** + * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + + /** + * Verifies a DeleteUptimeCheckConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + + /** + * Creates a plain object from a DeleteUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message DeleteUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListUptimeCheckIpsRequest. */ + interface IListUptimeCheckIpsRequest { + + /** ListUptimeCheckIpsRequest pageSize */ + pageSize?: (number|null); + + /** ListUptimeCheckIpsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUptimeCheckIpsRequest. */ + class ListUptimeCheckIpsRequest implements IListUptimeCheckIpsRequest { + + /** + * Constructs a new ListUptimeCheckIpsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckIpsRequest); + + /** ListUptimeCheckIpsRequest pageSize. */ + public pageSize: number; + + /** ListUptimeCheckIpsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUptimeCheckIpsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUptimeCheckIpsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListUptimeCheckIpsRequest): google.monitoring.v3.ListUptimeCheckIpsRequest; + + /** + * Encodes the specified ListUptimeCheckIpsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * @param message ListUptimeCheckIpsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListUptimeCheckIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUptimeCheckIpsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * @param message ListUptimeCheckIpsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUptimeCheckIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckIpsRequest; + + /** + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUptimeCheckIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckIpsRequest; + + /** + * Verifies a ListUptimeCheckIpsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUptimeCheckIpsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUptimeCheckIpsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckIpsRequest; + + /** + * Creates a plain object from a ListUptimeCheckIpsRequest message. Also converts values to other types if specified. + * @param message ListUptimeCheckIpsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListUptimeCheckIpsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUptimeCheckIpsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListUptimeCheckIpsResponse. */ + interface IListUptimeCheckIpsResponse { + + /** ListUptimeCheckIpsResponse uptimeCheckIps */ + uptimeCheckIps?: (google.monitoring.v3.IUptimeCheckIp[]|null); + + /** ListUptimeCheckIpsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUptimeCheckIpsResponse. */ + class ListUptimeCheckIpsResponse implements IListUptimeCheckIpsResponse { + + /** + * Constructs a new ListUptimeCheckIpsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckIpsResponse); + + /** ListUptimeCheckIpsResponse uptimeCheckIps. */ + public uptimeCheckIps: google.monitoring.v3.IUptimeCheckIp[]; + + /** ListUptimeCheckIpsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUptimeCheckIpsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUptimeCheckIpsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListUptimeCheckIpsResponse): google.monitoring.v3.ListUptimeCheckIpsResponse; + + /** + * Encodes the specified ListUptimeCheckIpsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @param message ListUptimeCheckIpsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListUptimeCheckIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUptimeCheckIpsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @param message ListUptimeCheckIpsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUptimeCheckIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckIpsResponse; + + /** + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUptimeCheckIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckIpsResponse; + + /** + * Verifies a ListUptimeCheckIpsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUptimeCheckIpsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUptimeCheckIpsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckIpsResponse; + + /** + * Creates a plain object from a ListUptimeCheckIpsResponse message. Also converts values to other types if specified. + * @param message ListUptimeCheckIpsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListUptimeCheckIpsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUptimeCheckIpsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InternalChecker. */ + interface IInternalChecker { + + /** InternalChecker name */ + name?: (string|null); + + /** InternalChecker displayName */ + displayName?: (string|null); + + /** InternalChecker network */ + network?: (string|null); + + /** InternalChecker gcpZone */ + gcpZone?: (string|null); + + /** InternalChecker peerProjectId */ + peerProjectId?: (string|null); + } + + /** Represents an InternalChecker. */ + class InternalChecker implements IInternalChecker { + + /** + * Constructs a new InternalChecker. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IInternalChecker); + + /** InternalChecker name. */ + public name: string; + + /** InternalChecker displayName. */ + public displayName: string; + + /** InternalChecker network. */ + public network: string; + + /** InternalChecker gcpZone. */ + public gcpZone: string; + + /** InternalChecker peerProjectId. */ + public peerProjectId: string; + + /** + * Creates a new InternalChecker instance using the specified properties. + * @param [properties] Properties to set + * @returns InternalChecker instance + */ + public static create(properties?: google.monitoring.v3.IInternalChecker): google.monitoring.v3.InternalChecker; + + /** + * Encodes the specified InternalChecker message. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. + * @param message InternalChecker message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IInternalChecker, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InternalChecker message, length delimited. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. + * @param message InternalChecker message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IInternalChecker, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InternalChecker message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InternalChecker + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.InternalChecker; + + /** + * Decodes an InternalChecker message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InternalChecker + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.InternalChecker; + + /** + * Verifies an InternalChecker message. + * @param message Plain 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 InternalChecker message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InternalChecker + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.InternalChecker; + + /** + * Creates a plain object from an InternalChecker message. Also converts values to other types if specified. + * @param message InternalChecker + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.InternalChecker, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InternalChecker to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UptimeCheckConfig. */ + interface IUptimeCheckConfig { + + /** UptimeCheckConfig name */ + name?: (string|null); + + /** UptimeCheckConfig displayName */ + displayName?: (string|null); + + /** UptimeCheckConfig monitoredResource */ + monitoredResource?: (google.api.IMonitoredResource|null); + + /** UptimeCheckConfig resourceGroup */ + resourceGroup?: (google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null); + + /** UptimeCheckConfig httpCheck */ + httpCheck?: (google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null); + + /** UptimeCheckConfig tcpCheck */ + tcpCheck?: (google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null); + + /** UptimeCheckConfig period */ + period?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig timeout */ + timeout?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig contentMatchers */ + contentMatchers?: (google.monitoring.v3.UptimeCheckConfig.IContentMatcher[]|null); + + /** UptimeCheckConfig selectedRegions */ + selectedRegions?: (google.monitoring.v3.UptimeCheckRegion[]|null); + + /** UptimeCheckConfig isInternal */ + isInternal?: (boolean|null); + + /** UptimeCheckConfig internalCheckers */ + internalCheckers?: (google.monitoring.v3.IInternalChecker[]|null); + } + + /** Represents an UptimeCheckConfig. */ + class UptimeCheckConfig implements IUptimeCheckConfig { + + /** + * Constructs a new UptimeCheckConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUptimeCheckConfig); + + /** UptimeCheckConfig name. */ + public name: string; + + /** UptimeCheckConfig displayName. */ + public displayName: string; + + /** UptimeCheckConfig monitoredResource. */ + public monitoredResource?: (google.api.IMonitoredResource|null); + + /** UptimeCheckConfig resourceGroup. */ + public resourceGroup?: (google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null); + + /** UptimeCheckConfig httpCheck. */ + public httpCheck?: (google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null); + + /** UptimeCheckConfig tcpCheck. */ + public tcpCheck?: (google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null); + + /** UptimeCheckConfig period. */ + public period?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig contentMatchers. */ + public contentMatchers: google.monitoring.v3.UptimeCheckConfig.IContentMatcher[]; + + /** UptimeCheckConfig selectedRegions. */ + public selectedRegions: google.monitoring.v3.UptimeCheckRegion[]; + + /** UptimeCheckConfig isInternal. */ + public isInternal: boolean; + + /** UptimeCheckConfig internalCheckers. */ + public internalCheckers: google.monitoring.v3.IInternalChecker[]; + + /** UptimeCheckConfig resource. */ + public resource?: ("monitoredResource"|"resourceGroup"); + + /** UptimeCheckConfig checkRequestType. */ + public checkRequestType?: ("httpCheck"|"tcpCheck"); + + /** + * Creates a new UptimeCheckConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns UptimeCheckConfig instance + */ + public static create(properties?: google.monitoring.v3.IUptimeCheckConfig): google.monitoring.v3.UptimeCheckConfig; + + /** + * Encodes the specified UptimeCheckConfig message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. + * @param message UptimeCheckConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUptimeCheckConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UptimeCheckConfig message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. + * @param message UptimeCheckConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUptimeCheckConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UptimeCheckConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UptimeCheckConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig; + + /** + * Decodes an UptimeCheckConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UptimeCheckConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig; + + /** + * Verifies an UptimeCheckConfig message. + * @param message Plain 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 UptimeCheckConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UptimeCheckConfig + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig; + + /** + * Creates a plain object from an UptimeCheckConfig message. Also converts values to other types if specified. + * @param message UptimeCheckConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UptimeCheckConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UptimeCheckConfig { + + /** Properties of a ResourceGroup. */ + interface IResourceGroup { + + /** ResourceGroup groupId */ + groupId?: (string|null); + + /** ResourceGroup resourceType */ + resourceType?: (google.monitoring.v3.GroupResourceType|null); + } + + /** Represents a ResourceGroup. */ + class ResourceGroup implements IResourceGroup { + + /** + * Constructs a new ResourceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IResourceGroup); + + /** ResourceGroup groupId. */ + public groupId: string; + + /** ResourceGroup resourceType. */ + public resourceType: google.monitoring.v3.GroupResourceType; + + /** + * Creates a new ResourceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceGroup instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IResourceGroup): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + + /** + * Verifies a ResourceGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceGroup + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @param message ResourceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpCheck. */ + interface IHttpCheck { + + /** HttpCheck useSsl */ + useSsl?: (boolean|null); + + /** HttpCheck path */ + path?: (string|null); + + /** HttpCheck port */ + port?: (number|null); + + /** HttpCheck authInfo */ + authInfo?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null); + + /** HttpCheck maskHeaders */ + maskHeaders?: (boolean|null); + + /** HttpCheck headers */ + headers?: ({ [k: string]: string }|null); + } + + /** Represents a HttpCheck. */ + class HttpCheck implements IHttpCheck { + + /** + * Constructs a new HttpCheck. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck); + + /** HttpCheck useSsl. */ + public useSsl: boolean; + + /** HttpCheck path. */ + public path: string; + + /** HttpCheck port. */ + public port: number; + + /** HttpCheck authInfo. */ + public authInfo?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null); + + /** HttpCheck maskHeaders. */ + public maskHeaders: boolean; + + /** HttpCheck headers. */ + public headers: { [k: string]: string }; + + /** + * Creates a new HttpCheck instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpCheck instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + + /** + * Encodes the specified HttpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. + * @param message HttpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.IHttpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. + * @param message HttpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IHttpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpCheck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + + /** + * Decodes a HttpCheck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + + /** + * Verifies a HttpCheck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpCheck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpCheck + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + + /** + * Creates a plain object from a HttpCheck message. Also converts values to other types if specified. + * @param message HttpCheck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpCheck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HttpCheck { + + /** Properties of a BasicAuthentication. */ + interface IBasicAuthentication { + + /** BasicAuthentication username */ + username?: (string|null); + + /** BasicAuthentication password */ + password?: (string|null); + } + + /** Represents a BasicAuthentication. */ + class BasicAuthentication implements IBasicAuthentication { + + /** + * Constructs a new BasicAuthentication. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication); + + /** BasicAuthentication username. */ + public username: string; + + /** BasicAuthentication password. */ + public password: string; + + /** + * Creates a new BasicAuthentication instance using the specified properties. + * @param [properties] Properties to set + * @returns BasicAuthentication instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + + /** + * Encodes the specified BasicAuthentication message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. + * @param message BasicAuthentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BasicAuthentication message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. + * @param message BasicAuthentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BasicAuthentication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BasicAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + + /** + * Decodes a BasicAuthentication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BasicAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + + /** + * Verifies a BasicAuthentication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BasicAuthentication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BasicAuthentication + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + + /** + * Creates a plain object from a BasicAuthentication message. Also converts values to other types if specified. + * @param message BasicAuthentication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BasicAuthentication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TcpCheck. */ + interface ITcpCheck { + + /** TcpCheck port */ + port?: (number|null); + } + + /** Represents a TcpCheck. */ + class TcpCheck implements ITcpCheck { + + /** + * Constructs a new TcpCheck. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.ITcpCheck); + + /** TcpCheck port. */ + public port: number; + + /** + * Creates a new TcpCheck instance using the specified properties. + * @param [properties] Properties to set + * @returns TcpCheck instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.ITcpCheck): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + + /** + * Encodes the specified TcpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. + * @param message TcpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.ITcpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TcpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. + * @param message TcpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.ITcpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TcpCheck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TcpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + + /** + * Decodes a TcpCheck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TcpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + + /** + * Verifies a TcpCheck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TcpCheck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TcpCheck + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + + /** + * Creates a plain object from a TcpCheck message. Also converts values to other types if specified. + * @param message TcpCheck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.TcpCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TcpCheck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContentMatcher. */ + interface IContentMatcher { + + /** ContentMatcher content */ + content?: (string|null); + } + + /** Represents a ContentMatcher. */ + class ContentMatcher implements IContentMatcher { + + /** + * Constructs a new ContentMatcher. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IContentMatcher); + + /** ContentMatcher content. */ + public content: string; + + /** + * Creates a new ContentMatcher instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentMatcher instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IContentMatcher): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + + /** + * Encodes the specified ContentMatcher message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. + * @param message ContentMatcher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.IContentMatcher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentMatcher message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. + * @param message ContentMatcher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IContentMatcher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentMatcher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + + /** + * Decodes a ContentMatcher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + + /** + * Verifies a ContentMatcher message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentMatcher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentMatcher + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + + /** + * Creates a plain object from a ContentMatcher message. Also converts values to other types if specified. + * @param message ContentMatcher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.ContentMatcher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentMatcher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an UptimeCheckIp. */ + interface IUptimeCheckIp { + + /** UptimeCheckIp region */ + region?: (google.monitoring.v3.UptimeCheckRegion|null); + + /** UptimeCheckIp location */ + location?: (string|null); + + /** UptimeCheckIp ipAddress */ + ipAddress?: (string|null); + } + + /** Represents an UptimeCheckIp. */ + class UptimeCheckIp implements IUptimeCheckIp { + + /** + * Constructs a new UptimeCheckIp. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUptimeCheckIp); + + /** UptimeCheckIp region. */ + public region: google.monitoring.v3.UptimeCheckRegion; + + /** UptimeCheckIp location. */ + public location: string; + + /** UptimeCheckIp ipAddress. */ + public ipAddress: string; + + /** + * Creates a new UptimeCheckIp instance using the specified properties. + * @param [properties] Properties to set + * @returns UptimeCheckIp instance + */ + public static create(properties?: google.monitoring.v3.IUptimeCheckIp): google.monitoring.v3.UptimeCheckIp; + + /** + * Encodes the specified UptimeCheckIp message. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. + * @param message UptimeCheckIp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUptimeCheckIp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UptimeCheckIp message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. + * @param message UptimeCheckIp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUptimeCheckIp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UptimeCheckIp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UptimeCheckIp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckIp; + + /** + * Decodes an UptimeCheckIp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UptimeCheckIp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckIp; + + /** + * Verifies an UptimeCheckIp message. + * @param message Plain 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 UptimeCheckIp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UptimeCheckIp + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckIp; + + /** + * Creates a plain object from an UptimeCheckIp message. Also converts values to other types if specified. + * @param message UptimeCheckIp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckIp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UptimeCheckIp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** UptimeCheckRegion enum. */ + enum UptimeCheckRegion { + REGION_UNSPECIFIED = 0, + USA = 1, + EUROPE = 2, + SOUTH_AMERICA = 3, + ASIA_PACIFIC = 4 + } + + /** GroupResourceType enum. */ + enum GroupResourceType { + RESOURCE_TYPE_UNSPECIFIED = 0, + INSTANCE = 1, + AWS_ELB_LOAD_BALANCER = 2 + } + } + } + + /** 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 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 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 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 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); + + /** 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 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 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 a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: Uint8Array; + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue 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 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 }; + } + } + + /** 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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js new file mode 100644 index 00000000000..fba4a68cd2a --- /dev/null +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -0,0 +1,36554 @@ +/*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.monitoring = (function() { + + /** + * Namespace monitoring. + * @memberof google + * @namespace + */ + var monitoring = {}; + + monitoring.v3 = (function() { + + /** + * Namespace v3. + * @memberof google.monitoring + * @namespace + */ + var v3 = {}; + + v3.AlertPolicyService = (function() { + + /** + * Constructs a new AlertPolicyService service. + * @memberof google.monitoring.v3 + * @classdesc Represents an AlertPolicyService + * @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 AlertPolicyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AlertPolicyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlertPolicyService; + + /** + * Creates new AlertPolicyService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.AlertPolicyService + * @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 {AlertPolicyService} RPC service. Useful where requests and/or responses are streamed. + */ + AlertPolicyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef ListAlertPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListAlertPoliciesResponse} [response] ListAlertPoliciesResponse + */ + + /** + * Calls ListAlertPolicies. + * @function listAlertPolicies + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IListAlertPoliciesRequest} request ListAlertPoliciesRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.ListAlertPoliciesCallback} callback Node-style callback called with the error, if any, and ListAlertPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.listAlertPolicies = function listAlertPolicies(request, callback) { + return this.rpcCall(listAlertPolicies, $root.google.monitoring.v3.ListAlertPoliciesRequest, $root.google.monitoring.v3.ListAlertPoliciesResponse, request, callback); + }, "name", { value: "ListAlertPolicies" }); + + /** + * Calls ListAlertPolicies. + * @function listAlertPolicies + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IListAlertPoliciesRequest} request ListAlertPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef GetAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy + */ + + /** + * Calls GetAlertPolicy. + * @function getAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IGetAlertPolicyRequest} request GetAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.GetAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.getAlertPolicy = function getAlertPolicy(request, callback) { + return this.rpcCall(getAlertPolicy, $root.google.monitoring.v3.GetAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); + }, "name", { value: "GetAlertPolicy" }); + + /** + * Calls GetAlertPolicy. + * @function getAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IGetAlertPolicyRequest} request GetAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef CreateAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy + */ + + /** + * Calls CreateAlertPolicy. + * @function createAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} request CreateAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.CreateAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.createAlertPolicy = function createAlertPolicy(request, callback) { + return this.rpcCall(createAlertPolicy, $root.google.monitoring.v3.CreateAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); + }, "name", { value: "CreateAlertPolicy" }); + + /** + * Calls CreateAlertPolicy. + * @function createAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} request CreateAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef DeleteAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAlertPolicy. + * @function deleteAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} request DeleteAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.DeleteAlertPolicyCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.deleteAlertPolicy = function deleteAlertPolicy(request, callback) { + return this.rpcCall(deleteAlertPolicy, $root.google.monitoring.v3.DeleteAlertPolicyRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAlertPolicy" }); + + /** + * Calls DeleteAlertPolicy. + * @function deleteAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} request DeleteAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef UpdateAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy + */ + + /** + * Calls UpdateAlertPolicy. + * @function updateAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} request UpdateAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.UpdateAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.updateAlertPolicy = function updateAlertPolicy(request, callback) { + return this.rpcCall(updateAlertPolicy, $root.google.monitoring.v3.UpdateAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); + }, "name", { value: "UpdateAlertPolicy" }); + + /** + * Calls UpdateAlertPolicy. + * @function updateAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} request UpdateAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AlertPolicyService; + })(); + + v3.CreateAlertPolicyRequest = (function() { + + /** + * Properties of a CreateAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @interface ICreateAlertPolicyRequest + * @property {string|null} [name] CreateAlertPolicyRequest name + * @property {google.monitoring.v3.IAlertPolicy|null} [alertPolicy] CreateAlertPolicyRequest alertPolicy + */ + + /** + * Constructs a new CreateAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateAlertPolicyRequest. + * @implements ICreateAlertPolicyRequest + * @constructor + * @param {google.monitoring.v3.ICreateAlertPolicyRequest=} [properties] Properties to set + */ + function CreateAlertPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAlertPolicyRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @instance + */ + CreateAlertPolicyRequest.prototype.name = ""; + + /** + * CreateAlertPolicyRequest alertPolicy. + * @member {google.monitoring.v3.IAlertPolicy|null|undefined} alertPolicy + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @instance + */ + CreateAlertPolicyRequest.prototype.alertPolicy = null; + + /** + * Creates a new CreateAlertPolicyRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.ICreateAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest instance + */ + CreateAlertPolicyRequest.create = function create(properties) { + return new CreateAlertPolicyRequest(properties); + }; + + /** + * Encodes the specified CreateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} message CreateAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAlertPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified CreateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} message CreateAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAlertPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateAlertPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 2: + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAlertPolicyRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAlertPolicyRequest.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.alertPolicy != null && message.hasOwnProperty("alertPolicy")) { + var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicy); + if (error) + return "alertPolicy." + error; + } + return null; + }; + + /** + * Creates a CreateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + */ + CreateAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateAlertPolicyRequest) + return object; + var message = new $root.google.monitoring.v3.CreateAlertPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.alertPolicy != null) { + if (typeof object.alertPolicy !== "object") + throw TypeError(".google.monitoring.v3.CreateAlertPolicyRequest.alertPolicy: object expected"); + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicy); + } + return message; + }; + + /** + * Creates a plain object from a CreateAlertPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.CreateAlertPolicyRequest} message CreateAlertPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAlertPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.alertPolicy = null; + object.name = ""; + } + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + object.alertPolicy = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicy, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CreateAlertPolicyRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAlertPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateAlertPolicyRequest; + })(); + + v3.GetAlertPolicyRequest = (function() { + + /** + * Properties of a GetAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @interface IGetAlertPolicyRequest + * @property {string|null} [name] GetAlertPolicyRequest name + */ + + /** + * Constructs a new GetAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetAlertPolicyRequest. + * @implements IGetAlertPolicyRequest + * @constructor + * @param {google.monitoring.v3.IGetAlertPolicyRequest=} [properties] Properties to set + */ + function GetAlertPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAlertPolicyRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @instance + */ + GetAlertPolicyRequest.prototype.name = ""; + + /** + * Creates a new GetAlertPolicyRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IGetAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest instance + */ + GetAlertPolicyRequest.create = function create(properties) { + return new GetAlertPolicyRequest(properties); + }; + + /** + * Encodes the specified GetAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IGetAlertPolicyRequest} message GetAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAlertPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IGetAlertPolicyRequest} message GetAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAlertPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetAlertPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAlertPolicyRequest message. + * @function verify + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAlertPolicyRequest.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 GetAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest + */ + GetAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetAlertPolicyRequest) + return object; + var message = new $root.google.monitoring.v3.GetAlertPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAlertPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {google.monitoring.v3.GetAlertPolicyRequest} message GetAlertPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAlertPolicyRequest.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 GetAlertPolicyRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetAlertPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetAlertPolicyRequest; + })(); + + v3.ListAlertPoliciesRequest = (function() { + + /** + * Properties of a ListAlertPoliciesRequest. + * @memberof google.monitoring.v3 + * @interface IListAlertPoliciesRequest + * @property {string|null} [name] ListAlertPoliciesRequest name + * @property {string|null} [filter] ListAlertPoliciesRequest filter + * @property {string|null} [orderBy] ListAlertPoliciesRequest orderBy + * @property {number|null} [pageSize] ListAlertPoliciesRequest pageSize + * @property {string|null} [pageToken] ListAlertPoliciesRequest pageToken + */ + + /** + * Constructs a new ListAlertPoliciesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListAlertPoliciesRequest. + * @implements IListAlertPoliciesRequest + * @constructor + * @param {google.monitoring.v3.IListAlertPoliciesRequest=} [properties] Properties to set + */ + function ListAlertPoliciesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAlertPoliciesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.name = ""; + + /** + * ListAlertPoliciesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.filter = ""; + + /** + * ListAlertPoliciesRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.orderBy = ""; + + /** + * ListAlertPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.pageSize = 0; + + /** + * ListAlertPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAlertPoliciesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {google.monitoring.v3.IListAlertPoliciesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest instance + */ + ListAlertPoliciesRequest.create = function create(properties) { + return new ListAlertPoliciesRequest(properties); + }; + + /** + * Encodes the specified ListAlertPoliciesRequest message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {google.monitoring.v3.IListAlertPoliciesRequest} message ListAlertPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAlertPoliciesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 4, wireType 2 =*/34).string(message.name); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListAlertPoliciesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {google.monitoring.v3.IListAlertPoliciesRequest} message ListAlertPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAlertPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAlertPoliciesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListAlertPoliciesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.orderBy = 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 ListAlertPoliciesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAlertPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAlertPoliciesRequest message. + * @function verify + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAlertPoliciesRequest.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.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 ListAlertPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest + */ + ListAlertPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListAlertPoliciesRequest) + return object; + var message = new $root.google.monitoring.v3.ListAlertPoliciesRequest(); + if (object.name != null) + message.name = String(object.name); + 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 ListAlertPoliciesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {google.monitoring.v3.ListAlertPoliciesRequest} message ListAlertPoliciesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAlertPoliciesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + object.filter = ""; + object.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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListAlertPoliciesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAlertPoliciesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAlertPoliciesRequest; + })(); + + v3.ListAlertPoliciesResponse = (function() { + + /** + * Properties of a ListAlertPoliciesResponse. + * @memberof google.monitoring.v3 + * @interface IListAlertPoliciesResponse + * @property {Array.|null} [alertPolicies] ListAlertPoliciesResponse alertPolicies + * @property {string|null} [nextPageToken] ListAlertPoliciesResponse nextPageToken + */ + + /** + * Constructs a new ListAlertPoliciesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListAlertPoliciesResponse. + * @implements IListAlertPoliciesResponse + * @constructor + * @param {google.monitoring.v3.IListAlertPoliciesResponse=} [properties] Properties to set + */ + function ListAlertPoliciesResponse(properties) { + this.alertPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAlertPoliciesResponse alertPolicies. + * @member {Array.} alertPolicies + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @instance + */ + ListAlertPoliciesResponse.prototype.alertPolicies = $util.emptyArray; + + /** + * ListAlertPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @instance + */ + ListAlertPoliciesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAlertPoliciesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {google.monitoring.v3.IListAlertPoliciesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse instance + */ + ListAlertPoliciesResponse.create = function create(properties) { + return new ListAlertPoliciesResponse(properties); + }; + + /** + * Encodes the specified ListAlertPoliciesResponse message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {google.monitoring.v3.IListAlertPoliciesResponse} message ListAlertPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAlertPoliciesResponse.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.alertPolicies != null && message.alertPolicies.length) + for (var i = 0; i < message.alertPolicies.length; ++i) + $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListAlertPoliciesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {google.monitoring.v3.IListAlertPoliciesResponse} message ListAlertPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAlertPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAlertPoliciesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListAlertPoliciesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (!(message.alertPolicies && message.alertPolicies.length)) + message.alertPolicies = []; + message.alertPolicies.push($root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAlertPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAlertPoliciesResponse message. + * @function verify + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAlertPoliciesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alertPolicies != null && message.hasOwnProperty("alertPolicies")) { + if (!Array.isArray(message.alertPolicies)) + return "alertPolicies: array expected"; + for (var i = 0; i < message.alertPolicies.length; ++i) { + var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicies[i]); + if (error) + return "alertPolicies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAlertPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse + */ + ListAlertPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListAlertPoliciesResponse) + return object; + var message = new $root.google.monitoring.v3.ListAlertPoliciesResponse(); + if (object.alertPolicies) { + if (!Array.isArray(object.alertPolicies)) + throw TypeError(".google.monitoring.v3.ListAlertPoliciesResponse.alertPolicies: array expected"); + message.alertPolicies = []; + for (var i = 0; i < object.alertPolicies.length; ++i) { + if (typeof object.alertPolicies[i] !== "object") + throw TypeError(".google.monitoring.v3.ListAlertPoliciesResponse.alertPolicies: object expected"); + message.alertPolicies[i] = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAlertPoliciesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {google.monitoring.v3.ListAlertPoliciesResponse} message ListAlertPoliciesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAlertPoliciesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.alertPolicies = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.alertPolicies && message.alertPolicies.length) { + object.alertPolicies = []; + for (var j = 0; j < message.alertPolicies.length; ++j) + object.alertPolicies[j] = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicies[j], options); + } + return object; + }; + + /** + * Converts this ListAlertPoliciesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAlertPoliciesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAlertPoliciesResponse; + })(); + + v3.UpdateAlertPolicyRequest = (function() { + + /** + * Properties of an UpdateAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateAlertPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAlertPolicyRequest updateMask + * @property {google.monitoring.v3.IAlertPolicy|null} [alertPolicy] UpdateAlertPolicyRequest alertPolicy + */ + + /** + * Constructs a new UpdateAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateAlertPolicyRequest. + * @implements IUpdateAlertPolicyRequest + * @constructor + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest=} [properties] Properties to set + */ + function UpdateAlertPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAlertPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @instance + */ + UpdateAlertPolicyRequest.prototype.updateMask = null; + + /** + * UpdateAlertPolicyRequest alertPolicy. + * @member {google.monitoring.v3.IAlertPolicy|null|undefined} alertPolicy + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @instance + */ + UpdateAlertPolicyRequest.prototype.alertPolicy = null; + + /** + * Creates a new UpdateAlertPolicyRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest instance + */ + UpdateAlertPolicyRequest.create = function create(properties) { + return new UpdateAlertPolicyRequest(properties); + }; + + /** + * Encodes the specified UpdateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} message UpdateAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAlertPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} message UpdateAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAlertPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateAlertPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAlertPolicyRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAlertPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) { + var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicy); + if (error) + return "alertPolicy." + error; + } + return null; + }; + + /** + * Creates an UpdateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest + */ + UpdateAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateAlertPolicyRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateAlertPolicyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateAlertPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.alertPolicy != null) { + if (typeof object.alertPolicy !== "object") + throw TypeError(".google.monitoring.v3.UpdateAlertPolicyRequest.alertPolicy: object expected"); + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicy); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAlertPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.UpdateAlertPolicyRequest} message UpdateAlertPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAlertPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.alertPolicy = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + object.alertPolicy = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicy, options); + return object; + }; + + /** + * Converts this UpdateAlertPolicyRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAlertPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateAlertPolicyRequest; + })(); + + v3.DeleteAlertPolicyRequest = (function() { + + /** + * Properties of a DeleteAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteAlertPolicyRequest + * @property {string|null} [name] DeleteAlertPolicyRequest name + */ + + /** + * Constructs a new DeleteAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteAlertPolicyRequest. + * @implements IDeleteAlertPolicyRequest + * @constructor + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest=} [properties] Properties to set + */ + function DeleteAlertPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAlertPolicyRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @instance + */ + DeleteAlertPolicyRequest.prototype.name = ""; + + /** + * Creates a new DeleteAlertPolicyRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest instance + */ + DeleteAlertPolicyRequest.create = function create(properties) { + return new DeleteAlertPolicyRequest(properties); + }; + + /** + * Encodes the specified DeleteAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} message DeleteAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAlertPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} message DeleteAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAlertPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteAlertPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAlertPolicyRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAlertPolicyRequest.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 DeleteAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest + */ + DeleteAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteAlertPolicyRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteAlertPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAlertPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {google.monitoring.v3.DeleteAlertPolicyRequest} message DeleteAlertPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAlertPolicyRequest.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 DeleteAlertPolicyRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAlertPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteAlertPolicyRequest; + })(); + + v3.AlertPolicy = (function() { + + /** + * Properties of an AlertPolicy. + * @memberof google.monitoring.v3 + * @interface IAlertPolicy + * @property {string|null} [name] AlertPolicy name + * @property {string|null} [displayName] AlertPolicy displayName + * @property {google.monitoring.v3.AlertPolicy.IDocumentation|null} [documentation] AlertPolicy documentation + * @property {Object.|null} [userLabels] AlertPolicy userLabels + * @property {Array.|null} [conditions] AlertPolicy conditions + * @property {google.monitoring.v3.AlertPolicy.ConditionCombinerType|null} [combiner] AlertPolicy combiner + * @property {google.protobuf.IBoolValue|null} [enabled] AlertPolicy enabled + * @property {Array.|null} [notificationChannels] AlertPolicy notificationChannels + * @property {google.monitoring.v3.IMutationRecord|null} [creationRecord] AlertPolicy creationRecord + * @property {google.monitoring.v3.IMutationRecord|null} [mutationRecord] AlertPolicy mutationRecord + */ + + /** + * Constructs a new AlertPolicy. + * @memberof google.monitoring.v3 + * @classdesc Represents an AlertPolicy. + * @implements IAlertPolicy + * @constructor + * @param {google.monitoring.v3.IAlertPolicy=} [properties] Properties to set + */ + function AlertPolicy(properties) { + this.userLabels = {}; + this.conditions = []; + this.notificationChannels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AlertPolicy name. + * @member {string} name + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.name = ""; + + /** + * AlertPolicy displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.displayName = ""; + + /** + * AlertPolicy documentation. + * @member {google.monitoring.v3.AlertPolicy.IDocumentation|null|undefined} documentation + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.documentation = null; + + /** + * AlertPolicy userLabels. + * @member {Object.} userLabels + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.userLabels = $util.emptyObject; + + /** + * AlertPolicy conditions. + * @member {Array.} conditions + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.conditions = $util.emptyArray; + + /** + * AlertPolicy combiner. + * @member {google.monitoring.v3.AlertPolicy.ConditionCombinerType} combiner + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.combiner = 0; + + /** + * AlertPolicy enabled. + * @member {google.protobuf.IBoolValue|null|undefined} enabled + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.enabled = null; + + /** + * AlertPolicy notificationChannels. + * @member {Array.} notificationChannels + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.notificationChannels = $util.emptyArray; + + /** + * AlertPolicy creationRecord. + * @member {google.monitoring.v3.IMutationRecord|null|undefined} creationRecord + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.creationRecord = null; + + /** + * AlertPolicy mutationRecord. + * @member {google.monitoring.v3.IMutationRecord|null|undefined} mutationRecord + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.mutationRecord = null; + + /** + * Creates a new AlertPolicy instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {google.monitoring.v3.IAlertPolicy=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy instance + */ + AlertPolicy.create = function create(properties) { + return new AlertPolicy(properties); + }; + + /** + * Encodes the specified AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {google.monitoring.v3.IAlertPolicy} message AlertPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlertPolicy.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.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.combiner != null && message.hasOwnProperty("combiner")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.combiner); + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) + $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecord, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.monitoring.v3.AlertPolicy.Condition.encode(message.conditions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.documentation != null && message.hasOwnProperty("documentation")) + $root.google.monitoring.v3.AlertPolicy.Documentation.encode(message.documentation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.notificationChannels != null && message.notificationChannels.length) + for (var i = 0; i < message.notificationChannels.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.notificationChannels[i]); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.enabled != null && message.hasOwnProperty("enabled")) + $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {google.monitoring.v3.IAlertPolicy} message AlertPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlertPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AlertPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlertPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 13: + message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.decode(reader, reader.uint32()); + break; + case 16: + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); + break; + case 12: + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.monitoring.v3.AlertPolicy.Condition.decode(reader, reader.uint32())); + break; + case 6: + message.combiner = reader.int32(); + break; + case 17: + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + case 14: + if (!(message.notificationChannels && message.notificationChannels.length)) + message.notificationChannels = []; + message.notificationChannels.push(reader.string()); + break; + case 10: + message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; + case 11: + message.mutationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AlertPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlertPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AlertPolicy message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlertPolicy.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.documentation != null && message.hasOwnProperty("documentation")) { + var error = $root.google.monitoring.v3.AlertPolicy.Documentation.verify(message.documentation); + if (error) + return "documentation." + 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.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.verify(message.conditions[i]); + if (error) + return "conditions." + error; + } + } + if (message.combiner != null && message.hasOwnProperty("combiner")) + switch (message.combiner) { + default: + return "combiner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.enabled); + if (error) + return "enabled." + error; + } + if (message.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { + if (!Array.isArray(message.notificationChannels)) + return "notificationChannels: array expected"; + for (var i = 0; i < message.notificationChannels.length; ++i) + if (!$util.isString(message.notificationChannels[i])) + return "notificationChannels: string[] expected"; + } + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) { + var error = $root.google.monitoring.v3.MutationRecord.verify(message.creationRecord); + if (error) + return "creationRecord." + error; + } + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) { + var error = $root.google.monitoring.v3.MutationRecord.verify(message.mutationRecord); + if (error) + return "mutationRecord." + error; + } + return null; + }; + + /** + * Creates an AlertPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy + */ + AlertPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.documentation != null) { + if (typeof object.documentation !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.documentation: object expected"); + message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.fromObject(object.documentation); + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.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.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.monitoring.v3.AlertPolicy.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.conditions: object expected"); + message.conditions[i] = $root.google.monitoring.v3.AlertPolicy.Condition.fromObject(object.conditions[i]); + } + } + switch (object.combiner) { + case "COMBINE_UNSPECIFIED": + case 0: + message.combiner = 0; + break; + case "AND": + case 1: + message.combiner = 1; + break; + case "OR": + case 2: + message.combiner = 2; + break; + case "AND_WITH_MATCHING_RESOURCE": + case 3: + message.combiner = 3; + break; + } + if (object.enabled != null) { + if (typeof object.enabled !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.enabled: object expected"); + message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); + } + if (object.notificationChannels) { + if (!Array.isArray(object.notificationChannels)) + throw TypeError(".google.monitoring.v3.AlertPolicy.notificationChannels: array expected"); + message.notificationChannels = []; + for (var i = 0; i < object.notificationChannels.length; ++i) + message.notificationChannels[i] = String(object.notificationChannels[i]); + } + if (object.creationRecord != null) { + if (typeof object.creationRecord !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.creationRecord: object expected"); + message.creationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.creationRecord); + } + if (object.mutationRecord != null) { + if (typeof object.mutationRecord !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.mutationRecord: object expected"); + message.mutationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.mutationRecord); + } + return message; + }; + + /** + * Creates a plain object from an AlertPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {google.monitoring.v3.AlertPolicy} message AlertPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlertPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.conditions = []; + object.notificationChannels = []; + } + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.combiner = options.enums === String ? "COMBINE_UNSPECIFIED" : 0; + object.creationRecord = null; + object.mutationRecord = null; + object.documentation = null; + object.enabled = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.combiner != null && message.hasOwnProperty("combiner")) + object.combiner = options.enums === String ? $root.google.monitoring.v3.AlertPolicy.ConditionCombinerType[message.combiner] : message.combiner; + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + object.creationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.creationRecord, options); + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) + object.mutationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.mutationRecord, options); + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.monitoring.v3.AlertPolicy.Condition.toObject(message.conditions[j], options); + } + if (message.documentation != null && message.hasOwnProperty("documentation")) + object.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.toObject(message.documentation, options); + if (message.notificationChannels && message.notificationChannels.length) { + object.notificationChannels = []; + for (var j = 0; j < message.notificationChannels.length; ++j) + object.notificationChannels[j] = message.notificationChannels[j]; + } + 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.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); + return object; + }; + + /** + * Converts this AlertPolicy to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy + * @instance + * @returns {Object.} JSON object + */ + AlertPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AlertPolicy.Documentation = (function() { + + /** + * Properties of a Documentation. + * @memberof google.monitoring.v3.AlertPolicy + * @interface IDocumentation + * @property {string|null} [content] Documentation content + * @property {string|null} [mimeType] Documentation mimeType + */ + + /** + * Constructs a new Documentation. + * @memberof google.monitoring.v3.AlertPolicy + * @classdesc Represents a Documentation. + * @implements IDocumentation + * @constructor + * @param {google.monitoring.v3.AlertPolicy.IDocumentation=} [properties] Properties to set + */ + function Documentation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Documentation content. + * @member {string} content + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @instance + */ + Documentation.prototype.content = ""; + + /** + * Documentation mimeType. + * @member {string} mimeType + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @instance + */ + Documentation.prototype.mimeType = ""; + + /** + * Creates a new Documentation instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.IDocumentation=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation instance + */ + Documentation.create = function create(properties) { + return new Documentation(properties); + }; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); + return writer; + }; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Documentation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.mimeType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Documentation message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Documentation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + return null; + }; + + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation + */ + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Documentation) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Documentation(); + if (object.content != null) + message.content = String(object.content); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + return message; + }; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.Documentation} message Documentation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Documentation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.mimeType = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + return object; + }; + + /** + * Converts this Documentation to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @instance + * @returns {Object.} JSON object + */ + Documentation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Documentation; + })(); + + AlertPolicy.Condition = (function() { + + /** + * Properties of a Condition. + * @memberof google.monitoring.v3.AlertPolicy + * @interface ICondition + * @property {string|null} [name] Condition name + * @property {string|null} [displayName] Condition displayName + * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null} [conditionThreshold] Condition conditionThreshold + * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null} [conditionAbsent] Condition conditionAbsent + */ + + /** + * Constructs a new Condition. + * @memberof google.monitoring.v3.AlertPolicy + * @classdesc Represents a Condition. + * @implements ICondition + * @constructor + * @param {google.monitoring.v3.AlertPolicy.ICondition=} [properties] Properties to set + */ + function Condition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Condition name. + * @member {string} name + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.name = ""; + + /** + * Condition displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.displayName = ""; + + /** + * Condition conditionThreshold. + * @member {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null|undefined} conditionThreshold + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.conditionThreshold = null; + + /** + * Condition conditionAbsent. + * @member {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null|undefined} conditionAbsent + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.conditionAbsent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Condition condition. + * @member {"conditionThreshold"|"conditionAbsent"|undefined} condition + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Object.defineProperty(Condition.prototype, "condition", { + get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Condition instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.ICondition=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition instance + */ + Condition.create = function create(properties) { + return new Condition(properties); + }; + + /** + * Encodes the specified Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) + $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.encode(message.conditionThreshold, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) + $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.encode(message.conditionAbsent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); + return writer; + }; + + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Condition message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 12: + message.name = reader.string(); + break; + case 6: + message.displayName = reader.string(); + break; + case 1: + message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.decode(reader, reader.uint32()); + break; + case 2: + message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Condition message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Condition.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) { + properties.condition = 1; + { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify(message.conditionThreshold); + if (error) + return "conditionThreshold." + error; + } + } + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) { + if (properties.condition === 1) + return "condition: multiple values"; + properties.condition = 1; + { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify(message.conditionAbsent); + if (error) + return "conditionAbsent." + error; + } + } + return null; + }; + + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition + */ + Condition.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.conditionThreshold != null) { + if (typeof object.conditionThreshold !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionThreshold: object expected"); + message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.fromObject(object.conditionThreshold); + } + if (object.conditionAbsent != null) { + if (typeof object.conditionAbsent !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionAbsent: object expected"); + message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.fromObject(object.conditionAbsent); + } + return message; + }; + + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition} message Condition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Condition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.name = ""; + } + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) { + object.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.toObject(message.conditionThreshold, options); + if (options.oneofs) + object.condition = "conditionThreshold"; + } + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) { + object.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.toObject(message.conditionAbsent, options); + if (options.oneofs) + object.condition = "conditionAbsent"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Condition to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + * @returns {Object.} JSON object + */ + Condition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Condition.Trigger = (function() { + + /** + * Properties of a Trigger. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface ITrigger + * @property {number|null} [count] Trigger count + * @property {number|null} [percent] Trigger percent + */ + + /** + * Constructs a new Trigger. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a Trigger. + * @implements ITrigger + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger=} [properties] Properties to set + */ + function Trigger(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trigger count. + * @member {number} count + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + */ + Trigger.prototype.count = 0; + + /** + * Trigger percent. + * @member {number} percent + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + */ + Trigger.prototype.percent = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Trigger type. + * @member {"count"|"percent"|undefined} type + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + */ + Object.defineProperty(Trigger.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["count", "percent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Trigger instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger instance + */ + Trigger.create = function create(properties) { + return new Trigger(properties); + }; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); + if (message.percent != null && message.hasOwnProperty("percent")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.percent); + return writer; + }; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.Trigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int32(); + break; + case 2: + message.percent = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trigger message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.count != null && message.hasOwnProperty("count")) { + properties.type = 1; + if (!$util.isInteger(message.count)) + return "count: integer expected"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (typeof message.percent !== "number") + return "percent: number expected"; + } + return null; + }; + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger + */ + Trigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.Trigger) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.Trigger(); + if (object.count != null) + message.count = object.count | 0; + if (object.percent != null) + message.percent = Number(object.percent); + return message; + }; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.Trigger} message Trigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.count != null && message.hasOwnProperty("count")) { + object.count = message.count; + if (options.oneofs) + object.type = "count"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + object.percent = options.json && !isFinite(message.percent) ? String(message.percent) : message.percent; + if (options.oneofs) + object.type = "percent"; + } + return object; + }; + + /** + * Converts this Trigger to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + * @returns {Object.} JSON object + */ + Trigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Trigger; + })(); + + Condition.MetricThreshold = (function() { + + /** + * Properties of a MetricThreshold. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface IMetricThreshold + * @property {string|null} [filter] MetricThreshold filter + * @property {Array.|null} [aggregations] MetricThreshold aggregations + * @property {string|null} [denominatorFilter] MetricThreshold denominatorFilter + * @property {Array.|null} [denominatorAggregations] MetricThreshold denominatorAggregations + * @property {google.monitoring.v3.ComparisonType|null} [comparison] MetricThreshold comparison + * @property {number|null} [thresholdValue] MetricThreshold thresholdValue + * @property {google.protobuf.IDuration|null} [duration] MetricThreshold duration + * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MetricThreshold trigger + */ + + /** + * Constructs a new MetricThreshold. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a MetricThreshold. + * @implements IMetricThreshold + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold=} [properties] Properties to set + */ + function MetricThreshold(properties) { + this.aggregations = []; + this.denominatorAggregations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricThreshold filter. + * @member {string} filter + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.filter = ""; + + /** + * MetricThreshold aggregations. + * @member {Array.} aggregations + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.aggregations = $util.emptyArray; + + /** + * MetricThreshold denominatorFilter. + * @member {string} denominatorFilter + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.denominatorFilter = ""; + + /** + * MetricThreshold denominatorAggregations. + * @member {Array.} denominatorAggregations + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.denominatorAggregations = $util.emptyArray; + + /** + * MetricThreshold comparison. + * @member {google.monitoring.v3.ComparisonType} comparison + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.comparison = 0; + + /** + * MetricThreshold thresholdValue. + * @member {number} thresholdValue + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.thresholdValue = 0; + + /** + * MetricThreshold duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.duration = null; + + /** + * MetricThreshold trigger. + * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.trigger = null; + + /** + * Creates a new MetricThreshold instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold instance + */ + MetricThreshold.create = function create(properties) { + return new MetricThreshold(properties); + }; + + /** + * Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold} message MetricThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricThreshold.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.comparison != null && message.hasOwnProperty("comparison")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.comparison); + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.thresholdValue); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trigger != null && message.hasOwnProperty("trigger")) + $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.aggregations != null && message.aggregations.length) + for (var i = 0; i < message.aggregations.length; ++i) + $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.denominatorFilter); + if (message.denominatorAggregations != null && message.denominatorAggregations.length) + for (var i = 0; i < message.denominatorAggregations.length; ++i) + $root.google.monitoring.v3.Aggregation.encode(message.denominatorAggregations[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold} message MetricThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricThreshold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricThreshold message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricThreshold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.filter = reader.string(); + break; + case 8: + if (!(message.aggregations && message.aggregations.length)) + message.aggregations = []; + message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + case 9: + message.denominatorFilter = reader.string(); + break; + case 10: + if (!(message.denominatorAggregations && message.denominatorAggregations.length)) + message.denominatorAggregations = []; + message.denominatorAggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + case 4: + message.comparison = reader.int32(); + break; + case 5: + message.thresholdValue = reader.double(); + break; + case 6: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 7: + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricThreshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricThreshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricThreshold message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricThreshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregations != null && message.hasOwnProperty("aggregations")) { + if (!Array.isArray(message.aggregations)) + return "aggregations: array expected"; + for (var i = 0; i < message.aggregations.length; ++i) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregations[i]); + if (error) + return "aggregations." + error; + } + } + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + if (!$util.isString(message.denominatorFilter)) + return "denominatorFilter: string expected"; + if (message.denominatorAggregations != null && message.hasOwnProperty("denominatorAggregations")) { + if (!Array.isArray(message.denominatorAggregations)) + return "denominatorAggregations: array expected"; + for (var i = 0; i < message.denominatorAggregations.length; ++i) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.denominatorAggregations[i]); + if (error) + return "denominatorAggregations." + error; + } + } + if (message.comparison != null && message.hasOwnProperty("comparison")) + switch (message.comparison) { + default: + return "comparison: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + if (typeof message.thresholdValue !== "number") + return "thresholdValue: number expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; + + /** + * Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold + */ + MetricThreshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregations) { + if (!Array.isArray(object.aggregations)) + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.aggregations: array expected"); + message.aggregations = []; + for (var i = 0; i < object.aggregations.length; ++i) { + if (typeof object.aggregations[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.aggregations: object expected"); + message.aggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregations[i]); + } + } + if (object.denominatorFilter != null) + message.denominatorFilter = String(object.denominatorFilter); + if (object.denominatorAggregations) { + if (!Array.isArray(object.denominatorAggregations)) + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.denominatorAggregations: array expected"); + message.denominatorAggregations = []; + for (var i = 0; i < object.denominatorAggregations.length; ++i) { + if (typeof object.denominatorAggregations[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.denominatorAggregations: object expected"); + message.denominatorAggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.denominatorAggregations[i]); + } + } + switch (object.comparison) { + case "COMPARISON_UNSPECIFIED": + case 0: + message.comparison = 0; + break; + case "COMPARISON_GT": + case 1: + message.comparison = 1; + break; + case "COMPARISON_GE": + case 2: + message.comparison = 2; + break; + case "COMPARISON_LT": + case 3: + message.comparison = 3; + break; + case "COMPARISON_LE": + case 4: + message.comparison = 4; + break; + case "COMPARISON_EQ": + case 5: + message.comparison = 5; + break; + case "COMPARISON_NE": + case 6: + message.comparison = 6; + break; + } + if (object.thresholdValue != null) + message.thresholdValue = Number(object.thresholdValue); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.trigger: object expected"); + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from a MetricThreshold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} message MetricThreshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricThreshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.aggregations = []; + object.denominatorAggregations = []; + } + if (options.defaults) { + object.filter = ""; + object.comparison = options.enums === String ? "COMPARISON_UNSPECIFIED" : 0; + object.thresholdValue = 0; + object.duration = null; + object.trigger = null; + object.denominatorFilter = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.comparison != null && message.hasOwnProperty("comparison")) + object.comparison = options.enums === String ? $root.google.monitoring.v3.ComparisonType[message.comparison] : message.comparison; + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + object.thresholdValue = options.json && !isFinite(message.thresholdValue) ? String(message.thresholdValue) : message.thresholdValue; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); + if (message.aggregations && message.aggregations.length) { + object.aggregations = []; + for (var j = 0; j < message.aggregations.length; ++j) + object.aggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.aggregations[j], options); + } + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + object.denominatorFilter = message.denominatorFilter; + if (message.denominatorAggregations && message.denominatorAggregations.length) { + object.denominatorAggregations = []; + for (var j = 0; j < message.denominatorAggregations.length; ++j) + object.denominatorAggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.denominatorAggregations[j], options); + } + return object; + }; + + /** + * Converts this MetricThreshold to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + * @returns {Object.} JSON object + */ + MetricThreshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricThreshold; + })(); + + Condition.MetricAbsence = (function() { + + /** + * Properties of a MetricAbsence. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface IMetricAbsence + * @property {string|null} [filter] MetricAbsence filter + * @property {Array.|null} [aggregations] MetricAbsence aggregations + * @property {google.protobuf.IDuration|null} [duration] MetricAbsence duration + * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MetricAbsence trigger + */ + + /** + * Constructs a new MetricAbsence. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a MetricAbsence. + * @implements IMetricAbsence + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence=} [properties] Properties to set + */ + function MetricAbsence(properties) { + this.aggregations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricAbsence filter. + * @member {string} filter + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.filter = ""; + + /** + * MetricAbsence aggregations. + * @member {Array.} aggregations + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.aggregations = $util.emptyArray; + + /** + * MetricAbsence duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.duration = null; + + /** + * MetricAbsence trigger. + * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.trigger = null; + + /** + * Creates a new MetricAbsence instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence instance + */ + MetricAbsence.create = function create(properties) { + return new MetricAbsence(properties); + }; + + /** + * Encodes the specified MetricAbsence message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence} message MetricAbsence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricAbsence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.trigger != null && message.hasOwnProperty("trigger")) + $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.aggregations != null && message.aggregations.length) + for (var i = 0; i < message.aggregations.length; ++i) + $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricAbsence message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence} message MetricAbsence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricAbsence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricAbsence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 5: + if (!(message.aggregations && message.aggregations.length)) + message.aggregations = []; + message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + case 2: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricAbsence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricAbsence message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricAbsence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregations != null && message.hasOwnProperty("aggregations")) { + if (!Array.isArray(message.aggregations)) + return "aggregations: array expected"; + for (var i = 0; i < message.aggregations.length; ++i) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregations[i]); + if (error) + return "aggregations." + error; + } + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; + + /** + * Creates a MetricAbsence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence + */ + MetricAbsence.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregations) { + if (!Array.isArray(object.aggregations)) + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.aggregations: array expected"); + message.aggregations = []; + for (var i = 0; i < object.aggregations.length; ++i) { + if (typeof object.aggregations[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.aggregations: object expected"); + message.aggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregations[i]); + } + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.trigger: object expected"); + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from a MetricAbsence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} message MetricAbsence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricAbsence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aggregations = []; + if (options.defaults) { + object.filter = ""; + object.duration = null; + object.trigger = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); + if (message.aggregations && message.aggregations.length) { + object.aggregations = []; + for (var j = 0; j < message.aggregations.length; ++j) + object.aggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.aggregations[j], options); + } + return object; + }; + + /** + * Converts this MetricAbsence to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + * @returns {Object.} JSON object + */ + MetricAbsence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricAbsence; + })(); + + return Condition; + })(); + + /** + * ConditionCombinerType enum. + * @name google.monitoring.v3.AlertPolicy.ConditionCombinerType + * @enum {string} + * @property {number} COMBINE_UNSPECIFIED=0 COMBINE_UNSPECIFIED value + * @property {number} AND=1 AND value + * @property {number} OR=2 OR value + * @property {number} AND_WITH_MATCHING_RESOURCE=3 AND_WITH_MATCHING_RESOURCE value + */ + AlertPolicy.ConditionCombinerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMBINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AND"] = 1; + values[valuesById[2] = "OR"] = 2; + values[valuesById[3] = "AND_WITH_MATCHING_RESOURCE"] = 3; + return values; + })(); + + return AlertPolicy; + })(); + + v3.TypedValue = (function() { + + /** + * Properties of a TypedValue. + * @memberof google.monitoring.v3 + * @interface ITypedValue + * @property {boolean|null} [boolValue] TypedValue boolValue + * @property {number|Long|null} [int64Value] TypedValue int64Value + * @property {number|null} [doubleValue] TypedValue doubleValue + * @property {string|null} [stringValue] TypedValue stringValue + * @property {google.api.IDistribution|null} [distributionValue] TypedValue distributionValue + */ + + /** + * Constructs a new TypedValue. + * @memberof google.monitoring.v3 + * @classdesc Represents a TypedValue. + * @implements ITypedValue + * @constructor + * @param {google.monitoring.v3.ITypedValue=} [properties] Properties to set + */ + function TypedValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TypedValue boolValue. + * @member {boolean} boolValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.boolValue = false; + + /** + * TypedValue int64Value. + * @member {number|Long} int64Value + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TypedValue doubleValue. + * @member {number} doubleValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.doubleValue = 0; + + /** + * TypedValue stringValue. + * @member {string} stringValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.stringValue = ""; + + /** + * TypedValue distributionValue. + * @member {google.api.IDistribution|null|undefined} distributionValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.distributionValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TypedValue value. + * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + Object.defineProperty(TypedValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TypedValue instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.ITypedValue=} [properties] Properties to set + * @returns {google.monitoring.v3.TypedValue} TypedValue instance + */ + TypedValue.create = function create(properties) { + return new TypedValue(properties); + }; + + /** + * Encodes the specified TypedValue message. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.ITypedValue} message TypedValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypedValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); + if (message.int64Value != null && message.hasOwnProperty("int64Value")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) + $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.ITypedValue} message TypedValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypedValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TypedValue} TypedValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypedValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TypedValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.boolValue = reader.bool(); + break; + case 2: + message.int64Value = reader.int64(); + break; + case 3: + message.doubleValue = reader.double(); + break; + case 4: + message.stringValue = reader.string(); + break; + case 5: + message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TypedValue} TypedValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypedValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypedValue message. + * @function verify + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypedValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.api.Distribution.verify(message.distributionValue); + if (error) + return "distributionValue." + error; + } + } + return null; + }; + + /** + * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TypedValue} TypedValue + */ + TypedValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TypedValue) + return object; + var message = new $root.google.monitoring.v3.TypedValue(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.distributionValue != null) { + if (typeof object.distributionValue !== "object") + throw TypeError(".google.monitoring.v3.TypedValue.distributionValue: object expected"); + message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); + } + return message; + }; + + /** + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.TypedValue} message TypedValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypedValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.value = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { + object.distributionValue = $root.google.api.Distribution.toObject(message.distributionValue, options); + if (options.oneofs) + object.value = "distributionValue"; + } + return object; + }; + + /** + * Converts this TypedValue to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TypedValue + * @instance + * @returns {Object.} JSON object + */ + TypedValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TypedValue; + })(); + + v3.TimeInterval = (function() { + + /** + * Properties of a TimeInterval. + * @memberof google.monitoring.v3 + * @interface ITimeInterval + * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime + * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime + */ + + /** + * Constructs a new TimeInterval. + * @memberof google.monitoring.v3 + * @classdesc Represents a TimeInterval. + * @implements ITimeInterval + * @constructor + * @param {google.monitoring.v3.ITimeInterval=} [properties] Properties to set + */ + function TimeInterval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeInterval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.monitoring.v3.TimeInterval + * @instance + */ + TimeInterval.prototype.endTime = null; + + /** + * TimeInterval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.monitoring.v3.TimeInterval + * @instance + */ + TimeInterval.prototype.startTime = null; + + /** + * Creates a new TimeInterval instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.ITimeInterval=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeInterval} TimeInterval instance + */ + TimeInterval.create = function create(properties) { + return new TimeInterval(properties); + }; + + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeInterval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeInterval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeInterval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 1: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeInterval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeInterval message. + * @function verify + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeInterval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; + + /** + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeInterval} TimeInterval + */ + TimeInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeInterval) + return object; + var message = new $root.google.monitoring.v3.TimeInterval(); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.monitoring.v3.TimeInterval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.monitoring.v3.TimeInterval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + return message; + }; + + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.TimeInterval} message TimeInterval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeInterval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + 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); + return object; + }; + + /** + * Converts this TimeInterval to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeInterval + * @instance + * @returns {Object.} JSON object + */ + TimeInterval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeInterval; + })(); + + v3.Aggregation = (function() { + + /** + * Properties of an Aggregation. + * @memberof google.monitoring.v3 + * @interface IAggregation + * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod + * @property {google.monitoring.v3.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner + * @property {google.monitoring.v3.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer + * @property {Array.|null} [groupByFields] Aggregation groupByFields + */ + + /** + * Constructs a new Aggregation. + * @memberof google.monitoring.v3 + * @classdesc Represents an Aggregation. + * @implements IAggregation + * @constructor + * @param {google.monitoring.v3.IAggregation=} [properties] Properties to set + */ + function Aggregation(properties) { + this.groupByFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Aggregation alignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.alignmentPeriod = null; + + /** + * Aggregation perSeriesAligner. + * @member {google.monitoring.v3.Aggregation.Aligner} perSeriesAligner + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.perSeriesAligner = 0; + + /** + * Aggregation crossSeriesReducer. + * @member {google.monitoring.v3.Aggregation.Reducer} crossSeriesReducer + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.crossSeriesReducer = 0; + + /** + * Aggregation groupByFields. + * @member {Array.} groupByFields + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.groupByFields = $util.emptyArray; + + /** + * Creates a new Aggregation instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.IAggregation=} [properties] Properties to set + * @returns {google.monitoring.v3.Aggregation} Aggregation instance + */ + Aggregation.create = function create(properties) { + return new Aggregation(properties); + }; + + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); + if (message.groupByFields != null && message.groupByFields.length) + for (var i = 0; i < message.groupByFields.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + return writer; + }; + + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Aggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.perSeriesAligner = reader.int32(); + break; + case 4: + message.crossSeriesReducer = reader.int32(); + break; + case 5: + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Aggregation message. + * @function verify + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); + if (error) + return "alignmentPeriod." + error; + } + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + switch (message.perSeriesAligner) { + default: + return "perSeriesAligner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 24: + case 17: + case 18: + case 19: + case 20: + case 21: + case 23: + break; + } + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + switch (message.crossSeriesReducer) { + default: + return "crossSeriesReducer: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 15: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { + if (!Array.isArray(message.groupByFields)) + return "groupByFields: array expected"; + for (var i = 0; i < message.groupByFields.length; ++i) + if (!$util.isString(message.groupByFields[i])) + return "groupByFields: string[] expected"; + } + return null; + }; + + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Aggregation} Aggregation + */ + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Aggregation) + return object; + var message = new $root.google.monitoring.v3.Aggregation(); + if (object.alignmentPeriod != null) { + if (typeof object.alignmentPeriod !== "object") + throw TypeError(".google.monitoring.v3.Aggregation.alignmentPeriod: object expected"); + message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); + } + switch (object.perSeriesAligner) { + case "ALIGN_NONE": + case 0: + message.perSeriesAligner = 0; + break; + case "ALIGN_DELTA": + case 1: + message.perSeriesAligner = 1; + break; + case "ALIGN_RATE": + case 2: + message.perSeriesAligner = 2; + break; + case "ALIGN_INTERPOLATE": + case 3: + message.perSeriesAligner = 3; + break; + case "ALIGN_NEXT_OLDER": + case 4: + message.perSeriesAligner = 4; + break; + case "ALIGN_MIN": + case 10: + message.perSeriesAligner = 10; + break; + case "ALIGN_MAX": + case 11: + message.perSeriesAligner = 11; + break; + case "ALIGN_MEAN": + case 12: + message.perSeriesAligner = 12; + break; + case "ALIGN_COUNT": + case 13: + message.perSeriesAligner = 13; + break; + case "ALIGN_SUM": + case 14: + message.perSeriesAligner = 14; + break; + case "ALIGN_STDDEV": + case 15: + message.perSeriesAligner = 15; + break; + case "ALIGN_COUNT_TRUE": + case 16: + message.perSeriesAligner = 16; + break; + case "ALIGN_COUNT_FALSE": + case 24: + message.perSeriesAligner = 24; + break; + case "ALIGN_FRACTION_TRUE": + case 17: + message.perSeriesAligner = 17; + break; + case "ALIGN_PERCENTILE_99": + case 18: + message.perSeriesAligner = 18; + break; + case "ALIGN_PERCENTILE_95": + case 19: + message.perSeriesAligner = 19; + break; + case "ALIGN_PERCENTILE_50": + case 20: + message.perSeriesAligner = 20; + break; + case "ALIGN_PERCENTILE_05": + case 21: + message.perSeriesAligner = 21; + break; + case "ALIGN_PERCENT_CHANGE": + case 23: + message.perSeriesAligner = 23; + break; + } + switch (object.crossSeriesReducer) { + case "REDUCE_NONE": + case 0: + message.crossSeriesReducer = 0; + break; + case "REDUCE_MEAN": + case 1: + message.crossSeriesReducer = 1; + break; + case "REDUCE_MIN": + case 2: + message.crossSeriesReducer = 2; + break; + case "REDUCE_MAX": + case 3: + message.crossSeriesReducer = 3; + break; + case "REDUCE_SUM": + case 4: + message.crossSeriesReducer = 4; + break; + case "REDUCE_STDDEV": + case 5: + message.crossSeriesReducer = 5; + break; + case "REDUCE_COUNT": + case 6: + message.crossSeriesReducer = 6; + break; + case "REDUCE_COUNT_TRUE": + case 7: + message.crossSeriesReducer = 7; + break; + case "REDUCE_COUNT_FALSE": + case 15: + message.crossSeriesReducer = 15; + break; + case "REDUCE_FRACTION_TRUE": + case 8: + message.crossSeriesReducer = 8; + break; + case "REDUCE_PERCENTILE_99": + case 9: + message.crossSeriesReducer = 9; + break; + case "REDUCE_PERCENTILE_95": + case 10: + message.crossSeriesReducer = 10; + break; + case "REDUCE_PERCENTILE_50": + case 11: + message.crossSeriesReducer = 11; + break; + case "REDUCE_PERCENTILE_05": + case 12: + message.crossSeriesReducer = 12; + break; + } + if (object.groupByFields) { + if (!Array.isArray(object.groupByFields)) + throw TypeError(".google.monitoring.v3.Aggregation.groupByFields: array expected"); + message.groupByFields = []; + for (var i = 0; i < object.groupByFields.length; ++i) + message.groupByFields[i] = String(object.groupByFields[i]); + } + return message; + }; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.Aggregation} message Aggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupByFields = []; + if (options.defaults) { + object.alignmentPeriod = null; + object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; + object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; + } + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + object.perSeriesAligner = options.enums === String ? $root.google.monitoring.v3.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.v3.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; + if (message.groupByFields && message.groupByFields.length) { + object.groupByFields = []; + for (var j = 0; j < message.groupByFields.length; ++j) + object.groupByFields[j] = message.groupByFields[j]; + } + return object; + }; + + /** + * Converts this Aggregation to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Aggregation + * @instance + * @returns {Object.} JSON object + */ + Aggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Aligner enum. + * @name google.monitoring.v3.Aggregation.Aligner + * @enum {string} + * @property {number} ALIGN_NONE=0 ALIGN_NONE value + * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value + * @property {number} ALIGN_RATE=2 ALIGN_RATE value + * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value + * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value + * @property {number} ALIGN_MIN=10 ALIGN_MIN value + * @property {number} ALIGN_MAX=11 ALIGN_MAX value + * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value + * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value + * @property {number} ALIGN_SUM=14 ALIGN_SUM value + * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value + * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value + * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value + * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value + * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value + * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value + * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value + * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value + * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value + */ + Aggregation.Aligner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ALIGN_NONE"] = 0; + values[valuesById[1] = "ALIGN_DELTA"] = 1; + values[valuesById[2] = "ALIGN_RATE"] = 2; + values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; + values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; + values[valuesById[10] = "ALIGN_MIN"] = 10; + values[valuesById[11] = "ALIGN_MAX"] = 11; + values[valuesById[12] = "ALIGN_MEAN"] = 12; + values[valuesById[13] = "ALIGN_COUNT"] = 13; + values[valuesById[14] = "ALIGN_SUM"] = 14; + values[valuesById[15] = "ALIGN_STDDEV"] = 15; + values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; + values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; + values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; + values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; + values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; + values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; + values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; + values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; + return values; + })(); + + /** + * Reducer enum. + * @name google.monitoring.v3.Aggregation.Reducer + * @enum {string} + * @property {number} REDUCE_NONE=0 REDUCE_NONE value + * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value + * @property {number} REDUCE_MIN=2 REDUCE_MIN value + * @property {number} REDUCE_MAX=3 REDUCE_MAX value + * @property {number} REDUCE_SUM=4 REDUCE_SUM value + * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value + * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value + * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value + * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value + * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value + * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value + * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value + * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value + * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value + */ + Aggregation.Reducer = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDUCE_NONE"] = 0; + values[valuesById[1] = "REDUCE_MEAN"] = 1; + values[valuesById[2] = "REDUCE_MIN"] = 2; + values[valuesById[3] = "REDUCE_MAX"] = 3; + values[valuesById[4] = "REDUCE_SUM"] = 4; + values[valuesById[5] = "REDUCE_STDDEV"] = 5; + values[valuesById[6] = "REDUCE_COUNT"] = 6; + values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; + values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; + values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; + values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; + values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; + values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; + values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; + return values; + })(); + + return Aggregation; + })(); + + /** + * ComparisonType enum. + * @name google.monitoring.v3.ComparisonType + * @enum {string} + * @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value + * @property {number} COMPARISON_GT=1 COMPARISON_GT value + * @property {number} COMPARISON_GE=2 COMPARISON_GE value + * @property {number} COMPARISON_LT=3 COMPARISON_LT value + * @property {number} COMPARISON_LE=4 COMPARISON_LE value + * @property {number} COMPARISON_EQ=5 COMPARISON_EQ value + * @property {number} COMPARISON_NE=6 COMPARISON_NE value + */ + v3.ComparisonType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPARISON_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPARISON_GT"] = 1; + values[valuesById[2] = "COMPARISON_GE"] = 2; + values[valuesById[3] = "COMPARISON_LT"] = 3; + values[valuesById[4] = "COMPARISON_LE"] = 4; + values[valuesById[5] = "COMPARISON_EQ"] = 5; + values[valuesById[6] = "COMPARISON_NE"] = 6; + return values; + })(); + + /** + * ServiceTier enum. + * @name google.monitoring.v3.ServiceTier + * @enum {string} + * @property {number} SERVICE_TIER_UNSPECIFIED=0 SERVICE_TIER_UNSPECIFIED value + * @property {number} SERVICE_TIER_BASIC=1 SERVICE_TIER_BASIC value + * @property {number} SERVICE_TIER_PREMIUM=2 SERVICE_TIER_PREMIUM value + */ + v3.ServiceTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVICE_TIER_BASIC"] = 1; + values[valuesById[2] = "SERVICE_TIER_PREMIUM"] = 2; + return values; + })(); + + v3.MutationRecord = (function() { + + /** + * Properties of a MutationRecord. + * @memberof google.monitoring.v3 + * @interface IMutationRecord + * @property {google.protobuf.ITimestamp|null} [mutateTime] MutationRecord mutateTime + * @property {string|null} [mutatedBy] MutationRecord mutatedBy + */ + + /** + * Constructs a new MutationRecord. + * @memberof google.monitoring.v3 + * @classdesc Represents a MutationRecord. + * @implements IMutationRecord + * @constructor + * @param {google.monitoring.v3.IMutationRecord=} [properties] Properties to set + */ + function MutationRecord(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MutationRecord mutateTime. + * @member {google.protobuf.ITimestamp|null|undefined} mutateTime + * @memberof google.monitoring.v3.MutationRecord + * @instance + */ + MutationRecord.prototype.mutateTime = null; + + /** + * MutationRecord mutatedBy. + * @member {string} mutatedBy + * @memberof google.monitoring.v3.MutationRecord + * @instance + */ + MutationRecord.prototype.mutatedBy = ""; + + /** + * Creates a new MutationRecord instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.IMutationRecord=} [properties] Properties to set + * @returns {google.monitoring.v3.MutationRecord} MutationRecord instance + */ + MutationRecord.create = function create(properties) { + return new MutationRecord(properties); + }; + + /** + * Encodes the specified MutationRecord message. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.IMutationRecord} message MutationRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutationRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) + $root.google.protobuf.Timestamp.encode(message.mutateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mutatedBy); + return writer; + }; + + /** + * Encodes the specified MutationRecord message, length delimited. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.IMutationRecord} message MutationRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutationRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutationRecord message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutationRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.MutationRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mutateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.mutatedBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutationRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutationRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutationRecord message. + * @function verify + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutationRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.mutateTime); + if (error) + return "mutateTime." + error; + } + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + if (!$util.isString(message.mutatedBy)) + return "mutatedBy: string expected"; + return null; + }; + + /** + * Creates a MutationRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.MutationRecord} MutationRecord + */ + MutationRecord.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.MutationRecord) + return object; + var message = new $root.google.monitoring.v3.MutationRecord(); + if (object.mutateTime != null) { + if (typeof object.mutateTime !== "object") + throw TypeError(".google.monitoring.v3.MutationRecord.mutateTime: object expected"); + message.mutateTime = $root.google.protobuf.Timestamp.fromObject(object.mutateTime); + } + if (object.mutatedBy != null) + message.mutatedBy = String(object.mutatedBy); + return message; + }; + + /** + * Creates a plain object from a MutationRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.MutationRecord} message MutationRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutationRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mutateTime = null; + object.mutatedBy = ""; + } + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) + object.mutateTime = $root.google.protobuf.Timestamp.toObject(message.mutateTime, options); + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + object.mutatedBy = message.mutatedBy; + return object; + }; + + /** + * Converts this MutationRecord to JSON. + * @function toJSON + * @memberof google.monitoring.v3.MutationRecord + * @instance + * @returns {Object.} JSON object + */ + MutationRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MutationRecord; + })(); + + v3.GroupService = (function() { + + /** + * Constructs a new GroupService service. + * @memberof google.monitoring.v3 + * @classdesc Represents a GroupService + * @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 GroupService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (GroupService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GroupService; + + /** + * Creates new GroupService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.GroupService + * @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 {GroupService} RPC service. Useful where requests and/or responses are streamed. + */ + GroupService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. + * @memberof google.monitoring.v3.GroupService + * @typedef ListGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListGroupsResponse} [response] ListGroupsResponse + */ + + /** + * Calls ListGroups. + * @function listGroups + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IListGroupsRequest} request ListGroupsRequest message or plain object + * @param {google.monitoring.v3.GroupService.ListGroupsCallback} callback Node-style callback called with the error, if any, and ListGroupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.listGroups = function listGroups(request, callback) { + return this.rpcCall(listGroups, $root.google.monitoring.v3.ListGroupsRequest, $root.google.monitoring.v3.ListGroupsResponse, request, callback); + }, "name", { value: "ListGroups" }); + + /** + * Calls ListGroups. + * @function listGroups + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IListGroupsRequest} request ListGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef GetGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Group} [response] Group + */ + + /** + * Calls GetGroup. + * @function getGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IGetGroupRequest} request GetGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.GetGroupCallback} callback Node-style callback called with the error, if any, and Group + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.getGroup = function getGroup(request, callback) { + return this.rpcCall(getGroup, $root.google.monitoring.v3.GetGroupRequest, $root.google.monitoring.v3.Group, request, callback); + }, "name", { value: "GetGroup" }); + + /** + * Calls GetGroup. + * @function getGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IGetGroupRequest} request GetGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef CreateGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Group} [response] Group + */ + + /** + * Calls CreateGroup. + * @function createGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.ICreateGroupRequest} request CreateGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.CreateGroupCallback} callback Node-style callback called with the error, if any, and Group + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.createGroup = function createGroup(request, callback) { + return this.rpcCall(createGroup, $root.google.monitoring.v3.CreateGroupRequest, $root.google.monitoring.v3.Group, request, callback); + }, "name", { value: "CreateGroup" }); + + /** + * Calls CreateGroup. + * @function createGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.ICreateGroupRequest} request CreateGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef UpdateGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Group} [response] Group + */ + + /** + * Calls UpdateGroup. + * @function updateGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IUpdateGroupRequest} request UpdateGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.UpdateGroupCallback} callback Node-style callback called with the error, if any, and Group + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.updateGroup = function updateGroup(request, callback) { + return this.rpcCall(updateGroup, $root.google.monitoring.v3.UpdateGroupRequest, $root.google.monitoring.v3.Group, request, callback); + }, "name", { value: "UpdateGroup" }); + + /** + * Calls UpdateGroup. + * @function updateGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IUpdateGroupRequest} request UpdateGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef DeleteGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteGroup. + * @function deleteGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IDeleteGroupRequest} request DeleteGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.DeleteGroupCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.deleteGroup = function deleteGroup(request, callback) { + return this.rpcCall(deleteGroup, $root.google.monitoring.v3.DeleteGroupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGroup" }); + + /** + * Calls DeleteGroup. + * @function deleteGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IDeleteGroupRequest} request DeleteGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. + * @memberof google.monitoring.v3.GroupService + * @typedef ListGroupMembersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListGroupMembersResponse} [response] ListGroupMembersResponse + */ + + /** + * Calls ListGroupMembers. + * @function listGroupMembers + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IListGroupMembersRequest} request ListGroupMembersRequest message or plain object + * @param {google.monitoring.v3.GroupService.ListGroupMembersCallback} callback Node-style callback called with the error, if any, and ListGroupMembersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.listGroupMembers = function listGroupMembers(request, callback) { + return this.rpcCall(listGroupMembers, $root.google.monitoring.v3.ListGroupMembersRequest, $root.google.monitoring.v3.ListGroupMembersResponse, request, callback); + }, "name", { value: "ListGroupMembers" }); + + /** + * Calls ListGroupMembers. + * @function listGroupMembers + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IListGroupMembersRequest} request ListGroupMembersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return GroupService; + })(); + + v3.ListGroupsRequest = (function() { + + /** + * Properties of a ListGroupsRequest. + * @memberof google.monitoring.v3 + * @interface IListGroupsRequest + * @property {string|null} [name] ListGroupsRequest name + * @property {string|null} [childrenOfGroup] ListGroupsRequest childrenOfGroup + * @property {string|null} [ancestorsOfGroup] ListGroupsRequest ancestorsOfGroup + * @property {string|null} [descendantsOfGroup] ListGroupsRequest descendantsOfGroup + * @property {number|null} [pageSize] ListGroupsRequest pageSize + * @property {string|null} [pageToken] ListGroupsRequest pageToken + */ + + /** + * Constructs a new ListGroupsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListGroupsRequest. + * @implements IListGroupsRequest + * @constructor + * @param {google.monitoring.v3.IListGroupsRequest=} [properties] Properties to set + */ + function ListGroupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGroupsRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.name = ""; + + /** + * ListGroupsRequest childrenOfGroup. + * @member {string} childrenOfGroup + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.childrenOfGroup = ""; + + /** + * ListGroupsRequest ancestorsOfGroup. + * @member {string} ancestorsOfGroup + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.ancestorsOfGroup = ""; + + /** + * ListGroupsRequest descendantsOfGroup. + * @member {string} descendantsOfGroup + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.descendantsOfGroup = ""; + + /** + * ListGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.pageSize = 0; + + /** + * ListGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.pageToken = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ListGroupsRequest filter. + * @member {"childrenOfGroup"|"ancestorsOfGroup"|"descendantsOfGroup"|undefined} filter + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + Object.defineProperty(ListGroupsRequest.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["childrenOfGroup", "ancestorsOfGroup", "descendantsOfGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListGroupsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {google.monitoring.v3.IListGroupsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest instance + */ + ListGroupsRequest.create = function create(properties) { + return new ListGroupsRequest(properties); + }; + + /** + * Encodes the specified ListGroupsRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {google.monitoring.v3.IListGroupsRequest} message ListGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childrenOfGroup); + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorsOfGroup); + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.descendantsOfGroup); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListGroupsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {google.monitoring.v3.IListGroupsRequest} message ListGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGroupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: + message.name = reader.string(); + break; + case 2: + message.childrenOfGroup = reader.string(); + break; + case 3: + message.ancestorsOfGroup = reader.string(); + break; + case 4: + message.descendantsOfGroup = reader.string(); + break; + case 5: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGroupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGroupsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGroupsRequest.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.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) { + properties.filter = 1; + if (!$util.isString(message.childrenOfGroup)) + return "childrenOfGroup: string expected"; + } + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.ancestorsOfGroup)) + return "ancestorsOfGroup: string expected"; + } + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.descendantsOfGroup)) + return "descendantsOfGroup: 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 ListGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest + */ + ListGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupsRequest) + return object; + var message = new $root.google.monitoring.v3.ListGroupsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.childrenOfGroup != null) + message.childrenOfGroup = String(object.childrenOfGroup); + if (object.ancestorsOfGroup != null) + message.ancestorsOfGroup = String(object.ancestorsOfGroup); + if (object.descendantsOfGroup != null) + message.descendantsOfGroup = String(object.descendantsOfGroup); + 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 ListGroupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {google.monitoring.v3.ListGroupsRequest} message ListGroupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGroupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) { + object.childrenOfGroup = message.childrenOfGroup; + if (options.oneofs) + object.filter = "childrenOfGroup"; + } + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) { + object.ancestorsOfGroup = message.ancestorsOfGroup; + if (options.oneofs) + object.filter = "ancestorsOfGroup"; + } + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) { + object.descendantsOfGroup = message.descendantsOfGroup; + if (options.oneofs) + object.filter = "descendantsOfGroup"; + } + 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; + }; + + /** + * Converts this ListGroupsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListGroupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListGroupsRequest; + })(); + + v3.ListGroupsResponse = (function() { + + /** + * Properties of a ListGroupsResponse. + * @memberof google.monitoring.v3 + * @interface IListGroupsResponse + * @property {Array.|null} [group] ListGroupsResponse group + * @property {string|null} [nextPageToken] ListGroupsResponse nextPageToken + */ + + /** + * Constructs a new ListGroupsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListGroupsResponse. + * @implements IListGroupsResponse + * @constructor + * @param {google.monitoring.v3.IListGroupsResponse=} [properties] Properties to set + */ + function ListGroupsResponse(properties) { + this.group = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGroupsResponse group. + * @member {Array.} group + * @memberof google.monitoring.v3.ListGroupsResponse + * @instance + */ + ListGroupsResponse.prototype.group = $util.emptyArray; + + /** + * ListGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListGroupsResponse + * @instance + */ + ListGroupsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListGroupsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {google.monitoring.v3.IListGroupsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse instance + */ + ListGroupsResponse.create = function create(properties) { + return new ListGroupsResponse(properties); + }; + + /** + * Encodes the specified ListGroupsResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {google.monitoring.v3.IListGroupsResponse} message ListGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && message.group.length) + for (var i = 0; i < message.group.length; ++i) + $root.google.monitoring.v3.Group.encode(message.group[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 ListGroupsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {google.monitoring.v3.IListGroupsResponse} message ListGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGroupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.group && message.group.length)) + message.group = []; + message.group.push($root.google.monitoring.v3.Group.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGroupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGroupsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGroupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) { + if (!Array.isArray(message.group)) + return "group: array expected"; + for (var i = 0; i < message.group.length; ++i) { + var error = $root.google.monitoring.v3.Group.verify(message.group[i]); + if (error) + return "group." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListGroupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse + */ + ListGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupsResponse) + return object; + var message = new $root.google.monitoring.v3.ListGroupsResponse(); + if (object.group) { + if (!Array.isArray(object.group)) + throw TypeError(".google.monitoring.v3.ListGroupsResponse.group: array expected"); + message.group = []; + for (var i = 0; i < object.group.length; ++i) { + if (typeof object.group[i] !== "object") + throw TypeError(".google.monitoring.v3.ListGroupsResponse.group: object expected"); + message.group[i] = $root.google.monitoring.v3.Group.fromObject(object.group[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListGroupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {google.monitoring.v3.ListGroupsResponse} message ListGroupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGroupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.group = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.group && message.group.length) { + object.group = []; + for (var j = 0; j < message.group.length; ++j) + object.group[j] = $root.google.monitoring.v3.Group.toObject(message.group[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListGroupsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListGroupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListGroupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListGroupsResponse; + })(); + + v3.GetGroupRequest = (function() { + + /** + * Properties of a GetGroupRequest. + * @memberof google.monitoring.v3 + * @interface IGetGroupRequest + * @property {string|null} [name] GetGroupRequest name + */ + + /** + * Constructs a new GetGroupRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetGroupRequest. + * @implements IGetGroupRequest + * @constructor + * @param {google.monitoring.v3.IGetGroupRequest=} [properties] Properties to set + */ + function GetGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetGroupRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetGroupRequest + * @instance + */ + GetGroupRequest.prototype.name = ""; + + /** + * Creates a new GetGroupRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {google.monitoring.v3.IGetGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest instance + */ + GetGroupRequest.create = function create(properties) { + return new GetGroupRequest(properties); + }; + + /** + * Encodes the specified GetGroupRequest message. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {google.monitoring.v3.IGetGroupRequest} message GetGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {google.monitoring.v3.IGetGroupRequest} message GetGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupRequest message. + * @function verify + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupRequest.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 GetGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest + */ + GetGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetGroupRequest) + return object; + var message = new $root.google.monitoring.v3.GetGroupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {google.monitoring.v3.GetGroupRequest} message GetGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupRequest.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 GetGroupRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetGroupRequest + * @instance + * @returns {Object.} JSON object + */ + GetGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetGroupRequest; + })(); + + v3.CreateGroupRequest = (function() { + + /** + * Properties of a CreateGroupRequest. + * @memberof google.monitoring.v3 + * @interface ICreateGroupRequest + * @property {string|null} [name] CreateGroupRequest name + * @property {google.monitoring.v3.IGroup|null} [group] CreateGroupRequest group + * @property {boolean|null} [validateOnly] CreateGroupRequest validateOnly + */ + + /** + * Constructs a new CreateGroupRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateGroupRequest. + * @implements ICreateGroupRequest + * @constructor + * @param {google.monitoring.v3.ICreateGroupRequest=} [properties] Properties to set + */ + function CreateGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateGroupRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateGroupRequest + * @instance + */ + CreateGroupRequest.prototype.name = ""; + + /** + * CreateGroupRequest group. + * @member {google.monitoring.v3.IGroup|null|undefined} group + * @memberof google.monitoring.v3.CreateGroupRequest + * @instance + */ + CreateGroupRequest.prototype.group = null; + + /** + * CreateGroupRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.monitoring.v3.CreateGroupRequest + * @instance + */ + CreateGroupRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateGroupRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {google.monitoring.v3.ICreateGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest instance + */ + CreateGroupRequest.create = function create(properties) { + return new CreateGroupRequest(properties); + }; + + /** + * Encodes the specified CreateGroupRequest message. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {google.monitoring.v3.ICreateGroupRequest} message CreateGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && message.hasOwnProperty("group")) + $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified CreateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {google.monitoring.v3.ICreateGroupRequest} message CreateGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 2: + message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateGroupRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateGroupRequest.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.group != null && message.hasOwnProperty("group")) { + var error = $root.google.monitoring.v3.Group.verify(message.group); + if (error) + return "group." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest + */ + CreateGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateGroupRequest) + return object; + var message = new $root.google.monitoring.v3.CreateGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.group != null) { + if (typeof object.group !== "object") + throw TypeError(".google.monitoring.v3.CreateGroupRequest.group: object expected"); + message.group = $root.google.monitoring.v3.Group.fromObject(object.group); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {google.monitoring.v3.CreateGroupRequest} message CreateGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.group = null; + object.validateOnly = false; + object.name = ""; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = $root.google.monitoring.v3.Group.toObject(message.group, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CreateGroupRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateGroupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateGroupRequest; + })(); + + v3.UpdateGroupRequest = (function() { + + /** + * Properties of an UpdateGroupRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateGroupRequest + * @property {google.monitoring.v3.IGroup|null} [group] UpdateGroupRequest group + * @property {boolean|null} [validateOnly] UpdateGroupRequest validateOnly + */ + + /** + * Constructs a new UpdateGroupRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateGroupRequest. + * @implements IUpdateGroupRequest + * @constructor + * @param {google.monitoring.v3.IUpdateGroupRequest=} [properties] Properties to set + */ + function UpdateGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateGroupRequest group. + * @member {google.monitoring.v3.IGroup|null|undefined} group + * @memberof google.monitoring.v3.UpdateGroupRequest + * @instance + */ + UpdateGroupRequest.prototype.group = null; + + /** + * UpdateGroupRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.monitoring.v3.UpdateGroupRequest + * @instance + */ + UpdateGroupRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateGroupRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.IUpdateGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest instance + */ + UpdateGroupRequest.create = function create(properties) { + return new UpdateGroupRequest(properties); + }; + + /** + * Encodes the specified UpdateGroupRequest message. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.IUpdateGroupRequest} message UpdateGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && message.hasOwnProperty("group")) + $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.IUpdateGroupRequest} message UpdateGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGroupRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) { + var error = $root.google.monitoring.v3.Group.verify(message.group); + if (error) + return "group." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + */ + UpdateGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateGroupRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateGroupRequest(); + if (object.group != null) { + if (typeof object.group !== "object") + throw TypeError(".google.monitoring.v3.UpdateGroupRequest.group: object expected"); + message.group = $root.google.monitoring.v3.Group.fromObject(object.group); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.UpdateGroupRequest} message UpdateGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.group = null; + object.validateOnly = false; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = $root.google.monitoring.v3.Group.toObject(message.group, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateGroupRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateGroupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateGroupRequest; + })(); + + v3.DeleteGroupRequest = (function() { + + /** + * Properties of a DeleteGroupRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteGroupRequest + * @property {string|null} [name] DeleteGroupRequest name + * @property {boolean|null} [recursive] DeleteGroupRequest recursive + */ + + /** + * Constructs a new DeleteGroupRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteGroupRequest. + * @implements IDeleteGroupRequest + * @constructor + * @param {google.monitoring.v3.IDeleteGroupRequest=} [properties] Properties to set + */ + function DeleteGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteGroupRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteGroupRequest + * @instance + */ + DeleteGroupRequest.prototype.name = ""; + + /** + * DeleteGroupRequest recursive. + * @member {boolean} recursive + * @memberof google.monitoring.v3.DeleteGroupRequest + * @instance + */ + DeleteGroupRequest.prototype.recursive = false; + + /** + * Creates a new DeleteGroupRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {google.monitoring.v3.IDeleteGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest instance + */ + DeleteGroupRequest.create = function create(properties) { + return new DeleteGroupRequest(properties); + }; + + /** + * Encodes the specified DeleteGroupRequest message. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {google.monitoring.v3.IDeleteGroupRequest} message DeleteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.recursive != null && message.hasOwnProperty("recursive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); + return writer; + }; + + /** + * Encodes the specified DeleteGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {google.monitoring.v3.IDeleteGroupRequest} message DeleteGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 4: + message.recursive = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteGroupRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteGroupRequest.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.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; + return null; + }; + + /** + * Creates a DeleteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest + */ + DeleteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteGroupRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); + return message; + }; + + /** + * Creates a plain object from a DeleteGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {google.monitoring.v3.DeleteGroupRequest} message DeleteGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.recursive = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; + return object; + }; + + /** + * Converts this DeleteGroupRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteGroupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteGroupRequest; + })(); + + v3.ListGroupMembersRequest = (function() { + + /** + * Properties of a ListGroupMembersRequest. + * @memberof google.monitoring.v3 + * @interface IListGroupMembersRequest + * @property {string|null} [name] ListGroupMembersRequest name + * @property {number|null} [pageSize] ListGroupMembersRequest pageSize + * @property {string|null} [pageToken] ListGroupMembersRequest pageToken + * @property {string|null} [filter] ListGroupMembersRequest filter + * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListGroupMembersRequest interval + */ + + /** + * Constructs a new ListGroupMembersRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListGroupMembersRequest. + * @implements IListGroupMembersRequest + * @constructor + * @param {google.monitoring.v3.IListGroupMembersRequest=} [properties] Properties to set + */ + function ListGroupMembersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGroupMembersRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance + */ + ListGroupMembersRequest.prototype.name = ""; + + /** + * ListGroupMembersRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance + */ + ListGroupMembersRequest.prototype.pageSize = 0; + + /** + * ListGroupMembersRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance + */ + ListGroupMembersRequest.prototype.pageToken = ""; + + /** + * ListGroupMembersRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance + */ + ListGroupMembersRequest.prototype.filter = ""; + + /** + * ListGroupMembersRequest interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance + */ + ListGroupMembersRequest.prototype.interval = null; + + /** + * Creates a new ListGroupMembersRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {google.monitoring.v3.IListGroupMembersRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest instance + */ + ListGroupMembersRequest.create = function create(properties) { + return new ListGroupMembersRequest(properties); + }; + + /** + * Encodes the specified ListGroupMembersRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {google.monitoring.v3.IListGroupMembersRequest} message ListGroupMembersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupMembersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListGroupMembersRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {google.monitoring.v3.IListGroupMembersRequest} message ListGroupMembersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupMembersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGroupMembersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupMembersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupMembersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: + message.name = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGroupMembersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupMembersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGroupMembersRequest message. + * @function verify + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGroupMembersRequest.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.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } + return null; + }; + + /** + * Creates a ListGroupMembersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest + */ + ListGroupMembersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupMembersRequest) + return object; + var message = new $root.google.monitoring.v3.ListGroupMembersRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.ListGroupMembersRequest.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); + } + return message; + }; + + /** + * Creates a plain object from a ListGroupMembersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {google.monitoring.v3.ListGroupMembersRequest} message ListGroupMembersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGroupMembersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.interval = null; + object.name = ""; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListGroupMembersRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance + * @returns {Object.} JSON object + */ + ListGroupMembersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListGroupMembersRequest; + })(); + + v3.ListGroupMembersResponse = (function() { + + /** + * Properties of a ListGroupMembersResponse. + * @memberof google.monitoring.v3 + * @interface IListGroupMembersResponse + * @property {Array.|null} [members] ListGroupMembersResponse members + * @property {string|null} [nextPageToken] ListGroupMembersResponse nextPageToken + * @property {number|null} [totalSize] ListGroupMembersResponse totalSize + */ + + /** + * Constructs a new ListGroupMembersResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListGroupMembersResponse. + * @implements IListGroupMembersResponse + * @constructor + * @param {google.monitoring.v3.IListGroupMembersResponse=} [properties] Properties to set + */ + function ListGroupMembersResponse(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGroupMembersResponse members. + * @member {Array.} members + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @instance + */ + ListGroupMembersResponse.prototype.members = $util.emptyArray; + + /** + * ListGroupMembersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @instance + */ + ListGroupMembersResponse.prototype.nextPageToken = ""; + + /** + * ListGroupMembersResponse totalSize. + * @member {number} totalSize + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @instance + */ + ListGroupMembersResponse.prototype.totalSize = 0; + + /** + * Creates a new ListGroupMembersResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {google.monitoring.v3.IListGroupMembersResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse instance + */ + ListGroupMembersResponse.create = function create(properties) { + return new ListGroupMembersResponse(properties); + }; + + /** + * Encodes the specified ListGroupMembersResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {google.monitoring.v3.IListGroupMembersResponse} message ListGroupMembersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupMembersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + $root.google.api.MonitoredResource.encode(message.members[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.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListGroupMembersResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {google.monitoring.v3.IListGroupMembersResponse} message ListGroupMembersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGroupMembersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGroupMembersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupMembersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupMembersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.google.api.MonitoredResource.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + message.totalSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGroupMembersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGroupMembersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGroupMembersResponse message. + * @function verify + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGroupMembersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) { + var error = $root.google.api.MonitoredResource.verify(message.members[i]); + if (error) + return "members." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListGroupMembersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse + */ + ListGroupMembersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupMembersResponse) + return object; + var message = new $root.google.monitoring.v3.ListGroupMembersResponse(); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.monitoring.v3.ListGroupMembersResponse.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) { + if (typeof object.members[i] !== "object") + throw TypeError(".google.monitoring.v3.ListGroupMembersResponse.members: object expected"); + message.members[i] = $root.google.api.MonitoredResource.fromObject(object.members[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListGroupMembersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {google.monitoring.v3.ListGroupMembersResponse} message ListGroupMembersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGroupMembersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = $root.google.api.MonitoredResource.toObject(message.members[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListGroupMembersResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @instance + * @returns {Object.} JSON object + */ + ListGroupMembersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListGroupMembersResponse; + })(); + + v3.Group = (function() { + + /** + * Properties of a Group. + * @memberof google.monitoring.v3 + * @interface IGroup + * @property {string|null} [name] Group name + * @property {string|null} [displayName] Group displayName + * @property {string|null} [parentName] Group parentName + * @property {string|null} [filter] Group filter + * @property {boolean|null} [isCluster] Group isCluster + */ + + /** + * Constructs a new Group. + * @memberof google.monitoring.v3 + * @classdesc Represents a Group. + * @implements IGroup + * @constructor + * @param {google.monitoring.v3.IGroup=} [properties] Properties to set + */ + function Group(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Group name. + * @member {string} name + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.name = ""; + + /** + * Group displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.displayName = ""; + + /** + * Group parentName. + * @member {string} parentName + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.parentName = ""; + + /** + * Group filter. + * @member {string} filter + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.filter = ""; + + /** + * Group isCluster. + * @member {boolean} isCluster + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.isCluster = false; + + /** + * Creates a new Group instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Group + * @static + * @param {google.monitoring.v3.IGroup=} [properties] Properties to set + * @returns {google.monitoring.v3.Group} Group instance + */ + Group.create = function create(properties) { + return new Group(properties); + }; + + /** + * Encodes the specified Group message. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Group + * @static + * @param {google.monitoring.v3.IGroup} message Group message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Group.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.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.parentName != null && message.hasOwnProperty("parentName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentName); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.isCluster != null && message.hasOwnProperty("isCluster")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isCluster); + return writer; + }; + + /** + * Encodes the specified Group message, length delimited. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Group + * @static + * @param {google.monitoring.v3.IGroup} message Group message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Group.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Group message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Group + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Group} Group + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Group.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Group(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.parentName = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.isCluster = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Group message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Group + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Group} Group + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Group.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Group message. + * @function verify + * @memberof google.monitoring.v3.Group + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Group.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.parentName != null && message.hasOwnProperty("parentName")) + if (!$util.isString(message.parentName)) + return "parentName: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.isCluster != null && message.hasOwnProperty("isCluster")) + if (typeof message.isCluster !== "boolean") + return "isCluster: boolean expected"; + return null; + }; + + /** + * Creates a Group message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Group + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Group} Group + */ + Group.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Group) + return object; + var message = new $root.google.monitoring.v3.Group(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.parentName != null) + message.parentName = String(object.parentName); + if (object.filter != null) + message.filter = String(object.filter); + if (object.isCluster != null) + message.isCluster = Boolean(object.isCluster); + return message; + }; + + /** + * Creates a plain object from a Group message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Group + * @static + * @param {google.monitoring.v3.Group} message Group + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Group.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.parentName = ""; + object.filter = ""; + object.isCluster = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.parentName != null && message.hasOwnProperty("parentName")) + object.parentName = message.parentName; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.isCluster != null && message.hasOwnProperty("isCluster")) + object.isCluster = message.isCluster; + return object; + }; + + /** + * Converts this Group to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Group + * @instance + * @returns {Object.} JSON object + */ + Group.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Group; + })(); + + v3.MetricService = (function() { + + /** + * Constructs a new MetricService service. + * @memberof google.monitoring.v3 + * @classdesc Represents a MetricService + * @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 MetricService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetricService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricService; + + /** + * Creates new MetricService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.MetricService + * @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 {MetricService} RPC service. Useful where requests and/or responses are streamed. + */ + MetricService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + */ + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); + + /** + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef GetMonitoredResourceDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MonitoredResourceDescriptor} [response] MonitoredResourceDescriptor + */ + + /** + * Calls GetMonitoredResourceDescriptor. + * @function getMonitoredResourceDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback} callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.getMonitoredResourceDescriptor = function getMonitoredResourceDescriptor(request, callback) { + return this.rpcCall(getMonitoredResourceDescriptor, $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest, $root.google.api.MonitoredResourceDescriptor, request, callback); + }, "name", { value: "GetMonitoredResourceDescriptor" }); + + /** + * Calls GetMonitoredResourceDescriptor. + * @function getMonitoredResourceDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListMetricDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListMetricDescriptorsResponse} [response] ListMetricDescriptorsResponse + */ + + /** + * Calls ListMetricDescriptors. + * @function listMetricDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListMetricDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.listMetricDescriptors = function listMetricDescriptors(request, callback) { + return this.rpcCall(listMetricDescriptors, $root.google.monitoring.v3.ListMetricDescriptorsRequest, $root.google.monitoring.v3.ListMetricDescriptorsResponse, request, callback); + }, "name", { value: "ListMetricDescriptors" }); + + /** + * Calls ListMetricDescriptors. + * @function listMetricDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef GetMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MetricDescriptor} [response] MetricDescriptor + */ + + /** + * Calls GetMetricDescriptor. + * @function getMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.GetMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.getMetricDescriptor = function getMetricDescriptor(request, callback) { + return this.rpcCall(getMetricDescriptor, $root.google.monitoring.v3.GetMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); + }, "name", { value: "GetMetricDescriptor" }); + + /** + * Calls GetMetricDescriptor. + * @function getMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef CreateMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MetricDescriptor} [response] MetricDescriptor + */ + + /** + * Calls CreateMetricDescriptor. + * @function createMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.CreateMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.createMetricDescriptor = function createMetricDescriptor(request, callback) { + return this.rpcCall(createMetricDescriptor, $root.google.monitoring.v3.CreateMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); + }, "name", { value: "CreateMetricDescriptor" }); + + /** + * Calls CreateMetricDescriptor. + * @function createMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef DeleteMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMetricDescriptor. + * @function deleteMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.deleteMetricDescriptor = function deleteMetricDescriptor(request, callback) { + return this.rpcCall(deleteMetricDescriptor, $root.google.monitoring.v3.DeleteMetricDescriptorRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMetricDescriptor" }); + + /** + * Calls DeleteMetricDescriptor. + * @function deleteMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListTimeSeriesResponse} [response] ListTimeSeriesResponse + */ + + /** + * Calls ListTimeSeries. + * @function listTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListTimeSeriesCallback} callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.listTimeSeries = function listTimeSeries(request, callback) { + return this.rpcCall(listTimeSeries, $root.google.monitoring.v3.ListTimeSeriesRequest, $root.google.monitoring.v3.ListTimeSeriesResponse, request, callback); + }, "name", { value: "ListTimeSeries" }); + + /** + * Calls ListTimeSeries. + * @function listTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * @memberof google.monitoring.v3.MetricService + * @typedef CreateTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CreateTimeSeries. + * @function createTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.MetricService.CreateTimeSeriesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.createTimeSeries = function createTimeSeries(request, callback) { + return this.rpcCall(createTimeSeries, $root.google.monitoring.v3.CreateTimeSeriesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CreateTimeSeries" }); + + /** + * Calls CreateTimeSeries. + * @function createTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetricService; + })(); + + v3.ListMonitoredResourceDescriptorsRequest = (function() { + + /** + * Properties of a ListMonitoredResourceDescriptorsRequest. + * @memberof google.monitoring.v3 + * @interface IListMonitoredResourceDescriptorsRequest + * @property {string|null} [name] ListMonitoredResourceDescriptorsRequest name + * @property {string|null} [filter] ListMonitoredResourceDescriptorsRequest filter + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + */ + + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest + * @constructor + * @param {google.monitoring.v3.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 name. + * @member {string} name + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.name = ""; + + /** + * ListMonitoredResourceDescriptorsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.filter = ""; + + /** + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + + /** + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + */ + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.monitoring.v3.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.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + 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.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.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.monitoring.v3.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.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 ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + */ + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest) + return object; + var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); + 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; + }; + + /** + * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @static + * @param {google.monitoring.v3.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.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; + }; + + /** + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListMonitoredResourceDescriptorsRequest; + })(); + + v3.ListMonitoredResourceDescriptorsResponse = (function() { + + /** + * Properties of a ListMonitoredResourceDescriptorsResponse. + * @memberof google.monitoring.v3 + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + */ + + /** + * Constructs a new ListMonitoredResourceDescriptorsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse + * @constructor + * @param {google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + + /** + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + */ + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); + }; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + */ + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) + return object; + var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @static + * @param {google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListMonitoredResourceDescriptorsResponse; + })(); + + v3.GetMonitoredResourceDescriptorRequest = (function() { + + /** + * Properties of a GetMonitoredResourceDescriptorRequest. + * @memberof google.monitoring.v3 + * @interface IGetMonitoredResourceDescriptorRequest + * @property {string|null} [name] GetMonitoredResourceDescriptorRequest name + */ + + /** + * Constructs a new GetMonitoredResourceDescriptorRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetMonitoredResourceDescriptorRequest. + * @implements IGetMonitoredResourceDescriptorRequest + * @constructor + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set + */ + function GetMonitoredResourceDescriptorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMonitoredResourceDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @instance + */ + GetMonitoredResourceDescriptorRequest.prototype.name = ""; + + /** + * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest instance + */ + GetMonitoredResourceDescriptorRequest.create = function create(properties) { + return new GetMonitoredResourceDescriptorRequest(properties); + }; + + /** + * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMonitoredResourceDescriptorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMonitoredResourceDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMonitoredResourceDescriptorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMonitoredResourceDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMonitoredResourceDescriptorRequest message. + * @function verify + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMonitoredResourceDescriptorRequest.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 GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + */ + GetMonitoredResourceDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest) + return object; + var message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMonitoredResourceDescriptorRequest.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 GetMonitoredResourceDescriptorRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @instance + * @returns {Object.} JSON object + */ + GetMonitoredResourceDescriptorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetMonitoredResourceDescriptorRequest; + })(); + + v3.ListMetricDescriptorsRequest = (function() { + + /** + * Properties of a ListMetricDescriptorsRequest. + * @memberof google.monitoring.v3 + * @interface IListMetricDescriptorsRequest + * @property {string|null} [name] ListMetricDescriptorsRequest name + * @property {string|null} [filter] ListMetricDescriptorsRequest filter + * @property {number|null} [pageSize] ListMetricDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMetricDescriptorsRequest pageToken + */ + + /** + * Constructs a new ListMetricDescriptorsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListMetricDescriptorsRequest. + * @implements IListMetricDescriptorsRequest + * @constructor + * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set + */ + function ListMetricDescriptorsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMetricDescriptorsRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @instance + */ + ListMetricDescriptorsRequest.prototype.name = ""; + + /** + * ListMetricDescriptorsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @instance + */ + ListMetricDescriptorsRequest.prototype.filter = ""; + + /** + * ListMetricDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @instance + */ + ListMetricDescriptorsRequest.prototype.pageSize = 0; + + /** + * ListMetricDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @instance + */ + ListMetricDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMetricDescriptorsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest instance + */ + ListMetricDescriptorsRequest.create = function create(properties) { + return new ListMetricDescriptorsRequest(properties); + }; + + /** + * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetricDescriptorsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetricDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetricDescriptorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetricDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetricDescriptorsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetricDescriptorsRequest.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 ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + */ + ListMetricDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsRequest) + return object; + var message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); + 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; + }; + + /** + * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {google.monitoring.v3.ListMetricDescriptorsRequest} message ListMetricDescriptorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetricDescriptorsRequest.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; + }; + + /** + * Converts this ListMetricDescriptorsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMetricDescriptorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListMetricDescriptorsRequest; + })(); + + v3.ListMetricDescriptorsResponse = (function() { + + /** + * Properties of a ListMetricDescriptorsResponse. + * @memberof google.monitoring.v3 + * @interface IListMetricDescriptorsResponse + * @property {Array.|null} [metricDescriptors] ListMetricDescriptorsResponse metricDescriptors + * @property {string|null} [nextPageToken] ListMetricDescriptorsResponse nextPageToken + */ + + /** + * Constructs a new ListMetricDescriptorsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListMetricDescriptorsResponse. + * @implements IListMetricDescriptorsResponse + * @constructor + * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set + */ + function ListMetricDescriptorsResponse(properties) { + this.metricDescriptors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMetricDescriptorsResponse metricDescriptors. + * @member {Array.} metricDescriptors + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @instance + */ + ListMetricDescriptorsResponse.prototype.metricDescriptors = $util.emptyArray; + + /** + * ListMetricDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @instance + */ + ListMetricDescriptorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMetricDescriptorsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse instance + */ + ListMetricDescriptorsResponse.create = function create(properties) { + return new ListMetricDescriptorsResponse(properties); + }; + + /** + * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetricDescriptorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricDescriptors != null && message.metricDescriptors.length) + for (var i = 0; i < message.metricDescriptors.length; ++i) + $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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 ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMetricDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetricDescriptorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.metricDescriptors && message.metricDescriptors.length)) + message.metricDescriptors = []; + message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMetricDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMetricDescriptorsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMetricDescriptorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricDescriptors != null && message.hasOwnProperty("metricDescriptors")) { + if (!Array.isArray(message.metricDescriptors)) + return "metricDescriptors: array expected"; + for (var i = 0; i < message.metricDescriptors.length; ++i) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptors[i]); + if (error) + return "metricDescriptors." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse + */ + ListMetricDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsResponse) + return object; + var message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); + if (object.metricDescriptors) { + if (!Array.isArray(object.metricDescriptors)) + throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: array expected"); + message.metricDescriptors = []; + for (var i = 0; i < object.metricDescriptors.length; ++i) { + if (typeof object.metricDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: object expected"); + message.metricDescriptors[i] = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {google.monitoring.v3.ListMetricDescriptorsResponse} message ListMetricDescriptorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMetricDescriptorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metricDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.metricDescriptors && message.metricDescriptors.length) { + object.metricDescriptors = []; + for (var j = 0; j < message.metricDescriptors.length; ++j) + object.metricDescriptors[j] = $root.google.api.MetricDescriptor.toObject(message.metricDescriptors[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMetricDescriptorsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMetricDescriptorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListMetricDescriptorsResponse; + })(); + + v3.GetMetricDescriptorRequest = (function() { + + /** + * Properties of a GetMetricDescriptorRequest. + * @memberof google.monitoring.v3 + * @interface IGetMetricDescriptorRequest + * @property {string|null} [name] GetMetricDescriptorRequest name + */ + + /** + * Constructs a new GetMetricDescriptorRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetMetricDescriptorRequest. + * @implements IGetMetricDescriptorRequest + * @constructor + * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set + */ + function GetMetricDescriptorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @instance + */ + GetMetricDescriptorRequest.prototype.name = ""; + + /** + * Creates a new GetMetricDescriptorRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest instance + */ + GetMetricDescriptorRequest.create = function create(properties) { + return new GetMetricDescriptorRequest(properties); + }; + + /** + * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetricDescriptorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetricDescriptorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMetricDescriptorRequest message. + * @function verify + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMetricDescriptorRequest.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 GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + */ + GetMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetMetricDescriptorRequest) + return object; + var message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.GetMetricDescriptorRequest} message GetMetricDescriptorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMetricDescriptorRequest.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 GetMetricDescriptorRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @instance + * @returns {Object.} JSON object + */ + GetMetricDescriptorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetMetricDescriptorRequest; + })(); + + v3.CreateMetricDescriptorRequest = (function() { + + /** + * Properties of a CreateMetricDescriptorRequest. + * @memberof google.monitoring.v3 + * @interface ICreateMetricDescriptorRequest + * @property {string|null} [name] CreateMetricDescriptorRequest name + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] CreateMetricDescriptorRequest metricDescriptor + */ + + /** + * Constructs a new CreateMetricDescriptorRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateMetricDescriptorRequest. + * @implements ICreateMetricDescriptorRequest + * @constructor + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set + */ + function CreateMetricDescriptorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @instance + */ + CreateMetricDescriptorRequest.prototype.name = ""; + + /** + * CreateMetricDescriptorRequest metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @instance + */ + CreateMetricDescriptorRequest.prototype.metricDescriptor = null; + + /** + * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest instance + */ + CreateMetricDescriptorRequest.create = function create(properties) { + return new CreateMetricDescriptorRequest(properties); + }; + + /** + * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMetricDescriptorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMetricDescriptorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 2: + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMetricDescriptorRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMetricDescriptorRequest.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.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); + if (error) + return "metricDescriptor." + error; + } + return null; + }; + + /** + * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + */ + CreateMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateMetricDescriptorRequest) + return object; + var message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.monitoring.v3.CreateMetricDescriptorRequest.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); + } + return message; + }; + + /** + * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.CreateMetricDescriptorRequest} message CreateMetricDescriptorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMetricDescriptorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricDescriptor = null; + object.name = ""; + } + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CreateMetricDescriptorRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMetricDescriptorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateMetricDescriptorRequest; + })(); + + v3.DeleteMetricDescriptorRequest = (function() { + + /** + * Properties of a DeleteMetricDescriptorRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteMetricDescriptorRequest + * @property {string|null} [name] DeleteMetricDescriptorRequest name + */ + + /** + * Constructs a new DeleteMetricDescriptorRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteMetricDescriptorRequest. + * @implements IDeleteMetricDescriptorRequest + * @constructor + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set + */ + function DeleteMetricDescriptorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @instance + */ + DeleteMetricDescriptorRequest.prototype.name = ""; + + /** + * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest instance + */ + DeleteMetricDescriptorRequest.create = function create(properties) { + return new DeleteMetricDescriptorRequest(properties); + }; + + /** + * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMetricDescriptorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMetricDescriptorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMetricDescriptorRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMetricDescriptorRequest.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 DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + */ + DeleteMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteMetricDescriptorRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {google.monitoring.v3.DeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMetricDescriptorRequest.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 DeleteMetricDescriptorRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMetricDescriptorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteMetricDescriptorRequest; + })(); + + v3.ListTimeSeriesRequest = (function() { + + /** + * Properties of a ListTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @interface IListTimeSeriesRequest + * @property {string|null} [name] ListTimeSeriesRequest name + * @property {string|null} [filter] ListTimeSeriesRequest filter + * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListTimeSeriesRequest interval + * @property {google.monitoring.v3.IAggregation|null} [aggregation] ListTimeSeriesRequest aggregation + * @property {string|null} [orderBy] ListTimeSeriesRequest orderBy + * @property {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null} [view] ListTimeSeriesRequest view + * @property {number|null} [pageSize] ListTimeSeriesRequest pageSize + * @property {string|null} [pageToken] ListTimeSeriesRequest pageToken + */ + + /** + * Constructs a new ListTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListTimeSeriesRequest. + * @implements IListTimeSeriesRequest + * @constructor + * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + */ + function ListTimeSeriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.name = ""; + + /** + * ListTimeSeriesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.filter = ""; + + /** + * ListTimeSeriesRequest interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.interval = null; + + /** + * ListTimeSeriesRequest aggregation. + * @member {google.monitoring.v3.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.aggregation = null; + + /** + * ListTimeSeriesRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.orderBy = ""; + + /** + * ListTimeSeriesRequest view. + * @member {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} view + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.view = 0; + + /** + * ListTimeSeriesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.pageSize = 0; + + /** + * ListTimeSeriesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTimeSeriesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest instance + */ + ListTimeSeriesRequest.create = function create(properties) { + return new ListTimeSeriesRequest(properties); + }; + + /** + * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesRequest.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.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: + message.name = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 4: + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + case 5: + message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); + break; + case 6: + message.orderBy = reader.string(); + break; + case 7: + message.view = reader.int32(); + break; + case 8: + message.pageSize = reader.int32(); + break; + case 9: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTimeSeriesRequest message. + * @function verify + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTimeSeriesRequest.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.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + break; + } + 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 ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + */ + ListTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListTimeSeriesRequest) + return object; + var message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); + } + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.aggregation: object expected"); + message.aggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregation); + } + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + switch (object.view) { + case "FULL": + case 0: + message.view = 0; + break; + case "HEADERS": + case 1: + message.view = 1; + break; + } + 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 ListTimeSeriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ListTimeSeriesRequest} message ListTimeSeriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTimeSeriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.interval = null; + object.aggregation = null; + object.orderBy = ""; + object.view = options.enums === String ? "FULL" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.v3.Aggregation.toObject(message.aggregation, options); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; + 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; + }; + + /** + * Converts this ListTimeSeriesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListTimeSeriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * TimeSeriesView enum. + * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView + * @enum {string} + * @property {number} FULL=0 FULL value + * @property {number} HEADERS=1 HEADERS value + */ + ListTimeSeriesRequest.TimeSeriesView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FULL"] = 0; + values[valuesById[1] = "HEADERS"] = 1; + return values; + })(); + + return ListTimeSeriesRequest; + })(); + + v3.ListTimeSeriesResponse = (function() { + + /** + * Properties of a ListTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @interface IListTimeSeriesResponse + * @property {Array.|null} [timeSeries] ListTimeSeriesResponse timeSeries + * @property {string|null} [nextPageToken] ListTimeSeriesResponse nextPageToken + * @property {Array.|null} [executionErrors] ListTimeSeriesResponse executionErrors + */ + + /** + * Constructs a new ListTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListTimeSeriesResponse. + * @implements IListTimeSeriesResponse + * @constructor + * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + */ + function ListTimeSeriesResponse(properties) { + this.timeSeries = []; + this.executionErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTimeSeriesResponse timeSeries. + * @member {Array.} timeSeries + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.timeSeries = $util.emptyArray; + + /** + * ListTimeSeriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.nextPageToken = ""; + + /** + * ListTimeSeriesResponse executionErrors. + * @member {Array.} executionErrors + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.executionErrors = $util.emptyArray; + + /** + * Creates a new ListTimeSeriesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse instance + */ + ListTimeSeriesResponse.create = function create(properties) { + return new ListTimeSeriesResponse(properties); + }; + + /** + * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.timeSeries.length) + for (var i = 0; i < message.timeSeries.length; ++i) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[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.executionErrors != null && message.executionErrors.length) + for (var i = 0; i < message.executionErrors.length; ++i) + $root.google.rpc.Status.encode(message.executionErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.executionErrors && message.executionErrors.length)) + message.executionErrors = []; + message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTimeSeriesResponse message. + * @function verify + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTimeSeriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { + if (!Array.isArray(message.timeSeries)) + return "timeSeries: array expected"; + for (var i = 0; i < message.timeSeries.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (error) + return "timeSeries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { + if (!Array.isArray(message.executionErrors)) + return "executionErrors: array expected"; + for (var i = 0; i < message.executionErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.executionErrors[i]); + if (error) + return "executionErrors." + error; + } + } + return null; + }; + + /** + * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + */ + ListTimeSeriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListTimeSeriesResponse) + return object; + var message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + if (object.timeSeries) { + if (!Array.isArray(object.timeSeries)) + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: array expected"); + message.timeSeries = []; + for (var i = 0; i < object.timeSeries.length; ++i) { + if (typeof object.timeSeries[i] !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: object expected"); + message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.executionErrors) { + if (!Array.isArray(object.executionErrors)) + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: array expected"); + message.executionErrors = []; + for (var i = 0; i < object.executionErrors.length; ++i) { + if (typeof object.executionErrors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: object expected"); + message.executionErrors[i] = $root.google.rpc.Status.fromObject(object.executionErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.ListTimeSeriesResponse} message ListTimeSeriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTimeSeriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.timeSeries = []; + object.executionErrors = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.timeSeries && message.timeSeries.length) { + object.timeSeries = []; + for (var j = 0; j < message.timeSeries.length; ++j) + object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.executionErrors && message.executionErrors.length) { + object.executionErrors = []; + for (var j = 0; j < message.executionErrors.length; ++j) + object.executionErrors[j] = $root.google.rpc.Status.toObject(message.executionErrors[j], options); + } + return object; + }; + + /** + * Converts this ListTimeSeriesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListTimeSeriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTimeSeriesResponse; + })(); + + v3.CreateTimeSeriesRequest = (function() { + + /** + * Properties of a CreateTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @interface ICreateTimeSeriesRequest + * @property {string|null} [name] CreateTimeSeriesRequest name + * @property {Array.|null} [timeSeries] CreateTimeSeriesRequest timeSeries + */ + + /** + * Constructs a new CreateTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateTimeSeriesRequest. + * @implements ICreateTimeSeriesRequest + * @constructor + * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + */ + function CreateTimeSeriesRequest(properties) { + this.timeSeries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @instance + */ + CreateTimeSeriesRequest.prototype.name = ""; + + /** + * CreateTimeSeriesRequest timeSeries. + * @member {Array.} timeSeries + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @instance + */ + CreateTimeSeriesRequest.prototype.timeSeries = $util.emptyArray; + + /** + * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest instance + */ + CreateTimeSeriesRequest.create = function create(properties) { + return new CreateTimeSeriesRequest(properties); + }; + + /** + * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.timeSeries.length) + for (var i = 0; i < message.timeSeries.length; ++i) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 2: + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTimeSeriesRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTimeSeriesRequest.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.timeSeries != null && message.hasOwnProperty("timeSeries")) { + if (!Array.isArray(message.timeSeries)) + return "timeSeries: array expected"; + for (var i = 0; i < message.timeSeries.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (error) + return "timeSeries." + error; + } + } + return null; + }; + + /** + * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + */ + CreateTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesRequest) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeSeries) { + if (!Array.isArray(object.timeSeries)) + throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: array expected"); + message.timeSeries = []; + for (var i = 0; i < object.timeSeries.length; ++i) { + if (typeof object.timeSeries[i] !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: object expected"); + message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.CreateTimeSeriesRequest} message CreateTimeSeriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTimeSeriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.timeSeries = []; + if (options.defaults) + object.name = ""; + if (message.timeSeries && message.timeSeries.length) { + object.timeSeries = []; + for (var j = 0; j < message.timeSeries.length; ++j) + object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CreateTimeSeriesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTimeSeriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTimeSeriesRequest; + })(); + + v3.CreateTimeSeriesError = (function() { + + /** + * Properties of a CreateTimeSeriesError. + * @memberof google.monitoring.v3 + * @interface ICreateTimeSeriesError + * @property {google.monitoring.v3.ITimeSeries|null} [timeSeries] CreateTimeSeriesError timeSeries + * @property {google.rpc.IStatus|null} [status] CreateTimeSeriesError status + */ + + /** + * Constructs a new CreateTimeSeriesError. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateTimeSeriesError. + * @implements ICreateTimeSeriesError + * @constructor + * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + */ + function CreateTimeSeriesError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTimeSeriesError timeSeries. + * @member {google.monitoring.v3.ITimeSeries|null|undefined} timeSeries + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + */ + CreateTimeSeriesError.prototype.timeSeries = null; + + /** + * CreateTimeSeriesError status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + */ + CreateTimeSeriesError.prototype.status = null; + + /** + * Creates a new CreateTimeSeriesError instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError instance + */ + CreateTimeSeriesError.create = function create(properties) { + return new CreateTimeSeriesError(properties); + }; + + /** + * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && message.hasOwnProperty("status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); + break; + case 2: + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTimeSeriesError message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTimeSeriesError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries); + if (error) + return "timeSeries." + error; + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + */ + CreateTimeSeriesError.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesError) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + if (object.timeSeries != null) { + if (typeof object.timeSeries !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.timeSeries: object expected"); + message.timeSeries = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries); + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + return message; + }; + + /** + * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.CreateTimeSeriesError} message CreateTimeSeriesError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTimeSeriesError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeries = null; + object.status = null; + } + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + object.timeSeries = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + return object; + }; + + /** + * Converts this CreateTimeSeriesError to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + * @returns {Object.} JSON object + */ + CreateTimeSeriesError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTimeSeriesError; + })(); + + v3.Point = (function() { + + /** + * Properties of a Point. + * @memberof google.monitoring.v3 + * @interface IPoint + * @property {google.monitoring.v3.ITimeInterval|null} [interval] Point interval + * @property {google.monitoring.v3.ITypedValue|null} [value] Point value + */ + + /** + * Constructs a new Point. + * @memberof google.monitoring.v3 + * @classdesc Represents a Point. + * @implements IPoint + * @constructor + * @param {google.monitoring.v3.IPoint=} [properties] Properties to set + */ + function Point(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Point interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.Point + * @instance + */ + Point.prototype.interval = null; + + /** + * Point value. + * @member {google.monitoring.v3.ITypedValue|null|undefined} value + * @memberof google.monitoring.v3.Point + * @instance + */ + Point.prototype.value = null; + + /** + * Creates a new Point instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Point + * @static + * @param {google.monitoring.v3.IPoint=} [properties] Properties to set + * @returns {google.monitoring.v3.Point} Point instance + */ + Point.create = function create(properties) { + return new Point(properties); + }; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Point + * @static + * @param {google.monitoring.v3.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && message.hasOwnProperty("value")) + $root.google.monitoring.v3.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Point + * @static + * @param {google.monitoring.v3.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Point message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Point} Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Point.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Point(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + case 2: + message.value = $root.google.monitoring.v3.TypedValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Point} Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Point.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Point message. + * @function verify + * @memberof google.monitoring.v3.Point + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Point.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.monitoring.v3.TypedValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Point + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Point} Point + */ + Point.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Point) + return object; + var message = new $root.google.monitoring.v3.Point(); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.Point.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.monitoring.v3.Point.value: object expected"); + message.value = $root.google.monitoring.v3.TypedValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Point + * @static + * @param {google.monitoring.v3.Point} message Point + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Point.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.interval = null; + object.value = null; + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.monitoring.v3.TypedValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this Point to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Point + * @instance + * @returns {Object.} JSON object + */ + Point.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Point; + })(); + + v3.TimeSeries = (function() { + + /** + * Properties of a TimeSeries. + * @memberof google.monitoring.v3 + * @interface ITimeSeries + * @property {google.api.IMetric|null} [metric] TimeSeries metric + * @property {google.api.IMonitoredResource|null} [resource] TimeSeries resource + * @property {google.api.IMonitoredResourceMetadata|null} [metadata] TimeSeries metadata + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] TimeSeries metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] TimeSeries valueType + * @property {Array.|null} [points] TimeSeries points + */ + + /** + * Constructs a new TimeSeries. + * @memberof google.monitoring.v3 + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries + * @constructor + * @param {google.monitoring.v3.ITimeSeries=} [properties] Properties to set + */ + function TimeSeries(properties) { + this.points = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeries metric. + * @member {google.api.IMetric|null|undefined} metric + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.metric = null; + + /** + * TimeSeries resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.resource = null; + + /** + * TimeSeries metadata. + * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.metadata = null; + + /** + * TimeSeries metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.metricKind = 0; + + /** + * TimeSeries valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.valueType = 0; + + /** + * TimeSeries points. + * @member {Array.} points + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.points = $util.emptyArray; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {google.monitoring.v3.ITimeSeries=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeries} TimeSeries instance + */ + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); + }; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {google.monitoring.v3.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && message.hasOwnProperty("metric")) + $root.google.api.Metric.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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.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.points != null && message.points.length) + for (var i = 0; i < message.points.length; ++i) + $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {google.monitoring.v3.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeSeries} TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeries.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metric = $root.google.api.Metric.decode(reader, reader.uint32()); + break; + case 2: + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 7: + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); + break; + case 3: + message.metricKind = reader.int32(); + break; + case 4: + message.valueType = reader.int32(); + break; + case 5: + if (!(message.points && message.points.length)) + message.points = []; + message.points.push($root.google.monitoring.v3.Point.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeSeries} TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeries message. + * @function verify + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.api.Metric.verify(message.metric); + if (error) + return "metric." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); + if (error) + return "metadata." + 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.points != null && message.hasOwnProperty("points")) { + if (!Array.isArray(message.points)) + return "points: array expected"; + for (var i = 0; i < message.points.length; ++i) { + var error = $root.google.monitoring.v3.Point.verify(message.points[i]); + if (error) + return "points." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeSeries} TimeSeries + */ + TimeSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeries) + return object; + var message = new $root.google.monitoring.v3.TimeSeries(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.metric: object expected"); + message.metric = $root.google.api.Metric.fromObject(object.metric); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.metadata: object expected"); + message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + } + 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.points) { + if (!Array.isArray(object.points)) + throw TypeError(".google.monitoring.v3.TimeSeries.points: array expected"); + message.points = []; + for (var i = 0; i < object.points.length; ++i) { + if (typeof object.points[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.points: object expected"); + message.points[i] = $root.google.monitoring.v3.Point.fromObject(object.points[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {google.monitoring.v3.TimeSeries} message TimeSeries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.points = []; + if (options.defaults) { + object.metric = null; + object.resource = null; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.metadata = null; + } + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.api.Metric.toObject(message.metric, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, 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.points && message.points.length) { + object.points = []; + for (var j = 0; j < message.points.length; ++j) + object.points[j] = $root.google.monitoring.v3.Point.toObject(message.points[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this TimeSeries to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeSeries + * @instance + * @returns {Object.} JSON object + */ + TimeSeries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeSeries; + })(); + + v3.NotificationChannelService = (function() { + + /** + * Constructs a new NotificationChannelService service. + * @memberof google.monitoring.v3 + * @classdesc Represents a NotificationChannelService + * @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 NotificationChannelService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (NotificationChannelService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NotificationChannelService; + + /** + * Creates new NotificationChannelService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.NotificationChannelService + * @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 {NotificationChannelService} RPC service. Useful where requests and/or responses are streamed. + */ + NotificationChannelService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef ListNotificationChannelDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} [response] ListNotificationChannelDescriptorsResponse + */ + + /** + * Calls ListNotificationChannelDescriptors. + * @function listNotificationChannelDescriptors + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} request ListNotificationChannelDescriptorsRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptorsCallback} callback Node-style callback called with the error, if any, and ListNotificationChannelDescriptorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.listNotificationChannelDescriptors = function listNotificationChannelDescriptors(request, callback) { + return this.rpcCall(listNotificationChannelDescriptors, $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest, $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse, request, callback); + }, "name", { value: "ListNotificationChannelDescriptors" }); + + /** + * Calls ListNotificationChannelDescriptors. + * @function listNotificationChannelDescriptors + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} request ListNotificationChannelDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef GetNotificationChannelDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannelDescriptor} [response] NotificationChannelDescriptor + */ + + /** + * Calls GetNotificationChannelDescriptor. + * @function getNotificationChannelDescriptor + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} request GetNotificationChannelDescriptorRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptorCallback} callback Node-style callback called with the error, if any, and NotificationChannelDescriptor + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.getNotificationChannelDescriptor = function getNotificationChannelDescriptor(request, callback) { + return this.rpcCall(getNotificationChannelDescriptor, $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest, $root.google.monitoring.v3.NotificationChannelDescriptor, request, callback); + }, "name", { value: "GetNotificationChannelDescriptor" }); + + /** + * Calls GetNotificationChannelDescriptor. + * @function getNotificationChannelDescriptor + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} request GetNotificationChannelDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef ListNotificationChannelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListNotificationChannelsResponse} [response] ListNotificationChannelsResponse + */ + + /** + * Calls ListNotificationChannels. + * @function listNotificationChannels + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelsRequest} request ListNotificationChannelsRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.ListNotificationChannelsCallback} callback Node-style callback called with the error, if any, and ListNotificationChannelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.listNotificationChannels = function listNotificationChannels(request, callback) { + return this.rpcCall(listNotificationChannels, $root.google.monitoring.v3.ListNotificationChannelsRequest, $root.google.monitoring.v3.ListNotificationChannelsResponse, request, callback); + }, "name", { value: "ListNotificationChannels" }); + + /** + * Calls ListNotificationChannels. + * @function listNotificationChannels + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelsRequest} request ListNotificationChannelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef GetNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel + */ + + /** + * Calls GetNotificationChannel. + * @function getNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelRequest} request GetNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.getNotificationChannel = function getNotificationChannel(request, callback) { + return this.rpcCall(getNotificationChannel, $root.google.monitoring.v3.GetNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "GetNotificationChannel" }); + + /** + * Calls GetNotificationChannel. + * @function getNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelRequest} request GetNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef CreateNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel + */ + + /** + * Calls CreateNotificationChannel. + * @function createNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} request CreateNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.CreateNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.createNotificationChannel = function createNotificationChannel(request, callback) { + return this.rpcCall(createNotificationChannel, $root.google.monitoring.v3.CreateNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "CreateNotificationChannel" }); + + /** + * Calls CreateNotificationChannel. + * @function createNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} request CreateNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#updateNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef UpdateNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel + */ + + /** + * Calls UpdateNotificationChannel. + * @function updateNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} request UpdateNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.UpdateNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.updateNotificationChannel = function updateNotificationChannel(request, callback) { + return this.rpcCall(updateNotificationChannel, $root.google.monitoring.v3.UpdateNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "UpdateNotificationChannel" }); + + /** + * Calls UpdateNotificationChannel. + * @function updateNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} request UpdateNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef DeleteNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteNotificationChannel. + * @function deleteNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} request DeleteNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.DeleteNotificationChannelCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.deleteNotificationChannel = function deleteNotificationChannel(request, callback) { + return this.rpcCall(deleteNotificationChannel, $root.google.monitoring.v3.DeleteNotificationChannelRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteNotificationChannel" }); + + /** + * Calls DeleteNotificationChannel. + * @function deleteNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} request DeleteNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef SendNotificationChannelVerificationCodeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls SendNotificationChannelVerificationCode. + * @function sendNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} request SendNotificationChannelVerificationCodeRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCodeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.sendNotificationChannelVerificationCode = function sendNotificationChannelVerificationCode(request, callback) { + return this.rpcCall(sendNotificationChannelVerificationCode, $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "SendNotificationChannelVerificationCode" }); + + /** + * Calls SendNotificationChannelVerificationCode. + * @function sendNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} request SendNotificationChannelVerificationCodeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef GetNotificationChannelVerificationCodeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} [response] GetNotificationChannelVerificationCodeResponse + */ + + /** + * Calls GetNotificationChannelVerificationCode. + * @function getNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} request GetNotificationChannelVerificationCodeRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCodeCallback} callback Node-style callback called with the error, if any, and GetNotificationChannelVerificationCodeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.getNotificationChannelVerificationCode = function getNotificationChannelVerificationCode(request, callback) { + return this.rpcCall(getNotificationChannelVerificationCode, $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest, $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse, request, callback); + }, "name", { value: "GetNotificationChannelVerificationCode" }); + + /** + * Calls GetNotificationChannelVerificationCode. + * @function getNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} request GetNotificationChannelVerificationCodeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef VerifyNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel + */ + + /** + * Calls VerifyNotificationChannel. + * @function verifyNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} request VerifyNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.VerifyNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.verifyNotificationChannel = function verifyNotificationChannel(request, callback) { + return this.rpcCall(verifyNotificationChannel, $root.google.monitoring.v3.VerifyNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "VerifyNotificationChannel" }); + + /** + * Calls VerifyNotificationChannel. + * @function verifyNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} request VerifyNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NotificationChannelService; + })(); + + v3.ListNotificationChannelDescriptorsRequest = (function() { + + /** + * Properties of a ListNotificationChannelDescriptorsRequest. + * @memberof google.monitoring.v3 + * @interface IListNotificationChannelDescriptorsRequest + * @property {string|null} [name] ListNotificationChannelDescriptorsRequest name + * @property {number|null} [pageSize] ListNotificationChannelDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListNotificationChannelDescriptorsRequest pageToken + */ + + /** + * Constructs a new ListNotificationChannelDescriptorsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListNotificationChannelDescriptorsRequest. + * @implements IListNotificationChannelDescriptorsRequest + * @constructor + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest=} [properties] Properties to set + */ + function ListNotificationChannelDescriptorsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNotificationChannelDescriptorsRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @instance + */ + ListNotificationChannelDescriptorsRequest.prototype.name = ""; + + /** + * ListNotificationChannelDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @instance + */ + ListNotificationChannelDescriptorsRequest.prototype.pageSize = 0; + + /** + * ListNotificationChannelDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @instance + */ + ListNotificationChannelDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNotificationChannelDescriptorsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest instance + */ + ListNotificationChannelDescriptorsRequest.create = function create(properties) { + return new ListNotificationChannelDescriptorsRequest(properties); + }; + + /** + * Encodes the specified ListNotificationChannelDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelDescriptorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListNotificationChannelDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelDescriptorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = 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 ListNotificationChannelDescriptorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNotificationChannelDescriptorsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotificationChannelDescriptorsRequest.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.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 ListNotificationChannelDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest + */ + ListNotificationChannelDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest) + return object; + var message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest(); + if (object.name != null) + message.name = String(object.name); + 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 ListNotificationChannelDescriptorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNotificationChannelDescriptorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + 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; + }; + + /** + * Converts this ListNotificationChannelDescriptorsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @instance + * @returns {Object.} JSON object + */ + ListNotificationChannelDescriptorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListNotificationChannelDescriptorsRequest; + })(); + + v3.ListNotificationChannelDescriptorsResponse = (function() { + + /** + * Properties of a ListNotificationChannelDescriptorsResponse. + * @memberof google.monitoring.v3 + * @interface IListNotificationChannelDescriptorsResponse + * @property {Array.|null} [channelDescriptors] ListNotificationChannelDescriptorsResponse channelDescriptors + * @property {string|null} [nextPageToken] ListNotificationChannelDescriptorsResponse nextPageToken + */ + + /** + * Constructs a new ListNotificationChannelDescriptorsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListNotificationChannelDescriptorsResponse. + * @implements IListNotificationChannelDescriptorsResponse + * @constructor + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse=} [properties] Properties to set + */ + function ListNotificationChannelDescriptorsResponse(properties) { + this.channelDescriptors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNotificationChannelDescriptorsResponse channelDescriptors. + * @member {Array.} channelDescriptors + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @instance + */ + ListNotificationChannelDescriptorsResponse.prototype.channelDescriptors = $util.emptyArray; + + /** + * ListNotificationChannelDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @instance + */ + ListNotificationChannelDescriptorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListNotificationChannelDescriptorsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse instance + */ + ListNotificationChannelDescriptorsResponse.create = function create(properties) { + return new ListNotificationChannelDescriptorsResponse(properties); + }; + + /** + * Encodes the specified ListNotificationChannelDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelDescriptorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelDescriptors != null && message.channelDescriptors.length) + for (var i = 0; i < message.channelDescriptors.length; ++i) + $root.google.monitoring.v3.NotificationChannelDescriptor.encode(message.channelDescriptors[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 ListNotificationChannelDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelDescriptorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.channelDescriptors && message.channelDescriptors.length)) + message.channelDescriptors = []; + message.channelDescriptors.push($root.google.monitoring.v3.NotificationChannelDescriptor.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNotificationChannelDescriptorsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotificationChannelDescriptorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channelDescriptors != null && message.hasOwnProperty("channelDescriptors")) { + if (!Array.isArray(message.channelDescriptors)) + return "channelDescriptors: array expected"; + for (var i = 0; i < message.channelDescriptors.length; ++i) { + var error = $root.google.monitoring.v3.NotificationChannelDescriptor.verify(message.channelDescriptors[i]); + if (error) + return "channelDescriptors." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListNotificationChannelDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse + */ + ListNotificationChannelDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse) + return object; + var message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse(); + if (object.channelDescriptors) { + if (!Array.isArray(object.channelDescriptors)) + throw TypeError(".google.monitoring.v3.ListNotificationChannelDescriptorsResponse.channelDescriptors: array expected"); + message.channelDescriptors = []; + for (var i = 0; i < object.channelDescriptors.length; ++i) { + if (typeof object.channelDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListNotificationChannelDescriptorsResponse.channelDescriptors: object expected"); + message.channelDescriptors[i] = $root.google.monitoring.v3.NotificationChannelDescriptor.fromObject(object.channelDescriptors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListNotificationChannelDescriptorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNotificationChannelDescriptorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.channelDescriptors = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.channelDescriptors && message.channelDescriptors.length) { + object.channelDescriptors = []; + for (var j = 0; j < message.channelDescriptors.length; ++j) + object.channelDescriptors[j] = $root.google.monitoring.v3.NotificationChannelDescriptor.toObject(message.channelDescriptors[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListNotificationChannelDescriptorsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @instance + * @returns {Object.} JSON object + */ + ListNotificationChannelDescriptorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListNotificationChannelDescriptorsResponse; + })(); + + v3.GetNotificationChannelDescriptorRequest = (function() { + + /** + * Properties of a GetNotificationChannelDescriptorRequest. + * @memberof google.monitoring.v3 + * @interface IGetNotificationChannelDescriptorRequest + * @property {string|null} [name] GetNotificationChannelDescriptorRequest name + */ + + /** + * Constructs a new GetNotificationChannelDescriptorRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetNotificationChannelDescriptorRequest. + * @implements IGetNotificationChannelDescriptorRequest + * @constructor + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest=} [properties] Properties to set + */ + function GetNotificationChannelDescriptorRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNotificationChannelDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @instance + */ + GetNotificationChannelDescriptorRequest.prototype.name = ""; + + /** + * Creates a new GetNotificationChannelDescriptorRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest instance + */ + GetNotificationChannelDescriptorRequest.create = function create(properties) { + return new GetNotificationChannelDescriptorRequest(properties); + }; + + /** + * Encodes the specified GetNotificationChannelDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelDescriptorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetNotificationChannelDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelDescriptorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNotificationChannelDescriptorRequest message. + * @function verify + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNotificationChannelDescriptorRequest.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 GetNotificationChannelDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest + */ + GetNotificationChannelDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest) + return object; + var message = new $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNotificationChannelDescriptorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {google.monitoring.v3.GetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNotificationChannelDescriptorRequest.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 GetNotificationChannelDescriptorRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @instance + * @returns {Object.} JSON object + */ + GetNotificationChannelDescriptorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetNotificationChannelDescriptorRequest; + })(); + + v3.CreateNotificationChannelRequest = (function() { + + /** + * Properties of a CreateNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @interface ICreateNotificationChannelRequest + * @property {string|null} [name] CreateNotificationChannelRequest name + * @property {google.monitoring.v3.INotificationChannel|null} [notificationChannel] CreateNotificationChannelRequest notificationChannel + */ + + /** + * Constructs a new CreateNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateNotificationChannelRequest. + * @implements ICreateNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.ICreateNotificationChannelRequest=} [properties] Properties to set + */ + function CreateNotificationChannelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @instance + */ + CreateNotificationChannelRequest.prototype.name = ""; + + /** + * CreateNotificationChannelRequest notificationChannel. + * @member {google.monitoring.v3.INotificationChannel|null|undefined} notificationChannel + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @instance + */ + CreateNotificationChannelRequest.prototype.notificationChannel = null; + + /** + * Creates a new CreateNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.ICreateNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest instance + */ + CreateNotificationChannelRequest.create = function create(properties) { + return new CreateNotificationChannelRequest(properties); + }; + + /** + * Encodes the specified CreateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} message CreateNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNotificationChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified CreateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} message CreateNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNotificationChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateNotificationChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 2: + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateNotificationChannelRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateNotificationChannelRequest.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.notificationChannel != null && message.hasOwnProperty("notificationChannel")) { + var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannel); + if (error) + return "notificationChannel." + error; + } + return null; + }; + + /** + * Creates a CreateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest + */ + CreateNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateNotificationChannelRequest) + return object; + var message = new $root.google.monitoring.v3.CreateNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.notificationChannel != null) { + if (typeof object.notificationChannel !== "object") + throw TypeError(".google.monitoring.v3.CreateNotificationChannelRequest.notificationChannel: object expected"); + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannel); + } + return message; + }; + + /** + * Creates a plain object from a CreateNotificationChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.CreateNotificationChannelRequest} message CreateNotificationChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateNotificationChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notificationChannel = null; + object.name = ""; + } + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + object.notificationChannel = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannel, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CreateNotificationChannelRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @instance + * @returns {Object.} JSON object + */ + CreateNotificationChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateNotificationChannelRequest; + })(); + + v3.ListNotificationChannelsRequest = (function() { + + /** + * Properties of a ListNotificationChannelsRequest. + * @memberof google.monitoring.v3 + * @interface IListNotificationChannelsRequest + * @property {string|null} [name] ListNotificationChannelsRequest name + * @property {string|null} [filter] ListNotificationChannelsRequest filter + * @property {string|null} [orderBy] ListNotificationChannelsRequest orderBy + * @property {number|null} [pageSize] ListNotificationChannelsRequest pageSize + * @property {string|null} [pageToken] ListNotificationChannelsRequest pageToken + */ + + /** + * Constructs a new ListNotificationChannelsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListNotificationChannelsRequest. + * @implements IListNotificationChannelsRequest + * @constructor + * @param {google.monitoring.v3.IListNotificationChannelsRequest=} [properties] Properties to set + */ + function ListNotificationChannelsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNotificationChannelsRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.name = ""; + + /** + * ListNotificationChannelsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.filter = ""; + + /** + * ListNotificationChannelsRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.orderBy = ""; + + /** + * ListNotificationChannelsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.pageSize = 0; + + /** + * ListNotificationChannelsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNotificationChannelsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {google.monitoring.v3.IListNotificationChannelsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest instance + */ + ListNotificationChannelsRequest.create = function create(properties) { + return new ListNotificationChannelsRequest(properties); + }; + + /** + * Encodes the specified ListNotificationChannelsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {google.monitoring.v3.IListNotificationChannelsRequest} message ListNotificationChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListNotificationChannelsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {google.monitoring.v3.IListNotificationChannelsRequest} message ListNotificationChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; + case 6: + message.filter = reader.string(); + break; + case 7: + message.orderBy = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNotificationChannelsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotificationChannelsRequest.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.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 ListNotificationChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest + */ + ListNotificationChannelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelsRequest) + return object; + var message = new $root.google.monitoring.v3.ListNotificationChannelsRequest(); + if (object.name != null) + message.name = String(object.name); + 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 ListNotificationChannelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {google.monitoring.v3.ListNotificationChannelsRequest} message ListNotificationChannelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNotificationChannelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + object.filter = ""; + object.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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListNotificationChannelsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListNotificationChannelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListNotificationChannelsRequest; + })(); + + v3.ListNotificationChannelsResponse = (function() { + + /** + * Properties of a ListNotificationChannelsResponse. + * @memberof google.monitoring.v3 + * @interface IListNotificationChannelsResponse + * @property {Array.|null} [notificationChannels] ListNotificationChannelsResponse notificationChannels + * @property {string|null} [nextPageToken] ListNotificationChannelsResponse nextPageToken + */ + + /** + * Constructs a new ListNotificationChannelsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListNotificationChannelsResponse. + * @implements IListNotificationChannelsResponse + * @constructor + * @param {google.monitoring.v3.IListNotificationChannelsResponse=} [properties] Properties to set + */ + function ListNotificationChannelsResponse(properties) { + this.notificationChannels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListNotificationChannelsResponse notificationChannels. + * @member {Array.} notificationChannels + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @instance + */ + ListNotificationChannelsResponse.prototype.notificationChannels = $util.emptyArray; + + /** + * ListNotificationChannelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @instance + */ + ListNotificationChannelsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListNotificationChannelsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {google.monitoring.v3.IListNotificationChannelsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse instance + */ + ListNotificationChannelsResponse.create = function create(properties) { + return new ListNotificationChannelsResponse(properties); + }; + + /** + * Encodes the specified ListNotificationChannelsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {google.monitoring.v3.IListNotificationChannelsResponse} message ListNotificationChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelsResponse.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.notificationChannels != null && message.notificationChannels.length) + for (var i = 0; i < message.notificationChannels.length; ++i) + $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListNotificationChannelsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {google.monitoring.v3.IListNotificationChannelsResponse} message ListNotificationChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListNotificationChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + if (!(message.notificationChannels && message.notificationChannels.length)) + message.notificationChannels = []; + message.notificationChannels.push($root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListNotificationChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListNotificationChannelsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListNotificationChannelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { + if (!Array.isArray(message.notificationChannels)) + return "notificationChannels: array expected"; + for (var i = 0; i < message.notificationChannels.length; ++i) { + var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannels[i]); + if (error) + return "notificationChannels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListNotificationChannelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse + */ + ListNotificationChannelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelsResponse) + return object; + var message = new $root.google.monitoring.v3.ListNotificationChannelsResponse(); + if (object.notificationChannels) { + if (!Array.isArray(object.notificationChannels)) + throw TypeError(".google.monitoring.v3.ListNotificationChannelsResponse.notificationChannels: array expected"); + message.notificationChannels = []; + for (var i = 0; i < object.notificationChannels.length; ++i) { + if (typeof object.notificationChannels[i] !== "object") + throw TypeError(".google.monitoring.v3.ListNotificationChannelsResponse.notificationChannels: object expected"); + message.notificationChannels[i] = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannels[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListNotificationChannelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {google.monitoring.v3.ListNotificationChannelsResponse} message ListNotificationChannelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListNotificationChannelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.notificationChannels = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.notificationChannels && message.notificationChannels.length) { + object.notificationChannels = []; + for (var j = 0; j < message.notificationChannels.length; ++j) + object.notificationChannels[j] = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannels[j], options); + } + return object; + }; + + /** + * Converts this ListNotificationChannelsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListNotificationChannelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListNotificationChannelsResponse; + })(); + + v3.GetNotificationChannelRequest = (function() { + + /** + * Properties of a GetNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @interface IGetNotificationChannelRequest + * @property {string|null} [name] GetNotificationChannelRequest name + */ + + /** + * Constructs a new GetNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetNotificationChannelRequest. + * @implements IGetNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.IGetNotificationChannelRequest=} [properties] Properties to set + */ + function GetNotificationChannelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @instance + */ + GetNotificationChannelRequest.prototype.name = ""; + + /** + * Creates a new GetNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest instance + */ + GetNotificationChannelRequest.create = function create(properties) { + return new GetNotificationChannelRequest(properties); + }; + + /** + * Encodes the specified GetNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelRequest} message GetNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelRequest} message GetNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNotificationChannelRequest message. + * @function verify + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNotificationChannelRequest.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 GetNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest + */ + GetNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelRequest) + return object; + var message = new $root.google.monitoring.v3.GetNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNotificationChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {google.monitoring.v3.GetNotificationChannelRequest} message GetNotificationChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNotificationChannelRequest.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 GetNotificationChannelRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @instance + * @returns {Object.} JSON object + */ + GetNotificationChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetNotificationChannelRequest; + })(); + + v3.UpdateNotificationChannelRequest = (function() { + + /** + * Properties of an UpdateNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateNotificationChannelRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNotificationChannelRequest updateMask + * @property {google.monitoring.v3.INotificationChannel|null} [notificationChannel] UpdateNotificationChannelRequest notificationChannel + */ + + /** + * Constructs a new UpdateNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateNotificationChannelRequest. + * @implements IUpdateNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest=} [properties] Properties to set + */ + function UpdateNotificationChannelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateNotificationChannelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @instance + */ + UpdateNotificationChannelRequest.prototype.updateMask = null; + + /** + * UpdateNotificationChannelRequest notificationChannel. + * @member {google.monitoring.v3.INotificationChannel|null|undefined} notificationChannel + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @instance + */ + UpdateNotificationChannelRequest.prototype.notificationChannel = null; + + /** + * Creates a new UpdateNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest instance + */ + UpdateNotificationChannelRequest.create = function create(properties) { + return new UpdateNotificationChannelRequest(properties); + }; + + /** + * Encodes the specified UpdateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} message UpdateNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateNotificationChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} message UpdateNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNotificationChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateNotificationChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateNotificationChannelRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateNotificationChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) { + var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannel); + if (error) + return "notificationChannel." + error; + } + return null; + }; + + /** + * Creates an UpdateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest + */ + UpdateNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateNotificationChannelRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateNotificationChannelRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateNotificationChannelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.notificationChannel != null) { + if (typeof object.notificationChannel !== "object") + throw TypeError(".google.monitoring.v3.UpdateNotificationChannelRequest.notificationChannel: object expected"); + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannel); + } + return message; + }; + + /** + * Creates a plain object from an UpdateNotificationChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.UpdateNotificationChannelRequest} message UpdateNotificationChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateNotificationChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.notificationChannel = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + object.notificationChannel = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannel, options); + return object; + }; + + /** + * Converts this UpdateNotificationChannelRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateNotificationChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateNotificationChannelRequest; + })(); + + v3.DeleteNotificationChannelRequest = (function() { + + /** + * Properties of a DeleteNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteNotificationChannelRequest + * @property {string|null} [name] DeleteNotificationChannelRequest name + * @property {boolean|null} [force] DeleteNotificationChannelRequest force + */ + + /** + * Constructs a new DeleteNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteNotificationChannelRequest. + * @implements IDeleteNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest=} [properties] Properties to set + */ + function DeleteNotificationChannelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @instance + */ + DeleteNotificationChannelRequest.prototype.name = ""; + + /** + * DeleteNotificationChannelRequest force. + * @member {boolean} force + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @instance + */ + DeleteNotificationChannelRequest.prototype.force = false; + + /** + * Creates a new DeleteNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest instance + */ + DeleteNotificationChannelRequest.create = function create(properties) { + return new DeleteNotificationChannelRequest(properties); + }; + + /** + * Encodes the specified DeleteNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} message DeleteNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNotificationChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.force != null && message.hasOwnProperty("force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} message DeleteNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNotificationChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteNotificationChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 5: + message.force = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteNotificationChannelRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteNotificationChannelRequest.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.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest + */ + DeleteNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteNotificationChannelRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteNotificationChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {google.monitoring.v3.DeleteNotificationChannelRequest} message DeleteNotificationChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteNotificationChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteNotificationChannelRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteNotificationChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteNotificationChannelRequest; + })(); + + v3.SendNotificationChannelVerificationCodeRequest = (function() { + + /** + * Properties of a SendNotificationChannelVerificationCodeRequest. + * @memberof google.monitoring.v3 + * @interface ISendNotificationChannelVerificationCodeRequest + * @property {string|null} [name] SendNotificationChannelVerificationCodeRequest name + */ + + /** + * Constructs a new SendNotificationChannelVerificationCodeRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a SendNotificationChannelVerificationCodeRequest. + * @implements ISendNotificationChannelVerificationCodeRequest + * @constructor + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest=} [properties] Properties to set + */ + function SendNotificationChannelVerificationCodeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SendNotificationChannelVerificationCodeRequest name. + * @member {string} name + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @instance + */ + SendNotificationChannelVerificationCodeRequest.prototype.name = ""; + + /** + * Creates a new SendNotificationChannelVerificationCodeRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest instance + */ + SendNotificationChannelVerificationCodeRequest.create = function create(properties) { + return new SendNotificationChannelVerificationCodeRequest(properties); + }; + + /** + * Encodes the specified SendNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendNotificationChannelVerificationCodeRequest.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 SendNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendNotificationChannelVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendNotificationChannelVerificationCodeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest(); + 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 SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendNotificationChannelVerificationCodeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendNotificationChannelVerificationCodeRequest message. + * @function verify + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendNotificationChannelVerificationCodeRequest.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 SendNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest + */ + SendNotificationChannelVerificationCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest) + return object; + var message = new $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SendNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendNotificationChannelVerificationCodeRequest.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 SendNotificationChannelVerificationCodeRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @instance + * @returns {Object.} JSON object + */ + SendNotificationChannelVerificationCodeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendNotificationChannelVerificationCodeRequest; + })(); + + v3.GetNotificationChannelVerificationCodeRequest = (function() { + + /** + * Properties of a GetNotificationChannelVerificationCodeRequest. + * @memberof google.monitoring.v3 + * @interface IGetNotificationChannelVerificationCodeRequest + * @property {string|null} [name] GetNotificationChannelVerificationCodeRequest name + * @property {google.protobuf.ITimestamp|null} [expireTime] GetNotificationChannelVerificationCodeRequest expireTime + */ + + /** + * Constructs a new GetNotificationChannelVerificationCodeRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetNotificationChannelVerificationCodeRequest. + * @implements IGetNotificationChannelVerificationCodeRequest + * @constructor + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest=} [properties] Properties to set + */ + function GetNotificationChannelVerificationCodeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNotificationChannelVerificationCodeRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @instance + */ + GetNotificationChannelVerificationCodeRequest.prototype.name = ""; + + /** + * GetNotificationChannelVerificationCodeRequest expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @instance + */ + GetNotificationChannelVerificationCodeRequest.prototype.expireTime = null; + + /** + * Creates a new GetNotificationChannelVerificationCodeRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest instance + */ + GetNotificationChannelVerificationCodeRequest.create = function create(properties) { + return new GetNotificationChannelVerificationCodeRequest(properties); + }; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelVerificationCodeRequest.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.expireTime != null && message.hasOwnProperty("expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelVerificationCodeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelVerificationCodeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNotificationChannelVerificationCodeRequest message. + * @function verify + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNotificationChannelVerificationCodeRequest.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.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a GetNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest + */ + GetNotificationChannelVerificationCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest) + return object; + var message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from a GetNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNotificationChannelVerificationCodeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.expireTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this GetNotificationChannelVerificationCodeRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @instance + * @returns {Object.} JSON object + */ + GetNotificationChannelVerificationCodeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetNotificationChannelVerificationCodeRequest; + })(); + + v3.GetNotificationChannelVerificationCodeResponse = (function() { + + /** + * Properties of a GetNotificationChannelVerificationCodeResponse. + * @memberof google.monitoring.v3 + * @interface IGetNotificationChannelVerificationCodeResponse + * @property {string|null} [code] GetNotificationChannelVerificationCodeResponse code + * @property {google.protobuf.ITimestamp|null} [expireTime] GetNotificationChannelVerificationCodeResponse expireTime + */ + + /** + * Constructs a new GetNotificationChannelVerificationCodeResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetNotificationChannelVerificationCodeResponse. + * @implements IGetNotificationChannelVerificationCodeResponse + * @constructor + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse=} [properties] Properties to set + */ + function GetNotificationChannelVerificationCodeResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNotificationChannelVerificationCodeResponse code. + * @member {string} code + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @instance + */ + GetNotificationChannelVerificationCodeResponse.prototype.code = ""; + + /** + * GetNotificationChannelVerificationCodeResponse expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @instance + */ + GetNotificationChannelVerificationCodeResponse.prototype.expireTime = null; + + /** + * Creates a new GetNotificationChannelVerificationCodeResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse instance + */ + GetNotificationChannelVerificationCodeResponse.create = function create(properties) { + return new GetNotificationChannelVerificationCodeResponse(properties); + }; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeResponse message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelVerificationCodeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetNotificationChannelVerificationCodeResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNotificationChannelVerificationCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelVerificationCodeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.string(); + break; + case 2: + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNotificationChannelVerificationCodeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNotificationChannelVerificationCodeResponse message. + * @function verify + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNotificationChannelVerificationCodeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a GetNotificationChannelVerificationCodeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse + */ + GetNotificationChannelVerificationCodeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) + return object; + var message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse(); + if (object.code != null) + message.code = String(object.code); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from a GetNotificationChannelVerificationCodeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNotificationChannelVerificationCodeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = ""; + object.expireTime = null; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this GetNotificationChannelVerificationCodeResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @instance + * @returns {Object.} JSON object + */ + GetNotificationChannelVerificationCodeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetNotificationChannelVerificationCodeResponse; + })(); + + v3.VerifyNotificationChannelRequest = (function() { + + /** + * Properties of a VerifyNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @interface IVerifyNotificationChannelRequest + * @property {string|null} [name] VerifyNotificationChannelRequest name + * @property {string|null} [code] VerifyNotificationChannelRequest code + */ + + /** + * Constructs a new VerifyNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a VerifyNotificationChannelRequest. + * @implements IVerifyNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest=} [properties] Properties to set + */ + function VerifyNotificationChannelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifyNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @instance + */ + VerifyNotificationChannelRequest.prototype.name = ""; + + /** + * VerifyNotificationChannelRequest code. + * @member {string} code + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @instance + */ + VerifyNotificationChannelRequest.prototype.code = ""; + + /** + * Creates a new VerifyNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest instance + */ + VerifyNotificationChannelRequest.create = function create(properties) { + return new VerifyNotificationChannelRequest(properties); + }; + + /** + * Encodes the specified VerifyNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} message VerifyNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyNotificationChannelRequest.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.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); + return writer; + }; + + /** + * Encodes the specified VerifyNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} message VerifyNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyNotificationChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.VerifyNotificationChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.code = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyNotificationChannelRequest message. + * @function verify + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyNotificationChannelRequest.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.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; + return null; + }; + + /** + * Creates a VerifyNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest + */ + VerifyNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.VerifyNotificationChannelRequest) + return object; + var message = new $root.google.monitoring.v3.VerifyNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.code != null) + message.code = String(object.code); + return message; + }; + + /** + * Creates a plain object from a VerifyNotificationChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {google.monitoring.v3.VerifyNotificationChannelRequest} message VerifyNotificationChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyNotificationChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.code = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + return object; + }; + + /** + * Converts this VerifyNotificationChannelRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyNotificationChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VerifyNotificationChannelRequest; + })(); + + v3.NotificationChannelDescriptor = (function() { + + /** + * Properties of a NotificationChannelDescriptor. + * @memberof google.monitoring.v3 + * @interface INotificationChannelDescriptor + * @property {string|null} [name] NotificationChannelDescriptor name + * @property {string|null} [type] NotificationChannelDescriptor type + * @property {string|null} [displayName] NotificationChannelDescriptor displayName + * @property {string|null} [description] NotificationChannelDescriptor description + * @property {Array.|null} [labels] NotificationChannelDescriptor labels + * @property {Array.|null} [supportedTiers] NotificationChannelDescriptor supportedTiers + */ + + /** + * Constructs a new NotificationChannelDescriptor. + * @memberof google.monitoring.v3 + * @classdesc Represents a NotificationChannelDescriptor. + * @implements INotificationChannelDescriptor + * @constructor + * @param {google.monitoring.v3.INotificationChannelDescriptor=} [properties] Properties to set + */ + function NotificationChannelDescriptor(properties) { + this.labels = []; + this.supportedTiers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotificationChannelDescriptor name. + * @member {string} name + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.name = ""; + + /** + * NotificationChannelDescriptor type. + * @member {string} type + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.type = ""; + + /** + * NotificationChannelDescriptor displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.displayName = ""; + + /** + * NotificationChannelDescriptor description. + * @member {string} description + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.description = ""; + + /** + * NotificationChannelDescriptor labels. + * @member {Array.} labels + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.labels = $util.emptyArray; + + /** + * NotificationChannelDescriptor supportedTiers. + * @member {Array.} supportedTiers + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.supportedTiers = $util.emptyArray; + + /** + * Creates a new NotificationChannelDescriptor instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {google.monitoring.v3.INotificationChannelDescriptor=} [properties] Properties to set + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor instance + */ + NotificationChannelDescriptor.create = function create(properties) { + return new NotificationChannelDescriptor(properties); + }; + + /** + * Encodes the specified NotificationChannelDescriptor message. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {google.monitoring.v3.INotificationChannelDescriptor} message NotificationChannelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationChannelDescriptor.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.supportedTiers != null && message.supportedTiers.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (var i = 0; i < message.supportedTiers.length; ++i) + writer.int32(message.supportedTiers[i]); + writer.ldelim(); + } + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + return writer; + }; + + /** + * Encodes the specified NotificationChannelDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {google.monitoring.v3.INotificationChannelDescriptor} message NotificationChannelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationChannelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationChannelDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + 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 5: + if (!(message.supportedTiers && message.supportedTiers.length)) + message.supportedTiers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedTiers.push(reader.int32()); + } else + message.supportedTiers.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationChannelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationChannelDescriptor message. + * @function verify + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationChannelDescriptor.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.supportedTiers != null && message.hasOwnProperty("supportedTiers")) { + if (!Array.isArray(message.supportedTiers)) + return "supportedTiers: array expected"; + for (var i = 0; i < message.supportedTiers.length; ++i) + switch (message.supportedTiers[i]) { + default: + return "supportedTiers: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a NotificationChannelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor + */ + NotificationChannelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.NotificationChannelDescriptor) + return object; + var message = new $root.google.monitoring.v3.NotificationChannelDescriptor(); + 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.monitoring.v3.NotificationChannelDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannelDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + if (object.supportedTiers) { + if (!Array.isArray(object.supportedTiers)) + throw TypeError(".google.monitoring.v3.NotificationChannelDescriptor.supportedTiers: array expected"); + message.supportedTiers = []; + for (var i = 0; i < object.supportedTiers.length; ++i) + switch (object.supportedTiers[i]) { + default: + case "SERVICE_TIER_UNSPECIFIED": + case 0: + message.supportedTiers[i] = 0; + break; + case "SERVICE_TIER_BASIC": + case 1: + message.supportedTiers[i] = 1; + break; + case "SERVICE_TIER_PREMIUM": + case 2: + message.supportedTiers[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a NotificationChannelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {google.monitoring.v3.NotificationChannelDescriptor} message NotificationChannelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationChannelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.supportedTiers = []; + } + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + } + 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.supportedTiers && message.supportedTiers.length) { + object.supportedTiers = []; + for (var j = 0; j < message.supportedTiers.length; ++j) + object.supportedTiers[j] = options.enums === String ? $root.google.monitoring.v3.ServiceTier[message.supportedTiers[j]] : message.supportedTiers[j]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this NotificationChannelDescriptor to JSON. + * @function toJSON + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + * @returns {Object.} JSON object + */ + NotificationChannelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NotificationChannelDescriptor; + })(); + + v3.NotificationChannel = (function() { + + /** + * Properties of a NotificationChannel. + * @memberof google.monitoring.v3 + * @interface INotificationChannel + * @property {string|null} [type] NotificationChannel type + * @property {string|null} [name] NotificationChannel name + * @property {string|null} [displayName] NotificationChannel displayName + * @property {string|null} [description] NotificationChannel description + * @property {Object.|null} [labels] NotificationChannel labels + * @property {Object.|null} [userLabels] NotificationChannel userLabels + * @property {google.monitoring.v3.NotificationChannel.VerificationStatus|null} [verificationStatus] NotificationChannel verificationStatus + * @property {google.protobuf.IBoolValue|null} [enabled] NotificationChannel enabled + */ + + /** + * Constructs a new NotificationChannel. + * @memberof google.monitoring.v3 + * @classdesc Represents a NotificationChannel. + * @implements INotificationChannel + * @constructor + * @param {google.monitoring.v3.INotificationChannel=} [properties] Properties to set + */ + function NotificationChannel(properties) { + this.labels = {}; + 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]]; + } + + /** + * NotificationChannel type. + * @member {string} type + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.type = ""; + + /** + * NotificationChannel name. + * @member {string} name + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.name = ""; + + /** + * NotificationChannel displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.displayName = ""; + + /** + * NotificationChannel description. + * @member {string} description + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.description = ""; + + /** + * NotificationChannel labels. + * @member {Object.} labels + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.labels = $util.emptyObject; + + /** + * NotificationChannel userLabels. + * @member {Object.} userLabels + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.userLabels = $util.emptyObject; + + /** + * NotificationChannel verificationStatus. + * @member {google.monitoring.v3.NotificationChannel.VerificationStatus} verificationStatus + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.verificationStatus = 0; + + /** + * NotificationChannel enabled. + * @member {google.protobuf.IBoolValue|null|undefined} enabled + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.enabled = null; + + /** + * Creates a new NotificationChannel instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {google.monitoring.v3.INotificationChannel=} [properties] Properties to set + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel instance + */ + NotificationChannel.create = function create(properties) { + return new NotificationChannel(properties); + }; + + /** + * Encodes the specified NotificationChannel message. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {google.monitoring.v3.INotificationChannel} message NotificationChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationChannel.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 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); + if (message.enabled != null && message.hasOwnProperty("enabled")) + $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NotificationChannel message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {google.monitoring.v3.INotificationChannel} message NotificationChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationChannel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationChannel message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationChannel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannel(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 6: + message.name = reader.string(); + break; + case 3: + message.displayName = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 8: + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); + break; + case 9: + message.verificationStatus = reader.int32(); + break; + case 11: + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationChannel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationChannel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationChannel message. + * @function verify + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationChannel.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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 (!$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.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.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + switch (message.verificationStatus) { + default: + return "verificationStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.enabled); + if (error) + return "enabled." + error; + } + return null; + }; + + /** + * Creates a NotificationChannel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel + */ + NotificationChannel.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.NotificationChannel) + return object; + var message = new $root.google.monitoring.v3.NotificationChannel(); + if (object.type != null) + message.type = String(object.type); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.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.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.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]]); + } + switch (object.verificationStatus) { + case "VERIFICATION_STATUS_UNSPECIFIED": + case 0: + message.verificationStatus = 0; + break; + case "UNVERIFIED": + case 1: + message.verificationStatus = 1; + break; + case "VERIFIED": + case 2: + message.verificationStatus = 2; + break; + } + if (object.enabled != null) { + if (typeof object.enabled !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.enabled: object expected"); + message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); + } + return message; + }; + + /** + * Creates a plain object from a NotificationChannel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {google.monitoring.v3.NotificationChannel} message NotificationChannel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationChannel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.userLabels = {}; + } + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.verificationStatus = options.enums === String ? "VERIFICATION_STATUS_UNSPECIFIED" : 0; + object.enabled = null; + } + 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; + 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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + object.verificationStatus = options.enums === String ? $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] : message.verificationStatus; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); + return object; + }; + + /** + * Converts this NotificationChannel to JSON. + * @function toJSON + * @memberof google.monitoring.v3.NotificationChannel + * @instance + * @returns {Object.} JSON object + */ + NotificationChannel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VerificationStatus enum. + * @name google.monitoring.v3.NotificationChannel.VerificationStatus + * @enum {string} + * @property {number} VERIFICATION_STATUS_UNSPECIFIED=0 VERIFICATION_STATUS_UNSPECIFIED value + * @property {number} UNVERIFIED=1 UNVERIFIED value + * @property {number} VERIFIED=2 VERIFIED value + */ + NotificationChannel.VerificationStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERIFICATION_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + values[valuesById[2] = "VERIFIED"] = 2; + return values; + })(); + + return NotificationChannel; + })(); + + v3.UptimeCheckService = (function() { + + /** + * Constructs a new UptimeCheckService service. + * @memberof google.monitoring.v3 + * @classdesc Represents an UptimeCheckService + * @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 UptimeCheckService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (UptimeCheckService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UptimeCheckService; + + /** + * Creates new UptimeCheckService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.UptimeCheckService + * @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 {UptimeCheckService} RPC service. Useful where requests and/or responses are streamed. + */ + UptimeCheckService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef ListUptimeCheckConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListUptimeCheckConfigsResponse} [response] ListUptimeCheckConfigsResponse + */ + + /** + * Calls ListUptimeCheckConfigs. + * @function listUptimeCheckConfigs + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} request ListUptimeCheckConfigsRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigsCallback} callback Node-style callback called with the error, if any, and ListUptimeCheckConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.listUptimeCheckConfigs = function listUptimeCheckConfigs(request, callback) { + return this.rpcCall(listUptimeCheckConfigs, $root.google.monitoring.v3.ListUptimeCheckConfigsRequest, $root.google.monitoring.v3.ListUptimeCheckConfigsResponse, request, callback); + }, "name", { value: "ListUptimeCheckConfigs" }); + + /** + * Calls ListUptimeCheckConfigs. + * @function listUptimeCheckConfigs + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} request ListUptimeCheckConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef GetUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig + */ + + /** + * Calls GetUptimeCheckConfig. + * @function getUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} request GetUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.getUptimeCheckConfig = function getUptimeCheckConfig(request, callback) { + return this.rpcCall(getUptimeCheckConfig, $root.google.monitoring.v3.GetUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); + }, "name", { value: "GetUptimeCheckConfig" }); + + /** + * Calls GetUptimeCheckConfig. + * @function getUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} request GetUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef CreateUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig + */ + + /** + * Calls CreateUptimeCheckConfig. + * @function createUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} request CreateUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.createUptimeCheckConfig = function createUptimeCheckConfig(request, callback) { + return this.rpcCall(createUptimeCheckConfig, $root.google.monitoring.v3.CreateUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); + }, "name", { value: "CreateUptimeCheckConfig" }); + + /** + * Calls CreateUptimeCheckConfig. + * @function createUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} request CreateUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef UpdateUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig + */ + + /** + * Calls UpdateUptimeCheckConfig. + * @function updateUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} request UpdateUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.updateUptimeCheckConfig = function updateUptimeCheckConfig(request, callback) { + return this.rpcCall(updateUptimeCheckConfig, $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); + }, "name", { value: "UpdateUptimeCheckConfig" }); + + /** + * Calls UpdateUptimeCheckConfig. + * @function updateUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} request UpdateUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef DeleteUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUptimeCheckConfig. + * @function deleteUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} request DeleteUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.deleteUptimeCheckConfig = function deleteUptimeCheckConfig(request, callback) { + return this.rpcCall(deleteUptimeCheckConfig, $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUptimeCheckConfig" }); + + /** + * Calls DeleteUptimeCheckConfig. + * @function deleteUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} request DeleteUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef ListUptimeCheckIpsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListUptimeCheckIpsResponse} [response] ListUptimeCheckIpsResponse + */ + + /** + * Calls ListUptimeCheckIps. + * @function listUptimeCheckIps + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} request ListUptimeCheckIpsRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.ListUptimeCheckIpsCallback} callback Node-style callback called with the error, if any, and ListUptimeCheckIpsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.listUptimeCheckIps = function listUptimeCheckIps(request, callback) { + return this.rpcCall(listUptimeCheckIps, $root.google.monitoring.v3.ListUptimeCheckIpsRequest, $root.google.monitoring.v3.ListUptimeCheckIpsResponse, request, callback); + }, "name", { value: "ListUptimeCheckIps" }); + + /** + * Calls ListUptimeCheckIps. + * @function listUptimeCheckIps + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} request ListUptimeCheckIpsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return UptimeCheckService; + })(); + + v3.ListUptimeCheckConfigsRequest = (function() { + + /** + * Properties of a ListUptimeCheckConfigsRequest. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckConfigsRequest + * @property {string|null} [parent] ListUptimeCheckConfigsRequest parent + * @property {number|null} [pageSize] ListUptimeCheckConfigsRequest pageSize + * @property {string|null} [pageToken] ListUptimeCheckConfigsRequest pageToken + */ + + /** + * Constructs a new ListUptimeCheckConfigsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckConfigsRequest. + * @implements IListUptimeCheckConfigsRequest + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest=} [properties] Properties to set + */ + function ListUptimeCheckConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUptimeCheckConfigsRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + */ + ListUptimeCheckConfigsRequest.prototype.parent = ""; + + /** + * ListUptimeCheckConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + */ + ListUptimeCheckConfigsRequest.prototype.pageSize = 0; + + /** + * ListUptimeCheckConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + */ + ListUptimeCheckConfigsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUptimeCheckConfigsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest instance + */ + ListUptimeCheckConfigsRequest.create = function create(properties) { + return new ListUptimeCheckConfigsRequest(properties); + }; + + /** + * Encodes the specified ListUptimeCheckConfigsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListUptimeCheckConfigsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUptimeCheckConfigsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckConfigsRequest.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 ListUptimeCheckConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + */ + ListUptimeCheckConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckConfigsRequest) + return object; + var message = new $root.google.monitoring.v3.ListUptimeCheckConfigsRequest(); + 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 ListUptimeCheckConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.ListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckConfigsRequest.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 ListUptimeCheckConfigsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListUptimeCheckConfigsRequest; + })(); + + v3.ListUptimeCheckConfigsResponse = (function() { + + /** + * Properties of a ListUptimeCheckConfigsResponse. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckConfigsResponse + * @property {Array.|null} [uptimeCheckConfigs] ListUptimeCheckConfigsResponse uptimeCheckConfigs + * @property {string|null} [nextPageToken] ListUptimeCheckConfigsResponse nextPageToken + * @property {number|null} [totalSize] ListUptimeCheckConfigsResponse totalSize + */ + + /** + * Constructs a new ListUptimeCheckConfigsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckConfigsResponse. + * @implements IListUptimeCheckConfigsResponse + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse=} [properties] Properties to set + */ + function ListUptimeCheckConfigsResponse(properties) { + this.uptimeCheckConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUptimeCheckConfigsResponse uptimeCheckConfigs. + * @member {Array.} uptimeCheckConfigs + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + */ + ListUptimeCheckConfigsResponse.prototype.uptimeCheckConfigs = $util.emptyArray; + + /** + * ListUptimeCheckConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + */ + ListUptimeCheckConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListUptimeCheckConfigsResponse totalSize. + * @member {number} totalSize + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + */ + ListUptimeCheckConfigsResponse.prototype.totalSize = 0; + + /** + * Creates a new ListUptimeCheckConfigsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse instance + */ + ListUptimeCheckConfigsResponse.create = function create(properties) { + return new ListUptimeCheckConfigsResponse(properties); + }; + + /** + * Encodes the specified ListUptimeCheckConfigsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uptimeCheckConfigs != null && message.uptimeCheckConfigs.length) + for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) + $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfigs[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.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; + + /** + * Encodes the specified ListUptimeCheckConfigsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uptimeCheckConfigs && message.uptimeCheckConfigs.length)) + message.uptimeCheckConfigs = []; + message.uptimeCheckConfigs.push($root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + message.totalSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUptimeCheckConfigsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uptimeCheckConfigs != null && message.hasOwnProperty("uptimeCheckConfigs")) { + if (!Array.isArray(message.uptimeCheckConfigs)) + return "uptimeCheckConfigs: array expected"; + for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfigs[i]); + if (error) + return "uptimeCheckConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; + + /** + * Creates a ListUptimeCheckConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + */ + ListUptimeCheckConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckConfigsResponse) + return object; + var message = new $root.google.monitoring.v3.ListUptimeCheckConfigsResponse(); + if (object.uptimeCheckConfigs) { + if (!Array.isArray(object.uptimeCheckConfigs)) + throw TypeError(".google.monitoring.v3.ListUptimeCheckConfigsResponse.uptimeCheckConfigs: array expected"); + message.uptimeCheckConfigs = []; + for (var i = 0; i < object.uptimeCheckConfigs.length; ++i) { + if (typeof object.uptimeCheckConfigs[i] !== "object") + throw TypeError(".google.monitoring.v3.ListUptimeCheckConfigsResponse.uptimeCheckConfigs: object expected"); + message.uptimeCheckConfigs[i] = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListUptimeCheckConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.ListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uptimeCheckConfigs = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; + } + if (message.uptimeCheckConfigs && message.uptimeCheckConfigs.length) { + object.uptimeCheckConfigs = []; + for (var j = 0; j < message.uptimeCheckConfigs.length; ++j) + object.uptimeCheckConfigs[j] = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + return object; + }; + + /** + * Converts this ListUptimeCheckConfigsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListUptimeCheckConfigsResponse; + })(); + + v3.GetUptimeCheckConfigRequest = (function() { + + /** + * Properties of a GetUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface IGetUptimeCheckConfigRequest + * @property {string|null} [name] GetUptimeCheckConfigRequest name + */ + + /** + * Constructs a new GetUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetUptimeCheckConfigRequest. + * @implements IGetUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest=} [properties] Properties to set + */ + function GetUptimeCheckConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUptimeCheckConfigRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @instance + */ + GetUptimeCheckConfigRequest.prototype.name = ""; + + /** + * Creates a new GetUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest instance + */ + GetUptimeCheckConfigRequest.create = function create(properties) { + return new GetUptimeCheckConfigRequest(properties); + }; + + /** + * Encodes the specified GetUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUptimeCheckConfigRequest.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 GetUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetUptimeCheckConfigRequest(); + 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 GetUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUptimeCheckConfigRequest.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 GetUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + */ + GetUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.GetUptimeCheckConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.GetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUptimeCheckConfigRequest.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 GetUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetUptimeCheckConfigRequest; + })(); + + v3.CreateUptimeCheckConfigRequest = (function() { + + /** + * Properties of a CreateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface ICreateUptimeCheckConfigRequest + * @property {string|null} [parent] CreateUptimeCheckConfigRequest parent + * @property {google.monitoring.v3.IUptimeCheckConfig|null} [uptimeCheckConfig] CreateUptimeCheckConfigRequest uptimeCheckConfig + */ + + /** + * Constructs a new CreateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateUptimeCheckConfigRequest. + * @implements ICreateUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest=} [properties] Properties to set + */ + function CreateUptimeCheckConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUptimeCheckConfigRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @instance + */ + CreateUptimeCheckConfigRequest.prototype.parent = ""; + + /** + * CreateUptimeCheckConfigRequest uptimeCheckConfig. + * @member {google.monitoring.v3.IUptimeCheckConfig|null|undefined} uptimeCheckConfig + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @instance + */ + CreateUptimeCheckConfigRequest.prototype.uptimeCheckConfig = null; + + /** + * Creates a new CreateUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest instance + */ + CreateUptimeCheckConfigRequest.create = function create(properties) { + return new CreateUptimeCheckConfigRequest(properties); + }; + + /** + * Encodes the specified CreateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUptimeCheckConfigRequest.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateUptimeCheckConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUptimeCheckConfigRequest.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfig); + if (error) + return "uptimeCheckConfig." + error; + } + return null; + }; + + /** + * Creates a CreateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + */ + CreateUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.CreateUptimeCheckConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.uptimeCheckConfig != null) { + if (typeof object.uptimeCheckConfig !== "object") + throw TypeError(".google.monitoring.v3.CreateUptimeCheckConfigRequest.uptimeCheckConfig: object expected"); + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.CreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUptimeCheckConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.uptimeCheckConfig = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + object.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfig, options); + return object; + }; + + /** + * Converts this CreateUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateUptimeCheckConfigRequest; + })(); + + v3.UpdateUptimeCheckConfigRequest = (function() { + + /** + * Properties of an UpdateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateUptimeCheckConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUptimeCheckConfigRequest updateMask + * @property {google.monitoring.v3.IUptimeCheckConfig|null} [uptimeCheckConfig] UpdateUptimeCheckConfigRequest uptimeCheckConfig + */ + + /** + * Constructs a new UpdateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateUptimeCheckConfigRequest. + * @implements IUpdateUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest=} [properties] Properties to set + */ + function UpdateUptimeCheckConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUptimeCheckConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @instance + */ + UpdateUptimeCheckConfigRequest.prototype.updateMask = null; + + /** + * UpdateUptimeCheckConfigRequest uptimeCheckConfig. + * @member {google.monitoring.v3.IUptimeCheckConfig|null|undefined} uptimeCheckConfig + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @instance + */ + UpdateUptimeCheckConfigRequest.prototype.uptimeCheckConfig = null; + + /** + * Creates a new UpdateUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest instance + */ + UpdateUptimeCheckConfigRequest.create = function create(properties) { + return new UpdateUptimeCheckConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUptimeCheckConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUptimeCheckConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfig); + if (error) + return "uptimeCheckConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest + */ + UpdateUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateUptimeCheckConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.uptimeCheckConfig != null) { + if (typeof object.uptimeCheckConfig !== "object") + throw TypeError(".google.monitoring.v3.UpdateUptimeCheckConfigRequest.uptimeCheckConfig: object expected"); + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.UpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUptimeCheckConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.uptimeCheckConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + object.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfig, options); + return object; + }; + + /** + * Converts this UpdateUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateUptimeCheckConfigRequest; + })(); + + v3.DeleteUptimeCheckConfigRequest = (function() { + + /** + * Properties of a DeleteUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteUptimeCheckConfigRequest + * @property {string|null} [name] DeleteUptimeCheckConfigRequest name + */ + + /** + * Constructs a new DeleteUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteUptimeCheckConfigRequest. + * @implements IDeleteUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest=} [properties] Properties to set + */ + function DeleteUptimeCheckConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUptimeCheckConfigRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @instance + */ + DeleteUptimeCheckConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest instance + */ + DeleteUptimeCheckConfigRequest.create = function create(properties) { + return new DeleteUptimeCheckConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUptimeCheckConfigRequest.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 DeleteUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest(); + 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 DeleteUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUptimeCheckConfigRequest.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 DeleteUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + */ + DeleteUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.DeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUptimeCheckConfigRequest.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 DeleteUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteUptimeCheckConfigRequest; + })(); + + v3.ListUptimeCheckIpsRequest = (function() { + + /** + * Properties of a ListUptimeCheckIpsRequest. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckIpsRequest + * @property {number|null} [pageSize] ListUptimeCheckIpsRequest pageSize + * @property {string|null} [pageToken] ListUptimeCheckIpsRequest pageToken + */ + + /** + * Constructs a new ListUptimeCheckIpsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckIpsRequest. + * @implements IListUptimeCheckIpsRequest + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest=} [properties] Properties to set + */ + function ListUptimeCheckIpsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUptimeCheckIpsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @instance + */ + ListUptimeCheckIpsRequest.prototype.pageSize = 0; + + /** + * ListUptimeCheckIpsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @instance + */ + ListUptimeCheckIpsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUptimeCheckIpsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest instance + */ + ListUptimeCheckIpsRequest.create = function create(properties) { + return new ListUptimeCheckIpsRequest(properties); + }; + + /** + * Encodes the specified ListUptimeCheckIpsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckIpsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 ListUptimeCheckIpsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckIpsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckIpsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckIpsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckIpsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUptimeCheckIpsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckIpsRequest.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 ListUptimeCheckIpsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest + */ + ListUptimeCheckIpsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckIpsRequest) + return object; + var message = new $root.google.monitoring.v3.ListUptimeCheckIpsRequest(); + 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 ListUptimeCheckIpsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {google.monitoring.v3.ListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckIpsRequest.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 ListUptimeCheckIpsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckIpsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListUptimeCheckIpsRequest; + })(); + + v3.ListUptimeCheckIpsResponse = (function() { + + /** + * Properties of a ListUptimeCheckIpsResponse. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckIpsResponse + * @property {Array.|null} [uptimeCheckIps] ListUptimeCheckIpsResponse uptimeCheckIps + * @property {string|null} [nextPageToken] ListUptimeCheckIpsResponse nextPageToken + */ + + /** + * Constructs a new ListUptimeCheckIpsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckIpsResponse. + * @implements IListUptimeCheckIpsResponse + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse=} [properties] Properties to set + */ + function ListUptimeCheckIpsResponse(properties) { + this.uptimeCheckIps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUptimeCheckIpsResponse uptimeCheckIps. + * @member {Array.} uptimeCheckIps + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @instance + */ + ListUptimeCheckIpsResponse.prototype.uptimeCheckIps = $util.emptyArray; + + /** + * ListUptimeCheckIpsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @instance + */ + ListUptimeCheckIpsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUptimeCheckIpsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse instance + */ + ListUptimeCheckIpsResponse.create = function create(properties) { + return new ListUptimeCheckIpsResponse(properties); + }; + + /** + * Encodes the specified ListUptimeCheckIpsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckIpsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uptimeCheckIps != null && message.uptimeCheckIps.length) + for (var i = 0; i < message.uptimeCheckIps.length; ++i) + $root.google.monitoring.v3.UptimeCheckIp.encode(message.uptimeCheckIps[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 ListUptimeCheckIpsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckIpsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckIpsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckIpsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uptimeCheckIps && message.uptimeCheckIps.length)) + message.uptimeCheckIps = []; + message.uptimeCheckIps.push($root.google.monitoring.v3.UptimeCheckIp.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckIpsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUptimeCheckIpsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckIpsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uptimeCheckIps != null && message.hasOwnProperty("uptimeCheckIps")) { + if (!Array.isArray(message.uptimeCheckIps)) + return "uptimeCheckIps: array expected"; + for (var i = 0; i < message.uptimeCheckIps.length; ++i) { + var error = $root.google.monitoring.v3.UptimeCheckIp.verify(message.uptimeCheckIps[i]); + if (error) + return "uptimeCheckIps." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUptimeCheckIpsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse + */ + ListUptimeCheckIpsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckIpsResponse) + return object; + var message = new $root.google.monitoring.v3.ListUptimeCheckIpsResponse(); + if (object.uptimeCheckIps) { + if (!Array.isArray(object.uptimeCheckIps)) + throw TypeError(".google.monitoring.v3.ListUptimeCheckIpsResponse.uptimeCheckIps: array expected"); + message.uptimeCheckIps = []; + for (var i = 0; i < object.uptimeCheckIps.length; ++i) { + if (typeof object.uptimeCheckIps[i] !== "object") + throw TypeError(".google.monitoring.v3.ListUptimeCheckIpsResponse.uptimeCheckIps: object expected"); + message.uptimeCheckIps[i] = $root.google.monitoring.v3.UptimeCheckIp.fromObject(object.uptimeCheckIps[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUptimeCheckIpsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.ListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckIpsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uptimeCheckIps = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.uptimeCheckIps && message.uptimeCheckIps.length) { + object.uptimeCheckIps = []; + for (var j = 0; j < message.uptimeCheckIps.length; ++j) + object.uptimeCheckIps[j] = $root.google.monitoring.v3.UptimeCheckIp.toObject(message.uptimeCheckIps[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUptimeCheckIpsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckIpsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListUptimeCheckIpsResponse; + })(); + + v3.InternalChecker = (function() { + + /** + * Properties of an InternalChecker. + * @memberof google.monitoring.v3 + * @interface IInternalChecker + * @property {string|null} [name] InternalChecker name + * @property {string|null} [displayName] InternalChecker displayName + * @property {string|null} [network] InternalChecker network + * @property {string|null} [gcpZone] InternalChecker gcpZone + * @property {string|null} [peerProjectId] InternalChecker peerProjectId + */ + + /** + * Constructs a new InternalChecker. + * @memberof google.monitoring.v3 + * @classdesc Represents an InternalChecker. + * @implements IInternalChecker + * @constructor + * @param {google.monitoring.v3.IInternalChecker=} [properties] Properties to set + */ + function InternalChecker(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InternalChecker name. + * @member {string} name + * @memberof google.monitoring.v3.InternalChecker + * @instance + */ + InternalChecker.prototype.name = ""; + + /** + * InternalChecker displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.InternalChecker + * @instance + */ + InternalChecker.prototype.displayName = ""; + + /** + * InternalChecker network. + * @member {string} network + * @memberof google.monitoring.v3.InternalChecker + * @instance + */ + InternalChecker.prototype.network = ""; + + /** + * InternalChecker gcpZone. + * @member {string} gcpZone + * @memberof google.monitoring.v3.InternalChecker + * @instance + */ + InternalChecker.prototype.gcpZone = ""; + + /** + * InternalChecker peerProjectId. + * @member {string} peerProjectId + * @memberof google.monitoring.v3.InternalChecker + * @instance + */ + InternalChecker.prototype.peerProjectId = ""; + + /** + * Creates a new InternalChecker instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {google.monitoring.v3.IInternalChecker=} [properties] Properties to set + * @returns {google.monitoring.v3.InternalChecker} InternalChecker instance + */ + InternalChecker.create = function create(properties) { + return new InternalChecker(properties); + }; + + /** + * Encodes the specified InternalChecker message. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {google.monitoring.v3.IInternalChecker} message InternalChecker message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InternalChecker.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.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.network != null && message.hasOwnProperty("network")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); + if (message.gcpZone != null && message.hasOwnProperty("gcpZone")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcpZone); + if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerProjectId); + return writer; + }; + + /** + * Encodes the specified InternalChecker message, length delimited. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {google.monitoring.v3.IInternalChecker} message InternalChecker message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InternalChecker.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InternalChecker message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.InternalChecker} InternalChecker + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InternalChecker.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.InternalChecker(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.network = reader.string(); + break; + case 4: + message.gcpZone = reader.string(); + break; + case 6: + message.peerProjectId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InternalChecker message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.InternalChecker} InternalChecker + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InternalChecker.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InternalChecker message. + * @function verify + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InternalChecker.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.gcpZone != null && message.hasOwnProperty("gcpZone")) + if (!$util.isString(message.gcpZone)) + return "gcpZone: string expected"; + if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) + if (!$util.isString(message.peerProjectId)) + return "peerProjectId: string expected"; + return null; + }; + + /** + * Creates an InternalChecker message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.InternalChecker} InternalChecker + */ + InternalChecker.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.InternalChecker) + return object; + var message = new $root.google.monitoring.v3.InternalChecker(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.network != null) + message.network = String(object.network); + if (object.gcpZone != null) + message.gcpZone = String(object.gcpZone); + if (object.peerProjectId != null) + message.peerProjectId = String(object.peerProjectId); + return message; + }; + + /** + * Creates a plain object from an InternalChecker message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {google.monitoring.v3.InternalChecker} message InternalChecker + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InternalChecker.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.network = ""; + object.gcpZone = ""; + object.peerProjectId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.gcpZone != null && message.hasOwnProperty("gcpZone")) + object.gcpZone = message.gcpZone; + if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) + object.peerProjectId = message.peerProjectId; + return object; + }; + + /** + * Converts this InternalChecker to JSON. + * @function toJSON + * @memberof google.monitoring.v3.InternalChecker + * @instance + * @returns {Object.} JSON object + */ + InternalChecker.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InternalChecker; + })(); + + v3.UptimeCheckConfig = (function() { + + /** + * Properties of an UptimeCheckConfig. + * @memberof google.monitoring.v3 + * @interface IUptimeCheckConfig + * @property {string|null} [name] UptimeCheckConfig name + * @property {string|null} [displayName] UptimeCheckConfig displayName + * @property {google.api.IMonitoredResource|null} [monitoredResource] UptimeCheckConfig monitoredResource + * @property {google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null} [resourceGroup] UptimeCheckConfig resourceGroup + * @property {google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null} [httpCheck] UptimeCheckConfig httpCheck + * @property {google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null} [tcpCheck] UptimeCheckConfig tcpCheck + * @property {google.protobuf.IDuration|null} [period] UptimeCheckConfig period + * @property {google.protobuf.IDuration|null} [timeout] UptimeCheckConfig timeout + * @property {Array.|null} [contentMatchers] UptimeCheckConfig contentMatchers + * @property {Array.|null} [selectedRegions] UptimeCheckConfig selectedRegions + * @property {boolean|null} [isInternal] UptimeCheckConfig isInternal + * @property {Array.|null} [internalCheckers] UptimeCheckConfig internalCheckers + */ + + /** + * Constructs a new UptimeCheckConfig. + * @memberof google.monitoring.v3 + * @classdesc Represents an UptimeCheckConfig. + * @implements IUptimeCheckConfig + * @constructor + * @param {google.monitoring.v3.IUptimeCheckConfig=} [properties] Properties to set + */ + function UptimeCheckConfig(properties) { + this.contentMatchers = []; + this.selectedRegions = []; + this.internalCheckers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UptimeCheckConfig name. + * @member {string} name + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.name = ""; + + /** + * UptimeCheckConfig displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.displayName = ""; + + /** + * UptimeCheckConfig monitoredResource. + * @member {google.api.IMonitoredResource|null|undefined} monitoredResource + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.monitoredResource = null; + + /** + * UptimeCheckConfig resourceGroup. + * @member {google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null|undefined} resourceGroup + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.resourceGroup = null; + + /** + * UptimeCheckConfig httpCheck. + * @member {google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null|undefined} httpCheck + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.httpCheck = null; + + /** + * UptimeCheckConfig tcpCheck. + * @member {google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null|undefined} tcpCheck + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.tcpCheck = null; + + /** + * UptimeCheckConfig period. + * @member {google.protobuf.IDuration|null|undefined} period + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.period = null; + + /** + * UptimeCheckConfig timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.timeout = null; + + /** + * UptimeCheckConfig contentMatchers. + * @member {Array.} contentMatchers + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.contentMatchers = $util.emptyArray; + + /** + * UptimeCheckConfig selectedRegions. + * @member {Array.} selectedRegions + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.selectedRegions = $util.emptyArray; + + /** + * UptimeCheckConfig isInternal. + * @member {boolean} isInternal + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.isInternal = false; + + /** + * UptimeCheckConfig internalCheckers. + * @member {Array.} internalCheckers + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + UptimeCheckConfig.prototype.internalCheckers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UptimeCheckConfig resource. + * @member {"monitoredResource"|"resourceGroup"|undefined} resource + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + Object.defineProperty(UptimeCheckConfig.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["monitoredResource", "resourceGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UptimeCheckConfig checkRequestType. + * @member {"httpCheck"|"tcpCheck"|undefined} checkRequestType + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + */ + Object.defineProperty(UptimeCheckConfig.prototype, "checkRequestType", { + get: $util.oneOfGetter($oneOfFields = ["httpCheck", "tcpCheck"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UptimeCheckConfig instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {google.monitoring.v3.IUptimeCheckConfig=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckConfig} UptimeCheckConfig instance + */ + UptimeCheckConfig.create = function create(properties) { + return new UptimeCheckConfig(properties); + }; + + /** + * Encodes the specified UptimeCheckConfig message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {google.monitoring.v3.IUptimeCheckConfig} message UptimeCheckConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UptimeCheckConfig.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.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + $root.google.api.MonitoredResource.encode(message.monitoredResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.encode(message.resourceGroup, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.httpCheck != null && message.hasOwnProperty("httpCheck")) + $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.encode(message.httpCheck, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tcpCheck != null && message.hasOwnProperty("tcpCheck")) + $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.encode(message.tcpCheck, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.period != null && message.hasOwnProperty("period")) + $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeout != null && message.hasOwnProperty("timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.contentMatchers != null && message.contentMatchers.length) + for (var i = 0; i < message.contentMatchers.length; ++i) + $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.encode(message.contentMatchers[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.selectedRegions != null && message.selectedRegions.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.selectedRegions.length; ++i) + writer.int32(message.selectedRegions[i]); + writer.ldelim(); + } + if (message.internalCheckers != null && message.internalCheckers.length) + for (var i = 0; i < message.internalCheckers.length; ++i) + $root.google.monitoring.v3.InternalChecker.encode(message.internalCheckers[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.isInternal != null && message.hasOwnProperty("isInternal")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.isInternal); + return writer; + }; + + /** + * Encodes the specified UptimeCheckConfig message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {google.monitoring.v3.IUptimeCheckConfig} message UptimeCheckConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UptimeCheckConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UptimeCheckConfig message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckConfig} UptimeCheckConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UptimeCheckConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.monitoredResource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 4: + message.resourceGroup = $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.decode(reader, reader.uint32()); + break; + case 5: + message.httpCheck = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.decode(reader, reader.uint32()); + break; + case 6: + message.tcpCheck = $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.decode(reader, reader.uint32()); + break; + case 7: + message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 8: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.contentMatchers && message.contentMatchers.length)) + message.contentMatchers = []; + message.contentMatchers.push($root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.selectedRegions && message.selectedRegions.length)) + message.selectedRegions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.selectedRegions.push(reader.int32()); + } else + message.selectedRegions.push(reader.int32()); + break; + case 15: + message.isInternal = reader.bool(); + break; + case 14: + if (!(message.internalCheckers && message.internalCheckers.length)) + message.internalCheckers = []; + message.internalCheckers.push($root.google.monitoring.v3.InternalChecker.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UptimeCheckConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckConfig} UptimeCheckConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UptimeCheckConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UptimeCheckConfig message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UptimeCheckConfig.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) { + properties.resource = 1; + { + var error = $root.google.api.MonitoredResource.verify(message.monitoredResource); + if (error) + return "monitoredResource." + error; + } + } + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify(message.resourceGroup); + if (error) + return "resourceGroup." + error; + } + } + if (message.httpCheck != null && message.hasOwnProperty("httpCheck")) { + properties.checkRequestType = 1; + { + var error = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify(message.httpCheck); + if (error) + return "httpCheck." + error; + } + } + if (message.tcpCheck != null && message.hasOwnProperty("tcpCheck")) { + if (properties.checkRequestType === 1) + return "checkRequestType: multiple values"; + properties.checkRequestType = 1; + { + var error = $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify(message.tcpCheck); + if (error) + return "tcpCheck." + error; + } + } + if (message.period != null && message.hasOwnProperty("period")) { + var error = $root.google.protobuf.Duration.verify(message.period); + if (error) + return "period." + error; + } + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + if (message.contentMatchers != null && message.hasOwnProperty("contentMatchers")) { + if (!Array.isArray(message.contentMatchers)) + return "contentMatchers: array expected"; + for (var i = 0; i < message.contentMatchers.length; ++i) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify(message.contentMatchers[i]); + if (error) + return "contentMatchers." + error; + } + } + if (message.selectedRegions != null && message.hasOwnProperty("selectedRegions")) { + if (!Array.isArray(message.selectedRegions)) + return "selectedRegions: array expected"; + for (var i = 0; i < message.selectedRegions.length; ++i) + switch (message.selectedRegions[i]) { + default: + return "selectedRegions: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.isInternal != null && message.hasOwnProperty("isInternal")) + if (typeof message.isInternal !== "boolean") + return "isInternal: boolean expected"; + if (message.internalCheckers != null && message.hasOwnProperty("internalCheckers")) { + if (!Array.isArray(message.internalCheckers)) + return "internalCheckers: array expected"; + for (var i = 0; i < message.internalCheckers.length; ++i) { + var error = $root.google.monitoring.v3.InternalChecker.verify(message.internalCheckers[i]); + if (error) + return "internalCheckers." + error; + } + } + return null; + }; + + /** + * Creates an UptimeCheckConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckConfig} UptimeCheckConfig + */ + UptimeCheckConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.monitoredResource != null) { + if (typeof object.monitoredResource !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.monitoredResource: object expected"); + message.monitoredResource = $root.google.api.MonitoredResource.fromObject(object.monitoredResource); + } + if (object.resourceGroup != null) { + if (typeof object.resourceGroup !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.resourceGroup: object expected"); + message.resourceGroup = $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.fromObject(object.resourceGroup); + } + if (object.httpCheck != null) { + if (typeof object.httpCheck !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.httpCheck: object expected"); + message.httpCheck = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.fromObject(object.httpCheck); + } + if (object.tcpCheck != null) { + if (typeof object.tcpCheck !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.tcpCheck: object expected"); + message.tcpCheck = $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.fromObject(object.tcpCheck); + } + if (object.period != null) { + if (typeof object.period !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.period: object expected"); + message.period = $root.google.protobuf.Duration.fromObject(object.period); + } + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + if (object.contentMatchers) { + if (!Array.isArray(object.contentMatchers)) + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.contentMatchers: array expected"); + message.contentMatchers = []; + for (var i = 0; i < object.contentMatchers.length; ++i) { + if (typeof object.contentMatchers[i] !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.contentMatchers: object expected"); + message.contentMatchers[i] = $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.fromObject(object.contentMatchers[i]); + } + } + if (object.selectedRegions) { + if (!Array.isArray(object.selectedRegions)) + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.selectedRegions: array expected"); + message.selectedRegions = []; + for (var i = 0; i < object.selectedRegions.length; ++i) + switch (object.selectedRegions[i]) { + default: + case "REGION_UNSPECIFIED": + case 0: + message.selectedRegions[i] = 0; + break; + case "USA": + case 1: + message.selectedRegions[i] = 1; + break; + case "EUROPE": + case 2: + message.selectedRegions[i] = 2; + break; + case "SOUTH_AMERICA": + case 3: + message.selectedRegions[i] = 3; + break; + case "ASIA_PACIFIC": + case 4: + message.selectedRegions[i] = 4; + break; + } + } + if (object.isInternal != null) + message.isInternal = Boolean(object.isInternal); + if (object.internalCheckers) { + if (!Array.isArray(object.internalCheckers)) + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.internalCheckers: array expected"); + message.internalCheckers = []; + for (var i = 0; i < object.internalCheckers.length; ++i) { + if (typeof object.internalCheckers[i] !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.internalCheckers: object expected"); + message.internalCheckers[i] = $root.google.monitoring.v3.InternalChecker.fromObject(object.internalCheckers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UptimeCheckConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {google.monitoring.v3.UptimeCheckConfig} message UptimeCheckConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UptimeCheckConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.contentMatchers = []; + object.selectedRegions = []; + object.internalCheckers = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.period = null; + object.timeout = null; + object.isInternal = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) { + object.monitoredResource = $root.google.api.MonitoredResource.toObject(message.monitoredResource, options); + if (options.oneofs) + object.resource = "monitoredResource"; + } + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) { + object.resourceGroup = $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.toObject(message.resourceGroup, options); + if (options.oneofs) + object.resource = "resourceGroup"; + } + if (message.httpCheck != null && message.hasOwnProperty("httpCheck")) { + object.httpCheck = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.toObject(message.httpCheck, options); + if (options.oneofs) + object.checkRequestType = "httpCheck"; + } + if (message.tcpCheck != null && message.hasOwnProperty("tcpCheck")) { + object.tcpCheck = $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.toObject(message.tcpCheck, options); + if (options.oneofs) + object.checkRequestType = "tcpCheck"; + } + if (message.period != null && message.hasOwnProperty("period")) + object.period = $root.google.protobuf.Duration.toObject(message.period, options); + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.contentMatchers && message.contentMatchers.length) { + object.contentMatchers = []; + for (var j = 0; j < message.contentMatchers.length; ++j) + object.contentMatchers[j] = $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.toObject(message.contentMatchers[j], options); + } + if (message.selectedRegions && message.selectedRegions.length) { + object.selectedRegions = []; + for (var j = 0; j < message.selectedRegions.length; ++j) + object.selectedRegions[j] = options.enums === String ? $root.google.monitoring.v3.UptimeCheckRegion[message.selectedRegions[j]] : message.selectedRegions[j]; + } + if (message.internalCheckers && message.internalCheckers.length) { + object.internalCheckers = []; + for (var j = 0; j < message.internalCheckers.length; ++j) + object.internalCheckers[j] = $root.google.monitoring.v3.InternalChecker.toObject(message.internalCheckers[j], options); + } + if (message.isInternal != null && message.hasOwnProperty("isInternal")) + object.isInternal = message.isInternal; + return object; + }; + + /** + * Converts this UptimeCheckConfig to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckConfig + * @instance + * @returns {Object.} JSON object + */ + UptimeCheckConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UptimeCheckConfig.ResourceGroup = (function() { + + /** + * Properties of a ResourceGroup. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @interface IResourceGroup + * @property {string|null} [groupId] ResourceGroup groupId + * @property {google.monitoring.v3.GroupResourceType|null} [resourceType] ResourceGroup resourceType + */ + + /** + * Constructs a new ResourceGroup. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @classdesc Represents a ResourceGroup. + * @implements IResourceGroup + * @constructor + * @param {google.monitoring.v3.UptimeCheckConfig.IResourceGroup=} [properties] Properties to set + */ + function ResourceGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceGroup groupId. + * @member {string} groupId + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @instance + */ + ResourceGroup.prototype.groupId = ""; + + /** + * ResourceGroup resourceType. + * @member {google.monitoring.v3.GroupResourceType} resourceType + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @instance + */ + ResourceGroup.prototype.resourceType = 0; + + /** + * Creates a new ResourceGroup instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IResourceGroup=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckConfig.ResourceGroup} ResourceGroup instance + */ + ResourceGroup.create = function create(properties) { + return new ResourceGroup(properties); + }; + + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupId != null && message.hasOwnProperty("groupId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId); + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); + return writer; + }; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IResourceGroup} message ResourceGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckConfig.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupId = reader.string(); + break; + case 2: + message.resourceType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckConfig.ResourceGroup} ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceGroup message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + switch (message.resourceType) { + default: + return "resourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckConfig.ResourceGroup} ResourceGroup + */ + ResourceGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup(); + if (object.groupId != null) + message.groupId = String(object.groupId); + switch (object.resourceType) { + case "RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType = 0; + break; + case "INSTANCE": + case 1: + message.resourceType = 1; + break; + case "AWS_ELB_LOAD_BALANCER": + case 2: + message.resourceType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.ResourceGroup} message ResourceGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.groupId = ""; + object.resourceType = options.enums === String ? "RESOURCE_TYPE_UNSPECIFIED" : 0; + } + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = options.enums === String ? $root.google.monitoring.v3.GroupResourceType[message.resourceType] : message.resourceType; + return object; + }; + + /** + * Converts this ResourceGroup to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @instance + * @returns {Object.} JSON object + */ + ResourceGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceGroup; + })(); + + UptimeCheckConfig.HttpCheck = (function() { + + /** + * Properties of a HttpCheck. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @interface IHttpCheck + * @property {boolean|null} [useSsl] HttpCheck useSsl + * @property {string|null} [path] HttpCheck path + * @property {number|null} [port] HttpCheck port + * @property {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null} [authInfo] HttpCheck authInfo + * @property {boolean|null} [maskHeaders] HttpCheck maskHeaders + * @property {Object.|null} [headers] HttpCheck headers + */ + + /** + * Constructs a new HttpCheck. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @classdesc Represents a HttpCheck. + * @implements IHttpCheck + * @constructor + * @param {google.monitoring.v3.UptimeCheckConfig.IHttpCheck=} [properties] Properties to set + */ + function HttpCheck(properties) { + this.headers = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpCheck useSsl. + * @member {boolean} useSsl + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.useSsl = false; + + /** + * HttpCheck path. + * @member {string} path + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.path = ""; + + /** + * HttpCheck port. + * @member {number} port + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.port = 0; + + /** + * HttpCheck authInfo. + * @member {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null|undefined} authInfo + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.authInfo = null; + + /** + * HttpCheck maskHeaders. + * @member {boolean} maskHeaders + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.maskHeaders = false; + + /** + * HttpCheck headers. + * @member {Object.} headers + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.headers = $util.emptyObject; + + /** + * Creates a new HttpCheck instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IHttpCheck=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck} HttpCheck instance + */ + HttpCheck.create = function create(properties) { + return new HttpCheck(properties); + }; + + /** + * Encodes the specified HttpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IHttpCheck} message HttpCheck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpCheck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useSsl != null && message.hasOwnProperty("useSsl")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useSsl); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.port != null && message.hasOwnProperty("port")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.encode(message.authInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.maskHeaders != null && message.hasOwnProperty("maskHeaders")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.maskHeaders); + if (message.headers != null && message.hasOwnProperty("headers")) + for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified HttpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IHttpCheck} message HttpCheck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpCheck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpCheck message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck} HttpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpCheck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.useSsl = reader.bool(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.port = reader.int32(); + break; + case 4: + message.authInfo = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.decode(reader, reader.uint32()); + break; + case 5: + message.maskHeaders = reader.bool(); + break; + case 6: + reader.skip().pos++; + if (message.headers === $util.emptyObject) + message.headers = {}; + key = reader.string(); + reader.pos++; + message.headers[key] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpCheck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck} HttpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpCheck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpCheck message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpCheck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useSsl != null && message.hasOwnProperty("useSsl")) + if (typeof message.useSsl !== "boolean") + return "useSsl: boolean expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.authInfo != null && message.hasOwnProperty("authInfo")) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify(message.authInfo); + if (error) + return "authInfo." + error; + } + if (message.maskHeaders != null && message.hasOwnProperty("maskHeaders")) + if (typeof message.maskHeaders !== "boolean") + return "maskHeaders: boolean expected"; + if (message.headers != null && message.hasOwnProperty("headers")) { + if (!$util.isObject(message.headers)) + return "headers: object expected"; + var key = Object.keys(message.headers); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.headers[key[i]])) + return "headers: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a HttpCheck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck} HttpCheck + */ + HttpCheck.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck(); + if (object.useSsl != null) + message.useSsl = Boolean(object.useSsl); + if (object.path != null) + message.path = String(object.path); + if (object.port != null) + message.port = object.port | 0; + if (object.authInfo != null) { + if (typeof object.authInfo !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.HttpCheck.authInfo: object expected"); + message.authInfo = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.fromObject(object.authInfo); + } + if (object.maskHeaders != null) + message.maskHeaders = Boolean(object.maskHeaders); + if (object.headers) { + if (typeof object.headers !== "object") + throw TypeError(".google.monitoring.v3.UptimeCheckConfig.HttpCheck.headers: object expected"); + message.headers = {}; + for (var keys = Object.keys(object.headers), i = 0; i < keys.length; ++i) + message.headers[keys[i]] = String(object.headers[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a HttpCheck message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.HttpCheck} message HttpCheck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpCheck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.headers = {}; + if (options.defaults) { + object.useSsl = false; + object.path = ""; + object.port = 0; + object.authInfo = null; + object.maskHeaders = false; + } + if (message.useSsl != null && message.hasOwnProperty("useSsl")) + object.useSsl = message.useSsl; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + object.authInfo = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.toObject(message.authInfo, options); + if (message.maskHeaders != null && message.hasOwnProperty("maskHeaders")) + object.maskHeaders = message.maskHeaders; + var keys2; + if (message.headers && (keys2 = Object.keys(message.headers)).length) { + object.headers = {}; + for (var j = 0; j < keys2.length; ++j) + object.headers[keys2[j]] = message.headers[keys2[j]]; + } + return object; + }; + + /** + * Converts this HttpCheck to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + * @returns {Object.} JSON object + */ + HttpCheck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + HttpCheck.BasicAuthentication = (function() { + + /** + * Properties of a BasicAuthentication. + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @interface IBasicAuthentication + * @property {string|null} [username] BasicAuthentication username + * @property {string|null} [password] BasicAuthentication password + */ + + /** + * Constructs a new BasicAuthentication. + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @classdesc Represents a BasicAuthentication. + * @implements IBasicAuthentication + * @constructor + * @param {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication=} [properties] Properties to set + */ + function BasicAuthentication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BasicAuthentication username. + * @member {string} username + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @instance + */ + BasicAuthentication.prototype.username = ""; + + /** + * BasicAuthentication password. + * @member {string} password + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @instance + */ + BasicAuthentication.prototype.password = ""; + + /** + * Creates a new BasicAuthentication instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication} BasicAuthentication instance + */ + BasicAuthentication.create = function create(properties) { + return new BasicAuthentication(properties); + }; + + /** + * Encodes the specified BasicAuthentication message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication} message BasicAuthentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicAuthentication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.username != null && message.hasOwnProperty("username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.password != null && message.hasOwnProperty("password")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); + return writer; + }; + + /** + * Encodes the specified BasicAuthentication message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication} message BasicAuthentication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicAuthentication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BasicAuthentication message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication} BasicAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicAuthentication.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.username = reader.string(); + break; + case 2: + message.password = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BasicAuthentication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication} BasicAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicAuthentication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BasicAuthentication message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BasicAuthentication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + return null; + }; + + /** + * Creates a BasicAuthentication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication} BasicAuthentication + */ + BasicAuthentication.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication(); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + return message; + }; + + /** + * Creates a plain object from a BasicAuthentication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication} message BasicAuthentication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BasicAuthentication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + object.password = ""; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + return object; + }; + + /** + * Converts this BasicAuthentication to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @instance + * @returns {Object.} JSON object + */ + BasicAuthentication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BasicAuthentication; + })(); + + return HttpCheck; + })(); + + UptimeCheckConfig.TcpCheck = (function() { + + /** + * Properties of a TcpCheck. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @interface ITcpCheck + * @property {number|null} [port] TcpCheck port + */ + + /** + * Constructs a new TcpCheck. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @classdesc Represents a TcpCheck. + * @implements ITcpCheck + * @constructor + * @param {google.monitoring.v3.UptimeCheckConfig.ITcpCheck=} [properties] Properties to set + */ + function TcpCheck(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TcpCheck port. + * @member {number} port + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @instance + */ + TcpCheck.prototype.port = 0; + + /** + * Creates a new TcpCheck instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.ITcpCheck=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckConfig.TcpCheck} TcpCheck instance + */ + TcpCheck.create = function create(properties) { + return new TcpCheck(properties); + }; + + /** + * Encodes the specified TcpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.ITcpCheck} message TcpCheck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TcpCheck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.port != null && message.hasOwnProperty("port")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.port); + return writer; + }; + + /** + * Encodes the specified TcpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.ITcpCheck} message TcpCheck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TcpCheck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TcpCheck message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckConfig.TcpCheck} TcpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TcpCheck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.port = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TcpCheck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckConfig.TcpCheck} TcpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TcpCheck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TcpCheck message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TcpCheck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + return null; + }; + + /** + * Creates a TcpCheck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckConfig.TcpCheck} TcpCheck + */ + TcpCheck.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck(); + if (object.port != null) + message.port = object.port | 0; + return message; + }; + + /** + * Creates a plain object from a TcpCheck message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.TcpCheck} message TcpCheck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TcpCheck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.port = 0; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + return object; + }; + + /** + * Converts this TcpCheck to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @instance + * @returns {Object.} JSON object + */ + TcpCheck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TcpCheck; + })(); + + UptimeCheckConfig.ContentMatcher = (function() { + + /** + * Properties of a ContentMatcher. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @interface IContentMatcher + * @property {string|null} [content] ContentMatcher content + */ + + /** + * Constructs a new ContentMatcher. + * @memberof google.monitoring.v3.UptimeCheckConfig + * @classdesc Represents a ContentMatcher. + * @implements IContentMatcher + * @constructor + * @param {google.monitoring.v3.UptimeCheckConfig.IContentMatcher=} [properties] Properties to set + */ + function ContentMatcher(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContentMatcher content. + * @member {string} content + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @instance + */ + ContentMatcher.prototype.content = ""; + + /** + * Creates a new ContentMatcher instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IContentMatcher=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckConfig.ContentMatcher} ContentMatcher instance + */ + ContentMatcher.create = function create(properties) { + return new ContentMatcher(properties); + }; + + /** + * Encodes the specified ContentMatcher message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IContentMatcher} message ContentMatcher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentMatcher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + return writer; + }; + + /** + * Encodes the specified ContentMatcher message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.IContentMatcher} message ContentMatcher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentMatcher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentMatcher message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckConfig.ContentMatcher} ContentMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentMatcher.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContentMatcher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckConfig.ContentMatcher} ContentMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentMatcher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentMatcher message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentMatcher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + return null; + }; + + /** + * Creates a ContentMatcher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckConfig.ContentMatcher} ContentMatcher + */ + ContentMatcher.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher(); + if (object.content != null) + message.content = String(object.content); + return message; + }; + + /** + * Creates a plain object from a ContentMatcher message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {google.monitoring.v3.UptimeCheckConfig.ContentMatcher} message ContentMatcher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentMatcher.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.content = ""; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + return object; + }; + + /** + * Converts this ContentMatcher to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @instance + * @returns {Object.} JSON object + */ + ContentMatcher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContentMatcher; + })(); + + return UptimeCheckConfig; + })(); + + v3.UptimeCheckIp = (function() { + + /** + * Properties of an UptimeCheckIp. + * @memberof google.monitoring.v3 + * @interface IUptimeCheckIp + * @property {google.monitoring.v3.UptimeCheckRegion|null} [region] UptimeCheckIp region + * @property {string|null} [location] UptimeCheckIp location + * @property {string|null} [ipAddress] UptimeCheckIp ipAddress + */ + + /** + * Constructs a new UptimeCheckIp. + * @memberof google.monitoring.v3 + * @classdesc Represents an UptimeCheckIp. + * @implements IUptimeCheckIp + * @constructor + * @param {google.monitoring.v3.IUptimeCheckIp=} [properties] Properties to set + */ + function UptimeCheckIp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UptimeCheckIp region. + * @member {google.monitoring.v3.UptimeCheckRegion} region + * @memberof google.monitoring.v3.UptimeCheckIp + * @instance + */ + UptimeCheckIp.prototype.region = 0; + + /** + * UptimeCheckIp location. + * @member {string} location + * @memberof google.monitoring.v3.UptimeCheckIp + * @instance + */ + UptimeCheckIp.prototype.location = ""; + + /** + * UptimeCheckIp ipAddress. + * @member {string} ipAddress + * @memberof google.monitoring.v3.UptimeCheckIp + * @instance + */ + UptimeCheckIp.prototype.ipAddress = ""; + + /** + * Creates a new UptimeCheckIp instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {google.monitoring.v3.IUptimeCheckIp=} [properties] Properties to set + * @returns {google.monitoring.v3.UptimeCheckIp} UptimeCheckIp instance + */ + UptimeCheckIp.create = function create(properties) { + return new UptimeCheckIp(properties); + }; + + /** + * Encodes the specified UptimeCheckIp message. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {google.monitoring.v3.IUptimeCheckIp} message UptimeCheckIp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UptimeCheckIp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.region != null && message.hasOwnProperty("region")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.region); + if (message.location != null && message.hasOwnProperty("location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified UptimeCheckIp message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {google.monitoring.v3.IUptimeCheckIp} message UptimeCheckIp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UptimeCheckIp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UptimeCheckIp message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UptimeCheckIp} UptimeCheckIp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UptimeCheckIp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckIp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.region = reader.int32(); + break; + case 2: + message.location = reader.string(); + break; + case 3: + message.ipAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UptimeCheckIp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UptimeCheckIp} UptimeCheckIp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UptimeCheckIp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UptimeCheckIp message. + * @function verify + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UptimeCheckIp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.region != null && message.hasOwnProperty("region")) + switch (message.region) { + default: + return "region: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates an UptimeCheckIp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UptimeCheckIp} UptimeCheckIp + */ + UptimeCheckIp.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UptimeCheckIp) + return object; + var message = new $root.google.monitoring.v3.UptimeCheckIp(); + switch (object.region) { + case "REGION_UNSPECIFIED": + case 0: + message.region = 0; + break; + case "USA": + case 1: + message.region = 1; + break; + case "EUROPE": + case 2: + message.region = 2; + break; + case "SOUTH_AMERICA": + case 3: + message.region = 3; + break; + case "ASIA_PACIFIC": + case 4: + message.region = 4; + break; + } + if (object.location != null) + message.location = String(object.location); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from an UptimeCheckIp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {google.monitoring.v3.UptimeCheckIp} message UptimeCheckIp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UptimeCheckIp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.region = options.enums === String ? "REGION_UNSPECIFIED" : 0; + object.location = ""; + object.ipAddress = ""; + } + if (message.region != null && message.hasOwnProperty("region")) + object.region = options.enums === String ? $root.google.monitoring.v3.UptimeCheckRegion[message.region] : message.region; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this UptimeCheckIp to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UptimeCheckIp + * @instance + * @returns {Object.} JSON object + */ + UptimeCheckIp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UptimeCheckIp; + })(); + + /** + * UptimeCheckRegion enum. + * @name google.monitoring.v3.UptimeCheckRegion + * @enum {string} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} USA=1 USA value + * @property {number} EUROPE=2 EUROPE value + * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value + * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + */ + v3.UptimeCheckRegion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USA"] = 1; + values[valuesById[2] = "EUROPE"] = 2; + values[valuesById[3] = "SOUTH_AMERICA"] = 3; + values[valuesById[4] = "ASIA_PACIFIC"] = 4; + return values; + })(); + + /** + * GroupResourceType enum. + * @name google.monitoring.v3.GroupResourceType + * @enum {string} + * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value + */ + v3.GroupResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "AWS_ELB_LOAD_BALANCER"] = 2; + return values; + })(); + + return v3; + })(); + + return monitoring; + })(); + + 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.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.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.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.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + 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.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; + })(); + + 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.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.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.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); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function 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.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.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"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function 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.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.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"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function 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.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function 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.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function 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.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function 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.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function 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.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BytesValue; + })(); + + 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.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; + })(); + + return protobuf; + })(); + + 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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index af04b8f2473..d8e81ff25cf 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-09-12T11:20:43.445733Z", + "updateTime": "2019-09-27T11:20:28.862286Z", "sources": [ { "generator": { "name": "artman", - "version": "0.36.2", - "dockerImage": "googleapis/artman@sha256:0e6f3a668cd68afc768ecbe08817cf6e56a0e64fcbdb1c58c3b97492d12418a1" + "version": "0.37.1", + "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1cb29d0fd49437d8e5d7de327e258739e998f01c", - "internalRef": "268598527" + "sha": "cd112d8d255e0099df053643d4bd12c228ef7b1b", + "internalRef": "271468707" } }, { From 42eb1290abc6c2ed43d1e7f2b844b3528c2bac48 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 1 Oct 2019 20:15:04 -0700 Subject: [PATCH 230/422] fix: use compatible version of google-gax * fix: use compatible version of google-gax * fix: use gax v1.6.3 --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c3474872a5b..2ce5cc4e8df 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.0.0" + "google-gax": "^1.6.3" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", From a363683bdf78eb6b7d2ca4555f50461fd8979d05 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 3 Oct 2019 07:37:56 -0700 Subject: [PATCH 231/422] chore: update pull request template (#302) --- packages/google-cloud-monitoring/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index d8e81ff25cf..b3a4f7f0d9d 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-27T11:20:28.862286Z", + "updateTime": "2019-10-01T11:24:26.983649Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cd112d8d255e0099df053643d4bd12c228ef7b1b", - "internalRef": "271468707" + "sha": "ce3c574d1266026cebea3a893247790bd68191c2", + "internalRef": "272147209" } }, { From 352a392c01074ae2491985f1e95f8a7e05a07824 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 7 Oct 2019 16:48:56 -0700 Subject: [PATCH 232/422] chore: update pull request template --- .../protos/google/monitoring/v3/alert.proto | 12 +- .../protos/google/monitoring/v3/uptime.proto | 203 ++++++++++-------- .../google/monitoring/v3/uptime_service.proto | 46 ++-- .../v3/doc/google/monitoring/v3/doc_alert.js | 12 +- .../v3/doc/google/monitoring/v3/doc_uptime.js | 163 +++++++------- .../monitoring/v3/doc_uptime_service.js | 26 +-- .../src/v3/uptime_check_service_client.js | 44 ++-- .../google-cloud-monitoring/synth.metadata | 10 +- 8 files changed, 261 insertions(+), 255 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 885ee2c087f..0f61bddf159 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -104,11 +104,7 @@ message AlertPolicy { // the time series specified by the `filter` field will be used as the // numerator. // - // The filter is similar to the one that is specified in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / - // processed) and must specify the metric type and optionally may contain + // The filter must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. string denominator_filter = 9; @@ -123,12 +119,6 @@ message AlertPolicy { // When computing ratios, the `aggregations` and // `denominator_aggregations` fields must use the same alignment period // and produce time series that have the same periodicity and labels. - // - // This field is similar to the one in the - // [`MetricService.ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this - // field. repeated Aggregation denominator_aggregations = 10; // The comparison to apply between the time series (indicated by `filter` diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 5820aa32a99..33106bc16ac 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -27,28 +27,7 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; -// The regions from which an uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - -// An internal checker allows uptime checks to run on private/internal GCP +// An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { option deprecated = true; @@ -59,13 +38,17 @@ message InternalChecker { UNSPECIFIED = 0; // The checker is being created, provisioned, and configured. A checker in - // this state can be returned by ListInternalCheckers or GetInternalChecker, - // as well as by examining the longrunning.Operation that created it. + // this state can be returned by `ListInternalCheckers` or + // `GetInternalChecker`, as well as by examining the [long running + // Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + // that created it. CREATING = 1; // The checker is running and available for use. A checker in this state - // can be returned by ListInternalCheckers or GetInternalChecker as well - // as by examining the longrunning.Operation that created it. + // can be returned by `ListInternalCheckers` or `GetInternalChecker` as + // well as by examining the [long running + // Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + // that created it. // If a checker is being torn down, it is neither visible nor usable, so // there is no "deleting" or "down" state. RUNNING = 2; @@ -75,8 +58,8 @@ message InternalChecker { // // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. // - // PROJECT_ID is the stackdriver workspace project for the - // uptime check config associated with the internal checker. + // `[PROJECT_ID]` is the Stackdriver Workspace project for the + // Uptime check config associated with the internal checker. string name = 1; // The checker's human-readable name. The display name @@ -88,18 +71,39 @@ message InternalChecker { // internal resource lives (ex: "default"). string network = 3; - // The GCP zone the uptime check should egress from. Only respected for - // internal uptime checks, where internal_network is specified. + // The GCP zone the Uptime check should egress from. Only respected for + // internal Uptime checks, where internal_network is specified. string gcp_zone = 4; - // The GCP project_id where the internal checker lives. Not necessary - // the same as the workspace project. + // The GCP project ID where the internal checker lives. Not necessary + // the same as the Workspace project. string peer_project_id = 6; // The current operational state of the internal checker. State state = 7; } +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // The supported resource types that can be used as values of // `group_resource.resource_type`. // `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. @@ -123,39 +127,42 @@ message UptimeCheckConfig { // The resource submessage for group checks. It can be used instead of a // monitored resource, when multiple resources are being monitored. message ResourceGroup { - // The group of resources being monitored. Should be only the - // group_id, not projects//groups/. + // The group of resources being monitored. Should be only the `[GROUP_ID]`, + // and not the full-path `projects/[PROJECT_ID]/groups/[GROUP_ID]`. string group_id = 1; // The resource type of the group members. GroupResourceType resource_type = 2; } - // Information involved in an HTTP/HTTPS uptime check request. + // Information involved in an HTTP/HTTPS Uptime check request. message HttpCheck { - // A type of authentication to perform against the specified resource or URL - // that uses username and password. - // Currently, only Basic authentication is supported in Uptime Monitoring. + // The authentication parameters to provide to the specified resource or + // URL that requires a username and password. Currently, only + // [Basic HTTP authentication](https://tools.ietf.org/html/rfc7617) is + // supported in Uptime checks. message BasicAuthentication { - // The username to authenticate. + // The username to use when authenticating with the HTTP server. string username = 1; - // The password to authenticate. + // The password to use when authenticating with the HTTP server. string password = 2; } - // If true, use HTTPS instead of HTTP to run the check. + // If `true`, use HTTPS instead of HTTP to run the check. bool use_ssl = 1; - // The path to the page to run the check against. Will be combined with the - // host (specified within the MonitoredResource) and port to construct the - // full URL. Optional (defaults to "/"). If the provided path does not - // begin with "/", it will be prepended automatically. + // Optional (defaults to "/"). The path to the page against which to run + // the check. Will be combined with the `host` (specified within the + // `monitored_resource`) and `port` to construct the full URL. If the + // provided path does not begin with "/", a "/" will be prepended + // automatically. string path = 2; - // The port to the page to run the check against. Will be combined with host - // (specified within the MonitoredResource) and path to construct the full - // URL. Optional (defaults to 80 without SSL, or 443 with SSL). + // Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + // `use_ssl` is `true`). The TCP port on the HTTP server against which to + // run the check. Will be combined with host (specified within the + // `monitored_resource`) and `path` to construct the full URL. int32 port = 3; // The authentication information. Optional when creating an HTTP check; @@ -166,11 +173,11 @@ message UptimeCheckConfig { // Encryption should be specified for any headers related to authentication // that you do not wish to be seen when retrieving the configuration. The // server will be responsible for encrypting the headers. - // On Get/List calls, if mask_headers is set to True then the headers - // will be obscured with ******. + // On Get/List calls, if `mask_headers` is set to `true` then the headers + // will be obscured with `******.` bool mask_headers = 5; - // The list of headers to send as part of the uptime check request. + // The list of headers to send as part of the Uptime check request. // If two headers have the same key and different values, they should // be entered as a single header, with the value being a comma-separated // list of all the desired values as described at @@ -180,17 +187,18 @@ message UptimeCheckConfig { // The maximum number of headers allowed is 100. map headers = 6; - // Boolean specifying whether to validate SSL certificates. - // Only applies to uptime_url checks. If use_ssl is false, setting this to - // true has no effect. + // Boolean specifying whether to include SSL certificate validation as a + // part of the Uptime check. Only applies to checks where + // `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + // setting `validate_ssl` to `true` has no effect. bool validate_ssl = 7; } - // Information required for a TCP uptime check request. + // Information required for a TCP Uptime check request. message TcpCheck { - // The port to the page to run the check against. Will be combined with host - // (specified within the MonitoredResource) to construct the full URL. - // Required. + // The TCP port on the server against which to run the check. Will be + // combined with host (specified within the `monitored_resource`) to + // construct the full URL. Required. int32 port = 1; } @@ -199,44 +207,49 @@ message UptimeCheckConfig { message ContentMatcher { // Options to perform content matching. enum ContentMatcherOption { - // No content macher option specified. Treated as CONTAINS_STRING. + // No content matcher type specified (maintained for backward + // compatibility, but deprecated for future use). + // Treated as `CONTAINS_STRING`. CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; - // Allows checking substring matching. - // Default value for previous versions without option. + // Selects substring matching (there is a match if the output contains + // the `content` string). This is the default value for checks without + // a `matcher` option, or where the value of `matcher` is + // `CONTENT_MATCHER_OPTION_UNSPECIFIED`. CONTAINS_STRING = 1; - // Allows checking negation of substring matching (doesn't contain the - // substring). + // Selects negation of substring matching (there is a match if the output + // does NOT contain the `content` string). NOT_CONTAINS_STRING = 2; - // Allows checking regular expression matching. + // Selects regular expression matching (there is a match of the output + // matches the regular expression specified in the `content` string). MATCHES_REGEX = 3; - // Allows checking negation of regular expression matching. + // Selects negation of regular expression matching (there is a match if + // the output does NOT match the regular expression specified in the + // `content` string). NOT_MATCHES_REGEX = 4; } // String or regex content to match (max 1024 bytes) string content = 1; - // The matcher representing content match options which the check will run - // with. If the field is not specified (in previous versions), the option is - // set to be CONTAINS_STRING which performs content substring matching. + // The type of content matcher that will be applied to the server output, + // compared to the `content` string when the check is run. ContentMatcherOption matcher = 2; } - // A unique resource name for this UptimeCheckConfig. The format is: - // + // A unique resource name for this Uptime check configuration. The format is: // // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. // - // This field should be omitted when creating the uptime check configuration; + // This field should be omitted when creating the Uptime check configuration; // on create, the resource name is assigned by the server and included in the // response. string name = 1; - // A human-friendly name for the uptime check configuration. The display name + // A human-friendly name for the Uptime check configuration. The display name // should be unique within a Stackdriver Workspace in order to make it easier // to identify; however, uniqueness is not enforced. Required. string display_name = 2; @@ -246,19 +259,19 @@ message UptimeCheckConfig { // The [monitored // resource](https://cloud.google.com/monitoring/api/resources) associated // with the configuration. - // The following monitored resource types are supported for uptime checks: - // uptime_url - // gce_instance - // gae_app - // aws_ec2_instance - // aws_elb_load_balancer + // The following monitored resource types are supported for Uptime checks: + // `uptime_url`, + // `gce_instance`, + // `gae_app`, + // `aws_ec2_instance`, + // `aws_elb_load_balancer` google.api.MonitoredResource monitored_resource = 3; // The group resource associated with the configuration. ResourceGroup resource_group = 4; } - // The type of uptime check request. + // The type of Uptime check request. oneof check_request_type { // Contains information needed to make an HTTP or HTTPS check. HttpCheck http_check = 5; @@ -267,7 +280,7 @@ message UptimeCheckConfig { TcpCheck tcp_check = 6; } - // How often, in seconds, the uptime check is performed. + // How often, in seconds, the Uptime check is performed. // Currently, the only supported values are `60s` (1 minute), `300s` // (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, // defaults to `60s`. @@ -277,24 +290,24 @@ message UptimeCheckConfig { // between 1 and 60 seconds). Required. google.protobuf.Duration timeout = 8; - // The expected content on the page the check is run against. - // Currently, only the first entry in the list is supported, and other entries - // will be ignored. The server will look for an exact match of the string in - // the page response's content. This field is optional and should only be - // specified if a content match is required. + // The content that is expected to appear in the data returned by the target + // server against which the check is run. Currently, only the first entry + // in the `content_matchers` list is supported, and additional entries will + // be ignored. This field is optional and should only be specified if a + // content match is required as part of the/ Uptime check. repeated ContentMatcher content_matchers = 9; // The list of regions from which the check will be run. // Some regions contain one location, and others contain more than one. - // If this field is specified, enough regions to include a minimum of - // 3 locations must be provided, or an error message is returned. - // Not specifying this field will result in uptime checks running from all - // regions. + // If this field is specified, enough regions must be provided to include a + // minimum of 3 locations. Not specifying this field will result in Uptime + // checks running from all available regions. repeated UptimeCheckRegion selected_regions = 10; // The internal checkers that this check will egress from. If `is_internal` is - // true and this list is empty, the check will egress from all the - // InternalCheckers configured for the project that owns this CheckConfig. + // `true` and this list is empty, the check will egress from all the + // InternalCheckers configured for the project that owns this + // `UptimeCheckConfig`. repeated InternalChecker internal_checkers = 14 [deprecated = true]; } @@ -309,10 +322,10 @@ message UptimeCheckIp { // within the broader umbrella region category. string location = 2; - // The IP address from which the uptime check originates. This is a full - // IP address (not an IP address range). Most IP addresses, as of this - // publication, are in IPv4 format; however, one should not rely on the - // IP addresses being in IPv4 format indefinitely and should support + // The IP address from which the Uptime check originates. This is a fully + // specified IP address (not an IP address range). Most IP addresses, as of + // this publication, are in IPv4 format; however, one should not rely on the + // IP addresses being in IPv4 format indefinitely, and should support // interpreting this field in either IPv4 or IPv6 format. string ip_address = 3; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index 2b5105cb71b..203db186411 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -32,7 +32,7 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The UptimeCheckService API is used to manage (list, create, delete, edit) -// uptime check configurations in the Stackdriver Monitoring product. An uptime +// Uptime check configurations in the Stackdriver Monitoring product. An Uptime // check is a piece of configuration that determines which resources and // services to monitor for availability. These configurations can also be // configured interactively by navigating to the [Cloud Console] @@ -46,22 +46,22 @@ service UptimeCheckService { "https://www.googleapis.com/auth/monitoring," "https://www.googleapis.com/auth/monitoring.read"; - // Lists the existing valid uptime check configurations for the project, - // leaving out any invalid configurations. + // Lists the existing valid Uptime check configurations for the project + // (leaving out any invalid configurations). rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest) returns (ListUptimeCheckConfigsResponse) { option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; } - // Gets a single uptime check configuration. + // Gets a single Uptime check configuration. rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; } - // Creates a new uptime check configuration. + // Creates a new Uptime check configuration. rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" @@ -69,9 +69,9 @@ service UptimeCheckService { }; } - // Updates an uptime check configuration. You can either replace the entire + // Updates an Uptime check configuration. You can either replace the entire // configuration with a new one or replace only certain fields in the current - // configuration by specifying the fields to be updated via `"updateMask"`. + // configuration by specifying the fields to be updated via `updateMask`. // Returns the updated configuration. rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest) returns (UptimeCheckConfig) { option (google.api.http) = { @@ -80,8 +80,8 @@ service UptimeCheckService { }; } - // Deletes an uptime check configuration. Note that this method will fail - // if the uptime check configuration is referenced by an alert policy or + // Deletes an Uptime check configuration. Note that this method will fail + // if the Uptime check configuration is referenced by an alert policy or // other dependent configs that would be rendered invalid by the deletion. rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -89,7 +89,7 @@ service UptimeCheckService { }; } - // Returns the list of IPs that checkers run from + // Returns the list of IP addresses that checkers run from rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest) returns (ListUptimeCheckIpsResponse) { option (google.api.http) = { get: "/v3/uptimeCheckIps" @@ -99,7 +99,7 @@ service UptimeCheckService { // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose uptime check configurations are listed. The format + // The project whose Uptime check configurations are listed. The format // is `projects/[PROJECT_ID]`. string parent = 1; @@ -117,7 +117,7 @@ message ListUptimeCheckConfigsRequest { // The protocol for the `ListUptimeCheckConfigs` response. message ListUptimeCheckConfigsResponse { - // The returned uptime check configurations. + // The returned Uptime check configurations. repeated UptimeCheckConfig uptime_check_configs = 1; // This field represents the pagination token to retrieve the next page of @@ -127,41 +127,41 @@ message ListUptimeCheckConfigsResponse { // request message's page_token field). string next_page_token = 2; - // The total number of uptime check configurations for the project, + // The total number of Uptime check configurations for the project, // irrespective of any pagination. int32 total_size = 3; } // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // The uptime check configuration to retrieve. The format + // The Uptime check configuration to retrieve. The format // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the uptime check. The format + // The project in which to create the Uptime check. The format // is `projects/[PROJECT_ID]`. string parent = 1; - // The new uptime check configuration. + // The new Uptime check configuration. UptimeCheckConfig uptime_check_config = 2; } // The protocol for the `UpdateUptimeCheckConfig` request. message UpdateUptimeCheckConfigRequest { - // Optional. If present, only the listed fields in the current uptime check + // Optional. If present, only the listed fields in the current Uptime check // configuration are updated with values from the new configuration. If this // field is empty, then the current configuration is completely replaced with // the new configuration. google.protobuf.FieldMask update_mask = 2; - // Required. If an `"updateMask"` has been specified, this field gives - // the values for the set of fields mentioned in the `"updateMask"`. If an - // `"updateMask"` has not been given, this uptime check configuration replaces - // the current configuration. If a field is mentioned in `"updateMask"` but - // the corresonding field is omitted in this partial uptime check + // Required. If an `updateMask` has been specified, this field gives + // the values for the set of fields mentioned in the `updateMask`. If an + // `updateMask` has not been given, this Uptime check configuration replaces + // the current configuration. If a field is mentioned in `updateMask` but + // the corresonding field is omitted in this partial Uptime check // configuration, it has the effect of deleting/clearing the field from the // configuration on the server. // @@ -173,7 +173,7 @@ message UpdateUptimeCheckConfigRequest { // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The uptime check configuration to delete. The format + // The Uptime check configuration to delete. The format // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. string name = 1; } diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index a1b99d28d21..b2d4b5b946e 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -254,11 +254,7 @@ const AlertPolicy = { * the time series specified by the `filter` field will be used as the * numerator. * - * The filter is similar to the one that is specified in the - * [`MetricService.ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - * call is useful to verify the time series that will be retrieved / - * processed) and must specify the metric type and optionally may contain + * The filter must specify the metric type and optionally may contain * restrictions on resource type, resource labels, and metric labels. * This field may not exceed 2048 Unicode characters in length. * @@ -274,12 +270,6 @@ const AlertPolicy = { * `denominator_aggregations` fields must use the same alignment period * and produce time series that have the same periodicity and labels. * - * This field is similar to the one in the - * [`MetricService.ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - * is advisable to use the `ListTimeSeries` method when debugging this - * field. - * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * * @property {number} comparison diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 31dc58ced99..741a3bb308a 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -16,7 +16,7 @@ // to be loaded as the JS file. /** - * An internal checker allows uptime checks to run on private/internal GCP + * An internal checker allows Uptime checks to run on private/internal GCP * resources. * * @property {string} name @@ -24,8 +24,8 @@ * * `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. * - * PROJECT_ID is the stackdriver workspace project for the - * uptime check config associated with the internal checker. + * `[PROJECT_ID]` is the Stackdriver Workspace project for the + * Uptime check config associated with the internal checker. * * @property {string} displayName * The checker's human-readable name. The display name @@ -37,12 +37,12 @@ * internal resource lives (ex: "default"). * * @property {string} gcpZone - * The GCP zone the uptime check should egress from. Only respected for - * internal uptime checks, where internal_network is specified. + * The GCP zone the Uptime check should egress from. Only respected for + * internal Uptime checks, where internal_network is specified. * * @property {string} peerProjectId - * The GCP project_id where the internal checker lives. Not necessary - * the same as the workspace project. + * The GCP project ID where the internal checker lives. Not necessary + * the same as the Workspace project. * * @property {number} state * The current operational state of the internal checker. @@ -71,15 +71,19 @@ const InternalChecker = { /** * The checker is being created, provisioned, and configured. A checker in - * this state can be returned by ListInternalCheckers or GetInternalChecker, - * as well as by examining the longrunning.Operation that created it. + * this state can be returned by `ListInternalCheckers` or + * `GetInternalChecker`, as well as by examining the [long running + * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + * that created it. */ CREATING: 1, /** * The checker is running and available for use. A checker in this state - * can be returned by ListInternalCheckers or GetInternalChecker as well - * as by examining the longrunning.Operation that created it. + * can be returned by `ListInternalCheckers` or `GetInternalChecker` as + * well as by examining the [long running + * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + * that created it. * If a checker is being torn down, it is neither visible nor usable, so * there is no "deleting" or "down" state. */ @@ -92,17 +96,16 @@ const InternalChecker = { * availability. * * @property {string} name - * A unique resource name for this UptimeCheckConfig. The format is: - * + * A unique resource name for this Uptime check configuration. The format is: * * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * - * This field should be omitted when creating the uptime check configuration; + * This field should be omitted when creating the Uptime check configuration; * on create, the resource name is assigned by the server and included in the * response. * * @property {string} displayName - * A human-friendly name for the uptime check configuration. The display name + * A human-friendly name for the Uptime check configuration. The display name * should be unique within a Stackdriver Workspace in order to make it easier * to identify; however, uniqueness is not enforced. Required. * @@ -110,12 +113,12 @@ const InternalChecker = { * The [monitored * resource](https://cloud.google.com/monitoring/api/resources) associated * with the configuration. - * The following monitored resource types are supported for uptime checks: - * uptime_url - * gce_instance - * gae_app - * aws_ec2_instance - * aws_elb_load_balancer + * The following monitored resource types are supported for Uptime checks: + * `uptime_url`, + * `gce_instance`, + * `gae_app`, + * `aws_ec2_instance`, + * `aws_elb_load_balancer` * * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} * @@ -135,7 +138,7 @@ const InternalChecker = { * This object should have the same structure as [TcpCheck]{@link google.monitoring.v3.TcpCheck} * * @property {Object} period - * How often, in seconds, the uptime check is performed. + * How often, in seconds, the Uptime check is performed. * Currently, the only supported values are `60s` (1 minute), `300s` * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, * defaults to `60s`. @@ -149,28 +152,28 @@ const InternalChecker = { * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @property {Object[]} contentMatchers - * The expected content on the page the check is run against. - * Currently, only the first entry in the list is supported, and other entries - * will be ignored. The server will look for an exact match of the string in - * the page response's content. This field is optional and should only be - * specified if a content match is required. + * The content that is expected to appear in the data returned by the target + * server against which the check is run. Currently, only the first entry + * in the `content_matchers` list is supported, and additional entries will + * be ignored. This field is optional and should only be specified if a + * content match is required as part of the/ Uptime check. * * This object should have the same structure as [ContentMatcher]{@link google.monitoring.v3.ContentMatcher} * * @property {number[]} selectedRegions * The list of regions from which the check will be run. * Some regions contain one location, and others contain more than one. - * If this field is specified, enough regions to include a minimum of - * 3 locations must be provided, or an error message is returned. - * Not specifying this field will result in uptime checks running from all - * regions. + * If this field is specified, enough regions must be provided to include a + * minimum of 3 locations. Not specifying this field will result in Uptime + * checks running from all available regions. * * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * * @property {Object[]} internalCheckers * The internal checkers that this check will egress from. If `is_internal` is - * true and this list is empty, the check will egress from all the - * InternalCheckers configured for the project that owns this CheckConfig. + * `true` and this list is empty, the check will egress from all the + * InternalCheckers configured for the project that owns this + * `UptimeCheckConfig`. * * This object should have the same structure as [InternalChecker]{@link google.monitoring.v3.InternalChecker} * @@ -186,8 +189,8 @@ const UptimeCheckConfig = { * monitored resource, when multiple resources are being monitored. * * @property {string} groupId - * The group of resources being monitored. Should be only the - * group_id, not projects//groups/. + * The group of resources being monitored. Should be only the `[GROUP_ID]`, + * and not the full-path `projects/[PROJECT_ID]/groups/[GROUP_ID]`. * * @property {number} resourceType * The resource type of the group members. @@ -203,21 +206,23 @@ const UptimeCheckConfig = { }, /** - * Information involved in an HTTP/HTTPS uptime check request. + * Information involved in an HTTP/HTTPS Uptime check request. * * @property {boolean} useSsl - * If true, use HTTPS instead of HTTP to run the check. + * If `true`, use HTTPS instead of HTTP to run the check. * * @property {string} path - * The path to the page to run the check against. Will be combined with the - * host (specified within the MonitoredResource) and port to construct the - * full URL. Optional (defaults to "/"). If the provided path does not - * begin with "/", it will be prepended automatically. + * Optional (defaults to "/"). The path to the page against which to run + * the check. Will be combined with the `host` (specified within the + * `monitored_resource`) and `port` to construct the full URL. If the + * provided path does not begin with "/", a "/" will be prepended + * automatically. * * @property {number} port - * The port to the page to run the check against. Will be combined with host - * (specified within the MonitoredResource) and path to construct the full - * URL. Optional (defaults to 80 without SSL, or 443 with SSL). + * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + * `use_ssl` is `true`). The TCP port on the HTTP server against which to + * run the check. Will be combined with host (specified within the + * `monitored_resource`) and `path` to construct the full URL. * * @property {Object} authInfo * The authentication information. Optional when creating an HTTP check; @@ -230,11 +235,11 @@ const UptimeCheckConfig = { * Encryption should be specified for any headers related to authentication * that you do not wish to be seen when retrieving the configuration. The * server will be responsible for encrypting the headers. - * On Get/List calls, if mask_headers is set to True then the headers - * will be obscured with ******. + * On Get/List calls, if `mask_headers` is set to `true` then the headers + * will be obscured with `******.` * * @property {Object.} headers - * The list of headers to send as part of the uptime check request. + * The list of headers to send as part of the Uptime check request. * If two headers have the same key and different values, they should * be entered as a single header, with the value being a comma-separated * list of all the desired values as described at @@ -244,9 +249,10 @@ const UptimeCheckConfig = { * The maximum number of headers allowed is 100. * * @property {boolean} validateSsl - * Boolean specifying whether to validate SSL certificates. - * Only applies to uptime_url checks. If use_ssl is false, setting this to - * true has no effect. + * Boolean specifying whether to include SSL certificate validation as a + * part of the Uptime check. Only applies to checks where + * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + * setting `validate_ssl` to `true` has no effect. * * @typedef HttpCheck * @memberof google.monitoring.v3 @@ -256,15 +262,16 @@ const UptimeCheckConfig = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * A type of authentication to perform against the specified resource or URL - * that uses username and password. - * Currently, only Basic authentication is supported in Uptime Monitoring. + * The authentication parameters to provide to the specified resource or + * URL that requires a username and password. Currently, only + * [Basic HTTP authentication](https://tools.ietf.org/html/rfc7617) is + * supported in Uptime checks. * * @property {string} username - * The username to authenticate. + * The username to use when authenticating with the HTTP server. * * @property {string} password - * The password to authenticate. + * The password to use when authenticating with the HTTP server. * * @typedef BasicAuthentication * @memberof google.monitoring.v3 @@ -276,12 +283,12 @@ const UptimeCheckConfig = { }, /** - * Information required for a TCP uptime check request. + * Information required for a TCP Uptime check request. * * @property {number} port - * The port to the page to run the check against. Will be combined with host - * (specified within the MonitoredResource) to construct the full URL. - * Required. + * The TCP port on the server against which to run the check. Will be + * combined with host (specified within the `monitored_resource`) to + * construct the full URL. Required. * * @typedef TcpCheck * @memberof google.monitoring.v3 @@ -299,9 +306,8 @@ const UptimeCheckConfig = { * String or regex content to match (max 1024 bytes) * * @property {number} matcher - * The matcher representing content match options which the check will run - * with. If the field is not specified (in previous versions), the option is - * set to be CONTAINS_STRING which performs content substring matching. + * The type of content matcher that will be applied to the server output, + * compared to the `content` string when the check is run. * * The number should be among the values of [ContentMatcherOption]{@link google.monitoring.v3.ContentMatcherOption} * @@ -321,29 +327,36 @@ const UptimeCheckConfig = { ContentMatcherOption: { /** - * No content macher option specified. Treated as CONTAINS_STRING. + * No content matcher type specified (maintained for backward + * compatibility, but deprecated for future use). + * Treated as `CONTAINS_STRING`. */ CONTENT_MATCHER_OPTION_UNSPECIFIED: 0, /** - * Allows checking substring matching. - * Default value for previous versions without option. + * Selects substring matching (there is a match if the output contains + * the `content` string). This is the default value for checks without + * a `matcher` option, or where the value of `matcher` is + * `CONTENT_MATCHER_OPTION_UNSPECIFIED`. */ CONTAINS_STRING: 1, /** - * Allows checking negation of substring matching (doesn't contain the - * substring). + * Selects negation of substring matching (there is a match if the output + * does NOT contain the `content` string). */ NOT_CONTAINS_STRING: 2, /** - * Allows checking regular expression matching. + * Selects regular expression matching (there is a match of the output + * matches the regular expression specified in the `content` string). */ MATCHES_REGEX: 3, /** - * Allows checking negation of regular expression matching. + * Selects negation of regular expression matching (there is a match if + * the output does NOT match the regular expression specified in the + * `content` string). */ NOT_MATCHES_REGEX: 4 } @@ -365,10 +378,10 @@ const UptimeCheckConfig = { * within the broader umbrella region category. * * @property {string} ipAddress - * The IP address from which the uptime check originates. This is a full - * IP address (not an IP address range). Most IP addresses, as of this - * publication, are in IPv4 format; however, one should not rely on the - * IP addresses being in IPv4 format indefinitely and should support + * The IP address from which the Uptime check originates. This is a fully + * specified IP address (not an IP address range). Most IP addresses, as of + * this publication, are in IPv4 format; however, one should not rely on the + * IP addresses being in IPv4 format indefinitely, and should support * interpreting this field in either IPv4 or IPv6 format. * * @typedef UptimeCheckIp @@ -409,7 +422,7 @@ const GroupResourceType = { }; /** - * The regions from which an uptime check can be run. + * The regions from which an Uptime check can be run. * * @enum {number} * @memberof google.monitoring.v3 @@ -417,7 +430,7 @@ const GroupResourceType = { const UptimeCheckRegion = { /** - * Default value if no region is specified. Will result in uptime checks + * Default value if no region is specified. Will result in Uptime checks * running from all regions. */ REGION_UNSPECIFIED: 0, diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index 5c7172be165..e301085e3a6 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js @@ -19,7 +19,7 @@ * The protocol for the `ListUptimeCheckConfigs` request. * * @property {string} parent - * The project whose uptime check configurations are listed. The format + * The project whose Uptime check configurations are listed. The format * is `projects/[PROJECT_ID]`. * * @property {number} pageSize @@ -45,7 +45,7 @@ const ListUptimeCheckConfigsRequest = { * The protocol for the `ListUptimeCheckConfigs` response. * * @property {Object[]} uptimeCheckConfigs - * The returned uptime check configurations. + * The returned Uptime check configurations. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @@ -57,7 +57,7 @@ const ListUptimeCheckConfigsRequest = { * request message's page_token field). * * @property {number} totalSize - * The total number of uptime check configurations for the project, + * The total number of Uptime check configurations for the project, * irrespective of any pagination. * * @typedef ListUptimeCheckConfigsResponse @@ -72,7 +72,7 @@ const ListUptimeCheckConfigsResponse = { * The protocol for the `GetUptimeCheckConfig` request. * * @property {string} name - * The uptime check configuration to retrieve. The format + * The Uptime check configuration to retrieve. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef GetUptimeCheckConfigRequest @@ -87,11 +87,11 @@ const GetUptimeCheckConfigRequest = { * The protocol for the `CreateUptimeCheckConfig` request. * * @property {string} parent - * The project in which to create the uptime check. The format + * The project in which to create the Uptime check. The format * is `projects/[PROJECT_ID]`. * * @property {Object} uptimeCheckConfig - * The new uptime check configuration. + * The new Uptime check configuration. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @@ -107,7 +107,7 @@ const CreateUptimeCheckConfigRequest = { * The protocol for the `UpdateUptimeCheckConfig` request. * * @property {Object} updateMask - * Optional. If present, only the listed fields in the current uptime check + * Optional. If present, only the listed fields in the current Uptime check * configuration are updated with values from the new configuration. If this * field is empty, then the current configuration is completely replaced with * the new configuration. @@ -115,11 +115,11 @@ const CreateUptimeCheckConfigRequest = { * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * * @property {Object} uptimeCheckConfig - * Required. If an `"updateMask"` has been specified, this field gives - * the values for the set of fields mentioned in the `"updateMask"`. If an - * `"updateMask"` has not been given, this uptime check configuration replaces - * the current configuration. If a field is mentioned in `"updateMask"` but - * the corresonding field is omitted in this partial uptime check + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresonding field is omitted in this partial Uptime check * configuration, it has the effect of deleting/clearing the field from the * configuration on the server. * @@ -141,7 +141,7 @@ const UpdateUptimeCheckConfigRequest = { * The protocol for the `DeleteUptimeCheckConfig` request. * * @property {string} name - * The uptime check configuration to delete. The format + * The Uptime check configuration to delete. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef DeleteUptimeCheckConfigRequest diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index 9976b5c407c..ce1fab1237f 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -22,7 +22,7 @@ const VERSION = require('../../package.json').version; /** * The UptimeCheckService API is used to manage (list, create, delete, edit) - * uptime check configurations in the Stackdriver Monitoring product. An uptime + * Uptime check configurations in the Stackdriver Monitoring product. An Uptime * check is a piece of configuration that determines which resources and * services to monitor for availability. These configurations can also be * configured interactively by navigating to the [Cloud Console] @@ -252,13 +252,13 @@ class UptimeCheckServiceClient { // ------------------- /** - * Lists the existing valid uptime check configurations for the project, - * leaving out any invalid configurations. + * Lists the existing valid Uptime check configurations for the project + * (leaving out any invalid configurations). * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose uptime check configurations are listed. The format + * The project whose Uptime check configurations are listed. The format * is `projects/[PROJECT_ID]`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -375,7 +375,7 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose uptime check configurations are listed. The format + * The project whose Uptime check configurations are listed. The format * is `projects/[PROJECT_ID]`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -416,12 +416,12 @@ class UptimeCheckServiceClient { } /** - * Gets a single uptime check configuration. + * Gets a single Uptime check configuration. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The uptime check configuration to retrieve. The format + * The Uptime check configuration to retrieve. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -471,15 +471,15 @@ class UptimeCheckServiceClient { } /** - * Creates a new uptime check configuration. + * Creates a new Uptime check configuration. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which to create the uptime check. The format + * The project in which to create the Uptime check. The format * is `projects/[PROJECT_ID]`. * @param {Object} request.uptimeCheckConfig - * The new uptime check configuration. + * The new Uptime check configuration. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @param {Object} [options] @@ -539,19 +539,19 @@ class UptimeCheckServiceClient { } /** - * Updates an uptime check configuration. You can either replace the entire + * Updates an Uptime check configuration. You can either replace the entire * configuration with a new one or replace only certain fields in the current - * configuration by specifying the fields to be updated via `"updateMask"`. + * configuration by specifying the fields to be updated via `updateMask`. * Returns the updated configuration. * * @param {Object} request * The request object that will be sent. * @param {Object} request.uptimeCheckConfig - * Required. If an `"updateMask"` has been specified, this field gives - * the values for the set of fields mentioned in the `"updateMask"`. If an - * `"updateMask"` has not been given, this uptime check configuration replaces - * the current configuration. If a field is mentioned in `"updateMask"` but - * the corresonding field is omitted in this partial uptime check + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresonding field is omitted in this partial Uptime check * configuration, it has the effect of deleting/clearing the field from the * configuration on the server. * @@ -561,7 +561,7 @@ class UptimeCheckServiceClient { * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @param {Object} [request.updateMask] - * Optional. If present, only the listed fields in the current uptime check + * Optional. If present, only the listed fields in the current Uptime check * configuration are updated with values from the new configuration. If this * field is empty, then the current configuration is completely replaced with * the new configuration. @@ -619,14 +619,14 @@ class UptimeCheckServiceClient { } /** - * Deletes an uptime check configuration. Note that this method will fail - * if the uptime check configuration is referenced by an alert policy or + * Deletes an Uptime check configuration. Note that this method will fail + * if the Uptime check configuration is referenced by an alert policy or * other dependent configs that would be rendered invalid by the deletion. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The uptime check configuration to delete. The format + * The Uptime check configuration to delete. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -672,7 +672,7 @@ class UptimeCheckServiceClient { } /** - * Returns the list of IPs that checkers run from + * Returns the list of IP addresses that checkers run from * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index b3a4f7f0d9d..a6a8ad2a759 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-10-01T11:24:26.983649Z", + "updateTime": "2019-10-04T11:14:03.833083Z", "sources": [ { "generator": { "name": "artman", - "version": "0.37.1", - "dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80" + "version": "0.38.0", + "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ce3c574d1266026cebea3a893247790bd68191c2", - "internalRef": "272147209" + "sha": "d9576d95b44f64fb0e3da4760adfc4a24fa1faab", + "internalRef": "272741510" } }, { From 9e0e2744a126dbc8fc382aae8c2f6630201400b6 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 8 Oct 2019 18:00:16 -0700 Subject: [PATCH 233/422] chore: update CONTRIBUTING.md and make releaseType node (#310) --- packages/google-cloud-monitoring/CONTRIBUTING.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/google-cloud-monitoring/CONTRIBUTING.md b/packages/google-cloud-monitoring/CONTRIBUTING.md index 78aaa61b269..f6c4cf010e3 100644 --- a/packages/google-cloud-monitoring/CONTRIBUTING.md +++ b/packages/google-cloud-monitoring/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 8b0e9b4493470413746781806c1b1897b7e10af5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 11 Oct 2019 21:17:32 -0700 Subject: [PATCH 234/422] build: update proto namespaces (#311) --- .../protos/google/monitoring/v3/dropped_labels.proto | 5 +++++ packages/google-cloud-monitoring/synth.metadata | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index 0754051a174..016ecf7b084 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -17,7 +17,12 @@ syntax = "proto3"; package google.monitoring.v3; +option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option java_multiple_files = true; +option java_outer_classname = "DroppedLabelsProto"; +option java_package = "com.google.monitoring.v3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index a6a8ad2a759..595b9d5ff66 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-10-04T11:14:03.833083Z", + "updateTime": "2019-10-11T11:22:49.209576Z", "sources": [ { "generator": { "name": "artman", - "version": "0.38.0", - "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" + "version": "0.39.0", + "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d9576d95b44f64fb0e3da4760adfc4a24fa1faab", - "internalRef": "272741510" + "sha": "192d3d8221175f7cc0aa8eeac1d820f47c53da7f", + "internalRef": "274071638" } }, { From c8e87986c0994ba97c8468db8a471368e3e7889c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2019 10:21:06 -0700 Subject: [PATCH 235/422] chore: release 1.4.0 (#307) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-monitoring/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index f9fae4831d9..b1143466ddc 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.4.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.3.0...v1.4.0) (2019-10-12) + + +### Features + +* .d.ts for protos ([#298](https://www.github.com/googleapis/nodejs-monitoring/issues/298)) ([dc6e8a1](https://www.github.com/googleapis/nodejs-monitoring/commit/dc6e8a1b82b41638ad873ec35007415f602c8b0b)) + + +### Bug Fixes + +* update sample for enabling or disabling a policy ([#305](https://www.github.com/googleapis/nodejs-monitoring/issues/305)) ([fd84c71](https://www.github.com/googleapis/nodejs-monitoring/commit/fd84c71ab4511c11963c8480cda70117f78f8651)) +* use compatible version of google-gax ([c210d32](https://www.github.com/googleapis/nodejs-monitoring/commit/c210d320a392fb33e6a6779ae4d727a6970326da)) + ## [1.3.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.2.3...v1.3.0) (2019-09-16) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2ce5cc4e8df..01b3a555358 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.3.0", + "version": "1.4.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { From 205d6a8645061ad0fb9967088975d0cc42b0d004 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Oct 2019 11:56:53 -0700 Subject: [PATCH 236/422] feat: add is_internal option (#312) --- .../protos/google/monitoring/v3/common.proto | 3 +- .../protos/google/monitoring/v3/metric.proto | 15 +++--- .../protos/google/monitoring/v3/uptime.proto | 48 +++++++++++-------- .../v3/doc/google/monitoring/v3/doc_common.js | 3 +- .../v3/doc/google/monitoring/v3/doc_metric.js | 15 +++--- .../v3/doc/google/monitoring/v3/doc_uptime.js | 6 +++ .../google-cloud-monitoring/synth.metadata | 6 +-- .../google-cloud-monitoring/test/gapic-v3.js | 6 +++ 8 files changed, 62 insertions(+), 40 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 17b73fcf46b..1e89b0dcdaf 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -55,7 +55,8 @@ message TypedValue { // // * For a `GAUGE` metric, the `startTime` value is technically optional; if // no value is specified, the start time defaults to the value of the -// end time, and the interval represents a single point in time. Such an +// end time, and the interval represents a single point in time. If both +// start and end times are specified, they must be identical. Such an // interval is valid only for `GAUGE` metrics, which are point-in-time // measurements. // diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 3ace1f96454..4c5c0a84810 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -33,13 +33,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A single data point in a time series. message Point { // The time interval to which the data point applies. For `GAUGE` metrics, - // only the end time of the interval is used. For `DELTA` metrics, the start - // and end time should specify a non-zero interval, with subsequent points - // specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - // metrics, the start and end time should specify a non-zero interval, with - // subsequent points specifying 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. + // the start time is optional, but if it is supplied, it must equal the end + // time. For `DELTA` metrics, the start and end time should specify a + // non-zero interval, with subsequent points specifying contiguous and + // non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + // time should specify a non-zero interval, with subsequent points specifying + // 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. TimeInterval interval = 1; // The value of the data point. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 33106bc16ac..2601f531ba7 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -27,6 +27,27 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { @@ -83,27 +104,6 @@ message InternalChecker { State state = 7; } -// The regions from which an Uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in Uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - // The supported resource types that can be used as values of // `group_resource.resource_type`. // `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. @@ -304,6 +304,12 @@ message UptimeCheckConfig { // checks running from all available regions. repeated UptimeCheckRegion selected_regions = 10; + // If this is `true`, then checks are made only from the 'internal_checkers'. + // If it is `false`, then checks are made only from the 'selected_regions'. + // It is an error to provide 'selected_regions' when is_internal is `true`, + // or to provide 'internal_checkers' when is_internal is `false`. + bool is_internal = 15 [deprecated = true]; + // The internal checkers that this check will egress from. If `is_internal` is // `true` and this list is empty, the check will egress from all the // InternalCheckers configured for the project that owns this diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index 89e4b9b04b3..e91053425d8 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js @@ -50,7 +50,8 @@ const TypedValue = { * * * For a `GAUGE` metric, the `startTime` value is technically optional; if * no value is specified, the start time defaults to the value of the - * end time, and the interval represents a single point in time. Such an + * end time, and the interval represents a single point in time. If both + * start and end times are specified, they must be identical. Such an * interval is valid only for `GAUGE` metrics, which are point-in-time * measurements. * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index e93cedc3a69..9f360244c65 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js @@ -20,13 +20,14 @@ * * @property {Object} interval * The time interval to which the data point applies. For `GAUGE` metrics, - * only the end time of the interval is used. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying 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. + * the start time is optional, but if it is supplied, it must equal the end + * time. For `DELTA` metrics, the start and end time should specify a + * non-zero interval, with subsequent points specifying contiguous and + * non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * 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. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 741a3bb308a..d890036b467 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -169,6 +169,12 @@ const InternalChecker = { * * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} * + * @property {boolean} isInternal + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * * @property {Object[]} internalCheckers * The internal checkers that this check will egress from. If `is_internal` is * `true` and this list is empty, the check will egress from all the diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 595b9d5ff66..5e67caf9475 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-11T11:22:49.209576Z", + "updateTime": "2019-10-12T11:23:31.960704Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "192d3d8221175f7cc0aa8eeac1d820f47c53da7f", - "internalRef": "274071638" + "sha": "af8dd2c1750558b538eaa6bdaa3bc899079533ee", + "internalRef": "274260771" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index fa88116cc9e..f9411f5f7a6 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -2183,9 +2183,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response const name2 = 'name2-1052831874'; const displayName = 'displayName1615086568'; + const isInternal = true; const expectedResponse = { name: name2, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer @@ -2250,9 +2252,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response const name = 'name3373707'; const displayName = 'displayName1615086568'; + const isInternal = true; const expectedResponse = { name: name, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer @@ -2314,9 +2318,11 @@ describe('UptimeCheckServiceClient', () => { // Mock response const name = 'name3373707'; const displayName = 'displayName1615086568'; + const isInternal = true; const expectedResponse = { name: name, displayName: displayName, + isInternal: isInternal, }; // Mock Grpc layer From 79b950e6b4099f6beb42d88b0804e7949913d07e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 21 Oct 2019 18:14:16 -0700 Subject: [PATCH 237/422] fix(deps): bump google-gax to 1.7.5 (#313) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 01b3a555358..4a3dcf8fbd7 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -42,7 +42,7 @@ "predocs-test": "npm run docs" }, "dependencies": { - "google-gax": "^1.6.3" + "google-gax": "^1.7.5" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", From 6a5f43524ea82c8edc4c25b74f41e9227c7aaf7e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2019 13:31:24 -0700 Subject: [PATCH 238/422] chore: release 1.5.0 (#314) --- packages/google-cloud-monitoring/CHANGELOG.md | 12 ++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index b1143466ddc..f311965ef28 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.5.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.4.0...v1.5.0) (2019-10-22) + + +### Features + +* add is_internal option ([#312](https://www.github.com/googleapis/nodejs-monitoring/issues/312)) ([a2dbb0b](https://www.github.com/googleapis/nodejs-monitoring/commit/a2dbb0b8df925317f01a193038ad520f0c8c43e7)) + + +### Bug Fixes + +* **deps:** bump google-gax to 1.7.5 ([#313](https://www.github.com/googleapis/nodejs-monitoring/issues/313)) ([faf0efa](https://www.github.com/googleapis/nodejs-monitoring/commit/faf0efa5caa535d0cf16d10143a48a0c545e2074)) + ## [1.4.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.3.0...v1.4.0) (2019-10-12) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 4a3dcf8fbd7..10f13cbbaa9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.4.0", + "version": "1.5.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index a412031c765..672cf09c2d5 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.3.0", + "@google-cloud/monitoring": "^1.5.0", "yargs": "^14.0.0" }, "devDependencies": { From 2c2fcf90c54a978eec0f29c3e04c51acb07d2f78 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 4 Nov 2019 09:51:04 -0800 Subject: [PATCH 239/422] chore: clean up package.json (#321) --- packages/google-cloud-monitoring/package.json | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 10f13cbbaa9..02c5c9c06b9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -11,9 +11,7 @@ "main": "src/index.js", "files": [ "src", - "protos", - "AUTHORS", - "LICENSE" + "protos" ], "keywords": [ "google apis client", @@ -29,14 +27,11 @@ "Stackdriver Monitoring API" ], "scripts": { - "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "docs": "jsdoc -c .jsdoc.js", - "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "eslint '**/*.js'", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha system-test/*.js --timeout 600000", - "test-no-cover": "mocha test/*.js", - "test": "npm run cover", + "test": "c8 mocha", "fix": "eslint '**/*.js' --fix", "docs-test": "linkinator docs", "predocs-test": "npm run docs" @@ -45,19 +40,18 @@ "google-gax": "^1.7.5" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.0.0", + "c8": "^6.0.1", "codecov": "^3.0.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.0", - "jsdoc-fresh": "^1.0.1", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "linkinator": "^1.5.0", "mocha": "^6.0.0", - "nyc": "^14.0.0", "power-assert": "^1.4.4", - "prettier": "^1.7.4", - "linkinator": "^1.5.0" + "prettier": "^1.7.4" } } From b1b5b5570f7aac9667929763644e40de2ca23fa3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 4 Nov 2019 10:14:28 -0800 Subject: [PATCH 240/422] chore: exclude gapic files from test coverage (#320) --- packages/google-cloud-monitoring/.nycrc | 1 - packages/google-cloud-monitoring/synth.metadata | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index 23e322204ec..367688844eb 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.nycrc @@ -10,7 +10,6 @@ "**/docs", "**/samples", "**/scripts", - "**/src/**/v*/**/*.js", "**/protos", "**/test", ".jsdoc.js", diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 5e67caf9475..c8da64fe4b7 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-12T11:23:31.960704Z", + "updateTime": "2019-11-02T11:11:54.790733Z", "sources": [ { "generator": { "name": "artman", - "version": "0.39.0", - "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" + "version": "0.41.0", + "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "af8dd2c1750558b538eaa6bdaa3bc899079533ee", - "internalRef": "274260771" + "sha": "aac770126e2def40dcc387f50e8007b21c869e58", + "internalRef": "278016738" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], From 29024b62eccab1eca99d5b8c0117493b34893a9e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 14 Nov 2019 16:50:06 -0800 Subject: [PATCH 241/422] fix(docs): snippets are now replaced in jsdoc comments (#324) --- packages/google-cloud-monitoring/linkinator.config.json | 3 ++- packages/google-cloud-monitoring/package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/linkinator.config.json b/packages/google-cloud-monitoring/linkinator.config.json index d780d6bfff5..924edef684c 100644 --- a/packages/google-cloud-monitoring/linkinator.config.json +++ b/packages/google-cloud-monitoring/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "https://cloud.google.com/monitoring/workspaces/tiers" ] } diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 02c5c9c06b9..ed8fb034a6d 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -49,6 +49,7 @@ "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", "mocha": "^6.0.0", "power-assert": "^1.4.4", From b90232477afdd275a7645002b7d13b87b02fb18d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 14 Nov 2019 22:17:08 -0800 Subject: [PATCH 242/422] feat: add service api support (#325) --- .../protos/google/monitoring/v3/service.proto | 377 + .../monitoring/v3/service_service.proto | 283 + .../protos/protos.d.ts | 3266 +++++++ .../google-cloud-monitoring/protos/protos.js | 7582 +++++++++++++++++ .../protos/protos.json | 608 ++ .../alert_policy_service_client_config.json | 10 +- .../doc/google/monitoring/v3/doc_service.js | 539 ++ .../monitoring/v3/doc_service_service.js | 299 + .../src/v3/group_service_client_config.json | 12 +- .../google-cloud-monitoring/src/v3/index.js | 2 + .../src/v3/metric_service_client_config.json | 14 +- ...ication_channel_service_client_config.json | 20 +- .../v3/service_monitoring_service_client.js | 1238 +++ ...vice_monitoring_service_client_config.json | 76 + ...service_monitoring_service_proto_list.json | 3 + .../google-cloud-monitoring/synth.metadata | 10 +- .../google-cloud-monitoring/test/gapic-v3.js | 670 ++ 17 files changed, 14976 insertions(+), 33 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js create mode 100644 packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json create mode 100644 packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto new file mode 100644 index 00000000000..5622931c67d --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto @@ -0,0 +1,377 @@ +// 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. +// + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/monitored_resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/calendar_period.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "ServiceMonitoringProto"; +option java_package = "com.google.monitoring.v3"; + +// A `Service` is a discrete, autonomous, and network-accessible unit, designed +// to solve an individual concern +// ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In +// Stackdriver Monitoring, a `Service` acts as the root resource under which +// operational aspects of the service are accessible. +message Service { + // Custom view of service telemetry. Currently a place-holder pending final + // design. + message Custom { + + } + + // App Engine service. Learn more at https://cloud.google.com/appengine. + message AppEngine { + // The ID of the App Engine module underlying this service. Corresponds to + // the `module_id` resource label in the `gae_app` monitored resource: + // https://cloud.google.com/monitoring/api/resources#tag_gae_app + string module_id = 1; + } + + // Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints. + message CloudEndpoints { + // The name of the Cloud Endpoints service underlying this service. + // Corresponds to the `service` resource label in the `api` monitored + // resource: https://cloud.google.com/monitoring/api/resources#tag_api + string service = 1; + } + + // Istio service. Learn more at http://istio.io. + message ClusterIstio { + // The location of the Kubernetes cluster in which this Istio service is + // defined. Corresponds to the `location` resource label in `k8s_cluster` + // resources. + string location = 1; + + // The name of the Kubernetes cluster in which this Istio service is + // defined. Corresponds to the `cluster_name` resource label in + // `k8s_cluster` resources. + string cluster_name = 2; + + // The namespace of the Istio service underlying this service. Corresponds + // to the `destination_service_namespace` metric label in Istio metrics. + string service_namespace = 3; + + // The name of the Istio service underlying this service. Corresponds to the + // `destination_service_name` metric label in Istio metrics. + string service_name = 4; + } + + // Configuration for how to query telemetry on a Service. + message Telemetry { + // The full name of the resource that defines this service. Formatted as + // described in https://cloud.google.com/apis/design/resource_names. + string resource_name = 1; + } + + // Resource name for this Service. Of the form + // `projects/{project_id}/services/{service_id}`. + string name = 1; + + // Name used for UI elements listing this Service. + string display_name = 2; + + // REQUIRED. Service-identifying atoms specifying the underlying service. + oneof identifier { + // Custom service type. + Custom custom = 6; + + // Type used for App Engine services. + AppEngine app_engine = 7; + + // Type used for Cloud Endpoints services. + CloudEndpoints cloud_endpoints = 8; + + // Type used for Istio services that live in a Kubernetes cluster. + ClusterIstio cluster_istio = 9; + } + + // Configuration for how to query telemetry on a Service. + Telemetry telemetry = 13; +} + +// A Service-Level Objective (SLO) describes a level of desired good service. It +// consists of a service-level indicator (SLI), a performance goal, and a period +// over which the objective is to be evaluated against that goal. The SLO can +// use SLIs defined in a number of different manners. Typical SLOs might include +// "99% of requests in each rolling week have latency below 200 milliseconds" or +// "99.5% of requests in each calendar month return successfully." +message ServiceLevelObjective { + // `ServiceLevelObjective.View` determines what form of + // `ServiceLevelObjective` is returned from `GetServiceLevelObjective`, + // `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs. + enum View { + // Same as FULL. + VIEW_UNSPECIFIED = 0; + + // Return the embedded `ServiceLevelIndicator` in the form in which it was + // defined. If it was defined using a `BasicSli`, return that `BasicSli`. + FULL = 2; + + // For `ServiceLevelIndicator`s using `BasicSli` articulation, instead + // return the `ServiceLevelIndicator` with its mode of computation fully + // spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using + // `RequestBasedSli` or `WindowsBasedSli`, return the + // `ServiceLevelIndicator` as it was provided. + EXPLICIT = 1; + } + + // Resource name for this `ServiceLevelObjective`. + // Of the form + // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + string name = 1; + + // Name used for UI elements listing this SLO. + string display_name = 11; + + // The definition of good service, used to measure and calculate the quality + // of the `Service`'s performance with respect to a single aspect of service + // quality. + ServiceLevelIndicator service_level_indicator = 3; + + // The fraction of service that must be good in order for this objective to be + // met. `0 < goal <= 1`. + double goal = 4; + + // The time period over which the objective will be evaluated. + oneof period { + // A rolling time period, semantically "in the past ``". + // Must be an integer multiple of 1 day no larger than 30 days. + google.protobuf.Duration rolling_period = 5; + + // A calendar period, semantically "since the start of the current + // ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and + // `MONTH` are supported. + google.type.CalendarPeriod calendar_period = 6; + } +} + +// A Service-Level Indicator (SLI) describes the "performance" of a service. For +// some services, the SLI is well-defined. In such cases, the SLI can be +// described easily by referencing the well-known SLI and providing the needed +// parameters. Alternatively, a "custom" SLI can be defined with a query to the +// underlying metric store. An SLI is defined to be `good_service / +// total_service` over any queried time interval. The value of performance +// always falls into the range `0 <= performance <= 1`. A custom SLI describes +// how to compute this ratio, whether this is by dividing values from a pair of +// time series, cutting a `Distribution` into good and bad counts, or counting +// time windows in which the service complies with a criterion. For separation +// of concerns, a single Service-Level Indicator measures performance for only +// one aspect of service quality, such as fraction of successful queries or +// fast-enough queries. +message ServiceLevelIndicator { + // Service level indicators can be grouped by whether the "unit" of service + // being measured is based on counts of good requests or on counts of good + // time windows + oneof type { + // Basic SLI on a well-known service type. + BasicSli basic_sli = 4; + + // Request-based SLIs + RequestBasedSli request_based = 1; + + // Windows-based SLIs + WindowsBasedSli windows_based = 2; + } +} + +// An SLI measuring performance on a well-known service type. Performance will +// be computed on the basis of pre-defined metrics. The type of the +// `service_resource` determines the metrics to use and the +// `service_resource.labels` and `metric_labels` are used to construct a +// monitoring filter to filter that metric down to just the data relevant to +// this service. +message BasicSli { + // Future parameters for the availability SLI. + message AvailabilityCriteria { + + } + + // Parameters for a latency threshold SLI. + message LatencyCriteria { + // Good service is defined to be the count of requests made to this service + // that return in no more than `threshold`. + google.protobuf.Duration threshold = 3; + } + + // OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + // other methods will not be used to calculate performance for this SLI. If + // omitted, this SLI applies to all the Service's methods. For service types + // that don't support breaking down by method, setting this field will result + // in an error. + repeated string method = 7; + + // OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + // from other locations will not be used to calculate performance for this + // SLI. If omitted, this SLI applies to all locations in which the Service has + // activity. For service types that don't support breaking down by location, + // setting this field will result in an error. + repeated string location = 8; + + // OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + // from other API versions will not be used to calculate performance for this + // SLI. If omitted, this SLI applies to all API versions. For service types + // that don't support breaking down by version, setting this field will result + // in an error. + repeated string version = 9; + + // This SLI can be evaluated on the basis of availability or latency. + oneof sli_criteria { + // Good service is defined to be the count of requests made to this service + // that return successfully. + AvailabilityCriteria availability = 2; + + // Good service is defined to be the count of requests made to this service + // that are fast enough with respect to `latency.threshold`. + LatencyCriteria latency = 3; + } +} + +// Range of numerical values, inclusive of `min` and exclusive of `max`. If the +// open range "< range.max" is desired, set `range.min = -infinity`. If the open +// range ">= range.min" is desired, set `range.max = infinity`. +message Range { + // Range minimum. + double min = 1; + + // Range maximum. + double max = 2; +} + +// Service Level Indicators for which atomic units of service are counted +// directly. +message RequestBasedSli { + // The means to compute a ratio of `good_service` to `total_service`. + oneof method { + // `good_total_ratio` is used when the ratio of `good_service` to + // `total_service` is computed from two `TimeSeries`. + TimeSeriesRatio good_total_ratio = 1; + + // `distribution_cut` is used when `good_service` is a count of values + // aggregated in a `Distribution` that fall into a good range. The + // `total_service` is the total count of all values aggregated in the + // `Distribution`. + DistributionCut distribution_cut = 3; + } +} + +// A `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the +// `good_service / total_service` ratio. The specified `TimeSeries` must have +// `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = +// DELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify +// exactly two of good, bad, and total, and the relationship `good_service + +// bad_service = total_service` will be assumed. +message TimeSeriesRatio { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` quantifying good service provided. Must have + // `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + // DELTA` or `MetricKind = CUMULATIVE`. + string good_service_filter = 4; + + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` quantifying bad service, either demanded service + // that was not provided or demanded service that was of inadequate quality. + // Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + // `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + string bad_service_filter = 5; + + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` quantifying total demanded service. Must have + // `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + // DELTA` or `MetricKind = CUMULATIVE`. + string total_service_filter = 6; +} + +// A `DistributionCut` defines a `TimeSeries` and thresholds used for measuring +// good service and total service. The `TimeSeries` must have `ValueType = +// DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. The +// computed `good_service` will be the count of values x in the `Distribution` +// such that `range.min <= x < range.max`. +message DistributionCut { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` aggregating values. Must have `ValueType = + // DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + string distribution_filter = 4; + + // Range of values considered "good." For a one-sided range, set one bound to + // an infinite value. + Range range = 5; +} + +// A `WindowsBasedSli` defines `good_service` as the count of time windows for +// which the provided service was of good quality. Criteria for determining +// if service was good are embedded in the `window_criterion`. +message WindowsBasedSli { + // A `PerformanceThreshold` is used when each window is good when that window + // has a sufficiently high `performance`. + message PerformanceThreshold { + // The means, either a request-based SLI or a basic SLI, by which to compute + // performance over a window. + oneof type { + // `RequestBasedSli` to evaluate to judge window quality. + RequestBasedSli performance = 1; + + // `BasicSli` to evaluate to judge window quality. + BasicSli basic_sli_performance = 3; + } + + // If window `performance >= threshold`, the window is counted as good. + double threshold = 2; + } + + // A `MetricRange` is used when each window is good when the value x of a + // single `TimeSeries` satisfies `range.min <= x < range.max`. The provided + // `TimeSeries` must have `ValueType = INT64` or `ValueType = DOUBLE` and + // `MetricKind = GAUGE`. + message MetricRange { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying the `TimeSeries` to use for evaluating window quality. + string time_series = 1; + + // Range of values considered "good." For a one-sided range, set one bound + // to an infinite value. + Range range = 4; + } + + // The criterion to use for evaluating window goodness. + oneof window_criterion { + // A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if + // any `true` values appear in the window. + string good_bad_metric_filter = 5; + + // A window is good if its `performance` is high enough. + PerformanceThreshold good_total_ratio_threshold = 2; + + // A window is good if the metric's value is in a good range, averaged + // across returned streams. + MetricRange metric_mean_in_range = 6; + + // A window is good if the metric's value is in a good range, summed across + // returned streams. + MetricRange metric_sum_in_range = 7; + } + + // Duration over which window quality is evaluated. Must be an integer + // fraction of a day and at least `60s`. + google.protobuf.Duration window_period = 4; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto new file mode 100644 index 00000000000..85cefa10d23 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto @@ -0,0 +1,283 @@ +// 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. +// + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/api/monitored_resource.proto"; +import "google/monitoring/v3/service.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "ServiceMonitoringServiceProto"; +option java_package = "com.google.monitoring.v3"; + +// The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for +// managing and querying aspects of a workspace's services. These include the +// `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy +// of categorized Health Metrics. +service ServiceMonitoringService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + + // Create a `Service`. + rpc CreateService(CreateServiceRequest) returns (Service) { + option (google.api.http) = { + post: "/v3/{parent=*/*}/services" + body: "service" + }; + } + + // Get the named `Service`. + rpc GetService(GetServiceRequest) returns (Service) { + option (google.api.http) = { + get: "/v3/{name=*/*/services/*}" + }; + } + + // List `Service`s for this workspace. + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v3/{parent=*/*}/services" + }; + } + + // Update this `Service`. + rpc UpdateService(UpdateServiceRequest) returns (Service) { + option (google.api.http) = { + patch: "/v3/{service.name=*/*/services/*}" + body: "service" + }; + } + + // Soft delete this `Service`. + rpc DeleteService(DeleteServiceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=*/*/services/*}" + }; + } + + // Create a `ServiceLevelObjective` for the given `Service`. + rpc CreateServiceLevelObjective(CreateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) { + option (google.api.http) = { + post: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + body: "service_level_objective" + }; + } + + // Get a `ServiceLevelObjective` by name. + rpc GetServiceLevelObjective(GetServiceLevelObjectiveRequest) returns (ServiceLevelObjective) { + option (google.api.http) = { + get: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + }; + } + + // List the `ServiceLevelObjective`s for the given `Service`. + rpc ListServiceLevelObjectives(ListServiceLevelObjectivesRequest) returns (ListServiceLevelObjectivesResponse) { + option (google.api.http) = { + get: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + }; + } + + // Update the given `ServiceLevelObjective`. + rpc UpdateServiceLevelObjective(UpdateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) { + option (google.api.http) = { + patch: "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}" + body: "service_level_objective" + }; + } + + // Delete the given `ServiceLevelObjective`. + rpc DeleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + }; + } +} + +// The `CreateService` request. +message CreateServiceRequest { + // Resource name of the parent workspace. + // Of the form `projects/{project_id}`. + string parent = 1; + + // Optional. The Service id to use for this Service. If omitted, an id will be + // generated instead. Must match the pattern [a-z0-9\-]+ + string service_id = 3; + + // The `Service` to create. + Service service = 2; +} + +// The `GetService` request. +message GetServiceRequest { + // Resource name of the `Service`. + // Of the form `projects/{project_id}/services/{service_id}`. + string name = 1; +} + +// The `ListServices` request. +message ListServicesRequest { + // Resource name of the parent `Workspace`. + // Of the form `projects/{project_id}`. + string parent = 1; + + // A filter specifying what `Service`s to return. The filter currently + // supports the following fields: + // + // - `identifier_case` + // - `app_engine.module_id` + // - `cloud_endpoints.service` + // - `cluster_istio.location` + // - `cluster_istio.cluster_name` + // - `cluster_istio.service_namespace` + // - `cluster_istio.service_name` + // + // `identifier_case` refers to which option in the identifier oneof is + // populated. For example, the filter `identifier_case = "CUSTOM"` would match + // all services with a value for the `custom` field. Valid options are + // "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + string filter = 2; + + // A non-negative number that is the maximum number of results to return. + // When 0, use default page size. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; +} + +// The `ListServices` response. +message ListServicesResponse { + // The `Service`s matching the specified filter. + repeated Service services = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `UpdateService` request. +message UpdateServiceRequest { + // The `Service` to draw updates from. + // The given `name` specifies the resource to update. + Service service = 1; + + // A set of field paths defining which fields to use for the update. + google.protobuf.FieldMask update_mask = 2; +} + +// The `DeleteService` request. +message DeleteServiceRequest { + // Resource name of the `Service` to delete. + // Of the form `projects/{project_id}/service/{service_id}`. + string name = 1; +} + +// The `CreateServiceLevelObjective` request. +message CreateServiceLevelObjectiveRequest { + // Resource name of the parent `Service`. + // Of the form `projects/{project_id}/services/{service_id}`. + string parent = 1; + + // Optional. The ServiceLevelObjective id to use for this + // ServiceLevelObjective. If omitted, an id will be generated instead. Must + // match the pattern [a-z0-9\-]+ + string service_level_objective_id = 3; + + // The `ServiceLevelObjective` to create. + // The provided `name` will be respected if no `ServiceLevelObjective` exists + // with this name. + ServiceLevelObjective service_level_objective = 2; +} + +// The `GetServiceLevelObjective` request. +message GetServiceLevelObjectiveRequest { + // Resource name of the `ServiceLevelObjective` to get. + // Of the form + // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + string name = 1; + + // View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + // `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + // `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + // `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + ServiceLevelObjective.View view = 2; +} + +// The `ListServiceLevelObjectives` request. +message ListServiceLevelObjectivesRequest { + // Resource name of the parent `Service`. + // Of the form `projects/{project_id}/services/{service_id}`. + string parent = 1; + + // A filter specifying what `ServiceLevelObjective`s to return. + string filter = 2; + + // A non-negative number that is the maximum number of results to return. + // When 0, use default page size. + int32 page_size = 3; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 4; + + // View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + // `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + // `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + // `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + ServiceLevelObjective.View view = 5; +} + +// The `ListServiceLevelObjectives` response. +message ListServiceLevelObjectivesResponse { + // The `ServiceLevelObjective`s matching the specified filter. + repeated ServiceLevelObjective service_level_objectives = 1; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, + // use that value as `pageToken` in the next call to this method. + string next_page_token = 2; +} + +// The `UpdateServiceLevelObjective` request. +message UpdateServiceLevelObjectiveRequest { + // The `ServiceLevelObjective` to draw updates from. + // The given `name` specifies the resource to update. + ServiceLevelObjective service_level_objective = 1; + + // A set of field paths defining which fields to use for the update. + google.protobuf.FieldMask update_mask = 2; +} + +// The `DeleteServiceLevelObjective` request. +message DeleteServiceLevelObjectiveRequest { + // Resource name of the `ServiceLevelObjective` to delete. + // Of the form + // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + string name = 1; +} diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index adee550a3d2..97b950a9f07 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -6352,6 +6352,3256 @@ export namespace google { } } + /** Represents a ServiceMonitoringService */ + class ServiceMonitoringService extends $protobuf.rpc.Service { + + /** + * Constructs a new ServiceMonitoringService 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 ServiceMonitoringService 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): ServiceMonitoringService; + + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public createService(request: google.monitoring.v3.ICreateServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.CreateServiceCallback): void; + + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @returns Promise + */ + public createService(request: google.monitoring.v3.ICreateServiceRequest): Promise; + + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public getService(request: google.monitoring.v3.IGetServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.GetServiceCallback): void; + + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @returns Promise + */ + public getService(request: google.monitoring.v3.IGetServiceRequest): Promise; + + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServicesResponse + */ + public listServices(request: google.monitoring.v3.IListServicesRequest, callback: google.monitoring.v3.ServiceMonitoringService.ListServicesCallback): void; + + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @returns Promise + */ + public listServices(request: google.monitoring.v3.IListServicesRequest): Promise; + + /** + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public updateService(request: google.monitoring.v3.IUpdateServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.UpdateServiceCallback): void; + + /** + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @returns Promise + */ + public updateService(request: google.monitoring.v3.IUpdateServiceRequest): Promise; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteService(request: google.monitoring.v3.IDeleteServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.DeleteServiceCallback): void; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @returns Promise + */ + public deleteService(request: google.monitoring.v3.IDeleteServiceRequest): Promise; + + /** + * Calls CreateServiceLevelObjective. + * @param request CreateServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + */ + public createServiceLevelObjective(request: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.CreateServiceLevelObjectiveCallback): void; + + /** + * Calls CreateServiceLevelObjective. + * @param request CreateServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public createServiceLevelObjective(request: google.monitoring.v3.ICreateServiceLevelObjectiveRequest): Promise; + + /** + * Calls GetServiceLevelObjective. + * @param request GetServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + */ + public getServiceLevelObjective(request: google.monitoring.v3.IGetServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjectiveCallback): void; + + /** + * Calls GetServiceLevelObjective. + * @param request GetServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public getServiceLevelObjective(request: google.monitoring.v3.IGetServiceLevelObjectiveRequest): Promise; + + /** + * Calls ListServiceLevelObjectives. + * @param request ListServiceLevelObjectivesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServiceLevelObjectivesResponse + */ + public listServiceLevelObjectives(request: google.monitoring.v3.IListServiceLevelObjectivesRequest, callback: google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectivesCallback): void; + + /** + * Calls ListServiceLevelObjectives. + * @param request ListServiceLevelObjectivesRequest message or plain object + * @returns Promise + */ + public listServiceLevelObjectives(request: google.monitoring.v3.IListServiceLevelObjectivesRequest): Promise; + + /** + * Calls UpdateServiceLevelObjective. + * @param request UpdateServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + */ + public updateServiceLevelObjective(request: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.UpdateServiceLevelObjectiveCallback): void; + + /** + * Calls UpdateServiceLevelObjective. + * @param request UpdateServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public updateServiceLevelObjective(request: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest): Promise; + + /** + * Calls DeleteServiceLevelObjective. + * @param request DeleteServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteServiceLevelObjective(request: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.DeleteServiceLevelObjectiveCallback): void; + + /** + * Calls DeleteServiceLevelObjective. + * @param request DeleteServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public deleteServiceLevelObjective(request: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest): Promise; + } + + namespace ServiceMonitoringService { + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. + * @param error Error, if any + * @param [response] Service + */ + type CreateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. + * @param error Error, if any + * @param [response] Service + */ + type GetServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. + * @param error Error, if any + * @param [response] ListServicesResponse + */ + type ListServicesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServicesResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. + * @param error Error, if any + * @param [response] Service + */ + type UpdateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteServiceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. + * @param error Error, if any + * @param [response] ServiceLevelObjective + */ + type CreateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. + * @param error Error, if any + * @param [response] ServiceLevelObjective + */ + type GetServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. + * @param error Error, if any + * @param [response] ListServiceLevelObjectivesResponse + */ + type ListServiceLevelObjectivesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServiceLevelObjectivesResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. + * @param error Error, if any + * @param [response] ServiceLevelObjective + */ + type UpdateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteServiceLevelObjectiveCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a CreateServiceRequest. */ + interface ICreateServiceRequest { + + /** CreateServiceRequest parent */ + parent?: (string|null); + + /** CreateServiceRequest serviceId */ + serviceId?: (string|null); + + /** CreateServiceRequest service */ + service?: (google.monitoring.v3.IService|null); + } + + /** Represents a CreateServiceRequest. */ + class CreateServiceRequest implements ICreateServiceRequest { + + /** + * Constructs a new CreateServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateServiceRequest); + + /** CreateServiceRequest parent. */ + public parent: string; + + /** CreateServiceRequest serviceId. */ + public serviceId: string; + + /** CreateServiceRequest service. */ + public service?: (google.monitoring.v3.IService|null); + + /** + * Creates a new CreateServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateServiceRequest): google.monitoring.v3.CreateServiceRequest; + + /** + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateServiceRequest; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateServiceRequest; + + /** + * Verifies a CreateServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateServiceRequest; + + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @param message CreateServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetServiceRequest. */ + interface IGetServiceRequest { + + /** GetServiceRequest name */ + name?: (string|null); + } + + /** Represents a GetServiceRequest. */ + class GetServiceRequest implements IGetServiceRequest { + + /** + * Constructs a new GetServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetServiceRequest); + + /** GetServiceRequest name. */ + public name: string; + + /** + * Creates a new GetServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServiceRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetServiceRequest): google.monitoring.v3.GetServiceRequest; + + /** + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetServiceRequest; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetServiceRequest; + + /** + * Verifies a GetServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetServiceRequest; + + /** + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @param message GetServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServicesRequest. */ + interface IListServicesRequest { + + /** ListServicesRequest parent */ + parent?: (string|null); + + /** ListServicesRequest filter */ + filter?: (string|null); + + /** ListServicesRequest pageSize */ + pageSize?: (number|null); + + /** ListServicesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListServicesRequest. */ + class ListServicesRequest implements IListServicesRequest { + + /** + * Constructs a new ListServicesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListServicesRequest); + + /** ListServicesRequest parent. */ + public parent: string; + + /** ListServicesRequest filter. */ + public filter: string; + + /** ListServicesRequest pageSize. */ + public pageSize: number; + + /** ListServicesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListServicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServicesRequest instance + */ + public static create(properties?: google.monitoring.v3.IListServicesRequest): google.monitoring.v3.ListServicesRequest; + + /** + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServicesRequest; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServicesRequest; + + /** + * Verifies a ListServicesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServicesRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServicesRequest; + + /** + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @param message ListServicesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServicesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServicesResponse. */ + interface IListServicesResponse { + + /** ListServicesResponse services */ + services?: (google.monitoring.v3.IService[]|null); + + /** ListServicesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListServicesResponse. */ + class ListServicesResponse implements IListServicesResponse { + + /** + * Constructs a new ListServicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListServicesResponse); + + /** ListServicesResponse services. */ + public services: google.monitoring.v3.IService[]; + + /** ListServicesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListServicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServicesResponse instance + */ + public static create(properties?: google.monitoring.v3.IListServicesResponse): google.monitoring.v3.ListServicesResponse; + + /** + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServicesResponse; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServicesResponse; + + /** + * Verifies a ListServicesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServicesResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServicesResponse; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @param message ListServicesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateServiceRequest. */ + interface IUpdateServiceRequest { + + /** UpdateServiceRequest service */ + service?: (google.monitoring.v3.IService|null); + + /** UpdateServiceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateServiceRequest. */ + class UpdateServiceRequest implements IUpdateServiceRequest { + + /** + * Constructs a new UpdateServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateServiceRequest); + + /** UpdateServiceRequest service. */ + public service?: (google.monitoring.v3.IService|null); + + /** UpdateServiceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateServiceRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateServiceRequest): google.monitoring.v3.UpdateServiceRequest; + + /** + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateServiceRequest; + + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateServiceRequest; + + /** + * Verifies an UpdateServiceRequest message. + * @param message Plain 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 UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateServiceRequest; + + /** + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * @param message UpdateServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteServiceRequest. */ + interface IDeleteServiceRequest { + + /** DeleteServiceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteServiceRequest. */ + class DeleteServiceRequest implements IDeleteServiceRequest { + + /** + * Constructs a new DeleteServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteServiceRequest); + + /** DeleteServiceRequest name. */ + public name: string; + + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteServiceRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteServiceRequest): google.monitoring.v3.DeleteServiceRequest; + + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteServiceRequest; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteServiceRequest; + + /** + * Verifies a DeleteServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteServiceRequest; + + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @param message DeleteServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateServiceLevelObjectiveRequest. */ + interface ICreateServiceLevelObjectiveRequest { + + /** CreateServiceLevelObjectiveRequest parent */ + parent?: (string|null); + + /** CreateServiceLevelObjectiveRequest serviceLevelObjectiveId */ + serviceLevelObjectiveId?: (string|null); + + /** CreateServiceLevelObjectiveRequest serviceLevelObjective */ + serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + } + + /** Represents a CreateServiceLevelObjectiveRequest. */ + class CreateServiceLevelObjectiveRequest implements ICreateServiceLevelObjectiveRequest { + + /** + * Constructs a new CreateServiceLevelObjectiveRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateServiceLevelObjectiveRequest); + + /** CreateServiceLevelObjectiveRequest parent. */ + public parent: string; + + /** CreateServiceLevelObjectiveRequest serviceLevelObjectiveId. */ + public serviceLevelObjectiveId: string; + + /** CreateServiceLevelObjectiveRequest serviceLevelObjective. */ + public serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + + /** + * Creates a new CreateServiceLevelObjectiveRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceLevelObjectiveRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateServiceLevelObjectiveRequest): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + + /** + * Encodes the specified CreateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + + /** + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + + /** + * Verifies a CreateServiceLevelObjectiveRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceLevelObjectiveRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + + /** + * Creates a plain object from a CreateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message CreateServiceLevelObjectiveRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateServiceLevelObjectiveRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetServiceLevelObjectiveRequest. */ + interface IGetServiceLevelObjectiveRequest { + + /** GetServiceLevelObjectiveRequest name */ + name?: (string|null); + + /** GetServiceLevelObjectiveRequest view */ + view?: (google.monitoring.v3.ServiceLevelObjective.View|null); + } + + /** Represents a GetServiceLevelObjectiveRequest. */ + class GetServiceLevelObjectiveRequest implements IGetServiceLevelObjectiveRequest { + + /** + * Constructs a new GetServiceLevelObjectiveRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetServiceLevelObjectiveRequest); + + /** GetServiceLevelObjectiveRequest name. */ + public name: string; + + /** GetServiceLevelObjectiveRequest view. */ + public view: google.monitoring.v3.ServiceLevelObjective.View; + + /** + * Creates a new GetServiceLevelObjectiveRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetServiceLevelObjectiveRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetServiceLevelObjectiveRequest): google.monitoring.v3.GetServiceLevelObjectiveRequest; + + /** + * Encodes the specified GetServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. + * @param message GetServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. + * @param message GetServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetServiceLevelObjectiveRequest; + + /** + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetServiceLevelObjectiveRequest; + + /** + * Verifies a GetServiceLevelObjectiveRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetServiceLevelObjectiveRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetServiceLevelObjectiveRequest; + + /** + * Creates a plain object from a GetServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message GetServiceLevelObjectiveRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetServiceLevelObjectiveRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServiceLevelObjectivesRequest. */ + interface IListServiceLevelObjectivesRequest { + + /** ListServiceLevelObjectivesRequest parent */ + parent?: (string|null); + + /** ListServiceLevelObjectivesRequest filter */ + filter?: (string|null); + + /** ListServiceLevelObjectivesRequest pageSize */ + pageSize?: (number|null); + + /** ListServiceLevelObjectivesRequest pageToken */ + pageToken?: (string|null); + + /** ListServiceLevelObjectivesRequest view */ + view?: (google.monitoring.v3.ServiceLevelObjective.View|null); + } + + /** Represents a ListServiceLevelObjectivesRequest. */ + class ListServiceLevelObjectivesRequest implements IListServiceLevelObjectivesRequest { + + /** + * Constructs a new ListServiceLevelObjectivesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListServiceLevelObjectivesRequest); + + /** ListServiceLevelObjectivesRequest parent. */ + public parent: string; + + /** ListServiceLevelObjectivesRequest filter. */ + public filter: string; + + /** ListServiceLevelObjectivesRequest pageSize. */ + public pageSize: number; + + /** ListServiceLevelObjectivesRequest pageToken. */ + public pageToken: string; + + /** ListServiceLevelObjectivesRequest view. */ + public view: google.monitoring.v3.ServiceLevelObjective.View; + + /** + * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceLevelObjectivesRequest instance + */ + public static create(properties?: google.monitoring.v3.IListServiceLevelObjectivesRequest): google.monitoring.v3.ListServiceLevelObjectivesRequest; + + /** + * Encodes the specified ListServiceLevelObjectivesRequest message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. + * @param message ListServiceLevelObjectivesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListServiceLevelObjectivesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServiceLevelObjectivesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. + * @param message ListServiceLevelObjectivesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListServiceLevelObjectivesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceLevelObjectivesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServiceLevelObjectivesRequest; + + /** + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceLevelObjectivesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServiceLevelObjectivesRequest; + + /** + * Verifies a ListServiceLevelObjectivesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServiceLevelObjectivesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceLevelObjectivesRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServiceLevelObjectivesRequest; + + /** + * Creates a plain object from a ListServiceLevelObjectivesRequest message. Also converts values to other types if specified. + * @param message ListServiceLevelObjectivesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListServiceLevelObjectivesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServiceLevelObjectivesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListServiceLevelObjectivesResponse. */ + interface IListServiceLevelObjectivesResponse { + + /** ListServiceLevelObjectivesResponse serviceLevelObjectives */ + serviceLevelObjectives?: (google.monitoring.v3.IServiceLevelObjective[]|null); + + /** ListServiceLevelObjectivesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListServiceLevelObjectivesResponse. */ + class ListServiceLevelObjectivesResponse implements IListServiceLevelObjectivesResponse { + + /** + * Constructs a new ListServiceLevelObjectivesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListServiceLevelObjectivesResponse); + + /** ListServiceLevelObjectivesResponse serviceLevelObjectives. */ + public serviceLevelObjectives: google.monitoring.v3.IServiceLevelObjective[]; + + /** ListServiceLevelObjectivesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListServiceLevelObjectivesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceLevelObjectivesResponse instance + */ + public static create(properties?: google.monitoring.v3.IListServiceLevelObjectivesResponse): google.monitoring.v3.ListServiceLevelObjectivesResponse; + + /** + * Encodes the specified ListServiceLevelObjectivesResponse message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. + * @param message ListServiceLevelObjectivesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListServiceLevelObjectivesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListServiceLevelObjectivesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. + * @param message ListServiceLevelObjectivesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListServiceLevelObjectivesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceLevelObjectivesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServiceLevelObjectivesResponse; + + /** + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceLevelObjectivesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServiceLevelObjectivesResponse; + + /** + * Verifies a ListServiceLevelObjectivesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListServiceLevelObjectivesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceLevelObjectivesResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServiceLevelObjectivesResponse; + + /** + * Creates a plain object from a ListServiceLevelObjectivesResponse message. Also converts values to other types if specified. + * @param message ListServiceLevelObjectivesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListServiceLevelObjectivesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListServiceLevelObjectivesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateServiceLevelObjectiveRequest. */ + interface IUpdateServiceLevelObjectiveRequest { + + /** UpdateServiceLevelObjectiveRequest serviceLevelObjective */ + serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + + /** UpdateServiceLevelObjectiveRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateServiceLevelObjectiveRequest. */ + class UpdateServiceLevelObjectiveRequest implements IUpdateServiceLevelObjectiveRequest { + + /** + * Constructs a new UpdateServiceLevelObjectiveRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest); + + /** UpdateServiceLevelObjectiveRequest serviceLevelObjective. */ + public serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + + /** UpdateServiceLevelObjectiveRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateServiceLevelObjectiveRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateServiceLevelObjectiveRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + + /** + * Encodes the specified UpdateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message UpdateServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message UpdateServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + + /** + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + + /** + * Verifies an UpdateServiceLevelObjectiveRequest message. + * @param message Plain 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 UpdateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateServiceLevelObjectiveRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + + /** + * Creates a plain object from an UpdateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message UpdateServiceLevelObjectiveRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateServiceLevelObjectiveRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteServiceLevelObjectiveRequest. */ + interface IDeleteServiceLevelObjectiveRequest { + + /** DeleteServiceLevelObjectiveRequest name */ + name?: (string|null); + } + + /** Represents a DeleteServiceLevelObjectiveRequest. */ + class DeleteServiceLevelObjectiveRequest implements IDeleteServiceLevelObjectiveRequest { + + /** + * Constructs a new DeleteServiceLevelObjectiveRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest); + + /** DeleteServiceLevelObjectiveRequest name. */ + public name: string; + + /** + * Creates a new DeleteServiceLevelObjectiveRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteServiceLevelObjectiveRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + + /** + * Encodes the specified DeleteServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * @param message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * @param message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + + /** + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + + /** + * Verifies a DeleteServiceLevelObjectiveRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceLevelObjectiveRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + + /** + * Creates a plain object from a DeleteServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message DeleteServiceLevelObjectiveRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteServiceLevelObjectiveRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Service. */ + interface IService { + + /** Service name */ + name?: (string|null); + + /** Service displayName */ + displayName?: (string|null); + + /** Service custom */ + custom?: (google.monitoring.v3.Service.ICustom|null); + + /** Service appEngine */ + appEngine?: (google.monitoring.v3.Service.IAppEngine|null); + + /** Service cloudEndpoints */ + cloudEndpoints?: (google.monitoring.v3.Service.ICloudEndpoints|null); + + /** Service clusterIstio */ + clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + + /** Service telemetry */ + telemetry?: (google.monitoring.v3.Service.ITelemetry|null); + } + + /** Represents a Service. */ + class Service implements IService { + + /** + * Constructs a new Service. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IService); + + /** Service name. */ + public name: string; + + /** Service displayName. */ + public displayName: string; + + /** Service custom. */ + public custom?: (google.monitoring.v3.Service.ICustom|null); + + /** Service appEngine. */ + public appEngine?: (google.monitoring.v3.Service.IAppEngine|null); + + /** Service cloudEndpoints. */ + public cloudEndpoints?: (google.monitoring.v3.Service.ICloudEndpoints|null); + + /** Service clusterIstio. */ + public clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + + /** Service telemetry. */ + public telemetry?: (google.monitoring.v3.Service.ITelemetry|null); + + /** Service identifier. */ + public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"); + + /** + * Creates a new Service instance using the specified properties. + * @param [properties] Properties to set + * @returns Service instance + */ + public static create(properties?: google.monitoring.v3.IService): google.monitoring.v3.Service; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * @param message Service message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Service message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service; + + /** + * Verifies a Service message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Service + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Service to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Service { + + /** Properties of a Custom. */ + interface ICustom { + } + + /** Represents a Custom. */ + class Custom implements ICustom { + + /** + * Constructs a new Custom. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.ICustom); + + /** + * Creates a new Custom instance using the specified properties. + * @param [properties] Properties to set + * @returns Custom instance + */ + public static create(properties?: google.monitoring.v3.Service.ICustom): google.monitoring.v3.Service.Custom; + + /** + * Encodes the specified Custom message. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @param message Custom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.ICustom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Custom message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @param message Custom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.ICustom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Custom message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.Custom; + + /** + * Decodes a Custom message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.Custom; + + /** + * Verifies a Custom message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Custom message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Custom + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.Custom; + + /** + * Creates a plain object from a Custom message. Also converts values to other types if specified. + * @param message Custom + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.Custom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Custom to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppEngine. */ + interface IAppEngine { + + /** AppEngine moduleId */ + moduleId?: (string|null); + } + + /** Represents an AppEngine. */ + class AppEngine implements IAppEngine { + + /** + * Constructs a new AppEngine. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.IAppEngine); + + /** AppEngine moduleId. */ + public moduleId: string; + + /** + * Creates a new AppEngine instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngine instance + */ + public static create(properties?: google.monitoring.v3.Service.IAppEngine): google.monitoring.v3.Service.AppEngine; + + /** + * Encodes the specified AppEngine message. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @param message AppEngine message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.IAppEngine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngine message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @param message AppEngine message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.IAppEngine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngine message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.AppEngine; + + /** + * Decodes an AppEngine message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.AppEngine; + + /** + * Verifies an AppEngine message. + * @param message Plain 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 AppEngine message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngine + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.AppEngine; + + /** + * Creates a plain object from an AppEngine message. Also converts values to other types if specified. + * @param message AppEngine + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.AppEngine, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngine to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CloudEndpoints. */ + interface ICloudEndpoints { + + /** CloudEndpoints service */ + service?: (string|null); + } + + /** Represents a CloudEndpoints. */ + class CloudEndpoints implements ICloudEndpoints { + + /** + * Constructs a new CloudEndpoints. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.ICloudEndpoints); + + /** CloudEndpoints service. */ + public service: string; + + /** + * Creates a new CloudEndpoints instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudEndpoints instance + */ + public static create(properties?: google.monitoring.v3.Service.ICloudEndpoints): google.monitoring.v3.Service.CloudEndpoints; + + /** + * Encodes the specified CloudEndpoints message. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @param message CloudEndpoints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.ICloudEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudEndpoints message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @param message CloudEndpoints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.ICloudEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudEndpoints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.CloudEndpoints; + + /** + * Decodes a CloudEndpoints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.CloudEndpoints; + + /** + * Verifies a CloudEndpoints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudEndpoints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudEndpoints + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.CloudEndpoints; + + /** + * Creates a plain object from a CloudEndpoints message. Also converts values to other types if specified. + * @param message CloudEndpoints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.CloudEndpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudEndpoints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClusterIstio. */ + interface IClusterIstio { + + /** ClusterIstio location */ + location?: (string|null); + + /** ClusterIstio clusterName */ + clusterName?: (string|null); + + /** ClusterIstio serviceNamespace */ + serviceNamespace?: (string|null); + + /** ClusterIstio serviceName */ + serviceName?: (string|null); + } + + /** Represents a ClusterIstio. */ + class ClusterIstio implements IClusterIstio { + + /** + * Constructs a new ClusterIstio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.IClusterIstio); + + /** ClusterIstio location. */ + public location: string; + + /** ClusterIstio clusterName. */ + public clusterName: string; + + /** ClusterIstio serviceNamespace. */ + public serviceNamespace: string; + + /** ClusterIstio serviceName. */ + public serviceName: string; + + /** + * Creates a new ClusterIstio instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterIstio instance + */ + public static create(properties?: google.monitoring.v3.Service.IClusterIstio): google.monitoring.v3.Service.ClusterIstio; + + /** + * Encodes the specified ClusterIstio message. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @param message ClusterIstio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.IClusterIstio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @param message ClusterIstio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.IClusterIstio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterIstio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.ClusterIstio; + + /** + * Decodes a ClusterIstio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.ClusterIstio; + + /** + * Verifies a ClusterIstio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClusterIstio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterIstio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.ClusterIstio; + + /** + * Creates a plain object from a ClusterIstio message. Also converts values to other types if specified. + * @param message ClusterIstio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.ClusterIstio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterIstio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Telemetry. */ + interface ITelemetry { + + /** Telemetry resourceName */ + resourceName?: (string|null); + } + + /** Represents a Telemetry. */ + class Telemetry implements ITelemetry { + + /** + * Constructs a new Telemetry. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.ITelemetry); + + /** Telemetry resourceName. */ + public resourceName: string; + + /** + * Creates a new Telemetry instance using the specified properties. + * @param [properties] Properties to set + * @returns Telemetry instance + */ + public static create(properties?: google.monitoring.v3.Service.ITelemetry): google.monitoring.v3.Service.Telemetry; + + /** + * Encodes the specified Telemetry message. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @param message Telemetry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.ITelemetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Telemetry message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @param message Telemetry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.ITelemetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Telemetry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.Telemetry; + + /** + * Decodes a Telemetry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.Telemetry; + + /** + * Verifies a Telemetry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Telemetry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Telemetry + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.Telemetry; + + /** + * Creates a plain object from a Telemetry message. Also converts values to other types if specified. + * @param message Telemetry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.Telemetry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Telemetry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ServiceLevelObjective. */ + interface IServiceLevelObjective { + + /** ServiceLevelObjective name */ + name?: (string|null); + + /** ServiceLevelObjective displayName */ + displayName?: (string|null); + + /** ServiceLevelObjective serviceLevelIndicator */ + serviceLevelIndicator?: (google.monitoring.v3.IServiceLevelIndicator|null); + + /** ServiceLevelObjective goal */ + goal?: (number|null); + + /** ServiceLevelObjective rollingPeriod */ + rollingPeriod?: (google.protobuf.IDuration|null); + + /** ServiceLevelObjective calendarPeriod */ + calendarPeriod?: (google.type.CalendarPeriod|null); + } + + /** Represents a ServiceLevelObjective. */ + class ServiceLevelObjective implements IServiceLevelObjective { + + /** + * Constructs a new ServiceLevelObjective. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IServiceLevelObjective); + + /** ServiceLevelObjective name. */ + public name: string; + + /** ServiceLevelObjective displayName. */ + public displayName: string; + + /** ServiceLevelObjective serviceLevelIndicator. */ + public serviceLevelIndicator?: (google.monitoring.v3.IServiceLevelIndicator|null); + + /** ServiceLevelObjective goal. */ + public goal: number; + + /** ServiceLevelObjective rollingPeriod. */ + public rollingPeriod?: (google.protobuf.IDuration|null); + + /** ServiceLevelObjective calendarPeriod. */ + public calendarPeriod: google.type.CalendarPeriod; + + /** ServiceLevelObjective period. */ + public period?: ("rollingPeriod"|"calendarPeriod"); + + /** + * Creates a new ServiceLevelObjective instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLevelObjective instance + */ + public static create(properties?: google.monitoring.v3.IServiceLevelObjective): google.monitoring.v3.ServiceLevelObjective; + + /** + * Encodes the specified ServiceLevelObjective message. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * @param message ServiceLevelObjective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IServiceLevelObjective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLevelObjective message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * @param message ServiceLevelObjective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IServiceLevelObjective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLevelObjective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLevelObjective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ServiceLevelObjective; + + /** + * Decodes a ServiceLevelObjective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLevelObjective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ServiceLevelObjective; + + /** + * Verifies a ServiceLevelObjective message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLevelObjective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLevelObjective + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ServiceLevelObjective; + + /** + * Creates a plain object from a ServiceLevelObjective message. Also converts values to other types if specified. + * @param message ServiceLevelObjective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ServiceLevelObjective, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLevelObjective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ServiceLevelObjective { + + /** View enum. */ + enum View { + VIEW_UNSPECIFIED = 0, + FULL = 2, + EXPLICIT = 1 + } + } + + /** Properties of a ServiceLevelIndicator. */ + interface IServiceLevelIndicator { + + /** ServiceLevelIndicator basicSli */ + basicSli?: (google.monitoring.v3.IBasicSli|null); + + /** ServiceLevelIndicator requestBased */ + requestBased?: (google.monitoring.v3.IRequestBasedSli|null); + + /** ServiceLevelIndicator windowsBased */ + windowsBased?: (google.monitoring.v3.IWindowsBasedSli|null); + } + + /** Represents a ServiceLevelIndicator. */ + class ServiceLevelIndicator implements IServiceLevelIndicator { + + /** + * Constructs a new ServiceLevelIndicator. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IServiceLevelIndicator); + + /** ServiceLevelIndicator basicSli. */ + public basicSli?: (google.monitoring.v3.IBasicSli|null); + + /** ServiceLevelIndicator requestBased. */ + public requestBased?: (google.monitoring.v3.IRequestBasedSli|null); + + /** ServiceLevelIndicator windowsBased. */ + public windowsBased?: (google.monitoring.v3.IWindowsBasedSli|null); + + /** ServiceLevelIndicator type. */ + public type?: ("basicSli"|"requestBased"|"windowsBased"); + + /** + * Creates a new ServiceLevelIndicator instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLevelIndicator instance + */ + public static create(properties?: google.monitoring.v3.IServiceLevelIndicator): google.monitoring.v3.ServiceLevelIndicator; + + /** + * Encodes the specified ServiceLevelIndicator message. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * @param message ServiceLevelIndicator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IServiceLevelIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLevelIndicator message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * @param message ServiceLevelIndicator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IServiceLevelIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLevelIndicator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLevelIndicator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ServiceLevelIndicator; + + /** + * Decodes a ServiceLevelIndicator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLevelIndicator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ServiceLevelIndicator; + + /** + * Verifies a ServiceLevelIndicator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLevelIndicator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLevelIndicator + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ServiceLevelIndicator; + + /** + * Creates a plain object from a ServiceLevelIndicator message. Also converts values to other types if specified. + * @param message ServiceLevelIndicator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ServiceLevelIndicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLevelIndicator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BasicSli. */ + interface IBasicSli { + + /** BasicSli method */ + method?: (string[]|null); + + /** BasicSli location */ + location?: (string[]|null); + + /** BasicSli version */ + version?: (string[]|null); + + /** BasicSli availability */ + availability?: (google.monitoring.v3.BasicSli.IAvailabilityCriteria|null); + + /** BasicSli latency */ + latency?: (google.monitoring.v3.BasicSli.ILatencyCriteria|null); + } + + /** Represents a BasicSli. */ + class BasicSli implements IBasicSli { + + /** + * Constructs a new BasicSli. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IBasicSli); + + /** BasicSli method. */ + public method: string[]; + + /** BasicSli location. */ + public location: string[]; + + /** BasicSli version. */ + public version: string[]; + + /** BasicSli availability. */ + public availability?: (google.monitoring.v3.BasicSli.IAvailabilityCriteria|null); + + /** BasicSli latency. */ + public latency?: (google.monitoring.v3.BasicSli.ILatencyCriteria|null); + + /** BasicSli sliCriteria. */ + public sliCriteria?: ("availability"|"latency"); + + /** + * Creates a new BasicSli instance using the specified properties. + * @param [properties] Properties to set + * @returns BasicSli instance + */ + public static create(properties?: google.monitoring.v3.IBasicSli): google.monitoring.v3.BasicSli; + + /** + * Encodes the specified BasicSli message. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @param message BasicSli message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IBasicSli, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BasicSli message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @param message BasicSli message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IBasicSli, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BasicSli message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BasicSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli; + + /** + * Decodes a BasicSli message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BasicSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli; + + /** + * Verifies a BasicSli message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BasicSli message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BasicSli + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli; + + /** + * Creates a plain object from a BasicSli message. Also converts values to other types if specified. + * @param message BasicSli + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.BasicSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BasicSli to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BasicSli { + + /** Properties of an AvailabilityCriteria. */ + interface IAvailabilityCriteria { + } + + /** Represents an AvailabilityCriteria. */ + class AvailabilityCriteria implements IAvailabilityCriteria { + + /** + * Constructs a new AvailabilityCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.BasicSli.IAvailabilityCriteria); + + /** + * Creates a new AvailabilityCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns AvailabilityCriteria instance + */ + public static create(properties?: google.monitoring.v3.BasicSli.IAvailabilityCriteria): google.monitoring.v3.BasicSli.AvailabilityCriteria; + + /** + * Encodes the specified AvailabilityCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @param message AvailabilityCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.BasicSli.IAvailabilityCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AvailabilityCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @param message AvailabilityCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.BasicSli.IAvailabilityCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AvailabilityCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AvailabilityCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli.AvailabilityCriteria; + + /** + * Decodes an AvailabilityCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AvailabilityCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli.AvailabilityCriteria; + + /** + * Verifies an AvailabilityCriteria message. + * @param message Plain 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 AvailabilityCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AvailabilityCriteria + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli.AvailabilityCriteria; + + /** + * Creates a plain object from an AvailabilityCriteria message. Also converts values to other types if specified. + * @param message AvailabilityCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.BasicSli.AvailabilityCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AvailabilityCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LatencyCriteria. */ + interface ILatencyCriteria { + + /** LatencyCriteria threshold */ + threshold?: (google.protobuf.IDuration|null); + } + + /** Represents a LatencyCriteria. */ + class LatencyCriteria implements ILatencyCriteria { + + /** + * Constructs a new LatencyCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.BasicSli.ILatencyCriteria); + + /** LatencyCriteria threshold. */ + public threshold?: (google.protobuf.IDuration|null); + + /** + * Creates a new LatencyCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyCriteria instance + */ + public static create(properties?: google.monitoring.v3.BasicSli.ILatencyCriteria): google.monitoring.v3.BasicSli.LatencyCriteria; + + /** + * Encodes the specified LatencyCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * @param message LatencyCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.BasicSli.ILatencyCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * @param message LatencyCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.BasicSli.ILatencyCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli.LatencyCriteria; + + /** + * Decodes a LatencyCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli.LatencyCriteria; + + /** + * Verifies a LatencyCriteria message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyCriteria + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli.LatencyCriteria; + + /** + * Creates a plain object from a LatencyCriteria message. Also converts values to other types if specified. + * @param message LatencyCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.BasicSli.LatencyCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** 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.monitoring.v3.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.monitoring.v3.IRange): google.monitoring.v3.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestBasedSli. */ + interface IRequestBasedSli { + + /** RequestBasedSli goodTotalRatio */ + goodTotalRatio?: (google.monitoring.v3.ITimeSeriesRatio|null); + + /** RequestBasedSli distributionCut */ + distributionCut?: (google.monitoring.v3.IDistributionCut|null); + } + + /** Represents a RequestBasedSli. */ + class RequestBasedSli implements IRequestBasedSli { + + /** + * Constructs a new RequestBasedSli. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IRequestBasedSli); + + /** RequestBasedSli goodTotalRatio. */ + public goodTotalRatio?: (google.monitoring.v3.ITimeSeriesRatio|null); + + /** RequestBasedSli distributionCut. */ + public distributionCut?: (google.monitoring.v3.IDistributionCut|null); + + /** RequestBasedSli method. */ + public method?: ("goodTotalRatio"|"distributionCut"); + + /** + * Creates a new RequestBasedSli instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestBasedSli instance + */ + public static create(properties?: google.monitoring.v3.IRequestBasedSli): google.monitoring.v3.RequestBasedSli; + + /** + * Encodes the specified RequestBasedSli message. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * @param message RequestBasedSli message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IRequestBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * @param message RequestBasedSli message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IRequestBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestBasedSli message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.RequestBasedSli; + + /** + * Decodes a RequestBasedSli message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.RequestBasedSli; + + /** + * Verifies a RequestBasedSli message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestBasedSli message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestBasedSli + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.RequestBasedSli; + + /** + * Creates a plain object from a RequestBasedSli message. Also converts values to other types if specified. + * @param message RequestBasedSli + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.RequestBasedSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestBasedSli to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeSeriesRatio. */ + interface ITimeSeriesRatio { + + /** TimeSeriesRatio goodServiceFilter */ + goodServiceFilter?: (string|null); + + /** TimeSeriesRatio badServiceFilter */ + badServiceFilter?: (string|null); + + /** TimeSeriesRatio totalServiceFilter */ + totalServiceFilter?: (string|null); + } + + /** Represents a TimeSeriesRatio. */ + class TimeSeriesRatio implements ITimeSeriesRatio { + + /** + * Constructs a new TimeSeriesRatio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ITimeSeriesRatio); + + /** TimeSeriesRatio goodServiceFilter. */ + public goodServiceFilter: string; + + /** TimeSeriesRatio badServiceFilter. */ + public badServiceFilter: string; + + /** TimeSeriesRatio totalServiceFilter. */ + public totalServiceFilter: string; + + /** + * Creates a new TimeSeriesRatio instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesRatio instance + */ + public static create(properties?: google.monitoring.v3.ITimeSeriesRatio): google.monitoring.v3.TimeSeriesRatio; + + /** + * Encodes the specified TimeSeriesRatio message. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * @param message TimeSeriesRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ITimeSeriesRatio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesRatio message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * @param message TimeSeriesRatio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ITimeSeriesRatio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesRatio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesRatio; + + /** + * Decodes a TimeSeriesRatio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesRatio; + + /** + * Verifies a TimeSeriesRatio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesRatio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesRatio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesRatio; + + /** + * Creates a plain object from a TimeSeriesRatio message. Also converts values to other types if specified. + * @param message TimeSeriesRatio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TimeSeriesRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesRatio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DistributionCut. */ + interface IDistributionCut { + + /** DistributionCut distributionFilter */ + distributionFilter?: (string|null); + + /** DistributionCut range */ + range?: (google.monitoring.v3.IRange|null); + } + + /** Represents a DistributionCut. */ + class DistributionCut implements IDistributionCut { + + /** + * Constructs a new DistributionCut. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDistributionCut); + + /** DistributionCut distributionFilter. */ + public distributionFilter: string; + + /** DistributionCut range. */ + public range?: (google.monitoring.v3.IRange|null); + + /** + * Creates a new DistributionCut instance using the specified properties. + * @param [properties] Properties to set + * @returns DistributionCut instance + */ + public static create(properties?: google.monitoring.v3.IDistributionCut): google.monitoring.v3.DistributionCut; + + /** + * Encodes the specified DistributionCut message. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @param message DistributionCut message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDistributionCut, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DistributionCut message, length delimited. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @param message DistributionCut message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDistributionCut, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DistributionCut message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DistributionCut + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DistributionCut; + + /** + * Decodes a DistributionCut message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DistributionCut + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DistributionCut; + + /** + * Verifies a DistributionCut message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DistributionCut message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DistributionCut + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DistributionCut; + + /** + * Creates a plain object from a DistributionCut message. Also converts values to other types if specified. + * @param message DistributionCut + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DistributionCut, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DistributionCut to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WindowsBasedSli. */ + interface IWindowsBasedSli { + + /** WindowsBasedSli goodBadMetricFilter */ + goodBadMetricFilter?: (string|null); + + /** WindowsBasedSli goodTotalRatioThreshold */ + goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); + + /** WindowsBasedSli metricMeanInRange */ + metricMeanInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + + /** WindowsBasedSli metricSumInRange */ + metricSumInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + + /** WindowsBasedSli windowPeriod */ + windowPeriod?: (google.protobuf.IDuration|null); + } + + /** Represents a WindowsBasedSli. */ + class WindowsBasedSli implements IWindowsBasedSli { + + /** + * Constructs a new WindowsBasedSli. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IWindowsBasedSli); + + /** WindowsBasedSli goodBadMetricFilter. */ + public goodBadMetricFilter: string; + + /** WindowsBasedSli goodTotalRatioThreshold. */ + public goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); + + /** WindowsBasedSli metricMeanInRange. */ + public metricMeanInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + + /** WindowsBasedSli metricSumInRange. */ + public metricSumInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + + /** WindowsBasedSli windowPeriod. */ + public windowPeriod?: (google.protobuf.IDuration|null); + + /** WindowsBasedSli windowCriterion. */ + public windowCriterion?: ("goodBadMetricFilter"|"goodTotalRatioThreshold"|"metricMeanInRange"|"metricSumInRange"); + + /** + * Creates a new WindowsBasedSli instance using the specified properties. + * @param [properties] Properties to set + * @returns WindowsBasedSli instance + */ + public static create(properties?: google.monitoring.v3.IWindowsBasedSli): google.monitoring.v3.WindowsBasedSli; + + /** + * Encodes the specified WindowsBasedSli message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * @param message WindowsBasedSli message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IWindowsBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WindowsBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * @param message WindowsBasedSli message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IWindowsBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WindowsBasedSli message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WindowsBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli; + + /** + * Decodes a WindowsBasedSli message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WindowsBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli; + + /** + * Verifies a WindowsBasedSli message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WindowsBasedSli message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WindowsBasedSli + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli; + + /** + * Creates a plain object from a WindowsBasedSli message. Also converts values to other types if specified. + * @param message WindowsBasedSli + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.WindowsBasedSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WindowsBasedSli to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WindowsBasedSli { + + /** Properties of a PerformanceThreshold. */ + interface IPerformanceThreshold { + + /** PerformanceThreshold performance */ + performance?: (google.monitoring.v3.IRequestBasedSli|null); + + /** PerformanceThreshold basicSliPerformance */ + basicSliPerformance?: (google.monitoring.v3.IBasicSli|null); + + /** PerformanceThreshold threshold */ + threshold?: (number|null); + } + + /** Represents a PerformanceThreshold. */ + class PerformanceThreshold implements IPerformanceThreshold { + + /** + * Constructs a new PerformanceThreshold. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold); + + /** PerformanceThreshold performance. */ + public performance?: (google.monitoring.v3.IRequestBasedSli|null); + + /** PerformanceThreshold basicSliPerformance. */ + public basicSliPerformance?: (google.monitoring.v3.IBasicSli|null); + + /** PerformanceThreshold threshold. */ + public threshold: number; + + /** PerformanceThreshold type. */ + public type?: ("performance"|"basicSliPerformance"); + + /** + * Creates a new PerformanceThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns PerformanceThreshold instance + */ + public static create(properties?: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; + + /** + * Encodes the specified PerformanceThreshold message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. + * @param message PerformanceThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PerformanceThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. + * @param message PerformanceThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PerformanceThreshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PerformanceThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; + + /** + * Decodes a PerformanceThreshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PerformanceThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; + + /** + * Verifies a PerformanceThreshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PerformanceThreshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PerformanceThreshold + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; + + /** + * Creates a plain object from a PerformanceThreshold message. Also converts values to other types if specified. + * @param message PerformanceThreshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.WindowsBasedSli.PerformanceThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PerformanceThreshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MetricRange. */ + interface IMetricRange { + + /** MetricRange timeSeries */ + timeSeries?: (string|null); + + /** MetricRange range */ + range?: (google.monitoring.v3.IRange|null); + } + + /** Represents a MetricRange. */ + class MetricRange implements IMetricRange { + + /** + * Constructs a new MetricRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.WindowsBasedSli.IMetricRange); + + /** MetricRange timeSeries. */ + public timeSeries: string; + + /** MetricRange range. */ + public range?: (google.monitoring.v3.IRange|null); + + /** + * Creates a new MetricRange instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricRange instance + */ + public static create(properties?: google.monitoring.v3.WindowsBasedSli.IMetricRange): google.monitoring.v3.WindowsBasedSli.MetricRange; + + /** + * Encodes the specified MetricRange message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. + * @param message MetricRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.WindowsBasedSli.IMetricRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricRange message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. + * @param message MetricRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.WindowsBasedSli.IMetricRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli.MetricRange; + + /** + * Decodes a MetricRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli.MetricRange; + + /** + * Verifies a MetricRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricRange + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli.MetricRange; + + /** + * Creates a plain object from a MetricRange message. Also converts values to other types if specified. + * @param message MetricRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.WindowsBasedSli.MetricRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Represents an UptimeCheckService */ class UptimeCheckService extends $protobuf.rpc.Service { @@ -14831,4 +18081,20 @@ export namespace google { public toJSON(): { [k: string]: any }; } } + + /** Namespace type. */ + namespace type { + + /** CalendarPeriod enum. */ + enum CalendarPeriod { + CALENDAR_PERIOD_UNSPECIFIED = 0, + DAY = 1, + WEEK = 2, + FORTNIGHT = 3, + MONTH = 4, + QUARTER = 5, + HALF = 6, + YEAR = 7 + } + } } diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index fba4a68cd2a..bfd444d1eec 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -15051,6 +15051,7550 @@ return NotificationChannel; })(); + v3.ServiceMonitoringService = (function() { + + /** + * Constructs a new ServiceMonitoringService service. + * @memberof google.monitoring.v3 + * @classdesc Represents a ServiceMonitoringService + * @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 ServiceMonitoringService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ServiceMonitoringService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ServiceMonitoringService; + + /** + * Creates new ServiceMonitoringService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.ServiceMonitoringService + * @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 {ServiceMonitoringService} RPC service. Useful where requests and/or responses are streamed. + */ + ServiceMonitoringService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef CreateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Service} [response] Service + */ + + /** + * Calls CreateService. + * @function createService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.CreateServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.createService = function createService(request, callback) { + return this.rpcCall(createService, $root.google.monitoring.v3.CreateServiceRequest, $root.google.monitoring.v3.Service, request, callback); + }, "name", { value: "CreateService" }); + + /** + * Calls CreateService. + * @function createService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef GetServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Service} [response] Service + */ + + /** + * Calls GetService. + * @function getService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceRequest} request GetServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.GetServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.getService = function getService(request, callback) { + return this.rpcCall(getService, $root.google.monitoring.v3.GetServiceRequest, $root.google.monitoring.v3.Service, request, callback); + }, "name", { value: "GetService" }); + + /** + * Calls GetService. + * @function getService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceRequest} request GetServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef ListServicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListServicesResponse} [response] ListServicesResponse + */ + + /** + * Calls ListServices. + * @function listServices + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServicesRequest} request ListServicesRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.listServices = function listServices(request, callback) { + return this.rpcCall(listServices, $root.google.monitoring.v3.ListServicesRequest, $root.google.monitoring.v3.ListServicesResponse, request, callback); + }, "name", { value: "ListServices" }); + + /** + * Calls ListServices. + * @function listServices + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServicesRequest} request ListServicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef UpdateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Service} [response] Service + */ + + /** + * Calls UpdateService. + * @function updateService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.updateService = function updateService(request, callback) { + return this.rpcCall(updateService, $root.google.monitoring.v3.UpdateServiceRequest, $root.google.monitoring.v3.Service, request, callback); + }, "name", { value: "UpdateService" }); + + /** + * Calls UpdateService. + * @function updateService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef DeleteServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.deleteService = function deleteService(request, callback) { + return this.rpcCall(deleteService, $root.google.monitoring.v3.DeleteServiceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteService" }); + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef CreateServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + */ + + /** + * Calls CreateServiceLevelObjective. + * @function createServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} request CreateServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.CreateServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.createServiceLevelObjective = function createServiceLevelObjective(request, callback) { + return this.rpcCall(createServiceLevelObjective, $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); + }, "name", { value: "CreateServiceLevelObjective" }); + + /** + * Calls CreateServiceLevelObjective. + * @function createServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} request CreateServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef GetServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + */ + + /** + * Calls GetServiceLevelObjective. + * @function getServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} request GetServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.getServiceLevelObjective = function getServiceLevelObjective(request, callback) { + return this.rpcCall(getServiceLevelObjective, $root.google.monitoring.v3.GetServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); + }, "name", { value: "GetServiceLevelObjective" }); + + /** + * Calls GetServiceLevelObjective. + * @function getServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} request GetServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef ListServiceLevelObjectivesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListServiceLevelObjectivesResponse} [response] ListServiceLevelObjectivesResponse + */ + + /** + * Calls ListServiceLevelObjectives. + * @function listServiceLevelObjectives + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} request ListServiceLevelObjectivesRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectivesCallback} callback Node-style callback called with the error, if any, and ListServiceLevelObjectivesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.listServiceLevelObjectives = function listServiceLevelObjectives(request, callback) { + return this.rpcCall(listServiceLevelObjectives, $root.google.monitoring.v3.ListServiceLevelObjectivesRequest, $root.google.monitoring.v3.ListServiceLevelObjectivesResponse, request, callback); + }, "name", { value: "ListServiceLevelObjectives" }); + + /** + * Calls ListServiceLevelObjectives. + * @function listServiceLevelObjectives + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} request ListServiceLevelObjectivesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef UpdateServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + */ + + /** + * Calls UpdateServiceLevelObjective. + * @function updateServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} request UpdateServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.UpdateServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.updateServiceLevelObjective = function updateServiceLevelObjective(request, callback) { + return this.rpcCall(updateServiceLevelObjective, $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); + }, "name", { value: "UpdateServiceLevelObjective" }); + + /** + * Calls UpdateServiceLevelObjective. + * @function updateServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} request UpdateServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef DeleteServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteServiceLevelObjective. + * @function deleteServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} request DeleteServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.DeleteServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.deleteServiceLevelObjective = function deleteServiceLevelObjective(request, callback) { + return this.rpcCall(deleteServiceLevelObjective, $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteServiceLevelObjective" }); + + /** + * Calls DeleteServiceLevelObjective. + * @function deleteServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} request DeleteServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ServiceMonitoringService; + })(); + + v3.CreateServiceRequest = (function() { + + /** + * Properties of a CreateServiceRequest. + * @memberof google.monitoring.v3 + * @interface ICreateServiceRequest + * @property {string|null} [parent] CreateServiceRequest parent + * @property {string|null} [serviceId] CreateServiceRequest serviceId + * @property {google.monitoring.v3.IService|null} [service] CreateServiceRequest service + */ + + /** + * Constructs a new CreateServiceRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateServiceRequest. + * @implements ICreateServiceRequest + * @constructor + * @param {google.monitoring.v3.ICreateServiceRequest=} [properties] Properties to set + */ + function CreateServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServiceRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.parent = ""; + + /** + * CreateServiceRequest serviceId. + * @member {string} serviceId + * @memberof google.monitoring.v3.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.serviceId = ""; + + /** + * CreateServiceRequest service. + * @member {google.monitoring.v3.IService|null|undefined} service + * @memberof google.monitoring.v3.CreateServiceRequest + * @instance + */ + CreateServiceRequest.prototype.service = null; + + /** + * Creates a new CreateServiceRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {google.monitoring.v3.ICreateServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest instance + */ + CreateServiceRequest.create = function create(properties) { + return new CreateServiceRequest(properties); + }; + + /** + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {google.monitoring.v3.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRequest.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.service != null && message.hasOwnProperty("service")) + $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceId); + return writer; + }; + + /** + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {google.monitoring.v3.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.serviceId = reader.string(); + break; + case 2: + message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServiceRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServiceRequest.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.serviceId != null && message.hasOwnProperty("serviceId")) + if (!$util.isString(message.serviceId)) + return "serviceId: string expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.monitoring.v3.Service.verify(message.service); + if (error) + return "service." + error; + } + return null; + }; + + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest + */ + CreateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateServiceRequest) + return object; + var message = new $root.google.monitoring.v3.CreateServiceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.serviceId != null) + message.serviceId = String(object.serviceId); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.monitoring.v3.CreateServiceRequest.service: object expected"); + message.service = $root.google.monitoring.v3.Service.fromObject(object.service); + } + return message; + }; + + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {google.monitoring.v3.CreateServiceRequest} message CreateServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.service = null; + object.serviceId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.monitoring.v3.Service.toObject(message.service, options); + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + object.serviceId = message.serviceId; + return object; + }; + + /** + * Converts this CreateServiceRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateServiceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateServiceRequest; + })(); + + v3.GetServiceRequest = (function() { + + /** + * Properties of a GetServiceRequest. + * @memberof google.monitoring.v3 + * @interface IGetServiceRequest + * @property {string|null} [name] GetServiceRequest name + */ + + /** + * Constructs a new GetServiceRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetServiceRequest. + * @implements IGetServiceRequest + * @constructor + * @param {google.monitoring.v3.IGetServiceRequest=} [properties] Properties to set + */ + function GetServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServiceRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetServiceRequest + * @instance + */ + GetServiceRequest.prototype.name = ""; + + /** + * Creates a new GetServiceRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {google.monitoring.v3.IGetServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest instance + */ + GetServiceRequest.create = function create(properties) { + return new GetServiceRequest(properties); + }; + + /** + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {google.monitoring.v3.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRequest.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 GetServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {google.monitoring.v3.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetServiceRequest(); + 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 GetServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServiceRequest message. + * @function verify + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServiceRequest.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 GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest + */ + GetServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetServiceRequest) + return object; + var message = new $root.google.monitoring.v3.GetServiceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {google.monitoring.v3.GetServiceRequest} message GetServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServiceRequest.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 GetServiceRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetServiceRequest + * @instance + * @returns {Object.} JSON object + */ + GetServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetServiceRequest; + })(); + + v3.ListServicesRequest = (function() { + + /** + * Properties of a ListServicesRequest. + * @memberof google.monitoring.v3 + * @interface IListServicesRequest + * @property {string|null} [parent] ListServicesRequest parent + * @property {string|null} [filter] ListServicesRequest filter + * @property {number|null} [pageSize] ListServicesRequest pageSize + * @property {string|null} [pageToken] ListServicesRequest pageToken + */ + + /** + * Constructs a new ListServicesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListServicesRequest. + * @implements IListServicesRequest + * @constructor + * @param {google.monitoring.v3.IListServicesRequest=} [properties] Properties to set + */ + function ListServicesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServicesRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.parent = ""; + + /** + * ListServicesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.filter = ""; + + /** + * ListServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageSize = 0; + + /** + * ListServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListServicesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {google.monitoring.v3.IListServicesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest instance + */ + ListServicesRequest.create = function create(properties) { + return new ListServicesRequest(properties); + }; + + /** + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {google.monitoring.v3.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesRequest.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.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {google.monitoring.v3.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServicesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesRequest message. + * @function verify + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesRequest.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.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 ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest + */ + ListServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServicesRequest) + return object; + var message = new $root.google.monitoring.v3.ListServicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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; + }; + + /** + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {google.monitoring.v3.ListServicesRequest} message ListServicesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; + return object; + }; + + /** + * Converts this ListServicesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + * @returns {Object.} JSON object + */ + ListServicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServicesRequest; + })(); + + v3.ListServicesResponse = (function() { + + /** + * Properties of a ListServicesResponse. + * @memberof google.monitoring.v3 + * @interface IListServicesResponse + * @property {Array.|null} [services] ListServicesResponse services + * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken + */ + + /** + * Constructs a new ListServicesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListServicesResponse. + * @implements IListServicesResponse + * @constructor + * @param {google.monitoring.v3.IListServicesResponse=} [properties] Properties to set + */ + function ListServicesResponse(properties) { + this.services = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServicesResponse services. + * @member {Array.} services + * @memberof google.monitoring.v3.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.services = $util.emptyArray; + + /** + * ListServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListServicesResponse + * @instance + */ + ListServicesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListServicesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.IListServicesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse instance + */ + ListServicesResponse.create = function create(properties) { + return new ListServicesResponse(properties); + }; + + /** + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.services != null && message.services.length) + for (var i = 0; i < message.services.length; ++i) + $root.google.monitoring.v3.Service.encode(message.services[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 ListServicesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.monitoring.v3.Service.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesResponse message. + * @function verify + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.services != null && message.hasOwnProperty("services")) { + if (!Array.isArray(message.services)) + return "services: array expected"; + for (var i = 0; i < message.services.length; ++i) { + var error = $root.google.monitoring.v3.Service.verify(message.services[i]); + if (error) + return "services." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + */ + ListServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServicesResponse) + return object; + var message = new $root.google.monitoring.v3.ListServicesResponse(); + if (object.services) { + if (!Array.isArray(object.services)) + throw TypeError(".google.monitoring.v3.ListServicesResponse.services: array expected"); + message.services = []; + for (var i = 0; i < object.services.length; ++i) { + if (typeof object.services[i] !== "object") + throw TypeError(".google.monitoring.v3.ListServicesResponse.services: object expected"); + message.services[i] = $root.google.monitoring.v3.Service.fromObject(object.services[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.ListServicesResponse} message ListServicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.services = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.services && message.services.length) { + object.services = []; + for (var j = 0; j < message.services.length; ++j) + object.services[j] = $root.google.monitoring.v3.Service.toObject(message.services[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServicesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListServicesResponse + * @instance + * @returns {Object.} JSON object + */ + ListServicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServicesResponse; + })(); + + v3.UpdateServiceRequest = (function() { + + /** + * Properties of an UpdateServiceRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateServiceRequest + * @property {google.monitoring.v3.IService|null} [service] UpdateServiceRequest service + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask + */ + + /** + * Constructs a new UpdateServiceRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateServiceRequest. + * @implements IUpdateServiceRequest + * @constructor + * @param {google.monitoring.v3.IUpdateServiceRequest=} [properties] Properties to set + */ + function UpdateServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateServiceRequest service. + * @member {google.monitoring.v3.IService|null|undefined} service + * @memberof google.monitoring.v3.UpdateServiceRequest + * @instance + */ + UpdateServiceRequest.prototype.service = null; + + /** + * UpdateServiceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateServiceRequest + * @instance + */ + UpdateServiceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateServiceRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {google.monitoring.v3.IUpdateServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest instance + */ + UpdateServiceRequest.create = function create(properties) { + return new UpdateServiceRequest(properties); + }; + + /** + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {google.monitoring.v3.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && message.hasOwnProperty("service")) + $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {google.monitoring.v3.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateServiceRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.monitoring.v3.Service.verify(message.service); + if (error) + return "service." + 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 UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest + */ + UpdateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateServiceRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateServiceRequest(); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceRequest.service: object expected"); + message.service = $root.google.monitoring.v3.Service.fromObject(object.service); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {google.monitoring.v3.UpdateServiceRequest} message UpdateServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.service = null; + object.updateMask = null; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.monitoring.v3.Service.toObject(message.service, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateServiceRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateServiceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateServiceRequest; + })(); + + v3.DeleteServiceRequest = (function() { + + /** + * Properties of a DeleteServiceRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteServiceRequest + * @property {string|null} [name] DeleteServiceRequest name + */ + + /** + * Constructs a new DeleteServiceRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteServiceRequest. + * @implements IDeleteServiceRequest + * @constructor + * @param {google.monitoring.v3.IDeleteServiceRequest=} [properties] Properties to set + */ + function DeleteServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteServiceRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteServiceRequest + * @instance + */ + DeleteServiceRequest.prototype.name = ""; + + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest instance + */ + DeleteServiceRequest.create = function create(properties) { + return new DeleteServiceRequest(properties); + }; + + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.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 DeleteServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteServiceRequest(); + 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 DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteServiceRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServiceRequest.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 DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest + */ + DeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteServiceRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteServiceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.DeleteServiceRequest} message DeleteServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServiceRequest.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 DeleteServiceRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteServiceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteServiceRequest; + })(); + + v3.CreateServiceLevelObjectiveRequest = (function() { + + /** + * Properties of a CreateServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @interface ICreateServiceLevelObjectiveRequest + * @property {string|null} [parent] CreateServiceLevelObjectiveRequest parent + * @property {string|null} [serviceLevelObjectiveId] CreateServiceLevelObjectiveRequest serviceLevelObjectiveId + * @property {google.monitoring.v3.IServiceLevelObjective|null} [serviceLevelObjective] CreateServiceLevelObjectiveRequest serviceLevelObjective + */ + + /** + * Constructs a new CreateServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateServiceLevelObjectiveRequest. + * @implements ICreateServiceLevelObjectiveRequest + * @constructor + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest=} [properties] Properties to set + */ + function CreateServiceLevelObjectiveRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServiceLevelObjectiveRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + */ + CreateServiceLevelObjectiveRequest.prototype.parent = ""; + + /** + * CreateServiceLevelObjectiveRequest serviceLevelObjectiveId. + * @member {string} serviceLevelObjectiveId + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + */ + CreateServiceLevelObjectiveRequest.prototype.serviceLevelObjectiveId = ""; + + /** + * CreateServiceLevelObjectiveRequest serviceLevelObjective. + * @member {google.monitoring.v3.IServiceLevelObjective|null|undefined} serviceLevelObjective + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + */ + CreateServiceLevelObjectiveRequest.prototype.serviceLevelObjective = null; + + /** + * Creates a new CreateServiceLevelObjectiveRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest instance + */ + CreateServiceLevelObjectiveRequest.create = function create(properties) { + return new CreateServiceLevelObjectiveRequest(properties); + }; + + /** + * Encodes the specified CreateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceLevelObjectiveRequest.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.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceLevelObjectiveId); + return writer; + }; + + /** + * Encodes the specified CreateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceLevelObjectiveRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.serviceLevelObjectiveId = reader.string(); + break; + case 2: + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServiceLevelObjectiveRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServiceLevelObjectiveRequest.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.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + if (!$util.isString(message.serviceLevelObjectiveId)) + return "serviceLevelObjectiveId: string expected"; + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) { + var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjective); + if (error) + return "serviceLevelObjective." + error; + } + return null; + }; + + /** + * Creates a CreateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest + */ + CreateServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest) + return object; + var message = new $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.serviceLevelObjectiveId != null) + message.serviceLevelObjectiveId = String(object.serviceLevelObjectiveId); + if (object.serviceLevelObjective != null) { + if (typeof object.serviceLevelObjective !== "object") + throw TypeError(".google.monitoring.v3.CreateServiceLevelObjectiveRequest.serviceLevelObjective: object expected"); + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjective); + } + return message; + }; + + /** + * Creates a plain object from a CreateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.CreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServiceLevelObjectiveRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.serviceLevelObjective = null; + object.serviceLevelObjectiveId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + object.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjective, options); + if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + object.serviceLevelObjectiveId = message.serviceLevelObjectiveId; + return object; + }; + + /** + * Converts this CreateServiceLevelObjectiveRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateServiceLevelObjectiveRequest; + })(); + + v3.GetServiceLevelObjectiveRequest = (function() { + + /** + * Properties of a GetServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @interface IGetServiceLevelObjectiveRequest + * @property {string|null} [name] GetServiceLevelObjectiveRequest name + * @property {google.monitoring.v3.ServiceLevelObjective.View|null} [view] GetServiceLevelObjectiveRequest view + */ + + /** + * Constructs a new GetServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetServiceLevelObjectiveRequest. + * @implements IGetServiceLevelObjectiveRequest + * @constructor + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest=} [properties] Properties to set + */ + function GetServiceLevelObjectiveRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServiceLevelObjectiveRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @instance + */ + GetServiceLevelObjectiveRequest.prototype.name = ""; + + /** + * GetServiceLevelObjectiveRequest view. + * @member {google.monitoring.v3.ServiceLevelObjective.View} view + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @instance + */ + GetServiceLevelObjectiveRequest.prototype.view = 0; + + /** + * Creates a new GetServiceLevelObjectiveRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest instance + */ + GetServiceLevelObjectiveRequest.create = function create(properties) { + return new GetServiceLevelObjectiveRequest(properties); + }; + + /** + * Encodes the specified GetServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceLevelObjectiveRequest.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.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceLevelObjectiveRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetServiceLevelObjectiveRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServiceLevelObjectiveRequest message. + * @function verify + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServiceLevelObjectiveRequest.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")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 2: + case 1: + break; + } + return null; + }; + + /** + * Creates a GetServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest + */ + GetServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetServiceLevelObjectiveRequest) + return object; + var message = new $root.google.monitoring.v3.GetServiceLevelObjectiveRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "EXPLICIT": + case 1: + message.view = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.GetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServiceLevelObjectiveRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; + return object; + }; + + /** + * Converts this GetServiceLevelObjectiveRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @instance + * @returns {Object.} JSON object + */ + GetServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetServiceLevelObjectiveRequest; + })(); + + v3.ListServiceLevelObjectivesRequest = (function() { + + /** + * Properties of a ListServiceLevelObjectivesRequest. + * @memberof google.monitoring.v3 + * @interface IListServiceLevelObjectivesRequest + * @property {string|null} [parent] ListServiceLevelObjectivesRequest parent + * @property {string|null} [filter] ListServiceLevelObjectivesRequest filter + * @property {number|null} [pageSize] ListServiceLevelObjectivesRequest pageSize + * @property {string|null} [pageToken] ListServiceLevelObjectivesRequest pageToken + * @property {google.monitoring.v3.ServiceLevelObjective.View|null} [view] ListServiceLevelObjectivesRequest view + */ + + /** + * Constructs a new ListServiceLevelObjectivesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListServiceLevelObjectivesRequest. + * @implements IListServiceLevelObjectivesRequest + * @constructor + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest=} [properties] Properties to set + */ + function ListServiceLevelObjectivesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServiceLevelObjectivesRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.parent = ""; + + /** + * ListServiceLevelObjectivesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.filter = ""; + + /** + * ListServiceLevelObjectivesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.pageSize = 0; + + /** + * ListServiceLevelObjectivesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.pageToken = ""; + + /** + * ListServiceLevelObjectivesRequest view. + * @member {google.monitoring.v3.ServiceLevelObjective.View} view + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.view = 0; + + /** + * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest instance + */ + ListServiceLevelObjectivesRequest.create = function create(properties) { + return new ListServiceLevelObjectivesRequest(properties); + }; + + /** + * Encodes the specified ListServiceLevelObjectivesRequest message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceLevelObjectivesRequest.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.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListServiceLevelObjectivesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceLevelObjectivesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceLevelObjectivesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServiceLevelObjectivesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.view = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceLevelObjectivesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServiceLevelObjectivesRequest message. + * @function verify + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServiceLevelObjectivesRequest.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.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 2: + case 1: + break; + } + return null; + }; + + /** + * Creates a ListServiceLevelObjectivesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest + */ + ListServiceLevelObjectivesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServiceLevelObjectivesRequest) + return object; + var message = new $root.google.monitoring.v3.ListServiceLevelObjectivesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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); + switch (object.view) { + case "VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "EXPLICIT": + case 1: + message.view = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListServiceLevelObjectivesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {google.monitoring.v3.ListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServiceLevelObjectivesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; + return object; + }; + + /** + * Converts this ListServiceLevelObjectivesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + * @returns {Object.} JSON object + */ + ListServiceLevelObjectivesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServiceLevelObjectivesRequest; + })(); + + v3.ListServiceLevelObjectivesResponse = (function() { + + /** + * Properties of a ListServiceLevelObjectivesResponse. + * @memberof google.monitoring.v3 + * @interface IListServiceLevelObjectivesResponse + * @property {Array.|null} [serviceLevelObjectives] ListServiceLevelObjectivesResponse serviceLevelObjectives + * @property {string|null} [nextPageToken] ListServiceLevelObjectivesResponse nextPageToken + */ + + /** + * Constructs a new ListServiceLevelObjectivesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListServiceLevelObjectivesResponse. + * @implements IListServiceLevelObjectivesResponse + * @constructor + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse=} [properties] Properties to set + */ + function ListServiceLevelObjectivesResponse(properties) { + this.serviceLevelObjectives = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServiceLevelObjectivesResponse serviceLevelObjectives. + * @member {Array.} serviceLevelObjectives + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @instance + */ + ListServiceLevelObjectivesResponse.prototype.serviceLevelObjectives = $util.emptyArray; + + /** + * ListServiceLevelObjectivesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @instance + */ + ListServiceLevelObjectivesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListServiceLevelObjectivesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse instance + */ + ListServiceLevelObjectivesResponse.create = function create(properties) { + return new ListServiceLevelObjectivesResponse(properties); + }; + + /** + * Encodes the specified ListServiceLevelObjectivesResponse message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceLevelObjectivesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceLevelObjectives != null && message.serviceLevelObjectives.length) + for (var i = 0; i < message.serviceLevelObjectives.length; ++i) + $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjectives[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 ListServiceLevelObjectivesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServiceLevelObjectivesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceLevelObjectivesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServiceLevelObjectivesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.serviceLevelObjectives && message.serviceLevelObjectives.length)) + message.serviceLevelObjectives = []; + message.serviceLevelObjectives.push($root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServiceLevelObjectivesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServiceLevelObjectivesResponse message. + * @function verify + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServiceLevelObjectivesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceLevelObjectives != null && message.hasOwnProperty("serviceLevelObjectives")) { + if (!Array.isArray(message.serviceLevelObjectives)) + return "serviceLevelObjectives: array expected"; + for (var i = 0; i < message.serviceLevelObjectives.length; ++i) { + var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjectives[i]); + if (error) + return "serviceLevelObjectives." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServiceLevelObjectivesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse + */ + ListServiceLevelObjectivesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServiceLevelObjectivesResponse) + return object; + var message = new $root.google.monitoring.v3.ListServiceLevelObjectivesResponse(); + if (object.serviceLevelObjectives) { + if (!Array.isArray(object.serviceLevelObjectives)) + throw TypeError(".google.monitoring.v3.ListServiceLevelObjectivesResponse.serviceLevelObjectives: array expected"); + message.serviceLevelObjectives = []; + for (var i = 0; i < object.serviceLevelObjectives.length; ++i) { + if (typeof object.serviceLevelObjectives[i] !== "object") + throw TypeError(".google.monitoring.v3.ListServiceLevelObjectivesResponse.serviceLevelObjectives: object expected"); + message.serviceLevelObjectives[i] = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjectives[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServiceLevelObjectivesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {google.monitoring.v3.ListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServiceLevelObjectivesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.serviceLevelObjectives = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.serviceLevelObjectives && message.serviceLevelObjectives.length) { + object.serviceLevelObjectives = []; + for (var j = 0; j < message.serviceLevelObjectives.length; ++j) + object.serviceLevelObjectives[j] = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjectives[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServiceLevelObjectivesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @instance + * @returns {Object.} JSON object + */ + ListServiceLevelObjectivesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListServiceLevelObjectivesResponse; + })(); + + v3.UpdateServiceLevelObjectiveRequest = (function() { + + /** + * Properties of an UpdateServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateServiceLevelObjectiveRequest + * @property {google.monitoring.v3.IServiceLevelObjective|null} [serviceLevelObjective] UpdateServiceLevelObjectiveRequest serviceLevelObjective + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceLevelObjectiveRequest updateMask + */ + + /** + * Constructs a new UpdateServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateServiceLevelObjectiveRequest. + * @implements IUpdateServiceLevelObjectiveRequest + * @constructor + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest=} [properties] Properties to set + */ + function UpdateServiceLevelObjectiveRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateServiceLevelObjectiveRequest serviceLevelObjective. + * @member {google.monitoring.v3.IServiceLevelObjective|null|undefined} serviceLevelObjective + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @instance + */ + UpdateServiceLevelObjectiveRequest.prototype.serviceLevelObjective = null; + + /** + * UpdateServiceLevelObjectiveRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @instance + */ + UpdateServiceLevelObjectiveRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateServiceLevelObjectiveRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest instance + */ + UpdateServiceLevelObjectiveRequest.create = function create(properties) { + return new UpdateServiceLevelObjectiveRequest(properties); + }; + + /** + * Encodes the specified UpdateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServiceLevelObjectiveRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServiceLevelObjectiveRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateServiceLevelObjectiveRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateServiceLevelObjectiveRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) { + var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjective); + if (error) + return "serviceLevelObjective." + 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 UpdateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest + */ + UpdateServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest(); + if (object.serviceLevelObjective != null) { + if (typeof object.serviceLevelObjective !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceLevelObjectiveRequest.serviceLevelObjective: object expected"); + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjective); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceLevelObjectiveRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateServiceLevelObjectiveRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceLevelObjective = null; + object.updateMask = null; + } + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + object.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjective, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateServiceLevelObjectiveRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateServiceLevelObjectiveRequest; + })(); + + v3.DeleteServiceLevelObjectiveRequest = (function() { + + /** + * Properties of a DeleteServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteServiceLevelObjectiveRequest + * @property {string|null} [name] DeleteServiceLevelObjectiveRequest name + */ + + /** + * Constructs a new DeleteServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteServiceLevelObjectiveRequest. + * @implements IDeleteServiceLevelObjectiveRequest + * @constructor + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest=} [properties] Properties to set + */ + function DeleteServiceLevelObjectiveRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteServiceLevelObjectiveRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @instance + */ + DeleteServiceLevelObjectiveRequest.prototype.name = ""; + + /** + * Creates a new DeleteServiceLevelObjectiveRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest instance + */ + DeleteServiceLevelObjectiveRequest.create = function create(properties) { + return new DeleteServiceLevelObjectiveRequest(properties); + }; + + /** + * Encodes the specified DeleteServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceLevelObjectiveRequest.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 DeleteServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceLevelObjectiveRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest(); + 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 DeleteServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteServiceLevelObjectiveRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServiceLevelObjectiveRequest.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 DeleteServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest + */ + DeleteServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServiceLevelObjectiveRequest.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 DeleteServiceLevelObjectiveRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteServiceLevelObjectiveRequest; + })(); + + v3.Service = (function() { + + /** + * Properties of a Service. + * @memberof google.monitoring.v3 + * @interface IService + * @property {string|null} [name] Service name + * @property {string|null} [displayName] Service displayName + * @property {google.monitoring.v3.Service.ICustom|null} [custom] Service custom + * @property {google.monitoring.v3.Service.IAppEngine|null} [appEngine] Service appEngine + * @property {google.monitoring.v3.Service.ICloudEndpoints|null} [cloudEndpoints] Service cloudEndpoints + * @property {google.monitoring.v3.Service.IClusterIstio|null} [clusterIstio] Service clusterIstio + * @property {google.monitoring.v3.Service.ITelemetry|null} [telemetry] Service telemetry + */ + + /** + * Constructs a new Service. + * @memberof google.monitoring.v3 + * @classdesc Represents a Service. + * @implements IService + * @constructor + * @param {google.monitoring.v3.IService=} [properties] Properties to set + */ + function Service(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Service name. + * @member {string} name + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.name = ""; + + /** + * Service displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.displayName = ""; + + /** + * Service custom. + * @member {google.monitoring.v3.Service.ICustom|null|undefined} custom + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.custom = null; + + /** + * Service appEngine. + * @member {google.monitoring.v3.Service.IAppEngine|null|undefined} appEngine + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.appEngine = null; + + /** + * Service cloudEndpoints. + * @member {google.monitoring.v3.Service.ICloudEndpoints|null|undefined} cloudEndpoints + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.cloudEndpoints = null; + + /** + * Service clusterIstio. + * @member {google.monitoring.v3.Service.IClusterIstio|null|undefined} clusterIstio + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.clusterIstio = null; + + /** + * Service telemetry. + * @member {google.monitoring.v3.Service.ITelemetry|null|undefined} telemetry + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.telemetry = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Service identifier. + * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|undefined} identifier + * @memberof google.monitoring.v3.Service + * @instance + */ + Object.defineProperty(Service.prototype, "identifier", { + get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Service instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service + * @static + * @param {google.monitoring.v3.IService=} [properties] Properties to set + * @returns {google.monitoring.v3.Service} Service instance + */ + Service.create = function create(properties) { + return new Service(properties); + }; + + /** + * Encodes the specified Service message. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service + * @static + * @param {google.monitoring.v3.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.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.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.monitoring.v3.Service.Custom.encode(message.custom, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.appEngine != null && message.hasOwnProperty("appEngine")) + $root.google.monitoring.v3.Service.AppEngine.encode(message.appEngine, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) + $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) + $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.telemetry != null && message.hasOwnProperty("telemetry")) + $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service + * @static + * @param {google.monitoring.v3.IService} message Service message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Service.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Service message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 6: + message.custom = $root.google.monitoring.v3.Service.Custom.decode(reader, reader.uint32()); + break; + case 7: + message.appEngine = $root.google.monitoring.v3.Service.AppEngine.decode(reader, reader.uint32()); + break; + case 8: + message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.decode(reader, reader.uint32()); + break; + case 9: + message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.decode(reader, reader.uint32()); + break; + case 13: + message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Service message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service} Service + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Service.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Service message. + * @function verify + * @memberof google.monitoring.v3.Service + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Service.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.custom != null && message.hasOwnProperty("custom")) { + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.Custom.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.appEngine != null && message.hasOwnProperty("appEngine")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.AppEngine.verify(message.appEngine); + if (error) + return "appEngine." + error; + } + } + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.CloudEndpoints.verify(message.cloudEndpoints); + if (error) + return "cloudEndpoints." + error; + } + } + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.ClusterIstio.verify(message.clusterIstio); + if (error) + return "clusterIstio." + error; + } + } + if (message.telemetry != null && message.hasOwnProperty("telemetry")) { + var error = $root.google.monitoring.v3.Service.Telemetry.verify(message.telemetry); + if (error) + return "telemetry." + error; + } + return null; + }; + + /** + * Creates a Service message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service} Service + */ + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service) + return object; + var message = new $root.google.monitoring.v3.Service(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.monitoring.v3.Service.custom: object expected"); + message.custom = $root.google.monitoring.v3.Service.Custom.fromObject(object.custom); + } + if (object.appEngine != null) { + if (typeof object.appEngine !== "object") + throw TypeError(".google.monitoring.v3.Service.appEngine: object expected"); + message.appEngine = $root.google.monitoring.v3.Service.AppEngine.fromObject(object.appEngine); + } + if (object.cloudEndpoints != null) { + if (typeof object.cloudEndpoints !== "object") + throw TypeError(".google.monitoring.v3.Service.cloudEndpoints: object expected"); + message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.fromObject(object.cloudEndpoints); + } + if (object.clusterIstio != null) { + if (typeof object.clusterIstio !== "object") + throw TypeError(".google.monitoring.v3.Service.clusterIstio: object expected"); + message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.fromObject(object.clusterIstio); + } + if (object.telemetry != null) { + if (typeof object.telemetry !== "object") + throw TypeError(".google.monitoring.v3.Service.telemetry: object expected"); + message.telemetry = $root.google.monitoring.v3.Service.Telemetry.fromObject(object.telemetry); + } + return message; + }; + + /** + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service + * @static + * @param {google.monitoring.v3.Service} message Service + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Service.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.telemetry = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.monitoring.v3.Service.Custom.toObject(message.custom, options); + if (options.oneofs) + object.identifier = "custom"; + } + if (message.appEngine != null && message.hasOwnProperty("appEngine")) { + object.appEngine = $root.google.monitoring.v3.Service.AppEngine.toObject(message.appEngine, options); + if (options.oneofs) + object.identifier = "appEngine"; + } + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) { + object.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.toObject(message.cloudEndpoints, options); + if (options.oneofs) + object.identifier = "cloudEndpoints"; + } + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) { + object.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.toObject(message.clusterIstio, options); + if (options.oneofs) + object.identifier = "clusterIstio"; + } + if (message.telemetry != null && message.hasOwnProperty("telemetry")) + object.telemetry = $root.google.monitoring.v3.Service.Telemetry.toObject(message.telemetry, options); + return object; + }; + + /** + * Converts this Service to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service + * @instance + * @returns {Object.} JSON object + */ + Service.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Service.Custom = (function() { + + /** + * Properties of a Custom. + * @memberof google.monitoring.v3.Service + * @interface ICustom + */ + + /** + * Constructs a new Custom. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a Custom. + * @implements ICustom + * @constructor + * @param {google.monitoring.v3.Service.ICustom=} [properties] Properties to set + */ + function Custom(properties) { + if (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 Custom instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.ICustom=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.Custom} Custom instance + */ + Custom.create = function create(properties) { + return new Custom(properties); + }; + + /** + * Encodes the specified Custom message. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.ICustom} message Custom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Custom.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Custom message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.ICustom} message Custom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Custom.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Custom message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.Custom} Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Custom.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.Custom(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Custom message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.Custom} Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Custom.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Custom message. + * @function verify + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Custom.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Custom message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.Custom} Custom + */ + Custom.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.Custom) + return object; + return new $root.google.monitoring.v3.Service.Custom(); + }; + + /** + * Creates a plain object from a Custom message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.Custom} message Custom + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Custom.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Custom to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.Custom + * @instance + * @returns {Object.} JSON object + */ + Custom.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Custom; + })(); + + Service.AppEngine = (function() { + + /** + * Properties of an AppEngine. + * @memberof google.monitoring.v3.Service + * @interface IAppEngine + * @property {string|null} [moduleId] AppEngine moduleId + */ + + /** + * Constructs a new AppEngine. + * @memberof google.monitoring.v3.Service + * @classdesc Represents an AppEngine. + * @implements IAppEngine + * @constructor + * @param {google.monitoring.v3.Service.IAppEngine=} [properties] Properties to set + */ + function AppEngine(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngine moduleId. + * @member {string} moduleId + * @memberof google.monitoring.v3.Service.AppEngine + * @instance + */ + AppEngine.prototype.moduleId = ""; + + /** + * Creates a new AppEngine instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.IAppEngine=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine instance + */ + AppEngine.create = function create(properties) { + return new AppEngine(properties); + }; + + /** + * Encodes the specified AppEngine message. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.IAppEngine} message AppEngine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngine.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moduleId != null && message.hasOwnProperty("moduleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moduleId); + return writer; + }; + + /** + * Encodes the specified AppEngine message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.IAppEngine} message AppEngine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngine.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngine message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngine.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.AppEngine(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moduleId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngine message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngine.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngine message. + * @function verify + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngine.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moduleId != null && message.hasOwnProperty("moduleId")) + if (!$util.isString(message.moduleId)) + return "moduleId: string expected"; + return null; + }; + + /** + * Creates an AppEngine message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + */ + AppEngine.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.AppEngine) + return object; + var message = new $root.google.monitoring.v3.Service.AppEngine(); + if (object.moduleId != null) + message.moduleId = String(object.moduleId); + return message; + }; + + /** + * Creates a plain object from an AppEngine message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.AppEngine} message AppEngine + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngine.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.moduleId = ""; + if (message.moduleId != null && message.hasOwnProperty("moduleId")) + object.moduleId = message.moduleId; + return object; + }; + + /** + * Converts this AppEngine to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.AppEngine + * @instance + * @returns {Object.} JSON object + */ + AppEngine.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppEngine; + })(); + + Service.CloudEndpoints = (function() { + + /** + * Properties of a CloudEndpoints. + * @memberof google.monitoring.v3.Service + * @interface ICloudEndpoints + * @property {string|null} [service] CloudEndpoints service + */ + + /** + * Constructs a new CloudEndpoints. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a CloudEndpoints. + * @implements ICloudEndpoints + * @constructor + * @param {google.monitoring.v3.Service.ICloudEndpoints=} [properties] Properties to set + */ + function CloudEndpoints(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudEndpoints service. + * @member {string} service + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @instance + */ + CloudEndpoints.prototype.service = ""; + + /** + * Creates a new CloudEndpoints instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.ICloudEndpoints=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints instance + */ + CloudEndpoints.create = function create(properties) { + return new CloudEndpoints(properties); + }; + + /** + * Encodes the specified CloudEndpoints message. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.ICloudEndpoints} message CloudEndpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEndpoints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && message.hasOwnProperty("service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; + + /** + * Encodes the specified CloudEndpoints message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.ICloudEndpoints} message CloudEndpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEndpoints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudEndpoints message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEndpoints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.CloudEndpoints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudEndpoints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEndpoints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudEndpoints message. + * @function verify + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudEndpoints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; + + /** + * Creates a CloudEndpoints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints + */ + CloudEndpoints.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.CloudEndpoints) + return object; + var message = new $root.google.monitoring.v3.Service.CloudEndpoints(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a CloudEndpoints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.CloudEndpoints} message CloudEndpoints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudEndpoints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; + + /** + * Converts this CloudEndpoints to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @instance + * @returns {Object.} JSON object + */ + CloudEndpoints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CloudEndpoints; + })(); + + Service.ClusterIstio = (function() { + + /** + * Properties of a ClusterIstio. + * @memberof google.monitoring.v3.Service + * @interface IClusterIstio + * @property {string|null} [location] ClusterIstio location + * @property {string|null} [clusterName] ClusterIstio clusterName + * @property {string|null} [serviceNamespace] ClusterIstio serviceNamespace + * @property {string|null} [serviceName] ClusterIstio serviceName + */ + + /** + * Constructs a new ClusterIstio. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a ClusterIstio. + * @implements IClusterIstio + * @constructor + * @param {google.monitoring.v3.Service.IClusterIstio=} [properties] Properties to set + */ + function ClusterIstio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClusterIstio location. + * @member {string} location + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.location = ""; + + /** + * ClusterIstio clusterName. + * @member {string} clusterName + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.clusterName = ""; + + /** + * ClusterIstio serviceNamespace. + * @member {string} serviceNamespace + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.serviceNamespace = ""; + + /** + * ClusterIstio serviceName. + * @member {string} serviceName + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.serviceName = ""; + + /** + * Creates a new ClusterIstio instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.IClusterIstio=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio instance + */ + ClusterIstio.create = function create(properties) { + return new ClusterIstio(properties); + }; + + /** + * Encodes the specified ClusterIstio message. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.IClusterIstio} message ClusterIstio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterIstio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.clusterName != null && message.hasOwnProperty("clusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterName); + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); + return writer; + }; + + /** + * Encodes the specified ClusterIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.IClusterIstio} message ClusterIstio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterIstio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterIstio message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterIstio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.ClusterIstio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + message.clusterName = reader.string(); + break; + case 3: + message.serviceNamespace = reader.string(); + break; + case 4: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterIstio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterIstio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterIstio message. + * @function verify + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterIstio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.clusterName != null && message.hasOwnProperty("clusterName")) + if (!$util.isString(message.clusterName)) + return "clusterName: string expected"; + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (!$util.isString(message.serviceNamespace)) + return "serviceNamespace: string expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; + + /** + * Creates a ClusterIstio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio + */ + ClusterIstio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.ClusterIstio) + return object; + var message = new $root.google.monitoring.v3.Service.ClusterIstio(); + if (object.location != null) + message.location = String(object.location); + if (object.clusterName != null) + message.clusterName = String(object.clusterName); + if (object.serviceNamespace != null) + message.serviceNamespace = String(object.serviceNamespace); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; + + /** + * Creates a plain object from a ClusterIstio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.ClusterIstio} message ClusterIstio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterIstio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = ""; + object.clusterName = ""; + object.serviceNamespace = ""; + object.serviceName = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.clusterName != null && message.hasOwnProperty("clusterName")) + object.clusterName = message.clusterName; + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + object.serviceNamespace = message.serviceNamespace; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + return object; + }; + + /** + * Converts this ClusterIstio to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + * @returns {Object.} JSON object + */ + ClusterIstio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClusterIstio; + })(); + + Service.Telemetry = (function() { + + /** + * Properties of a Telemetry. + * @memberof google.monitoring.v3.Service + * @interface ITelemetry + * @property {string|null} [resourceName] Telemetry resourceName + */ + + /** + * Constructs a new Telemetry. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a Telemetry. + * @implements ITelemetry + * @constructor + * @param {google.monitoring.v3.Service.ITelemetry=} [properties] Properties to set + */ + function Telemetry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Telemetry resourceName. + * @member {string} resourceName + * @memberof google.monitoring.v3.Service.Telemetry + * @instance + */ + Telemetry.prototype.resourceName = ""; + + /** + * Creates a new Telemetry instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.ITelemetry=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry instance + */ + Telemetry.create = function create(properties) { + return new Telemetry(properties); + }; + + /** + * Encodes the specified Telemetry message. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.ITelemetry} message Telemetry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Telemetry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); + return writer; + }; + + /** + * Encodes the specified Telemetry message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.ITelemetry} message Telemetry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Telemetry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Telemetry message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Telemetry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.Telemetry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resourceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Telemetry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Telemetry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Telemetry message. + * @function verify + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Telemetry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + return null; + }; + + /** + * Creates a Telemetry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry + */ + Telemetry.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.Telemetry) + return object; + var message = new $root.google.monitoring.v3.Service.Telemetry(); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + return message; + }; + + /** + * Creates a plain object from a Telemetry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.Telemetry} message Telemetry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Telemetry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.resourceName = ""; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + return object; + }; + + /** + * Converts this Telemetry to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.Telemetry + * @instance + * @returns {Object.} JSON object + */ + Telemetry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Telemetry; + })(); + + return Service; + })(); + + v3.ServiceLevelObjective = (function() { + + /** + * Properties of a ServiceLevelObjective. + * @memberof google.monitoring.v3 + * @interface IServiceLevelObjective + * @property {string|null} [name] ServiceLevelObjective name + * @property {string|null} [displayName] ServiceLevelObjective displayName + * @property {google.monitoring.v3.IServiceLevelIndicator|null} [serviceLevelIndicator] ServiceLevelObjective serviceLevelIndicator + * @property {number|null} [goal] ServiceLevelObjective goal + * @property {google.protobuf.IDuration|null} [rollingPeriod] ServiceLevelObjective rollingPeriod + * @property {google.type.CalendarPeriod|null} [calendarPeriod] ServiceLevelObjective calendarPeriod + */ + + /** + * Constructs a new ServiceLevelObjective. + * @memberof google.monitoring.v3 + * @classdesc Represents a ServiceLevelObjective. + * @implements IServiceLevelObjective + * @constructor + * @param {google.monitoring.v3.IServiceLevelObjective=} [properties] Properties to set + */ + function ServiceLevelObjective(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceLevelObjective name. + * @member {string} name + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.name = ""; + + /** + * ServiceLevelObjective displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.displayName = ""; + + /** + * ServiceLevelObjective serviceLevelIndicator. + * @member {google.monitoring.v3.IServiceLevelIndicator|null|undefined} serviceLevelIndicator + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.serviceLevelIndicator = null; + + /** + * ServiceLevelObjective goal. + * @member {number} goal + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.goal = 0; + + /** + * ServiceLevelObjective rollingPeriod. + * @member {google.protobuf.IDuration|null|undefined} rollingPeriod + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.rollingPeriod = null; + + /** + * ServiceLevelObjective calendarPeriod. + * @member {google.type.CalendarPeriod} calendarPeriod + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.calendarPeriod = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceLevelObjective period. + * @member {"rollingPeriod"|"calendarPeriod"|undefined} period + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + Object.defineProperty(ServiceLevelObjective.prototype, "period", { + get: $util.oneOfGetter($oneOfFields = ["rollingPeriod", "calendarPeriod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceLevelObjective instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {google.monitoring.v3.IServiceLevelObjective=} [properties] Properties to set + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective instance + */ + ServiceLevelObjective.create = function create(properties) { + return new ServiceLevelObjective(properties); + }; + + /** + * Encodes the specified ServiceLevelObjective message. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {google.monitoring.v3.IServiceLevelObjective} message ServiceLevelObjective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLevelObjective.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.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) + $root.google.monitoring.v3.ServiceLevelIndicator.encode(message.serviceLevelIndicator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.goal != null && message.hasOwnProperty("goal")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.goal); + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) + $root.google.protobuf.Duration.encode(message.rollingPeriod, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.calendarPeriod); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ServiceLevelObjective message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {google.monitoring.v3.IServiceLevelObjective} message ServiceLevelObjective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLevelObjective.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceLevelObjective message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLevelObjective.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ServiceLevelObjective(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 11: + message.displayName = reader.string(); + break; + case 3: + message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.decode(reader, reader.uint32()); + break; + case 4: + message.goal = reader.double(); + break; + case 5: + message.rollingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.calendarPeriod = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceLevelObjective message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLevelObjective.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceLevelObjective message. + * @function verify + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceLevelObjective.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) { + var error = $root.google.monitoring.v3.ServiceLevelIndicator.verify(message.serviceLevelIndicator); + if (error) + return "serviceLevelIndicator." + error; + } + if (message.goal != null && message.hasOwnProperty("goal")) + if (typeof message.goal !== "number") + return "goal: number expected"; + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) { + properties.period = 1; + { + var error = $root.google.protobuf.Duration.verify(message.rollingPeriod); + if (error) + return "rollingPeriod." + error; + } + } + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { + if (properties.period === 1) + return "period: multiple values"; + properties.period = 1; + switch (message.calendarPeriod) { + default: + return "calendarPeriod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates a ServiceLevelObjective message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective + */ + ServiceLevelObjective.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ServiceLevelObjective) + return object; + var message = new $root.google.monitoring.v3.ServiceLevelObjective(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.serviceLevelIndicator != null) { + if (typeof object.serviceLevelIndicator !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelObjective.serviceLevelIndicator: object expected"); + message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.fromObject(object.serviceLevelIndicator); + } + if (object.goal != null) + message.goal = Number(object.goal); + if (object.rollingPeriod != null) { + if (typeof object.rollingPeriod !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelObjective.rollingPeriod: object expected"); + message.rollingPeriod = $root.google.protobuf.Duration.fromObject(object.rollingPeriod); + } + switch (object.calendarPeriod) { + case "CALENDAR_PERIOD_UNSPECIFIED": + case 0: + message.calendarPeriod = 0; + break; + case "DAY": + case 1: + message.calendarPeriod = 1; + break; + case "WEEK": + case 2: + message.calendarPeriod = 2; + break; + case "FORTNIGHT": + case 3: + message.calendarPeriod = 3; + break; + case "MONTH": + case 4: + message.calendarPeriod = 4; + break; + case "QUARTER": + case 5: + message.calendarPeriod = 5; + break; + case "HALF": + case 6: + message.calendarPeriod = 6; + break; + case "YEAR": + case 7: + message.calendarPeriod = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a ServiceLevelObjective message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {google.monitoring.v3.ServiceLevelObjective} message ServiceLevelObjective + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceLevelObjective.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.serviceLevelIndicator = null; + object.goal = 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) + object.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.toObject(message.serviceLevelIndicator, options); + if (message.goal != null && message.hasOwnProperty("goal")) + object.goal = options.json && !isFinite(message.goal) ? String(message.goal) : message.goal; + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) { + object.rollingPeriod = $root.google.protobuf.Duration.toObject(message.rollingPeriod, options); + if (options.oneofs) + object.period = "rollingPeriod"; + } + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { + object.calendarPeriod = options.enums === String ? $root.google.type.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; + if (options.oneofs) + object.period = "calendarPeriod"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ServiceLevelObjective to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + * @returns {Object.} JSON object + */ + ServiceLevelObjective.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * View enum. + * @name google.monitoring.v3.ServiceLevelObjective.View + * @enum {string} + * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value + * @property {number} FULL=2 FULL value + * @property {number} EXPLICIT=1 EXPLICIT value + */ + ServiceLevelObjective.View = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIEW_UNSPECIFIED"] = 0; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[1] = "EXPLICIT"] = 1; + return values; + })(); + + return ServiceLevelObjective; + })(); + + v3.ServiceLevelIndicator = (function() { + + /** + * Properties of a ServiceLevelIndicator. + * @memberof google.monitoring.v3 + * @interface IServiceLevelIndicator + * @property {google.monitoring.v3.IBasicSli|null} [basicSli] ServiceLevelIndicator basicSli + * @property {google.monitoring.v3.IRequestBasedSli|null} [requestBased] ServiceLevelIndicator requestBased + * @property {google.monitoring.v3.IWindowsBasedSli|null} [windowsBased] ServiceLevelIndicator windowsBased + */ + + /** + * Constructs a new ServiceLevelIndicator. + * @memberof google.monitoring.v3 + * @classdesc Represents a ServiceLevelIndicator. + * @implements IServiceLevelIndicator + * @constructor + * @param {google.monitoring.v3.IServiceLevelIndicator=} [properties] Properties to set + */ + function ServiceLevelIndicator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceLevelIndicator basicSli. + * @member {google.monitoring.v3.IBasicSli|null|undefined} basicSli + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @instance + */ + ServiceLevelIndicator.prototype.basicSli = null; + + /** + * ServiceLevelIndicator requestBased. + * @member {google.monitoring.v3.IRequestBasedSli|null|undefined} requestBased + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @instance + */ + ServiceLevelIndicator.prototype.requestBased = null; + + /** + * ServiceLevelIndicator windowsBased. + * @member {google.monitoring.v3.IWindowsBasedSli|null|undefined} windowsBased + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @instance + */ + ServiceLevelIndicator.prototype.windowsBased = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceLevelIndicator type. + * @member {"basicSli"|"requestBased"|"windowsBased"|undefined} type + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @instance + */ + Object.defineProperty(ServiceLevelIndicator.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["basicSli", "requestBased", "windowsBased"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceLevelIndicator instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {google.monitoring.v3.IServiceLevelIndicator=} [properties] Properties to set + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator instance + */ + ServiceLevelIndicator.create = function create(properties) { + return new ServiceLevelIndicator(properties); + }; + + /** + * Encodes the specified ServiceLevelIndicator message. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {google.monitoring.v3.IServiceLevelIndicator} message ServiceLevelIndicator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLevelIndicator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestBased != null && message.hasOwnProperty("requestBased")) + $root.google.monitoring.v3.RequestBasedSli.encode(message.requestBased, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) + $root.google.monitoring.v3.WindowsBasedSli.encode(message.windowsBased, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.basicSli != null && message.hasOwnProperty("basicSli")) + $root.google.monitoring.v3.BasicSli.encode(message.basicSli, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceLevelIndicator message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {google.monitoring.v3.IServiceLevelIndicator} message ServiceLevelIndicator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLevelIndicator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceLevelIndicator message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLevelIndicator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ServiceLevelIndicator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.basicSli = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + break; + case 1: + message.requestBased = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); + break; + case 2: + message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceLevelIndicator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLevelIndicator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceLevelIndicator message. + * @function verify + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceLevelIndicator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.basicSli != null && message.hasOwnProperty("basicSli")) { + properties.type = 1; + { + var error = $root.google.monitoring.v3.BasicSli.verify(message.basicSli); + if (error) + return "basicSli." + error; + } + } + if (message.requestBased != null && message.hasOwnProperty("requestBased")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.monitoring.v3.RequestBasedSli.verify(message.requestBased); + if (error) + return "requestBased." + error; + } + } + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.monitoring.v3.WindowsBasedSli.verify(message.windowsBased); + if (error) + return "windowsBased." + error; + } + } + return null; + }; + + /** + * Creates a ServiceLevelIndicator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator + */ + ServiceLevelIndicator.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ServiceLevelIndicator) + return object; + var message = new $root.google.monitoring.v3.ServiceLevelIndicator(); + if (object.basicSli != null) { + if (typeof object.basicSli !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.basicSli: object expected"); + message.basicSli = $root.google.monitoring.v3.BasicSli.fromObject(object.basicSli); + } + if (object.requestBased != null) { + if (typeof object.requestBased !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.requestBased: object expected"); + message.requestBased = $root.google.monitoring.v3.RequestBasedSli.fromObject(object.requestBased); + } + if (object.windowsBased != null) { + if (typeof object.windowsBased !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.windowsBased: object expected"); + message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.fromObject(object.windowsBased); + } + return message; + }; + + /** + * Creates a plain object from a ServiceLevelIndicator message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {google.monitoring.v3.ServiceLevelIndicator} message ServiceLevelIndicator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceLevelIndicator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.requestBased != null && message.hasOwnProperty("requestBased")) { + object.requestBased = $root.google.monitoring.v3.RequestBasedSli.toObject(message.requestBased, options); + if (options.oneofs) + object.type = "requestBased"; + } + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) { + object.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.toObject(message.windowsBased, options); + if (options.oneofs) + object.type = "windowsBased"; + } + if (message.basicSli != null && message.hasOwnProperty("basicSli")) { + object.basicSli = $root.google.monitoring.v3.BasicSli.toObject(message.basicSli, options); + if (options.oneofs) + object.type = "basicSli"; + } + return object; + }; + + /** + * Converts this ServiceLevelIndicator to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @instance + * @returns {Object.} JSON object + */ + ServiceLevelIndicator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceLevelIndicator; + })(); + + v3.BasicSli = (function() { + + /** + * Properties of a BasicSli. + * @memberof google.monitoring.v3 + * @interface IBasicSli + * @property {Array.|null} [method] BasicSli method + * @property {Array.|null} [location] BasicSli location + * @property {Array.|null} [version] BasicSli version + * @property {google.monitoring.v3.BasicSli.IAvailabilityCriteria|null} [availability] BasicSli availability + * @property {google.monitoring.v3.BasicSli.ILatencyCriteria|null} [latency] BasicSli latency + */ + + /** + * Constructs a new BasicSli. + * @memberof google.monitoring.v3 + * @classdesc Represents a BasicSli. + * @implements IBasicSli + * @constructor + * @param {google.monitoring.v3.IBasicSli=} [properties] Properties to set + */ + function BasicSli(properties) { + this.method = []; + this.location = []; + this.version = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BasicSli method. + * @member {Array.} method + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.method = $util.emptyArray; + + /** + * BasicSli location. + * @member {Array.} location + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.location = $util.emptyArray; + + /** + * BasicSli version. + * @member {Array.} version + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.version = $util.emptyArray; + + /** + * BasicSli availability. + * @member {google.monitoring.v3.BasicSli.IAvailabilityCriteria|null|undefined} availability + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.availability = null; + + /** + * BasicSli latency. + * @member {google.monitoring.v3.BasicSli.ILatencyCriteria|null|undefined} latency + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.latency = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BasicSli sliCriteria. + * @member {"availability"|"latency"|undefined} sliCriteria + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + Object.defineProperty(BasicSli.prototype, "sliCriteria", { + get: $util.oneOfGetter($oneOfFields = ["availability", "latency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BasicSli instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.IBasicSli=} [properties] Properties to set + * @returns {google.monitoring.v3.BasicSli} BasicSli instance + */ + BasicSli.create = function create(properties) { + return new BasicSli(properties); + }; + + /** + * Encodes the specified BasicSli message. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.IBasicSli} message BasicSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicSli.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.availability != null && message.hasOwnProperty("availability")) + $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.encode(message.availability, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.latency != null && message.hasOwnProperty("latency")) + $root.google.monitoring.v3.BasicSli.LatencyCriteria.encode(message.latency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.method[i]); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.location[i]); + if (message.version != null && message.version.length) + for (var i = 0; i < message.version.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.version[i]); + return writer; + }; + + /** + * Encodes the specified BasicSli message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.IBasicSli} message BasicSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicSli.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BasicSli message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.BasicSli} BasicSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicSli.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push(reader.string()); + break; + case 8: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push(reader.string()); + break; + case 9: + if (!(message.version && message.version.length)) + message.version = []; + message.version.push(reader.string()); + break; + case 2: + message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.decode(reader, reader.uint32()); + break; + case 3: + message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BasicSli message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.BasicSli} BasicSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicSli.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BasicSli message. + * @function verify + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BasicSli.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + 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) + if (!$util.isString(message.method[i])) + return "method: string[] 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) + if (!$util.isString(message.location[i])) + return "location: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) { + if (!Array.isArray(message.version)) + return "version: array expected"; + for (var i = 0; i < message.version.length; ++i) + if (!$util.isString(message.version[i])) + return "version: string[] expected"; + } + if (message.availability != null && message.hasOwnProperty("availability")) { + properties.sliCriteria = 1; + { + var error = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.verify(message.availability); + if (error) + return "availability." + error; + } + } + if (message.latency != null && message.hasOwnProperty("latency")) { + if (properties.sliCriteria === 1) + return "sliCriteria: multiple values"; + properties.sliCriteria = 1; + { + var error = $root.google.monitoring.v3.BasicSli.LatencyCriteria.verify(message.latency); + if (error) + return "latency." + error; + } + } + return null; + }; + + /** + * Creates a BasicSli message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.BasicSli} BasicSli + */ + BasicSli.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.BasicSli) + return object; + var message = new $root.google.monitoring.v3.BasicSli(); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.monitoring.v3.BasicSli.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) + message.method[i] = String(object.method[i]); + } + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.monitoring.v3.BasicSli.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) + message.location[i] = String(object.location[i]); + } + if (object.version) { + if (!Array.isArray(object.version)) + throw TypeError(".google.monitoring.v3.BasicSli.version: array expected"); + message.version = []; + for (var i = 0; i < object.version.length; ++i) + message.version[i] = String(object.version[i]); + } + if (object.availability != null) { + if (typeof object.availability !== "object") + throw TypeError(".google.monitoring.v3.BasicSli.availability: object expected"); + message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.fromObject(object.availability); + } + if (object.latency != null) { + if (typeof object.latency !== "object") + throw TypeError(".google.monitoring.v3.BasicSli.latency: object expected"); + message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.fromObject(object.latency); + } + return message; + }; + + /** + * Creates a plain object from a BasicSli message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.BasicSli} message BasicSli + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BasicSli.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.method = []; + object.location = []; + object.version = []; + } + if (message.availability != null && message.hasOwnProperty("availability")) { + object.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.toObject(message.availability, options); + if (options.oneofs) + object.sliCriteria = "availability"; + } + if (message.latency != null && message.hasOwnProperty("latency")) { + object.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.toObject(message.latency, options); + if (options.oneofs) + object.sliCriteria = "latency"; + } + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = message.method[j]; + } + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = message.location[j]; + } + if (message.version && message.version.length) { + object.version = []; + for (var j = 0; j < message.version.length; ++j) + object.version[j] = message.version[j]; + } + return object; + }; + + /** + * Converts this BasicSli to JSON. + * @function toJSON + * @memberof google.monitoring.v3.BasicSli + * @instance + * @returns {Object.} JSON object + */ + BasicSli.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BasicSli.AvailabilityCriteria = (function() { + + /** + * Properties of an AvailabilityCriteria. + * @memberof google.monitoring.v3.BasicSli + * @interface IAvailabilityCriteria + */ + + /** + * Constructs a new AvailabilityCriteria. + * @memberof google.monitoring.v3.BasicSli + * @classdesc Represents an AvailabilityCriteria. + * @implements IAvailabilityCriteria + * @constructor + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria=} [properties] Properties to set + */ + function AvailabilityCriteria(properties) { + if (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 AvailabilityCriteria instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria=} [properties] Properties to set + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria instance + */ + AvailabilityCriteria.create = function create(properties) { + return new AvailabilityCriteria(properties); + }; + + /** + * Encodes the specified AvailabilityCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria} message AvailabilityCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvailabilityCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AvailabilityCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria} message AvailabilityCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvailabilityCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AvailabilityCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvailabilityCriteria.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli.AvailabilityCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AvailabilityCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvailabilityCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AvailabilityCriteria message. + * @function verify + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AvailabilityCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AvailabilityCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria + */ + AvailabilityCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.BasicSli.AvailabilityCriteria) + return object; + return new $root.google.monitoring.v3.BasicSli.AvailabilityCriteria(); + }; + + /** + * Creates a plain object from an AvailabilityCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {google.monitoring.v3.BasicSli.AvailabilityCriteria} message AvailabilityCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AvailabilityCriteria.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AvailabilityCriteria to JSON. + * @function toJSON + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @instance + * @returns {Object.} JSON object + */ + AvailabilityCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AvailabilityCriteria; + })(); + + BasicSli.LatencyCriteria = (function() { + + /** + * Properties of a LatencyCriteria. + * @memberof google.monitoring.v3.BasicSli + * @interface ILatencyCriteria + * @property {google.protobuf.IDuration|null} [threshold] LatencyCriteria threshold + */ + + /** + * Constructs a new LatencyCriteria. + * @memberof google.monitoring.v3.BasicSli + * @classdesc Represents a LatencyCriteria. + * @implements ILatencyCriteria + * @constructor + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria=} [properties] Properties to set + */ + function LatencyCriteria(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyCriteria threshold. + * @member {google.protobuf.IDuration|null|undefined} threshold + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @instance + */ + LatencyCriteria.prototype.threshold = null; + + /** + * Creates a new LatencyCriteria instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria=} [properties] Properties to set + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria instance + */ + LatencyCriteria.create = function create(properties) { + return new LatencyCriteria(properties); + }; + + /** + * Encodes the specified LatencyCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria} message LatencyCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threshold != null && message.hasOwnProperty("threshold")) + $root.google.protobuf.Duration.encode(message.threshold, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LatencyCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria} message LatencyCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyCriteria.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli.LatencyCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.threshold = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyCriteria message. + * @function verify + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) { + var error = $root.google.protobuf.Duration.verify(message.threshold); + if (error) + return "threshold." + error; + } + return null; + }; + + /** + * Creates a LatencyCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria + */ + LatencyCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.BasicSli.LatencyCriteria) + return object; + var message = new $root.google.monitoring.v3.BasicSli.LatencyCriteria(); + if (object.threshold != null) { + if (typeof object.threshold !== "object") + throw TypeError(".google.monitoring.v3.BasicSli.LatencyCriteria.threshold: object expected"); + message.threshold = $root.google.protobuf.Duration.fromObject(object.threshold); + } + return message; + }; + + /** + * Creates a plain object from a LatencyCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {google.monitoring.v3.BasicSli.LatencyCriteria} message LatencyCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.threshold = null; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = $root.google.protobuf.Duration.toObject(message.threshold, options); + return object; + }; + + /** + * Converts this LatencyCriteria to JSON. + * @function toJSON + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @instance + * @returns {Object.} JSON object + */ + LatencyCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LatencyCriteria; + })(); + + return BasicSli; + })(); + + v3.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.monitoring.v3 + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ + + /** + * Constructs a new Range. + * @memberof google.monitoring.v3 + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.monitoring.v3.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.monitoring.v3.Range + * @instance + */ + Range.prototype.min = 0; + + /** + * Range max. + * @member {number} max + * @memberof google.monitoring.v3.Range + * @instance + */ + Range.prototype.max = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.IRange=} [properties] Properties to set + * @returns {google.monitoring.v3.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.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.monitoring.v3.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.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.monitoring.v3.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.Range + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Range) + return object; + var message = new $root.google.monitoring.v3.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.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.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.monitoring.v3.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Range; + })(); + + v3.RequestBasedSli = (function() { + + /** + * Properties of a RequestBasedSli. + * @memberof google.monitoring.v3 + * @interface IRequestBasedSli + * @property {google.monitoring.v3.ITimeSeriesRatio|null} [goodTotalRatio] RequestBasedSli goodTotalRatio + * @property {google.monitoring.v3.IDistributionCut|null} [distributionCut] RequestBasedSli distributionCut + */ + + /** + * Constructs a new RequestBasedSli. + * @memberof google.monitoring.v3 + * @classdesc Represents a RequestBasedSli. + * @implements IRequestBasedSli + * @constructor + * @param {google.monitoring.v3.IRequestBasedSli=} [properties] Properties to set + */ + function RequestBasedSli(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestBasedSli goodTotalRatio. + * @member {google.monitoring.v3.ITimeSeriesRatio|null|undefined} goodTotalRatio + * @memberof google.monitoring.v3.RequestBasedSli + * @instance + */ + RequestBasedSli.prototype.goodTotalRatio = null; + + /** + * RequestBasedSli distributionCut. + * @member {google.monitoring.v3.IDistributionCut|null|undefined} distributionCut + * @memberof google.monitoring.v3.RequestBasedSli + * @instance + */ + RequestBasedSli.prototype.distributionCut = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RequestBasedSli method. + * @member {"goodTotalRatio"|"distributionCut"|undefined} method + * @memberof google.monitoring.v3.RequestBasedSli + * @instance + */ + Object.defineProperty(RequestBasedSli.prototype, "method", { + get: $util.oneOfGetter($oneOfFields = ["goodTotalRatio", "distributionCut"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RequestBasedSli instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {google.monitoring.v3.IRequestBasedSli=} [properties] Properties to set + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli instance + */ + RequestBasedSli.create = function create(properties) { + return new RequestBasedSli(properties); + }; + + /** + * Encodes the specified RequestBasedSli message. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {google.monitoring.v3.IRequestBasedSli} message RequestBasedSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBasedSli.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) + $root.google.monitoring.v3.TimeSeriesRatio.encode(message.goodTotalRatio, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) + $root.google.monitoring.v3.DistributionCut.encode(message.distributionCut, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {google.monitoring.v3.IRequestBasedSli} message RequestBasedSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBasedSli.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestBasedSli message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBasedSli.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.RequestBasedSli(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.decode(reader, reader.uint32()); + break; + case 3: + message.distributionCut = $root.google.monitoring.v3.DistributionCut.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestBasedSli message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBasedSli.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestBasedSli message. + * @function verify + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestBasedSli.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) { + properties.method = 1; + { + var error = $root.google.monitoring.v3.TimeSeriesRatio.verify(message.goodTotalRatio); + if (error) + return "goodTotalRatio." + error; + } + } + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) { + if (properties.method === 1) + return "method: multiple values"; + properties.method = 1; + { + var error = $root.google.monitoring.v3.DistributionCut.verify(message.distributionCut); + if (error) + return "distributionCut." + error; + } + } + return null; + }; + + /** + * Creates a RequestBasedSli message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli + */ + RequestBasedSli.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.RequestBasedSli) + return object; + var message = new $root.google.monitoring.v3.RequestBasedSli(); + if (object.goodTotalRatio != null) { + if (typeof object.goodTotalRatio !== "object") + throw TypeError(".google.monitoring.v3.RequestBasedSli.goodTotalRatio: object expected"); + message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.fromObject(object.goodTotalRatio); + } + if (object.distributionCut != null) { + if (typeof object.distributionCut !== "object") + throw TypeError(".google.monitoring.v3.RequestBasedSli.distributionCut: object expected"); + message.distributionCut = $root.google.monitoring.v3.DistributionCut.fromObject(object.distributionCut); + } + return message; + }; + + /** + * Creates a plain object from a RequestBasedSli message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {google.monitoring.v3.RequestBasedSli} message RequestBasedSli + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestBasedSli.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) { + object.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.toObject(message.goodTotalRatio, options); + if (options.oneofs) + object.method = "goodTotalRatio"; + } + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) { + object.distributionCut = $root.google.monitoring.v3.DistributionCut.toObject(message.distributionCut, options); + if (options.oneofs) + object.method = "distributionCut"; + } + return object; + }; + + /** + * Converts this RequestBasedSli to JSON. + * @function toJSON + * @memberof google.monitoring.v3.RequestBasedSli + * @instance + * @returns {Object.} JSON object + */ + RequestBasedSli.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestBasedSli; + })(); + + v3.TimeSeriesRatio = (function() { + + /** + * Properties of a TimeSeriesRatio. + * @memberof google.monitoring.v3 + * @interface ITimeSeriesRatio + * @property {string|null} [goodServiceFilter] TimeSeriesRatio goodServiceFilter + * @property {string|null} [badServiceFilter] TimeSeriesRatio badServiceFilter + * @property {string|null} [totalServiceFilter] TimeSeriesRatio totalServiceFilter + */ + + /** + * Constructs a new TimeSeriesRatio. + * @memberof google.monitoring.v3 + * @classdesc Represents a TimeSeriesRatio. + * @implements ITimeSeriesRatio + * @constructor + * @param {google.monitoring.v3.ITimeSeriesRatio=} [properties] Properties to set + */ + function TimeSeriesRatio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesRatio goodServiceFilter. + * @member {string} goodServiceFilter + * @memberof google.monitoring.v3.TimeSeriesRatio + * @instance + */ + TimeSeriesRatio.prototype.goodServiceFilter = ""; + + /** + * TimeSeriesRatio badServiceFilter. + * @member {string} badServiceFilter + * @memberof google.monitoring.v3.TimeSeriesRatio + * @instance + */ + TimeSeriesRatio.prototype.badServiceFilter = ""; + + /** + * TimeSeriesRatio totalServiceFilter. + * @member {string} totalServiceFilter + * @memberof google.monitoring.v3.TimeSeriesRatio + * @instance + */ + TimeSeriesRatio.prototype.totalServiceFilter = ""; + + /** + * Creates a new TimeSeriesRatio instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {google.monitoring.v3.ITimeSeriesRatio=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio instance + */ + TimeSeriesRatio.create = function create(properties) { + return new TimeSeriesRatio(properties); + }; + + /** + * Encodes the specified TimeSeriesRatio message. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {google.monitoring.v3.ITimeSeriesRatio} message TimeSeriesRatio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesRatio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.goodServiceFilter); + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.badServiceFilter); + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.totalServiceFilter); + return writer; + }; + + /** + * Encodes the specified TimeSeriesRatio message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {google.monitoring.v3.ITimeSeriesRatio} message TimeSeriesRatio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesRatio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesRatio message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesRatio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesRatio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.goodServiceFilter = reader.string(); + break; + case 5: + message.badServiceFilter = reader.string(); + break; + case 6: + message.totalServiceFilter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesRatio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesRatio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesRatio message. + * @function verify + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesRatio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + if (!$util.isString(message.goodServiceFilter)) + return "goodServiceFilter: string expected"; + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + if (!$util.isString(message.badServiceFilter)) + return "badServiceFilter: string expected"; + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + if (!$util.isString(message.totalServiceFilter)) + return "totalServiceFilter: string expected"; + return null; + }; + + /** + * Creates a TimeSeriesRatio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio + */ + TimeSeriesRatio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeriesRatio) + return object; + var message = new $root.google.monitoring.v3.TimeSeriesRatio(); + if (object.goodServiceFilter != null) + message.goodServiceFilter = String(object.goodServiceFilter); + if (object.badServiceFilter != null) + message.badServiceFilter = String(object.badServiceFilter); + if (object.totalServiceFilter != null) + message.totalServiceFilter = String(object.totalServiceFilter); + return message; + }; + + /** + * Creates a plain object from a TimeSeriesRatio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {google.monitoring.v3.TimeSeriesRatio} message TimeSeriesRatio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesRatio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.goodServiceFilter = ""; + object.badServiceFilter = ""; + object.totalServiceFilter = ""; + } + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + object.goodServiceFilter = message.goodServiceFilter; + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + object.badServiceFilter = message.badServiceFilter; + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + object.totalServiceFilter = message.totalServiceFilter; + return object; + }; + + /** + * Converts this TimeSeriesRatio to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeSeriesRatio + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesRatio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeSeriesRatio; + })(); + + v3.DistributionCut = (function() { + + /** + * Properties of a DistributionCut. + * @memberof google.monitoring.v3 + * @interface IDistributionCut + * @property {string|null} [distributionFilter] DistributionCut distributionFilter + * @property {google.monitoring.v3.IRange|null} [range] DistributionCut range + */ + + /** + * Constructs a new DistributionCut. + * @memberof google.monitoring.v3 + * @classdesc Represents a DistributionCut. + * @implements IDistributionCut + * @constructor + * @param {google.monitoring.v3.IDistributionCut=} [properties] Properties to set + */ + function DistributionCut(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DistributionCut distributionFilter. + * @member {string} distributionFilter + * @memberof google.monitoring.v3.DistributionCut + * @instance + */ + DistributionCut.prototype.distributionFilter = ""; + + /** + * DistributionCut range. + * @member {google.monitoring.v3.IRange|null|undefined} range + * @memberof google.monitoring.v3.DistributionCut + * @instance + */ + DistributionCut.prototype.range = null; + + /** + * Creates a new DistributionCut instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.IDistributionCut=} [properties] Properties to set + * @returns {google.monitoring.v3.DistributionCut} DistributionCut instance + */ + DistributionCut.create = function create(properties) { + return new DistributionCut(properties); + }; + + /** + * Encodes the specified DistributionCut message. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.IDistributionCut} message DistributionCut message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DistributionCut.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.distributionFilter); + if (message.range != null && message.hasOwnProperty("range")) + $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DistributionCut message, length delimited. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.IDistributionCut} message DistributionCut message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DistributionCut.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DistributionCut message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DistributionCut.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DistributionCut(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.distributionFilter = reader.string(); + break; + case 5: + message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DistributionCut message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DistributionCut.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DistributionCut message. + * @function verify + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DistributionCut.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + if (!$util.isString(message.distributionFilter)) + return "distributionFilter: string expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.monitoring.v3.Range.verify(message.range); + if (error) + return "range." + error; + } + return null; + }; + + /** + * Creates a DistributionCut message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DistributionCut} DistributionCut + */ + DistributionCut.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DistributionCut) + return object; + var message = new $root.google.monitoring.v3.DistributionCut(); + if (object.distributionFilter != null) + message.distributionFilter = String(object.distributionFilter); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.monitoring.v3.DistributionCut.range: object expected"); + message.range = $root.google.monitoring.v3.Range.fromObject(object.range); + } + return message; + }; + + /** + * Creates a plain object from a DistributionCut message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.DistributionCut} message DistributionCut + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DistributionCut.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.distributionFilter = ""; + object.range = null; + } + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + object.distributionFilter = message.distributionFilter; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.monitoring.v3.Range.toObject(message.range, options); + return object; + }; + + /** + * Converts this DistributionCut to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DistributionCut + * @instance + * @returns {Object.} JSON object + */ + DistributionCut.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DistributionCut; + })(); + + v3.WindowsBasedSli = (function() { + + /** + * Properties of a WindowsBasedSli. + * @memberof google.monitoring.v3 + * @interface IWindowsBasedSli + * @property {string|null} [goodBadMetricFilter] WindowsBasedSli goodBadMetricFilter + * @property {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null} [goodTotalRatioThreshold] WindowsBasedSli goodTotalRatioThreshold + * @property {google.monitoring.v3.WindowsBasedSli.IMetricRange|null} [metricMeanInRange] WindowsBasedSli metricMeanInRange + * @property {google.monitoring.v3.WindowsBasedSli.IMetricRange|null} [metricSumInRange] WindowsBasedSli metricSumInRange + * @property {google.protobuf.IDuration|null} [windowPeriod] WindowsBasedSli windowPeriod + */ + + /** + * Constructs a new WindowsBasedSli. + * @memberof google.monitoring.v3 + * @classdesc Represents a WindowsBasedSli. + * @implements IWindowsBasedSli + * @constructor + * @param {google.monitoring.v3.IWindowsBasedSli=} [properties] Properties to set + */ + function WindowsBasedSli(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsBasedSli goodBadMetricFilter. + * @member {string} goodBadMetricFilter + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.goodBadMetricFilter = ""; + + /** + * WindowsBasedSli goodTotalRatioThreshold. + * @member {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null|undefined} goodTotalRatioThreshold + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.goodTotalRatioThreshold = null; + + /** + * WindowsBasedSli metricMeanInRange. + * @member {google.monitoring.v3.WindowsBasedSli.IMetricRange|null|undefined} metricMeanInRange + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.metricMeanInRange = null; + + /** + * WindowsBasedSli metricSumInRange. + * @member {google.monitoring.v3.WindowsBasedSli.IMetricRange|null|undefined} metricSumInRange + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.metricSumInRange = null; + + /** + * WindowsBasedSli windowPeriod. + * @member {google.protobuf.IDuration|null|undefined} windowPeriod + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.windowPeriod = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WindowsBasedSli windowCriterion. + * @member {"goodBadMetricFilter"|"goodTotalRatioThreshold"|"metricMeanInRange"|"metricSumInRange"|undefined} windowCriterion + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + Object.defineProperty(WindowsBasedSli.prototype, "windowCriterion", { + get: $util.oneOfGetter($oneOfFields = ["goodBadMetricFilter", "goodTotalRatioThreshold", "metricMeanInRange", "metricSumInRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WindowsBasedSli instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {google.monitoring.v3.IWindowsBasedSli=} [properties] Properties to set + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli instance + */ + WindowsBasedSli.create = function create(properties) { + return new WindowsBasedSli(properties); + }; + + /** + * Encodes the specified WindowsBasedSli message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {google.monitoring.v3.IWindowsBasedSli} message WindowsBasedSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsBasedSli.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) + $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.encode(message.goodTotalRatioThreshold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) + $root.google.protobuf.Duration.encode(message.windowPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.goodBadMetricFilter); + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) + $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricMeanInRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) + $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricSumInRange, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WindowsBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {google.monitoring.v3.IWindowsBasedSli} message WindowsBasedSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WindowsBasedSli.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WindowsBasedSli message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsBasedSli.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.goodBadMetricFilter = reader.string(); + break; + case 2: + message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.decode(reader, reader.uint32()); + break; + case 6: + message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); + break; + case 7: + message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); + break; + case 4: + message.windowPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WindowsBasedSli message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WindowsBasedSli.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WindowsBasedSli message. + * @function verify + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WindowsBasedSli.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) { + properties.windowCriterion = 1; + if (!$util.isString(message.goodBadMetricFilter)) + return "goodBadMetricFilter: string expected"; + } + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) { + if (properties.windowCriterion === 1) + return "windowCriterion: multiple values"; + properties.windowCriterion = 1; + { + var error = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify(message.goodTotalRatioThreshold); + if (error) + return "goodTotalRatioThreshold." + error; + } + } + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) { + if (properties.windowCriterion === 1) + return "windowCriterion: multiple values"; + properties.windowCriterion = 1; + { + var error = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.verify(message.metricMeanInRange); + if (error) + return "metricMeanInRange." + error; + } + } + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) { + if (properties.windowCriterion === 1) + return "windowCriterion: multiple values"; + properties.windowCriterion = 1; + { + var error = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.verify(message.metricSumInRange); + if (error) + return "metricSumInRange." + error; + } + } + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.windowPeriod); + if (error) + return "windowPeriod." + error; + } + return null; + }; + + /** + * Creates a WindowsBasedSli message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli + */ + WindowsBasedSli.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.WindowsBasedSli) + return object; + var message = new $root.google.monitoring.v3.WindowsBasedSli(); + if (object.goodBadMetricFilter != null) + message.goodBadMetricFilter = String(object.goodBadMetricFilter); + if (object.goodTotalRatioThreshold != null) { + if (typeof object.goodTotalRatioThreshold !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.goodTotalRatioThreshold: object expected"); + message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.fromObject(object.goodTotalRatioThreshold); + } + if (object.metricMeanInRange != null) { + if (typeof object.metricMeanInRange !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.metricMeanInRange: object expected"); + message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.fromObject(object.metricMeanInRange); + } + if (object.metricSumInRange != null) { + if (typeof object.metricSumInRange !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.metricSumInRange: object expected"); + message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.fromObject(object.metricSumInRange); + } + if (object.windowPeriod != null) { + if (typeof object.windowPeriod !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.windowPeriod: object expected"); + message.windowPeriod = $root.google.protobuf.Duration.fromObject(object.windowPeriod); + } + return message; + }; + + /** + * Creates a plain object from a WindowsBasedSli message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {google.monitoring.v3.WindowsBasedSli} message WindowsBasedSli + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WindowsBasedSli.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.windowPeriod = null; + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) { + object.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.toObject(message.goodTotalRatioThreshold, options); + if (options.oneofs) + object.windowCriterion = "goodTotalRatioThreshold"; + } + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) + object.windowPeriod = $root.google.protobuf.Duration.toObject(message.windowPeriod, options); + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) { + object.goodBadMetricFilter = message.goodBadMetricFilter; + if (options.oneofs) + object.windowCriterion = "goodBadMetricFilter"; + } + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) { + object.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.toObject(message.metricMeanInRange, options); + if (options.oneofs) + object.windowCriterion = "metricMeanInRange"; + } + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) { + object.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.toObject(message.metricSumInRange, options); + if (options.oneofs) + object.windowCriterion = "metricSumInRange"; + } + return object; + }; + + /** + * Converts this WindowsBasedSli to JSON. + * @function toJSON + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + * @returns {Object.} JSON object + */ + WindowsBasedSli.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + WindowsBasedSli.PerformanceThreshold = (function() { + + /** + * Properties of a PerformanceThreshold. + * @memberof google.monitoring.v3.WindowsBasedSli + * @interface IPerformanceThreshold + * @property {google.monitoring.v3.IRequestBasedSli|null} [performance] PerformanceThreshold performance + * @property {google.monitoring.v3.IBasicSli|null} [basicSliPerformance] PerformanceThreshold basicSliPerformance + * @property {number|null} [threshold] PerformanceThreshold threshold + */ + + /** + * Constructs a new PerformanceThreshold. + * @memberof google.monitoring.v3.WindowsBasedSli + * @classdesc Represents a PerformanceThreshold. + * @implements IPerformanceThreshold + * @constructor + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold=} [properties] Properties to set + */ + function PerformanceThreshold(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PerformanceThreshold performance. + * @member {google.monitoring.v3.IRequestBasedSli|null|undefined} performance + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + PerformanceThreshold.prototype.performance = null; + + /** + * PerformanceThreshold basicSliPerformance. + * @member {google.monitoring.v3.IBasicSli|null|undefined} basicSliPerformance + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + PerformanceThreshold.prototype.basicSliPerformance = null; + + /** + * PerformanceThreshold threshold. + * @member {number} threshold + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + PerformanceThreshold.prototype.threshold = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PerformanceThreshold type. + * @member {"performance"|"basicSliPerformance"|undefined} type + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + Object.defineProperty(PerformanceThreshold.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["performance", "basicSliPerformance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PerformanceThreshold instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold=} [properties] Properties to set + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold instance + */ + PerformanceThreshold.create = function create(properties) { + return new PerformanceThreshold(properties); + }; + + /** + * Encodes the specified PerformanceThreshold message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold} message PerformanceThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PerformanceThreshold.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.performance != null && message.hasOwnProperty("performance")) + $root.google.monitoring.v3.RequestBasedSli.encode(message.performance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.threshold != null && message.hasOwnProperty("threshold")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.threshold); + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) + $root.google.monitoring.v3.BasicSli.encode(message.basicSliPerformance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PerformanceThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold} message PerformanceThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PerformanceThreshold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PerformanceThreshold message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PerformanceThreshold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.performance = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); + break; + case 3: + message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + break; + case 2: + message.threshold = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PerformanceThreshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PerformanceThreshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PerformanceThreshold message. + * @function verify + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PerformanceThreshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.performance != null && message.hasOwnProperty("performance")) { + properties.type = 1; + { + var error = $root.google.monitoring.v3.RequestBasedSli.verify(message.performance); + if (error) + return "performance." + error; + } + } + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.monitoring.v3.BasicSli.verify(message.basicSliPerformance); + if (error) + return "basicSliPerformance." + error; + } + } + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (typeof message.threshold !== "number") + return "threshold: number expected"; + return null; + }; + + /** + * Creates a PerformanceThreshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold + */ + PerformanceThreshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold) + return object; + var message = new $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold(); + if (object.performance != null) { + if (typeof object.performance !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.performance: object expected"); + message.performance = $root.google.monitoring.v3.RequestBasedSli.fromObject(object.performance); + } + if (object.basicSliPerformance != null) { + if (typeof object.basicSliPerformance !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.basicSliPerformance: object expected"); + message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.fromObject(object.basicSliPerformance); + } + if (object.threshold != null) + message.threshold = Number(object.threshold); + return message; + }; + + /** + * Creates a plain object from a PerformanceThreshold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} message PerformanceThreshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PerformanceThreshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.threshold = 0; + if (message.performance != null && message.hasOwnProperty("performance")) { + object.performance = $root.google.monitoring.v3.RequestBasedSli.toObject(message.performance, options); + if (options.oneofs) + object.type = "performance"; + } + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) { + object.basicSliPerformance = $root.google.monitoring.v3.BasicSli.toObject(message.basicSliPerformance, options); + if (options.oneofs) + object.type = "basicSliPerformance"; + } + return object; + }; + + /** + * Converts this PerformanceThreshold to JSON. + * @function toJSON + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + * @returns {Object.} JSON object + */ + PerformanceThreshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PerformanceThreshold; + })(); + + WindowsBasedSli.MetricRange = (function() { + + /** + * Properties of a MetricRange. + * @memberof google.monitoring.v3.WindowsBasedSli + * @interface IMetricRange + * @property {string|null} [timeSeries] MetricRange timeSeries + * @property {google.monitoring.v3.IRange|null} [range] MetricRange range + */ + + /** + * Constructs a new MetricRange. + * @memberof google.monitoring.v3.WindowsBasedSli + * @classdesc Represents a MetricRange. + * @implements IMetricRange + * @constructor + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange=} [properties] Properties to set + */ + function MetricRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricRange timeSeries. + * @member {string} timeSeries + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @instance + */ + MetricRange.prototype.timeSeries = ""; + + /** + * MetricRange range. + * @member {google.monitoring.v3.IRange|null|undefined} range + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @instance + */ + MetricRange.prototype.range = null; + + /** + * Creates a new MetricRange instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange=} [properties] Properties to set + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange instance + */ + MetricRange.create = function create(properties) { + return new MetricRange(properties); + }; + + /** + * Encodes the specified MetricRange message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange} message MetricRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeSeries); + if (message.range != null && message.hasOwnProperty("range")) + $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricRange message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange} message MetricRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricRange message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli.MetricRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeries = reader.string(); + break; + case 4: + message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricRange message. + * @function verify + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + if (!$util.isString(message.timeSeries)) + return "timeSeries: string expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.monitoring.v3.Range.verify(message.range); + if (error) + return "range." + error; + } + return null; + }; + + /** + * Creates a MetricRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange + */ + MetricRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.WindowsBasedSli.MetricRange) + return object; + var message = new $root.google.monitoring.v3.WindowsBasedSli.MetricRange(); + if (object.timeSeries != null) + message.timeSeries = String(object.timeSeries); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.MetricRange.range: object expected"); + message.range = $root.google.monitoring.v3.Range.fromObject(object.range); + } + return message; + }; + + /** + * Creates a plain object from a MetricRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {google.monitoring.v3.WindowsBasedSli.MetricRange} message MetricRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeries = ""; + object.range = null; + } + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + object.timeSeries = message.timeSeries; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.monitoring.v3.Range.toObject(message.range, options); + return object; + }; + + /** + * Converts this MetricRange to JSON. + * @function toJSON + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @instance + * @returns {Object.} JSON object + */ + MetricRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricRange; + })(); + + return WindowsBasedSli; + })(); + v3.UptimeCheckService = (function() { /** @@ -36547,6 +44091,44 @@ return rpc; })(); + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + /** + * CalendarPeriod enum. + * @name google.type.CalendarPeriod + * @enum {string} + * @property {number} CALENDAR_PERIOD_UNSPECIFIED=0 CALENDAR_PERIOD_UNSPECIFIED value + * @property {number} DAY=1 DAY value + * @property {number} WEEK=2 WEEK value + * @property {number} FORTNIGHT=3 FORTNIGHT value + * @property {number} MONTH=4 MONTH value + * @property {number} QUARTER=5 QUARTER value + * @property {number} HALF=6 HALF value + * @property {number} YEAR=7 YEAR value + */ + type.CalendarPeriod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CALENDAR_PERIOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAY"] = 1; + values[valuesById[2] = "WEEK"] = 2; + values[valuesById[3] = "FORTNIGHT"] = 3; + values[valuesById[4] = "MONTH"] = 4; + values[valuesById[5] = "QUARTER"] = 5; + values[valuesById[6] = "HALF"] = 6; + values[valuesById[7] = "YEAR"] = 7; + return values; + })(); + + return type; + })(); + return google; })(); diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 150edcdf26b..57bebf5ff94 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -1294,6 +1294,591 @@ } } }, + "ServiceMonitoringService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, + "methods": { + "CreateService": { + "requestType": "CreateServiceRequest", + "responseType": "Service", + "options": { + "(google.api.http).post": "/v3/{parent=*/*}/services", + "(google.api.http).body": "service" + } + }, + "GetService": { + "requestType": "GetServiceRequest", + "responseType": "Service", + "options": { + "(google.api.http).get": "/v3/{name=*/*/services/*}" + } + }, + "ListServices": { + "requestType": "ListServicesRequest", + "responseType": "ListServicesResponse", + "options": { + "(google.api.http).get": "/v3/{parent=*/*}/services" + } + }, + "UpdateService": { + "requestType": "UpdateServiceRequest", + "responseType": "Service", + "options": { + "(google.api.http).patch": "/v3/{service.name=*/*/services/*}", + "(google.api.http).body": "service" + } + }, + "DeleteService": { + "requestType": "DeleteServiceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=*/*/services/*}" + } + }, + "CreateServiceLevelObjective": { + "requestType": "CreateServiceLevelObjectiveRequest", + "responseType": "ServiceLevelObjective", + "options": { + "(google.api.http).post": "/v3/{parent=*/*/services/*}/serviceLevelObjectives", + "(google.api.http).body": "service_level_objective" + } + }, + "GetServiceLevelObjective": { + "requestType": "GetServiceLevelObjectiveRequest", + "responseType": "ServiceLevelObjective", + "options": { + "(google.api.http).get": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + } + }, + "ListServiceLevelObjectives": { + "requestType": "ListServiceLevelObjectivesRequest", + "responseType": "ListServiceLevelObjectivesResponse", + "options": { + "(google.api.http).get": "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + } + }, + "UpdateServiceLevelObjective": { + "requestType": "UpdateServiceLevelObjectiveRequest", + "responseType": "ServiceLevelObjective", + "options": { + "(google.api.http).patch": "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}", + "(google.api.http).body": "service_level_objective" + } + }, + "DeleteServiceLevelObjective": { + "requestType": "DeleteServiceLevelObjectiveRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + } + } + } + }, + "CreateServiceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "serviceId": { + "type": "string", + "id": 3 + }, + "service": { + "type": "Service", + "id": 2 + } + } + }, + "GetServiceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListServicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListServicesResponse": { + "fields": { + "services": { + "rule": "repeated", + "type": "Service", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateServiceRequest": { + "fields": { + "service": { + "type": "Service", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteServiceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "CreateServiceLevelObjectiveRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "serviceLevelObjectiveId": { + "type": "string", + "id": 3 + }, + "serviceLevelObjective": { + "type": "ServiceLevelObjective", + "id": 2 + } + } + }, + "GetServiceLevelObjectiveRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "view": { + "type": "ServiceLevelObjective.View", + "id": 2 + } + } + }, + "ListServiceLevelObjectivesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + }, + "view": { + "type": "ServiceLevelObjective.View", + "id": 5 + } + } + }, + "ListServiceLevelObjectivesResponse": { + "fields": { + "serviceLevelObjectives": { + "rule": "repeated", + "type": "ServiceLevelObjective", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateServiceLevelObjectiveRequest": { + "fields": { + "serviceLevelObjective": { + "type": "ServiceLevelObjective", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteServiceLevelObjectiveRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "Service": { + "oneofs": { + "identifier": { + "oneof": [ + "custom", + "appEngine", + "cloudEndpoints", + "clusterIstio" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "custom": { + "type": "Custom", + "id": 6 + }, + "appEngine": { + "type": "AppEngine", + "id": 7 + }, + "cloudEndpoints": { + "type": "CloudEndpoints", + "id": 8 + }, + "clusterIstio": { + "type": "ClusterIstio", + "id": 9 + }, + "telemetry": { + "type": "Telemetry", + "id": 13 + } + }, + "nested": { + "Custom": { + "fields": {} + }, + "AppEngine": { + "fields": { + "moduleId": { + "type": "string", + "id": 1 + } + } + }, + "CloudEndpoints": { + "fields": { + "service": { + "type": "string", + "id": 1 + } + } + }, + "ClusterIstio": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "clusterName": { + "type": "string", + "id": 2 + }, + "serviceNamespace": { + "type": "string", + "id": 3 + }, + "serviceName": { + "type": "string", + "id": 4 + } + } + }, + "Telemetry": { + "fields": { + "resourceName": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ServiceLevelObjective": { + "oneofs": { + "period": { + "oneof": [ + "rollingPeriod", + "calendarPeriod" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 11 + }, + "serviceLevelIndicator": { + "type": "ServiceLevelIndicator", + "id": 3 + }, + "goal": { + "type": "double", + "id": 4 + }, + "rollingPeriod": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "calendarPeriod": { + "type": "google.type.CalendarPeriod", + "id": 6 + } + }, + "nested": { + "View": { + "values": { + "VIEW_UNSPECIFIED": 0, + "FULL": 2, + "EXPLICIT": 1 + } + } + } + }, + "ServiceLevelIndicator": { + "oneofs": { + "type": { + "oneof": [ + "basicSli", + "requestBased", + "windowsBased" + ] + } + }, + "fields": { + "basicSli": { + "type": "BasicSli", + "id": 4 + }, + "requestBased": { + "type": "RequestBasedSli", + "id": 1 + }, + "windowsBased": { + "type": "WindowsBasedSli", + "id": 2 + } + } + }, + "BasicSli": { + "oneofs": { + "sliCriteria": { + "oneof": [ + "availability", + "latency" + ] + } + }, + "fields": { + "method": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "location": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "version": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "availability": { + "type": "AvailabilityCriteria", + "id": 2 + }, + "latency": { + "type": "LatencyCriteria", + "id": 3 + } + }, + "nested": { + "AvailabilityCriteria": { + "fields": {} + }, + "LatencyCriteria": { + "fields": { + "threshold": { + "type": "google.protobuf.Duration", + "id": 3 + } + } + } + } + }, + "Range": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "RequestBasedSli": { + "oneofs": { + "method": { + "oneof": [ + "goodTotalRatio", + "distributionCut" + ] + } + }, + "fields": { + "goodTotalRatio": { + "type": "TimeSeriesRatio", + "id": 1 + }, + "distributionCut": { + "type": "DistributionCut", + "id": 3 + } + } + }, + "TimeSeriesRatio": { + "fields": { + "goodServiceFilter": { + "type": "string", + "id": 4 + }, + "badServiceFilter": { + "type": "string", + "id": 5 + }, + "totalServiceFilter": { + "type": "string", + "id": 6 + } + } + }, + "DistributionCut": { + "fields": { + "distributionFilter": { + "type": "string", + "id": 4 + }, + "range": { + "type": "Range", + "id": 5 + } + } + }, + "WindowsBasedSli": { + "oneofs": { + "windowCriterion": { + "oneof": [ + "goodBadMetricFilter", + "goodTotalRatioThreshold", + "metricMeanInRange", + "metricSumInRange" + ] + } + }, + "fields": { + "goodBadMetricFilter": { + "type": "string", + "id": 5 + }, + "goodTotalRatioThreshold": { + "type": "PerformanceThreshold", + "id": 2 + }, + "metricMeanInRange": { + "type": "MetricRange", + "id": 6 + }, + "metricSumInRange": { + "type": "MetricRange", + "id": 7 + }, + "windowPeriod": { + "type": "google.protobuf.Duration", + "id": 4 + } + }, + "nested": { + "PerformanceThreshold": { + "oneofs": { + "type": { + "oneof": [ + "performance", + "basicSliPerformance" + ] + } + }, + "fields": { + "performance": { + "type": "RequestBasedSli", + "id": 1 + }, + "basicSliPerformance": { + "type": "BasicSli", + "id": 3 + }, + "threshold": { + "type": "double", + "id": 2 + } + } + }, + "MetricRange": { + "fields": { + "timeSeries": { + "type": "string", + "id": 1 + }, + "range": { + "type": "Range", + "id": 4 + } + } + } + } + }, "UptimeCheckService": { "options": { "(google.api.default_host)": "monitoring.googleapis.com", @@ -3185,6 +3770,29 @@ } } } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod", + "java_multiple_files": true, + "java_outer_classname": "CalendarPeriodProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "CalendarPeriod": { + "values": { + "CALENDAR_PERIOD_UNSPECIFIED": 0, + "DAY": 1, + "WEEK": 2, + "FORTNIGHT": 3, + "MONTH": 4, + "QUARTER": 5, + "HALF": 6, + "YEAR": 7 + } + } + } } } } diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json index de7fdbc0fdc..d6101ccaae8 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json @@ -21,27 +21,27 @@ }, "methods": { "ListAlertPolicies": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetAlertPolicy": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateAlertPolicy": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteAlertPolicy": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateAlertPolicy": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js new file mode 100644 index 00000000000..22da60afed1 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js @@ -0,0 +1,539 @@ +// 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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * A `Service` is a discrete, autonomous, and network-accessible unit, designed + * to solve an individual concern + * ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In + * Stackdriver Monitoring, a `Service` acts as the root resource under which + * operational aspects of the service are accessible. + * + * @property {string} name + * Resource name for this Service. Of the form + * `projects/{project_id}/services/{service_id}`. + * + * @property {string} displayName + * Name used for UI elements listing this Service. + * + * @property {Object} custom + * Custom service type. + * + * This object should have the same structure as [Custom]{@link google.monitoring.v3.Custom} + * + * @property {Object} appEngine + * Type used for App Engine services. + * + * This object should have the same structure as [AppEngine]{@link google.monitoring.v3.AppEngine} + * + * @property {Object} cloudEndpoints + * Type used for Cloud Endpoints services. + * + * This object should have the same structure as [CloudEndpoints]{@link google.monitoring.v3.CloudEndpoints} + * + * @property {Object} clusterIstio + * Type used for Istio services that live in a Kubernetes cluster. + * + * This object should have the same structure as [ClusterIstio]{@link google.monitoring.v3.ClusterIstio} + * + * @property {Object} telemetry + * Configuration for how to query telemetry on a Service. + * + * This object should have the same structure as [Telemetry]{@link google.monitoring.v3.Telemetry} + * + * @typedef Service + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Service definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const Service = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Custom view of service telemetry. Currently a place-holder pending final + * design. + * @typedef Custom + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Service.Custom definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + Custom: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * App Engine service. Learn more at https://cloud.google.com/appengine. + * + * @property {string} moduleId + * The ID of the App Engine module underlying this service. Corresponds to + * the `module_id` resource label in the `gae_app` monitored resource: + * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * + * @typedef AppEngine + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Service.AppEngine definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + AppEngine: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints. + * + * @property {string} service + * The name of the Cloud Endpoints service underlying this service. + * Corresponds to the `service` resource label in the `api` monitored + * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * + * @typedef CloudEndpoints + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Service.CloudEndpoints definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + CloudEndpoints: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Istio service. Learn more at http://istio.io. + * + * @property {string} location + * The location of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `location` resource label in `k8s_cluster` + * resources. + * + * @property {string} clusterName + * The name of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `cluster_name` resource label in + * `k8s_cluster` resources. + * + * @property {string} serviceNamespace + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * @property {string} serviceName + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * @typedef ClusterIstio + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Service.ClusterIstio definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + ClusterIstio: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Configuration for how to query telemetry on a Service. + * + * @property {string} resourceName + * The full name of the resource that defines this service. Formatted as + * described in https://cloud.google.com/apis/design/resource_names. + * + * @typedef Telemetry + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Service.Telemetry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + Telemetry: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * A Service-Level Objective (SLO) describes a level of desired good service. It + * consists of a service-level indicator (SLI), a performance goal, and a period + * over which the objective is to be evaluated against that goal. The SLO can + * use SLIs defined in a number of different manners. Typical SLOs might include + * "99% of requests in each rolling week have latency below 200 milliseconds" or + * "99.5% of requests in each calendar month return successfully." + * + * @property {string} name + * Resource name for this `ServiceLevelObjective`. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * + * @property {string} displayName + * Name used for UI elements listing this SLO. + * + * @property {Object} serviceLevelIndicator + * The definition of good service, used to measure and calculate the quality + * of the `Service`'s performance with respect to a single aspect of service + * quality. + * + * This object should have the same structure as [ServiceLevelIndicator]{@link google.monitoring.v3.ServiceLevelIndicator} + * + * @property {number} goal + * The fraction of service that must be good in order for this objective to be + * met. `0 < goal <= 1`. + * + * @property {Object} rollingPeriod + * A rolling time period, semantically "in the past ``". + * Must be an integer multiple of 1 day no larger than 30 days. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {number} calendarPeriod + * A calendar period, semantically "since the start of the current + * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and + * `MONTH` are supported. + * + * The number should be among the values of [CalendarPeriod]{@link google.type.CalendarPeriod} + * + * @typedef ServiceLevelObjective + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ServiceLevelObjective definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const ServiceLevelObjective = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * `ServiceLevelObjective.View` determines what form of + * `ServiceLevelObjective` is returned from `GetServiceLevelObjective`, + * `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs. + * + * @enum {number} + * @memberof google.monitoring.v3 + */ + View: { + + /** + * Same as FULL. + */ + VIEW_UNSPECIFIED: 0, + + /** + * Return the embedded `ServiceLevelIndicator` in the form in which it was + * defined. If it was defined using a `BasicSli`, return that `BasicSli`. + */ + FULL: 2, + + /** + * For `ServiceLevelIndicator`s using `BasicSli` articulation, instead + * return the `ServiceLevelIndicator` with its mode of computation fully + * spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using + * `RequestBasedSli` or `WindowsBasedSli`, return the + * `ServiceLevelIndicator` as it was provided. + */ + EXPLICIT: 1 + } +}; + +/** + * A Service-Level Indicator (SLI) describes the "performance" of a service. For + * some services, the SLI is well-defined. In such cases, the SLI can be + * described easily by referencing the well-known SLI and providing the needed + * parameters. Alternatively, a "custom" SLI can be defined with a query to the + * underlying metric store. An SLI is defined to be `good_service / + * total_service` over any queried time interval. The value of performance + * always falls into the range `0 <= performance <= 1`. A custom SLI describes + * how to compute this ratio, whether this is by dividing values from a pair of + * time series, cutting a `Distribution` into good and bad counts, or counting + * time windows in which the service complies with a criterion. For separation + * of concerns, a single Service-Level Indicator measures performance for only + * one aspect of service quality, such as fraction of successful queries or + * fast-enough queries. + * + * @property {Object} basicSli + * Basic SLI on a well-known service type. + * + * This object should have the same structure as [BasicSli]{@link google.monitoring.v3.BasicSli} + * + * @property {Object} requestBased + * Request-based SLIs + * + * This object should have the same structure as [RequestBasedSli]{@link google.monitoring.v3.RequestBasedSli} + * + * @property {Object} windowsBased + * Windows-based SLIs + * + * This object should have the same structure as [WindowsBasedSli]{@link google.monitoring.v3.WindowsBasedSli} + * + * @typedef ServiceLevelIndicator + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ServiceLevelIndicator definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const ServiceLevelIndicator = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * An SLI measuring performance on a well-known service type. Performance will + * be computed on the basis of pre-defined metrics. The type of the + * `service_resource` determines the metrics to use and the + * `service_resource.labels` and `metric_labels` are used to construct a + * monitoring filter to filter that metric down to just the data relevant to + * this service. + * + * @property {string[]} method + * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + * other methods will not be used to calculate performance for this SLI. If + * omitted, this SLI applies to all the Service's methods. For service types + * that don't support breaking down by method, setting this field will result + * in an error. + * + * @property {string[]} location + * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + * from other locations will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all locations in which the Service has + * activity. For service types that don't support breaking down by location, + * setting this field will result in an error. + * + * @property {string[]} version + * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + * from other API versions will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all API versions. For service types + * that don't support breaking down by version, setting this field will result + * in an error. + * + * @property {Object} availability + * Good service is defined to be the count of requests made to this service + * that return successfully. + * + * This object should have the same structure as [AvailabilityCriteria]{@link google.monitoring.v3.AvailabilityCriteria} + * + * @property {Object} latency + * Good service is defined to be the count of requests made to this service + * that are fast enough with respect to `latency.threshold`. + * + * This object should have the same structure as [LatencyCriteria]{@link google.monitoring.v3.LatencyCriteria} + * + * @typedef BasicSli + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.BasicSli definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const BasicSli = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Future parameters for the availability SLI. + * @typedef AvailabilityCriteria + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.BasicSli.AvailabilityCriteria definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + AvailabilityCriteria: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Parameters for a latency threshold SLI. + * + * @property {Object} threshold + * Good service is defined to be the count of requests made to this service + * that return in no more than `threshold`. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @typedef LatencyCriteria + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.BasicSli.LatencyCriteria definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + LatencyCriteria: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * Range of numerical values, inclusive of `min` and exclusive of `max`. If the + * open range "< range.max" is desired, set `range.min = -infinity`. If the open + * range ">= range.min" is desired, set `range.max = infinity`. + * + * @property {number} min + * Range minimum. + * + * @property {number} max + * Range maximum. + * + * @typedef Range + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const Range = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Service Level Indicators for which atomic units of service are counted + * directly. + * + * @property {Object} goodTotalRatio + * `good_total_ratio` is used when the ratio of `good_service` to + * `total_service` is computed from two `TimeSeries`. + * + * This object should have the same structure as [TimeSeriesRatio]{@link google.monitoring.v3.TimeSeriesRatio} + * + * @property {Object} distributionCut + * `distribution_cut` is used when `good_service` is a count of values + * aggregated in a `Distribution` that fall into a good range. The + * `total_service` is the total count of all values aggregated in the + * `Distribution`. + * + * This object should have the same structure as [DistributionCut]{@link google.monitoring.v3.DistributionCut} + * + * @typedef RequestBasedSli + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.RequestBasedSli definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const RequestBasedSli = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the + * `good_service / total_service` ratio. The specified `TimeSeries` must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify + * exactly two of good, bad, and total, and the relationship `good_service + + * bad_service = total_service` will be assumed. + * + * @property {string} goodServiceFilter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying good service provided. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * @property {string} badServiceFilter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying bad service, either demanded service + * that was not provided or demanded service that was of inadequate quality. + * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * @property {string} totalServiceFilter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying total demanded service. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * @typedef TimeSeriesRatio + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.TimeSeriesRatio definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const TimeSeriesRatio = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A `DistributionCut` defines a `TimeSeries` and thresholds used for measuring + * good service and total service. The `TimeSeries` must have `ValueType = + * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. The + * computed `good_service` will be the count of values x in the `Distribution` + * such that `range.min <= x < range.max`. + * + * @property {string} distributionFilter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` aggregating values. Must have `ValueType = + * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * @property {Object} range + * Range of values considered "good." For a one-sided range, set one bound to + * an infinite value. + * + * This object should have the same structure as [Range]{@link google.monitoring.v3.Range} + * + * @typedef DistributionCut + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DistributionCut definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const DistributionCut = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A `WindowsBasedSli` defines `good_service` as the count of time windows for + * which the provided service was of good quality. Criteria for determining + * if service was good are embedded in the `window_criterion`. + * + * @property {string} goodBadMetricFilter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if + * any `true` values appear in the window. + * + * @property {Object} goodTotalRatioThreshold + * A window is good if its `performance` is high enough. + * + * This object should have the same structure as [PerformanceThreshold]{@link google.monitoring.v3.PerformanceThreshold} + * + * @property {Object} metricMeanInRange + * A window is good if the metric's value is in a good range, averaged + * across returned streams. + * + * This object should have the same structure as [MetricRange]{@link google.monitoring.v3.MetricRange} + * + * @property {Object} metricSumInRange + * A window is good if the metric's value is in a good range, summed across + * returned streams. + * + * This object should have the same structure as [MetricRange]{@link google.monitoring.v3.MetricRange} + * + * @property {Object} windowPeriod + * Duration over which window quality is evaluated. Must be an integer + * fraction of a day and at least `60s`. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @typedef WindowsBasedSli + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.WindowsBasedSli definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ +const WindowsBasedSli = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * A `PerformanceThreshold` is used when each window is good when that window + * has a sufficiently high `performance`. + * + * @property {Object} performance + * `RequestBasedSli` to evaluate to judge window quality. + * + * This object should have the same structure as [RequestBasedSli]{@link google.monitoring.v3.RequestBasedSli} + * + * @property {Object} basicSliPerformance + * `BasicSli` to evaluate to judge window quality. + * + * This object should have the same structure as [BasicSli]{@link google.monitoring.v3.BasicSli} + * + * @property {number} threshold + * If window `performance >= threshold`, the window is counted as good. + * + * @typedef PerformanceThreshold + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.WindowsBasedSli.PerformanceThreshold definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + PerformanceThreshold: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * A `MetricRange` is used when each window is good when the value x of a + * single `TimeSeries` satisfies `range.min <= x < range.max`. The provided + * `TimeSeries` must have `ValueType = INT64` or `ValueType = DOUBLE` and + * `MetricKind = GAUGE`. + * + * @property {string} timeSeries + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying the `TimeSeries` to use for evaluating window quality. + * + * @property {Object} range + * Range of values considered "good." For a one-sided range, set one bound + * to an infinite value. + * + * This object should have the same structure as [Range]{@link google.monitoring.v3.Range} + * + * @typedef MetricRange + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.WindowsBasedSli.MetricRange definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} + */ + MetricRange: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js new file mode 100644 index 00000000000..78856efd49e --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js @@ -0,0 +1,299 @@ +// 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. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * The `CreateService` request. + * + * @property {string} parent + * Resource name of the parent workspace. + * Of the form `projects/{project_id}`. + * + * @property {string} serviceId + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern [a-z0-9\-]+ + * + * @property {Object} service + * The `Service` to create. + * + * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} + * + * @typedef CreateServiceRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const CreateServiceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetService` request. + * + * @property {string} name + * Resource name of the `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * + * @typedef GetServiceRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const GetServiceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListServices` request. + * + * @property {string} parent + * Resource name of the parent `Workspace`. + * Of the form `projects/{project_id}`. + * + * @property {string} filter + * A filter specifying what `Service`s to return. The filter currently + * supports the following fields: + * + * - `identifier_case` + * - `app_engine.module_id` + * - `cloud_endpoints.service` + * - `cluster_istio.location` + * - `cluster_istio.cluster_name` + * - `cluster_istio.service_namespace` + * - `cluster_istio.service_name` + * + * `identifier_case` refers to which option in the identifier oneof is + * populated. For example, the filter `identifier_case = "CUSTOM"` would match + * all services with a value for the `custom` field. Valid options are + * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * + * @property {number} pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @typedef ListServicesRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListServicesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const ListServicesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListServices` response. + * + * @property {Object[]} services + * The `Service`s matching the specified filter. + * + * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListServicesResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListServicesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const ListServicesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `UpdateService` request. + * + * @property {Object} service + * The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * + * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} + * + * @property {Object} updateMask + * A set of field paths defining which fields to use for the update. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef UpdateServiceRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UpdateServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const UpdateServiceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `DeleteService` request. + * + * @property {string} name + * Resource name of the `Service` to delete. + * Of the form `projects/{project_id}/service/{service_id}`. + * + * @typedef DeleteServiceRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const DeleteServiceRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `CreateServiceLevelObjective` request. + * + * @property {string} parent + * Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * + * @property {string} serviceLevelObjectiveId + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern [a-z0-9\-]+ + * + * @property {Object} serviceLevelObjective + * The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * + * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} + * + * @typedef CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.CreateServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const CreateServiceLevelObjectiveRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `GetServiceLevelObjective` request. + * + * @property {string} name + * Resource name of the `ServiceLevelObjective` to get. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * + * @property {number} view + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * The number should be among the values of [View]{@link google.monitoring.v3.View} + * + * @typedef GetServiceLevelObjectiveRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.GetServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const GetServiceLevelObjectiveRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListServiceLevelObjectives` request. + * + * @property {string} parent + * Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * + * @property {string} filter + * A filter specifying what `ServiceLevelObjective`s to return. + * + * @property {number} pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * @property {string} pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * @property {number} view + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * The number should be among the values of [View]{@link google.monitoring.v3.View} + * + * @typedef ListServiceLevelObjectivesRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListServiceLevelObjectivesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const ListServiceLevelObjectivesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `ListServiceLevelObjectives` response. + * + * @property {Object[]} serviceLevelObjectives + * The `ServiceLevelObjective`s matching the specified filter. + * + * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} + * + * @property {string} nextPageToken + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `pageToken` in the next call to this method. + * + * @typedef ListServiceLevelObjectivesResponse + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.ListServiceLevelObjectivesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const ListServiceLevelObjectivesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `UpdateServiceLevelObjective` request. + * + * @property {Object} serviceLevelObjective + * The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * + * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} + * + * @property {Object} updateMask + * A set of field paths defining which fields to use for the update. + * + * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} + * + * @typedef UpdateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.UpdateServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const UpdateServiceLevelObjectiveRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The `DeleteServiceLevelObjective` request. + * + * @property {string} name + * Resource name of the `ServiceLevelObjective` to delete. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * + * @typedef DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3 + * @see [google.monitoring.v3.DeleteServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} + */ +const DeleteServiceLevelObjectiveRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json index fde5e90f1d0..a57878c2ece 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json @@ -21,32 +21,32 @@ }, "methods": { "ListGroups": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetGroup": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateGroup": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateGroup": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteGroup": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListGroupMembers": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index 9845e3fa484..ceaeae9e567 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/index.js @@ -18,10 +18,12 @@ const AlertPolicyServiceClient = require('./alert_policy_service_client'); const GroupServiceClient = require('./group_service_client'); const MetricServiceClient = require('./metric_service_client'); const NotificationChannelServiceClient = require('./notification_channel_service_client'); +const ServiceMonitoringServiceClient = require('./service_monitoring_service_client'); const UptimeCheckServiceClient = require('./uptime_check_service_client'); module.exports.AlertPolicyServiceClient = AlertPolicyServiceClient; module.exports.GroupServiceClient = GroupServiceClient; module.exports.MetricServiceClient = MetricServiceClient; module.exports.NotificationChannelServiceClient = NotificationChannelServiceClient; +module.exports.ServiceMonitoringServiceClient = ServiceMonitoringServiceClient; module.exports.UptimeCheckServiceClient = UptimeCheckServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json index 7dd4607375c..c67d2422ec1 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json @@ -21,37 +21,37 @@ }, "methods": { "ListMonitoredResourceDescriptors": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetMonitoredResourceDescriptor": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListMetricDescriptors": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetMetricDescriptor": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateMetricDescriptor": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteMetricDescriptor": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListTimeSeries": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json index 4a0f4bdc195..5fddaef1323 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json @@ -21,52 +21,52 @@ }, "methods": { "ListNotificationChannelDescriptors": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetNotificationChannelDescriptor": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListNotificationChannels": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetNotificationChannel": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CreateNotificationChannel": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateNotificationChannel": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteNotificationChannel": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "SendNotificationChannelVerificationCode": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetNotificationChannelVerificationCode": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "VerifyNotificationChannel": { - "timeout_millis": 30000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js new file mode 100644 index 00000000000..20d3b178828 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js @@ -0,0 +1,1238 @@ +// 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'; + +const gapicConfig = require('./service_monitoring_service_client_config.json'); +const gax = require('google-gax'); +const path = require('path'); + +const VERSION = require('../../package.json').version; + +/** + * The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for + * managing and querying aspects of a workspace's services. These include the + * `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy + * of categorized Health Metrics. + * + * @class + * @memberof v3 + */ +class ServiceMonitoringServiceClient { + /** + * Construct an instance of ServiceMonitoringServiceClient. + * + * @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 = { + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + servicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + serviceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + }; + + // 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 = { + listServices: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'services' + ), + listServiceLevelObjectives: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'serviceLevelObjectives' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.ServiceMonitoringService', + 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.monitoring.v3.ServiceMonitoringService. + const serviceMonitoringServiceStub = gaxGrpc.createStub( + opts.fallback + ? protos.lookupService('google.monitoring.v3.ServiceMonitoringService') + : protos.google.monitoring.v3.ServiceMonitoringService, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const serviceMonitoringServiceStubMethods = [ + 'createService', + 'getService', + 'listServices', + 'updateService', + 'deleteService', + 'createServiceLevelObjective', + 'getServiceLevelObjective', + 'listServiceLevelObjectives', + 'updateServiceLevelObjective', + 'deleteServiceLevelObjective', + ]; + for (const methodName of serviceMonitoringServiceStubMethods) { + const innerCallPromise = serviceMonitoringServiceStub.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 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + + /** + * Create a `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Resource name of the parent workspace. + * Of the form `projects/{project_id}`. + * @param {Object} request.service + * The `Service` to create. + * + * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} + * @param {string} [request.serviceId] + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern [a-z0-9\-]+ + * @param {Object} [options] + * Optional parameters. You 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 [Service]{@link google.monitoring.v3.Service}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Service]{@link google.monitoring.v3.Service}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedParent = client.projectPath('[PROJECT]'); + * const service = {}; + * const request = { + * parent: formattedParent, + * service: service, + * }; + * client.createService(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createService(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.createService(request, options, callback); + } + + /** + * Get the named `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name of the `Service`. + * Of the form `projects/{project_id}/services/{service_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 [Service]{@link google.monitoring.v3.Service}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Service]{@link google.monitoring.v3.Service}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); + * client.getService({name: formattedName}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getService(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.getService(request, options, callback); + } + + /** + * List `Service`s for this workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Resource name of the parent `Workspace`. + * Of the form `projects/{project_id}`. + * @param {string} [request.filter] + * A filter specifying what `Service`s to return. The filter currently + * supports the following fields: + * + * - `identifier_case` + * - `app_engine.module_id` + * - `cloud_endpoints.service` + * - `cluster_istio.location` + * - `cluster_istio.cluster_name` + * - `cluster_istio.service_namespace` + * - `cluster_istio.service_name` + * + * `identifier_case` refers to which option in the identifier oneof is + * populated. For example, the filter `identifier_case = "CUSTOM"` would match + * all services with a value for the `custom` field. Valid options are + * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * @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 [Service]{@link google.monitoring.v3.Service}. + * + * 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 [ListServicesResponse]{@link google.monitoring.v3.ListServicesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Service]{@link google.monitoring.v3.Service}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Service]{@link google.monitoring.v3.Service} 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 [ListServicesResponse]{@link google.monitoring.v3.ListServicesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * const formattedParent = client.projectPath('[PROJECT]'); + * + * client.listServices({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.listServices(nextRequest, options).then(callback); + * } + * } + * client.listServices({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listServices(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.listServices(request, options, callback); + } + + /** + * Equivalent to {@link listServices}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listServices} 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 + * Resource name of the parent `Workspace`. + * Of the form `projects/{project_id}`. + * @param {string} [request.filter] + * A filter specifying what `Service`s to return. The filter currently + * supports the following fields: + * + * - `identifier_case` + * - `app_engine.module_id` + * - `cloud_endpoints.service` + * - `cluster_istio.location` + * - `cluster_istio.cluster_name` + * - `cluster_istio.service_namespace` + * - `cluster_istio.service_name` + * + * `identifier_case` refers to which option in the identifier oneof is + * populated. For example, the filter `identifier_case = "CUSTOM"` would match + * all services with a value for the `custom` field. Valid options are + * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * @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 [Service]{@link google.monitoring.v3.Service} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedParent = client.projectPath('[PROJECT]'); + * client.listServicesStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listServicesStream(request, options) { + options = options || {}; + + return this._descriptors.page.listServices.createStream( + this._innerApiCalls.listServices, + request, + options + ); + } + + /** + * Update this `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.service + * The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * + * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} + * @param {Object} [request.updateMask] + * A set of field paths defining which fields to use for the update. + * + * 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 [Service]{@link google.monitoring.v3.Service}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Service]{@link google.monitoring.v3.Service}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const service = {}; + * client.updateService({service: service}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateService(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({ + 'service.name': request.service.name, + }); + + return this._innerApiCalls.updateService(request, options, callback); + } + + /** + * Soft delete this `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name of the `Service` to delete. + * Of the form `projects/{project_id}/service/{service_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 monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); + * client.deleteService({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteService(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.deleteService(request, options, callback); + } + + /** + * Create a `ServiceLevelObjective` for the given `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {Object} request.serviceLevelObjective + * The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * + * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} + * @param {string} [request.serviceLevelObjectiveId] + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern [a-z0-9\-]+ + * @param {Object} [options] + * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + * const serviceLevelObjective = {}; + * const request = { + * parent: formattedParent, + * serviceLevelObjective: serviceLevelObjective, + * }; + * client.createServiceLevelObjective(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createServiceLevelObjective(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.createServiceLevelObjective( + request, + options, + callback + ); + } + + /** + * Get a `ServiceLevelObjective` by name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name of the `ServiceLevelObjective` to get. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * @param {number} [request.view] + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * The number should be among the values of [View]{@link google.monitoring.v3.View} + * @param {Object} [options] + * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.serviceLevelObjectivePath('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + * client.getServiceLevelObjective({name: formattedName}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getServiceLevelObjective(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.getServiceLevelObjective( + request, + options, + callback + ); + } + + /** + * List the `ServiceLevelObjective`s for the given `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {string} [request.filter] + * A filter specifying what `ServiceLevelObjective`s to return. + * @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 {number} [request.view] + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * The number should be among the values of [View]{@link google.monitoring.v3.View} + * @param {Object} [options] + * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * + * 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 [ListServiceLevelObjectivesResponse]{@link google.monitoring.v3.ListServiceLevelObjectivesResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} 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 [ListServiceLevelObjectivesResponse]{@link google.monitoring.v3.ListServiceLevelObjectivesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + * + * client.listServiceLevelObjectives({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.servicePath('[PROJECT]', '[SERVICE]'); + * + * + * 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.listServiceLevelObjectives(nextRequest, options).then(callback); + * } + * } + * client.listServiceLevelObjectives({parent: formattedParent}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listServiceLevelObjectives(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.listServiceLevelObjectives( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listServiceLevelObjectives}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listServiceLevelObjectives} 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 + * Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {string} [request.filter] + * A filter specifying what `ServiceLevelObjective`s to return. + * @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 {number} [request.view] + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * The number should be among the values of [View]{@link google.monitoring.v3.View} + * @param {Object} [options] + * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} on 'data' event. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + * client.listServiceLevelObjectivesStream({parent: formattedParent}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listServiceLevelObjectivesStream(request, options) { + options = options || {}; + + return this._descriptors.page.listServiceLevelObjectives.createStream( + this._innerApiCalls.listServiceLevelObjectives, + request, + options + ); + } + + /** + * Update the given `ServiceLevelObjective`. + * + * @param {Object} request + * The request object that will be sent. + * @param {Object} request.serviceLevelObjective + * The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * + * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} + * @param {Object} [request.updateMask] + * A set of field paths defining which fields to use for the update. + * + * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const serviceLevelObjective = {}; + * client.updateServiceLevelObjective({serviceLevelObjective: serviceLevelObjective}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateServiceLevelObjective(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({ + 'service_level_objective.name': request.serviceLevelObjective.name, + }); + + return this._innerApiCalls.updateServiceLevelObjective( + request, + options, + callback + ); + } + + /** + * Delete the given `ServiceLevelObjective`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name of the `ServiceLevelObjective` to delete. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * @param {Object} [options] + * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); + * + * const client = new monitoring.v3.ServiceMonitoringServiceClient({ + * // optional auth parameters. + * }); + * + * const formattedName = client.serviceLevelObjectivePath('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + * client.deleteServiceLevelObjective({name: formattedName}).catch(err => { + * console.error(err); + * }); + */ + deleteServiceLevelObjective(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.deleteServiceLevelObjective( + request, + options, + callback + ); + } + + // -------------------- + // -- 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 service resource name string. + * + * @param {String} project + * @param {String} service + * @returns {String} + */ + servicePath(project, service) { + return this._pathTemplates.servicePathTemplate.render({ + project: project, + service: service, + }); + } + + /** + * Return a fully-qualified service_level_objective resource name string. + * + * @param {String} project + * @param {String} service + * @param {String} serviceLevelObjective + * @returns {String} + */ + serviceLevelObjectivePath(project, service, serviceLevelObjective) { + return this._pathTemplates.serviceLevelObjectivePathTemplate.render({ + project: project, + service: service, + service_level_objective: serviceLevelObjective, + }); + } + + /** + * 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 serviceName from a service resource. + * + * @param {String} serviceName + * A fully-qualified path representing a service resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromServiceName(serviceName) { + return this._pathTemplates.servicePathTemplate.match(serviceName).project; + } + + /** + * Parse the serviceName from a service resource. + * + * @param {String} serviceName + * A fully-qualified path representing a service resources. + * @returns {String} - A string representing the service. + */ + matchServiceFromServiceName(serviceName) { + return this._pathTemplates.servicePathTemplate.match(serviceName).service; + } + + /** + * Parse the serviceLevelObjectiveName from a service_level_objective resource. + * + * @param {String} serviceLevelObjectiveName + * A fully-qualified path representing a service_level_objective resources. + * @returns {String} - A string representing the project. + */ + matchProjectFromServiceLevelObjectiveName(serviceLevelObjectiveName) { + return this._pathTemplates.serviceLevelObjectivePathTemplate.match( + serviceLevelObjectiveName + ).project; + } + + /** + * Parse the serviceLevelObjectiveName from a service_level_objective resource. + * + * @param {String} serviceLevelObjectiveName + * A fully-qualified path representing a service_level_objective resources. + * @returns {String} - A string representing the service. + */ + matchServiceFromServiceLevelObjectiveName(serviceLevelObjectiveName) { + return this._pathTemplates.serviceLevelObjectivePathTemplate.match( + serviceLevelObjectiveName + ).service; + } + + /** + * Parse the serviceLevelObjectiveName from a service_level_objective resource. + * + * @param {String} serviceLevelObjectiveName + * A fully-qualified path representing a service_level_objective resources. + * @returns {String} - A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromServiceLevelObjectiveName( + serviceLevelObjectiveName + ) { + return this._pathTemplates.serviceLevelObjectivePathTemplate.match( + serviceLevelObjectiveName + ).service_level_objective; + } +} + +module.exports = ServiceMonitoringServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json new file mode 100644 index 00000000000..dfa25dc0bb1 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json @@ -0,0 +1,76 @@ +{ + "interfaces": { + "google.monitoring.v3.ServiceMonitoringService": { + "retry_codes": { + "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, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateService": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetService": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListServices": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateService": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteService": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateServiceLevelObjective": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetServiceLevelObjective": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListServiceLevelObjectives": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateServiceLevelObjective": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteServiceLevelObjective": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json new file mode 100644 index 00000000000..10dad48263d --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/monitoring/v3/service_service.proto" +] diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index c8da64fe4b7..7e210387b10 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-02T11:11:54.790733Z", + "updateTime": "2019-11-13T12:16:01.746091Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.0", - "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" + "version": "0.41.1", + "dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aac770126e2def40dcc387f50e8007b21c869e58", - "internalRef": "278016738" + "sha": "88bbf96b90089994ed16208a0f38cdd07f743742", + "internalRef": "280134477" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index f9411f5f7a6..037d55a5790 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -2064,6 +2064,676 @@ describe('NotificationChannelServiceClient', () => { }); }); }); +describe('ServiceMonitoringServiceClient', () => { + it('has servicePath', () => { + const servicePath = + monitoringModule.v3.ServiceMonitoringServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + monitoringModule.v3.ServiceMonitoringServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = monitoringModule.v3.ServiceMonitoringServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + fallback: true, + }); + assert(client); + }); + + describe('createService', () => { + it('invokes createService without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.projectPath('[PROJECT]'); + const service = {}; + const request = { + parent: formattedParent, + service: service, + }; + + // Mock response + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const expectedResponse = { + name: name, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.createService = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createService(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createService with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.projectPath('[PROJECT]'); + const service = {}; + const request = { + parent: formattedParent, + service: service, + }; + + // Mock Grpc layer + client._innerApiCalls.createService = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createService(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getService', () => { + it('invokes getService without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); + const request = { + name: formattedName, + }; + + // Mock response + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const expectedResponse = { + name: name2, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.getService = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getService(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getService with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getService = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getService(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listServices', () => { + it('invokes listServices without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + 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 servicesElement = {}; + const services = [servicesElement]; + const expectedResponse = { + nextPageToken: nextPageToken, + services: services, + }; + + // Mock Grpc layer + client._innerApiCalls.listServices = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.services); + }; + + client.listServices(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.services); + done(); + }); + }); + + it('invokes listServices with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + 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.listServices = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listServices(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateService', () => { + it('invokes updateService without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const service = {}; + const request = { + service: service, + }; + + // Mock response + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const expectedResponse = { + name: name, + displayName: displayName, + }; + + // Mock Grpc layer + client._innerApiCalls.updateService = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateService(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateService with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const service = {}; + const request = { + service: service, + }; + + // Mock Grpc layer + client._innerApiCalls.updateService = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateService(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteService', () => { + it('invokes deleteService without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteService = mockSimpleGrpcMethod(request); + + client.deleteService(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteService with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteService = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteService(request, err => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('createServiceLevelObjective', () => { + it('invokes createServiceLevelObjective without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + const serviceLevelObjective = {}; + const request = { + parent: formattedParent, + serviceLevelObjective: serviceLevelObjective, + }; + + // Mock response + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const goal = 317825.0; + const expectedResponse = { + name: name, + displayName: displayName, + goal: goal, + }; + + // Mock Grpc layer + client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createServiceLevelObjective(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createServiceLevelObjective with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + const serviceLevelObjective = {}; + const request = { + parent: formattedParent, + serviceLevelObjective: serviceLevelObjective, + }; + + // Mock Grpc layer + client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createServiceLevelObjective(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getServiceLevelObjective', () => { + it('invokes getServiceLevelObjective without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.serviceLevelObjectivePath( + '[PROJECT]', + '[SERVICE]', + '[SERVICE_LEVEL_OBJECTIVE]' + ); + const request = { + name: formattedName, + }; + + // Mock response + const name2 = 'name2-1052831874'; + const displayName = 'displayName1615086568'; + const goal = 317825.0; + const expectedResponse = { + name: name2, + displayName: displayName, + goal: goal, + }; + + // Mock Grpc layer + client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getServiceLevelObjective(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getServiceLevelObjective with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.serviceLevelObjectivePath( + '[PROJECT]', + '[SERVICE]', + '[SERVICE_LEVEL_OBJECTIVE]' + ); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getServiceLevelObjective(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listServiceLevelObjectives', () => { + it('invokes listServiceLevelObjectives without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + const request = { + parent: formattedParent, + }; + + // Mock response + const nextPageToken = ''; + const serviceLevelObjectivesElement = {}; + const serviceLevelObjectives = [serviceLevelObjectivesElement]; + const expectedResponse = { + nextPageToken: nextPageToken, + serviceLevelObjectives: serviceLevelObjectives, + }; + + // Mock Grpc layer + client._innerApiCalls.listServiceLevelObjectives = ( + actualRequest, + options, + callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.serviceLevelObjectives); + }; + + client.listServiceLevelObjectives(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual( + response, + expectedResponse.serviceLevelObjectives + ); + done(); + }); + }); + + it('invokes listServiceLevelObjectives with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); + const request = { + parent: formattedParent, + }; + + // Mock Grpc layer + client._innerApiCalls.listServiceLevelObjectives = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listServiceLevelObjectives(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('updateServiceLevelObjective', () => { + it('invokes updateServiceLevelObjective without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const serviceLevelObjective = {}; + const request = { + serviceLevelObjective: serviceLevelObjective, + }; + + // Mock response + const name = 'name3373707'; + const displayName = 'displayName1615086568'; + const goal = 317825.0; + const expectedResponse = { + name: name, + displayName: displayName, + goal: goal, + }; + + // Mock Grpc layer + client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateServiceLevelObjective(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateServiceLevelObjective with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const serviceLevelObjective = {}; + const request = { + serviceLevelObjective: serviceLevelObjective, + }; + + // Mock Grpc layer + client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateServiceLevelObjective(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteServiceLevelObjective', () => { + it('invokes deleteServiceLevelObjective without error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.serviceLevelObjectivePath( + '[PROJECT]', + '[SERVICE]', + '[SERVICE_LEVEL_OBJECTIVE]' + ); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( + request + ); + + client.deleteServiceLevelObjective(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteServiceLevelObjective with error', done => { + const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const formattedName = client.serviceLevelObjectivePath( + '[PROJECT]', + '[SERVICE]', + '[SERVICE_LEVEL_OBJECTIVE]' + ); + const request = { + name: formattedName, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteServiceLevelObjective(request, err => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); +}); describe('UptimeCheckServiceClient', () => { it('has servicePath', () => { const servicePath = From a01624d08460ff79322839c94483d4cb48fc4595 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 15 Nov 2019 12:00:25 -0800 Subject: [PATCH 243/422] feat: Introduced detailed status message for CreateTimeSeries: CreateTimeSeriesSummary replaces CreateTimeSeriesError, which is now deprecated and unused --- packages/google-cloud-monitoring/.jsdoc.js | 3 +- .../protos/google/monitoring/v3/alert.proto | 10 +- .../google/monitoring/v3/dropped_labels.proto | 2 +- .../protos/google/monitoring/v3/metric.proto | 16 +- .../google/monitoring/v3/metric_service.proto | 46 +- .../google/monitoring/v3/notification.proto | 1 + .../protos/google/monitoring/v3/service.proto | 2 + .../monitoring/v3/service_service.proto | 2 + .../protos/google/monitoring/v3/uptime.proto | 96 ++-- .../protos/protos.d.ts | 201 ++++++++ .../google-cloud-monitoring/protos/protos.js | 469 ++++++++++++++++++ .../protos/protos.json | 39 +- .../v3/doc/google/monitoring/v3/doc_alert.js | 10 +- .../v3/doc/google/monitoring/v3/doc_metric.js | 16 +- .../monitoring/v3/doc_metric_service.js | 10 +- .../v3/doc/google/monitoring/v3/doc_uptime.js | 28 +- .../src/v3/metric_service_client.js | 20 +- .../google-cloud-monitoring/synth.metadata | 6 +- 18 files changed, 860 insertions(+), 117 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index ca434e9064b..06980d9b158 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.jsdoc.js @@ -26,7 +26,8 @@ module.exports = { destination: './docs/' }, plugins: [ - 'plugins/markdown' + 'plugins/markdown', + 'jsdoc-region-tag' ], source: { excludePattern: '(^|\\/|\\\\)[._]', diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 0f61bddf159..a4ea225d577 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -76,7 +76,7 @@ message AlertPolicy { // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the - // [`MetricService.ListTimeSeries` + // [`ListTimeSeries` // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that // call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain @@ -91,8 +91,7 @@ message AlertPolicy { // members of a group of resrouces). Multiple aggregations // are applied in the order specified. // - // This field is similar to the one in the - // [`MetricService.ListTimeSeries` + // This field is similar to the one in the [`ListTimeSeries` // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It // is advisable to use the `ListTimeSeries` method when debugging this // field. @@ -163,7 +162,7 @@ message AlertPolicy { // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the - // [`MetricService.ListTimeSeries` + // [`ListTimeSeries` // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that // call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain @@ -178,8 +177,7 @@ message AlertPolicy { // members of a group of resrouces). Multiple aggregations // are applied in the order specified. // - // This field is similar to the - // one in the [`MetricService.ListTimeSeries` + // This field is similar to the one in the [`ListTimeSeries` // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It // is advisable to use the `ListTimeSeries` method when debugging this // field. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index 016ecf7b084..9b943ccd047 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -19,10 +19,10 @@ package google.monitoring.v3; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; -option php_namespace = "Google\\Cloud\\Monitoring\\V3"; option java_multiple_files = true; option java_outer_classname = "DroppedLabelsProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 4c5c0a84810..3c202ed412c 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -33,14 +33,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A single data point in a time series. message Point { // The time interval to which the data point applies. For `GAUGE` metrics, - // the start time is optional, but if it is supplied, it must equal the end - // time. For `DELTA` metrics, the start and end time should specify a - // non-zero interval, with subsequent points specifying contiguous and - // non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - // time should specify a non-zero interval, with subsequent points specifying - // 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. + // the start time is optional, but if it is supplied, it must equal the + // end time. For `DELTA` metrics, the start + // and end time should specify a non-zero interval, with subsequent points + // specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + // metrics, the start and end time should specify a non-zero interval, with + // subsequent points specifying 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. TimeInterval interval = 1; // The value of the data point. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 3dc20be9aa5..101dee40e97 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -252,13 +252,15 @@ message ListTimeSeriesRequest { // in the response. TimeInterval interval = 4; - // By default, the raw time series data is returned. - // Use this field to combine multiple time series for different - // views of the data. + // Specifies the alignment of data points in individual time series as + // well as how to combine the retrieved time series across specified labels. + // + // By default (if no `aggregation` is explicitly specified), the raw time + // series data is returned. Aggregation aggregation = 5; // Unsupported: must be left blank. The points in each time series are - // returned in reverse time order. + // currently returned in reverse time order (most recent to oldest). string order_by = 6; // Specifies which information is returned about the time series. @@ -308,14 +310,32 @@ message CreateTimeSeriesRequest { repeated TimeSeries time_series = 2; } -// Describes the result of a failed request to write data to a time series. +// DEPRECATED. Used to hold per-time-series error status. message CreateTimeSeriesError { - // The time series, including the `Metric`, `MonitoredResource`, - // and `Point`s (including timestamp and value) that resulted - // in the error. This field provides all of the context that - // would be needed to retry the operation. - TimeSeries time_series = 1; - - // The status of the requested write operation. - google.rpc.Status status = 2; + // DEPRECATED. Time series ID that resulted in the `status` error. + TimeSeries time_series = 1 [deprecated = true]; + + // DEPRECATED. The status of the requested write operation for `time_series`. + google.rpc.Status status = 2 [deprecated = true]; +} + +// Summary of the result of a failed request to write data to a time series. +message CreateTimeSeriesSummary { + // Detailed information about an error category. + message Error { + // The status of the requested write operation. + google.rpc.Status status = 1; + + // The number of points that couldn't be written because of `status`. + int32 point_count = 2; + } + + // The number of points in the request. + int32 total_point_count = 1; + + // The number of points that were successfully written. + int32 success_point_count = 2; + + // The number of points that failed to be written. Order is not guaranteed. + repeated Error errors = 3; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index 4ee97b8f6e5..939ca267718 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/label.proto"; +import "google/api/launch_stage.proto"; import "google/monitoring/v3/common.proto"; import "google/protobuf/wrappers.proto"; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto index 5622931c67d..7de203319af 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto @@ -22,10 +22,12 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/type/calendar_period.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A `Service` is a discrete, autonomous, and network-accessible unit, designed // to solve an individual concern diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto index 85cefa10d23..e0a35833e5b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto @@ -24,10 +24,12 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/api/client.proto"; +option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringServiceProto"; option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for // managing and querying aspects of a workspace's services. These include the diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 2601f531ba7..eb424e97151 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -27,27 +27,6 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; -// The regions from which an Uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in Uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - // An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { @@ -104,21 +83,25 @@ message InternalChecker { State state = 7; } -// The supported resource types that can be used as values of -// `group_resource.resource_type`. -// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. -// The resource types `gae_app` and `uptime_url` are not valid here because -// group checks on App Engine modules and URLs are not allowed. -enum GroupResourceType { - // Default value (not valid). - RESOURCE_TYPE_UNSPECIFIED = 0; +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; - // A group of instances from Google Cloud Platform (GCP) or - // Amazon Web Services (AWS). - INSTANCE = 1; + // Allows checks to run from locations within the United States of America. + USA = 1; - // A group of Amazon ELB load balancers. - AWS_ELB_LOAD_BALANCER = 2; + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; } // This message configures which resources and services to monitor for @@ -202,8 +185,11 @@ message UptimeCheckConfig { int32 port = 1; } - // Used to perform string matching. It allows substring and regular - // expressions, together with their negations. + // Optional. Used to perform content matching. This allows matching based on + // substrings and regular expressions, together with their negations. Only the + // first 4 MB of an HTTP or HTTPS check's response (and the first + // 1 MB of a TCP check's response) are examined for purposes of content + // matching. message ContentMatcher { // Options to perform content matching. enum ContentMatcherOption { @@ -212,27 +198,28 @@ message UptimeCheckConfig { // Treated as `CONTAINS_STRING`. CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; - // Selects substring matching (there is a match if the output contains - // the `content` string). This is the default value for checks without + // Selects substring matching. The match succeeds if the output contains + // the `content` string. This is the default value for checks without // a `matcher` option, or where the value of `matcher` is // `CONTENT_MATCHER_OPTION_UNSPECIFIED`. CONTAINS_STRING = 1; - // Selects negation of substring matching (there is a match if the output - // does NOT contain the `content` string). + // Selects negation of substring matching. The match succeeds if the + // output does _NOT_ contain the `content` string. NOT_CONTAINS_STRING = 2; - // Selects regular expression matching (there is a match of the output - // matches the regular expression specified in the `content` string). + // Selects regular-expression matching. The match succeeds of the output + // matches the regular expression specified in the `content` string. MATCHES_REGEX = 3; - // Selects negation of regular expression matching (there is a match if - // the output does NOT match the regular expression specified in the - // `content` string). + // Selects negation of regular-expression matching. The match succeeds if + // the output does _NOT_ match the regular expression specified in the + // `content` string. NOT_MATCHES_REGEX = 4; } - // String or regex content to match (max 1024 bytes) + // String or regex content to match. Maximum 1024 bytes. An empty `content` + // string indicates no content matching is to be performed. string content = 1; // The type of content matcher that will be applied to the server output, @@ -335,3 +322,20 @@ message UptimeCheckIp { // interpreting this field in either IPv4 or IPv6 format. string ip_address = 3; } + +// The supported resource types that can be used as values of +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. +enum GroupResourceType { + // Default value (not valid). + RESOURCE_TYPE_UNSPECIFIED = 0; + + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). + INSTANCE = 1; + + // A group of Amazon ELB load balancers. + AWS_ELB_LOAD_BALANCER = 2; +} diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 97b950a9f07..69b102307a2 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -4386,6 +4386,207 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a CreateTimeSeriesSummary. */ + interface ICreateTimeSeriesSummary { + + /** CreateTimeSeriesSummary totalPointCount */ + totalPointCount?: (number|null); + + /** CreateTimeSeriesSummary successPointCount */ + successPointCount?: (number|null); + + /** CreateTimeSeriesSummary errors */ + errors?: (google.monitoring.v3.CreateTimeSeriesSummary.IError[]|null); + } + + /** Represents a CreateTimeSeriesSummary. */ + class CreateTimeSeriesSummary implements ICreateTimeSeriesSummary { + + /** + * Constructs a new CreateTimeSeriesSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesSummary); + + /** CreateTimeSeriesSummary totalPointCount. */ + public totalPointCount: number; + + /** CreateTimeSeriesSummary successPointCount. */ + public successPointCount: number; + + /** CreateTimeSeriesSummary errors. */ + public errors: google.monitoring.v3.CreateTimeSeriesSummary.IError[]; + + /** + * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTimeSeriesSummary instance + */ + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesSummary): google.monitoring.v3.CreateTimeSeriesSummary; + + /** + * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @param message CreateTimeSeriesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @param message CreateTimeSeriesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary; + + /** + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary; + + /** + * Verifies a CreateTimeSeriesSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTimeSeriesSummary + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary; + + /** + * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * @param message CreateTimeSeriesSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTimeSeriesSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CreateTimeSeriesSummary { + + /** Properties of an Error. */ + interface IError { + + /** Error status */ + status?: (google.rpc.IStatus|null); + + /** Error pointCount */ + pointCount?: (number|null); + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError); + + /** Error status. */ + public status?: (google.rpc.IStatus|null); + + /** Error pointCount. */ + public pointCount: number; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Verifies an Error message. + * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Properties of a Point. */ interface IPoint { diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index bfd444d1eec..4f0b7db3d24 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -10465,6 +10465,475 @@ return CreateTimeSeriesError; })(); + v3.CreateTimeSeriesSummary = (function() { + + /** + * Properties of a CreateTimeSeriesSummary. + * @memberof google.monitoring.v3 + * @interface ICreateTimeSeriesSummary + * @property {number|null} [totalPointCount] CreateTimeSeriesSummary totalPointCount + * @property {number|null} [successPointCount] CreateTimeSeriesSummary successPointCount + * @property {Array.|null} [errors] CreateTimeSeriesSummary errors + */ + + /** + * Constructs a new CreateTimeSeriesSummary. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateTimeSeriesSummary. + * @implements ICreateTimeSeriesSummary + * @constructor + * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + */ + function CreateTimeSeriesSummary(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTimeSeriesSummary totalPointCount. + * @member {number} totalPointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.totalPointCount = 0; + + /** + * CreateTimeSeriesSummary successPointCount. + * @member {number} successPointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.successPointCount = 0; + + /** + * CreateTimeSeriesSummary errors. + * @member {Array.} errors + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.errors = $util.emptyArray; + + /** + * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary instance + */ + CreateTimeSeriesSummary.create = function create(properties) { + return new CreateTimeSeriesSummary(properties); + }; + + /** + * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.encode(message.errors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.totalPointCount = reader.int32(); + break; + case 2: + message.successPointCount = reader.int32(); + break; + case 3: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTimeSeriesSummary message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTimeSeriesSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + if (!$util.isInteger(message.totalPointCount)) + return "totalPointCount: integer expected"; + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + if (!$util.isInteger(message.successPointCount)) + return "successPointCount: integer expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + */ + CreateTimeSeriesSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + if (object.totalPointCount != null) + message.totalPointCount = object.totalPointCount | 0; + if (object.successPointCount != null) + message.successPointCount = object.successPointCount | 0; + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: object expected"); + message.errors[i] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary} message CreateTimeSeriesSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTimeSeriesSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) { + object.totalPointCount = 0; + object.successPointCount = 0; + } + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + object.totalPointCount = message.totalPointCount; + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + object.successPointCount = message.successPointCount; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this CreateTimeSeriesSummary to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + * @returns {Object.} JSON object + */ + CreateTimeSeriesSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CreateTimeSeriesSummary.Error = (function() { + + /** + * Properties of an Error. + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @interface IError + * @property {google.rpc.IStatus|null} [status] Error status + * @property {number|null} [pointCount] Error pointCount + */ + + /** + * Constructs a new Error. + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set + */ + function Error(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Error status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + */ + Error.prototype.status = null; + + /** + * Error pointCount. + * @member {number} pointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + */ + Error.prototype.pointCount = 0; + + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && message.hasOwnProperty("status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); + return writer; + }; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 2: + message.pointCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + if (!$util.isInteger(message.pointCount)) + return "pointCount: integer expected"; + return null; + }; + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + */ + Error.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary.Error) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.Error.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + if (object.pointCount != null) + message.pointCount = object.pointCount | 0; + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = null; + object.pointCount = 0; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + object.pointCount = message.pointCount; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Error; + })(); + + return CreateTimeSeriesSummary; + })(); + v3.Point = (function() { /** diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 57bebf5ff94..46a2ae4ad6f 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -920,11 +920,48 @@ "fields": { "timeSeries": { "type": "TimeSeries", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, "status": { "type": "google.rpc.Status", + "id": 2, + "options": { + "deprecated": true + } + } + } + }, + "CreateTimeSeriesSummary": { + "fields": { + "totalPointCount": { + "type": "int32", + "id": 1 + }, + "successPointCount": { + "type": "int32", "id": 2 + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 3 + } + }, + "nested": { + "Error": { + "fields": { + "status": { + "type": "google.rpc.Status", + "id": 1 + }, + "pointCount": { + "type": "int32", + "id": 2 + } + } } } }, diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index b2d4b5b946e..961f70ce119 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -224,7 +224,7 @@ const AlertPolicy = { * identifies which time series should be compared with the threshold. * * The filter is similar to the one that is specified in the - * [`MetricService.ListTimeSeries` + * [`ListTimeSeries` * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that * call is useful to verify the time series that will be retrieved / * processed) and must specify the metric type and optionally may contain @@ -239,8 +239,7 @@ const AlertPolicy = { * members of a group of resrouces). Multiple aggregations * are applied in the order specified. * - * This field is similar to the one in the - * [`MetricService.ListTimeSeries` + * This field is similar to the one in the [`ListTimeSeries` * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It * is advisable to use the `ListTimeSeries` method when debugging this * field. @@ -329,7 +328,7 @@ const AlertPolicy = { * identifies which time series should be compared with the threshold. * * The filter is similar to the one that is specified in the - * [`MetricService.ListTimeSeries` + * [`ListTimeSeries` * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that * call is useful to verify the time series that will be retrieved / * processed) and must specify the metric type and optionally may contain @@ -344,8 +343,7 @@ const AlertPolicy = { * members of a group of resrouces). Multiple aggregations * are applied in the order specified. * - * This field is similar to the - * one in the [`MetricService.ListTimeSeries` + * This field is similar to the one in the [`ListTimeSeries` * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It * is advisable to use the `ListTimeSeries` method when debugging this * field. diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index 9f360244c65..b9bd3bad055 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js @@ -20,14 +20,14 @@ * * @property {Object} interval * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time is optional, but if it is supplied, it must equal the end - * time. For `DELTA` metrics, the start and end time should specify a - * non-zero interval, with subsequent points specifying contiguous and - * non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - * time should specify a non-zero interval, with subsequent points specifying - * 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. + * the start time is optional, but if it is supplied, it must equal the + * end time. For `DELTA` metrics, the start + * and end time should specify a non-zero interval, with subsequent points + * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + * metrics, the start and end time should specify a non-zero interval, with + * subsequent points specifying 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. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index c19c916ec16..28fec4cfe49 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -220,15 +220,17 @@ const DeleteMetricDescriptorRequest = { * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * * @property {Object} aggregation - * By default, the raw time series data is returned. - * Use this field to combine multiple time series for different - * views of the data. + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * * @property {string} orderBy * Unsupported: must be left blank. The points in each time series are - * returned in reverse time order. + * currently returned in reverse time order (most recent to oldest). * * @property {number} view * Specifies which information is returned about the time series. diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index d890036b467..7d9e27fe05f 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js @@ -305,11 +305,15 @@ const UptimeCheckConfig = { }, /** - * Used to perform string matching. It allows substring and regular - * expressions, together with their negations. + * Optional. Used to perform content matching. This allows matching based on + * substrings and regular expressions, together with their negations. Only the + * first 4 MB of an HTTP or HTTPS check's response (and the first + * 1 MB of a TCP check's response) are examined for purposes of content + * matching. * * @property {string} content - * String or regex content to match (max 1024 bytes) + * String or regex content to match. Maximum 1024 bytes. An empty `content` + * string indicates no content matching is to be performed. * * @property {number} matcher * The type of content matcher that will be applied to the server output, @@ -340,29 +344,29 @@ const UptimeCheckConfig = { CONTENT_MATCHER_OPTION_UNSPECIFIED: 0, /** - * Selects substring matching (there is a match if the output contains - * the `content` string). This is the default value for checks without + * Selects substring matching. The match succeeds if the output contains + * the `content` string. This is the default value for checks without * a `matcher` option, or where the value of `matcher` is * `CONTENT_MATCHER_OPTION_UNSPECIFIED`. */ CONTAINS_STRING: 1, /** - * Selects negation of substring matching (there is a match if the output - * does NOT contain the `content` string). + * Selects negation of substring matching. The match succeeds if the + * output does _NOT_ contain the `content` string. */ NOT_CONTAINS_STRING: 2, /** - * Selects regular expression matching (there is a match of the output - * matches the regular expression specified in the `content` string). + * Selects regular-expression matching. The match succeeds of the output + * matches the regular expression specified in the `content` string. */ MATCHES_REGEX: 3, /** - * Selects negation of regular expression matching (there is a match if - * the output does NOT match the regular expression specified in the - * `content` string). + * Selects negation of regular-expression matching. The match succeeds if + * the output does _NOT_ match the regular expression specified in the + * `content` string. */ NOT_MATCHES_REGEX: 4 } diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index bc948eb8200..5ed5919417a 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -885,14 +885,16 @@ class MetricServiceClient { * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * @param {Object} [request.aggregation] - * By default, the raw time series data is returned. - * Use this field to combine multiple time series for different - * views of the data. + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @param {string} [request.orderBy] * Unsupported: must be left blank. The points in each time series are - * returned in reverse time order. + * currently returned in reverse time order (most recent to oldest). * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this @@ -1043,14 +1045,16 @@ class MetricServiceClient { * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * @param {Object} [request.aggregation] - * By default, the raw time series data is returned. - * Use this field to combine multiple time series for different - * views of the data. + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. * * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} * @param {string} [request.orderBy] * Unsupported: must be left blank. The points in each time series are - * returned in reverse time order. + * currently returned in reverse time order (most recent to oldest). * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7e210387b10..7598d9f4f7c 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-13T12:16:01.746091Z", + "updateTime": "2019-11-15T12:17:52.310628Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "88bbf96b90089994ed16208a0f38cdd07f743742", - "internalRef": "280134477" + "sha": "f6808ff4e8b966cd571e99279d4a2780ed97dff2", + "internalRef": "280581337" } }, { From 6533a33060367c23aa35447271540f6f067006d1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 12:16:28 -0800 Subject: [PATCH 244/422] chore: release 1.6.0 (#330) --- packages/google-cloud-monitoring/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index f311965ef28..e0a5b4e08d6 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.6.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.5.0...v1.6.0) (2019-11-15) + + +### Features + +* add service api support ([#325](https://www.github.com/googleapis/nodejs-monitoring/issues/325)) ([dbc3680](https://www.github.com/googleapis/nodejs-monitoring/commit/dbc36809baeef4fe860da898face3d04103cca63)) +* Introduced detailed status message for CreateTimeSeries: CreateTimeSeriesSummary replaces CreateTimeSeriesError, which is now deprecated and unused ([46e0661](https://www.github.com/googleapis/nodejs-monitoring/commit/46e0661286f8b59c4124338477c5104cd1f5a099)) + + +### Bug Fixes + +* **docs:** snippets are now replaced in jsdoc comments ([#324](https://www.github.com/googleapis/nodejs-monitoring/issues/324)) ([6d81605](https://www.github.com/googleapis/nodejs-monitoring/commit/6d8160596340a0c3ee9f4540e505d3e329a532eb)) + ## [1.5.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.4.0...v1.5.0) (2019-10-22) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index ed8fb034a6d..a86a2d82e83 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.5.0", + "version": "1.6.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 672cf09c2d5..9c17d2affcd 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.5.0", + "@google-cloud/monitoring": "^1.6.0", "yargs": "^14.0.0" }, "devDependencies": { From 7004b952eff01117f63cd5db5392d79c1be3737a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 18 Nov 2019 19:53:30 +0100 Subject: [PATCH 245/422] fix(deps): update dependency yargs to v15 (#333) --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 9c17d2affcd..167c954871c 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@google-cloud/monitoring": "^1.6.0", - "yargs": "^14.0.0" + "yargs": "^15.0.0" }, "devDependencies": { "chai": "^4.2.0", From 33df663e35c9724e10182b873440bb4e68be41b0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 19 Nov 2019 14:28:56 -0800 Subject: [PATCH 246/422] fix(docs): bump release level to GA (#335) --- packages/google-cloud-monitoring/.repo-metadata.json | 4 ++-- packages/google-cloud-monitoring/README.md | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json index b987ce38e50..7ebf2d742c3 100644 --- a/packages/google-cloud-monitoring/.repo-metadata.json +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -4,10 +4,10 @@ "product_documentation": "https://cloud.google.com/monitoring/docs", "client_documentation": "https://googleapis.dev/nodejs/monitoring/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", - "release_level": "beta", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-monitoring", "distribution_name": "@google-cloud/monitoring", "api_id": "monitoring.googleapis.com", "requires_billing": true -} \ No newline at end of file +} diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 56e5e65ce69..2d909b67063 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -4,7 +4,7 @@ # [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.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/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) @@ -134,11 +134,12 @@ also contains samples. 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. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. From 92561492196d3a08a618230b9070194aed7b4e51 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 25 Nov 2019 08:54:45 -0800 Subject: [PATCH 247/422] chore: update license headers --- .../samples/quickstart.js | 27 +++++++++---------- .../samples/test/quickstart.test.js | 27 +++++++++---------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index 924691c0f47..54d132476f4 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -1,17 +1,16 @@ -/** - * 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. - */ +// Copyright 2017 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'; diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js index 8048b0d48ca..0ba9e249e41 100644 --- a/packages/google-cloud-monitoring/samples/test/quickstart.test.js +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -1,17 +1,16 @@ -/** - * 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. - */ +// Copyright 2017 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'; From 2d911a37f943faba9ef6e7303258e6191935dff8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2019 15:17:49 -0800 Subject: [PATCH 248/422] chore: release 1.6.1 (#334) --- packages/google-cloud-monitoring/CHANGELOG.md | 9 +++++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index e0a5b4e08d6..d3c407c2ff3 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [1.6.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.6.0...v1.6.1) (2019-12-05) + + +### Bug Fixes + +* **deps:** TypeScript 3.7.0 causes breaking change in typings ([#339](https://www.github.com/googleapis/nodejs-monitoring/issues/339)) ([3616df7](https://www.github.com/googleapis/nodejs-monitoring/commit/3616df79a5b23a0eae1bb899e7a6a4c45d7cee7e)) +* **deps:** update dependency yargs to v15 ([#333](https://www.github.com/googleapis/nodejs-monitoring/issues/333)) ([dd3ba97](https://www.github.com/googleapis/nodejs-monitoring/commit/dd3ba97f7506577c264f40353d403ac62ce9951b)) +* **docs:** bump release level to GA ([#335](https://www.github.com/googleapis/nodejs-monitoring/issues/335)) ([839a25b](https://www.github.com/googleapis/nodejs-monitoring/commit/839a25b443ec0c65ed18822f5ca305ab0737fa71)) + ## [1.6.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.5.0...v1.6.0) (2019-11-15) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a86a2d82e83..a699a8b499b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.6.0", + "version": "1.6.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 167c954871c..d10edf9cbee 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.6.0", + "@google-cloud/monitoring": "^1.6.1", "yargs": "^15.0.0" }, "devDependencies": { From f07727a91bf969f5a397d4d32a54f559fd1e0541 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Dec 2019 23:29:20 -0500 Subject: [PATCH 249/422] docs: update jsdoc license/samples-README (#340) --- packages/google-cloud-monitoring/.jsdoc.js | 29 +++++++++---------- .../google-cloud-monitoring/samples/README.md | 16 ++++++---- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 06980d9b158..97b97e65002 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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'; diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 7d6f61cf4a6..f5ea0e5570f 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -24,6 +24,12 @@ and a variety of common application components including Cassandra, Nginx, Apach Before running the samples, make sure you've followed the steps outlined in [Using the client library](https://github.com/googleapis/nodejs-monitoring#using-the-client-library). +`cd samples` + +`npm install` + +`cd ..` + ## Samples @@ -37,7 +43,7 @@ View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/mast __Usage:__ -`node alerts.js` +`node samples/alerts.js` ----- @@ -54,7 +60,7 @@ View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/mast __Usage:__ -`node metrics.js` +`node samples/metrics.js` ----- @@ -71,7 +77,7 @@ View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/mast __Usage:__ -`node quickstart.js` +`node samples/quickstart.js` ----- @@ -88,7 +94,7 @@ View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/mast __Usage:__ -`node uptime.js` +`node samples/uptime.js` @@ -97,4 +103,4 @@ __Usage:__ [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/nodejs-monitoring&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/monitoring/docs \ No newline at end of file +[product-docs]: https://cloud.google.com/monitoring/docs From eb5ebf1a0baf30b9a686a64fbcbfe9e7f62bb549 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 27 Dec 2019 21:54:54 +0200 Subject: [PATCH 250/422] chore(deps): update dependency eslint-plugin-node to v11 (#342) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a699a8b499b..7b95f67c23b 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -44,7 +44,7 @@ "codecov": "^3.0.0", "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", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", From 9d98e6a7f0db1c1f1e4ad25c0320e1f8c6caf928 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 31 Dec 2019 20:23:06 +0200 Subject: [PATCH 251/422] chore(deps): update dependency c8 to v7 (#341) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 7b95f67c23b..938523dfbd8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,7 +40,7 @@ "google-gax": "^1.7.5" }, "devDependencies": { - "c8": "^6.0.1", + "c8": "^7.0.0", "codecov": "^3.0.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", From 7a6409bd7ea5fe7ddd9079fad9b34ce62351848a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 31 Dec 2019 13:02:10 -0800 Subject: [PATCH 252/422] refactor: use explicit mocha imports (#343) --- .../.cloud-repo-tools.json | 30 ------------------- .../samples/test/quickstart.test.js | 1 + .../smoke-test/.eslintrc.yml | 2 -- .../smoke-test/metric_service_smoke_test.js | 2 ++ .../system-test/.eslintrc.yml | 2 -- .../system-test/metric_service_smoke_test.js | 2 ++ .../test/.eslintrc.yml | 3 -- .../google-cloud-monitoring/test/gapic-v3.js | 1 + 8 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 packages/google-cloud-monitoring/.cloud-repo-tools.json delete mode 100644 packages/google-cloud-monitoring/test/.eslintrc.yml diff --git a/packages/google-cloud-monitoring/.cloud-repo-tools.json b/packages/google-cloud-monitoring/.cloud-repo-tools.json deleted file mode 100644 index 72bd859e09e..00000000000 --- a/packages/google-cloud-monitoring/.cloud-repo-tools.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "requiresKeyFile": true, - "requiresProjectId": true, - "product": "monitoring", - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/monitoring/latest/", - "release_quality": "beta", - "samples": [ - { - "id": "alerts", - "name": "Alert Policies", - "file": "alerts.js", - "docs_link": "https://cloud.google.com/monitoring/docs", - "usage": "node alerts.js --help" - }, - { - "id": "metrics", - "name": "Metrics", - "file": "metrics.js", - "docs_link": "https://cloud.google.com/monitoring/docs", - "usage": "node metrics.js --help" - }, - { - "id": "uptime", - "name": "Uptime Config", - "file": "uptime.js", - "docs_link": "https://cloud.google.com/monitoring/docs", - "usage": "node uptime.js --help" - } - ] -} diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js index 0ba9e249e41..50bbdde1616 100644 --- a/packages/google-cloud-monitoring/samples/test/quickstart.test.js +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -15,6 +15,7 @@ 'use strict'; const {assert} = require('chai'); +const {describe, it} = require('mocha'); const cp = require('child_process'); const retry = require('p-retry'); diff --git a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml index f9605165c0f..282535f55f6 100644 --- a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml +++ b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml @@ -1,5 +1,3 @@ --- -env: - mocha: true rules: no-console: off diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index 7ae9786e0c1..728f1b6636e 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js @@ -14,6 +14,8 @@ 'use strict'; +const {describe, it} = require('mocha'); + describe('MetricServiceSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); diff --git a/packages/google-cloud-monitoring/system-test/.eslintrc.yml b/packages/google-cloud-monitoring/system-test/.eslintrc.yml index f9605165c0f..282535f55f6 100644 --- a/packages/google-cloud-monitoring/system-test/.eslintrc.yml +++ b/packages/google-cloud-monitoring/system-test/.eslintrc.yml @@ -1,5 +1,3 @@ --- -env: - mocha: true rules: no-console: off diff --git a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js index 685a7b593a3..4791222a091 100644 --- a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js @@ -14,6 +14,8 @@ 'use strict'; +const {describe, it} = require('mocha'); + describe('MetricServiceSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { throw new Error('Usage: GCLOUD_PROJECT= node #{$0}'); diff --git a/packages/google-cloud-monitoring/test/.eslintrc.yml b/packages/google-cloud-monitoring/test/.eslintrc.yml deleted file mode 100644 index 6db2a46c535..00000000000 --- a/packages/google-cloud-monitoring/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -env: - mocha: true diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 037d55a5790..632a50c9d2c 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.js @@ -15,6 +15,7 @@ 'use strict'; const assert = require('assert'); +const {describe, it} = require('mocha'); const monitoringModule = require('../src'); From 8947ea54ac9597f6781148b97605403dd2310ec3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 31 Dec 2019 13:37:48 -0800 Subject: [PATCH 253/422] feat: adds ContentMatcherOption (#336) --- .../protos/protos.d.ts | 79 +++++- .../google-cloud-monitoring/protos/protos.js | 232 ++++++++++++++++-- .../protos/protos.json | 67 ++++- .../google-cloud-monitoring/synth.metadata | 10 +- 4 files changed, 342 insertions(+), 46 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 69b102307a2..23cc020301b 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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 { @@ -743,6 +758,9 @@ export namespace google { /** AlertPolicy enabled */ enabled?: (google.protobuf.IBoolValue|null); + /** AlertPolicy validity */ + validity?: (google.rpc.IStatus|null); + /** AlertPolicy notificationChannels */ notificationChannels?: (string[]|null); @@ -783,6 +801,9 @@ export namespace google { /** AlertPolicy enabled. */ public enabled?: (google.protobuf.IBoolValue|null); + /** AlertPolicy validity. */ + public validity?: (google.rpc.IStatus|null); + /** AlertPolicy notificationChannels. */ public notificationChannels: string[]; @@ -10738,6 +10759,9 @@ export namespace google { /** InternalChecker peerProjectId */ peerProjectId?: (string|null); + + /** InternalChecker state */ + state?: (google.monitoring.v3.InternalChecker.State|null); } /** Represents an InternalChecker. */ @@ -10764,6 +10788,9 @@ export namespace google { /** InternalChecker peerProjectId. */ public peerProjectId: string; + /** InternalChecker state. */ + public state: google.monitoring.v3.InternalChecker.State; + /** * Creates a new InternalChecker instance using the specified properties. * @param [properties] Properties to set @@ -10835,6 +10862,25 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace InternalChecker { + + /** State enum. */ + enum State { + UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2 + } + } + + /** UptimeCheckRegion enum. */ + enum UptimeCheckRegion { + REGION_UNSPECIFIED = 0, + USA = 1, + EUROPE = 2, + SOUTH_AMERICA = 3, + ASIA_PACIFIC = 4 + } + /** Properties of an UptimeCheckConfig. */ interface IUptimeCheckConfig { @@ -11115,6 +11161,9 @@ export namespace google { /** HttpCheck headers */ headers?: ({ [k: string]: string }|null); + + /** HttpCheck validateSsl */ + validateSsl?: (boolean|null); } /** Represents a HttpCheck. */ @@ -11144,6 +11193,9 @@ export namespace google { /** HttpCheck headers. */ public headers: { [k: string]: string }; + /** HttpCheck validateSsl. */ + public validateSsl: boolean; + /** * Creates a new HttpCheck instance using the specified properties. * @param [properties] Properties to set @@ -11409,6 +11461,9 @@ export namespace google { /** ContentMatcher content */ content?: (string|null); + + /** ContentMatcher matcher */ + matcher?: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|null); } /** Represents a ContentMatcher. */ @@ -11423,6 +11478,9 @@ export namespace google { /** ContentMatcher content. */ public content: string; + /** ContentMatcher matcher. */ + public matcher: google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption; + /** * Creates a new ContentMatcher instance using the specified properties. * @param [properties] Properties to set @@ -11493,6 +11551,18 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + namespace ContentMatcher { + + /** ContentMatcherOption enum. */ + enum ContentMatcherOption { + CONTENT_MATCHER_OPTION_UNSPECIFIED = 0, + CONTAINS_STRING = 1, + NOT_CONTAINS_STRING = 2, + MATCHES_REGEX = 3, + NOT_MATCHES_REGEX = 4 + } + } } /** Properties of an UptimeCheckIp. */ @@ -11597,15 +11667,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** UptimeCheckRegion enum. */ - enum UptimeCheckRegion { - REGION_UNSPECIFIED = 0, - USA = 1, - EUROPE = 2, - SOUTH_AMERICA = 3, - ASIA_PACIFIC = 4 - } - /** GroupResourceType enum. */ enum GroupResourceType { RESOURCE_TYPE_UNSPECIFIED = 0, diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 4f0b7db3d24..387c542f939 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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 */ @@ -1572,6 +1586,7 @@ * @property {Array.|null} [conditions] AlertPolicy conditions * @property {google.monitoring.v3.AlertPolicy.ConditionCombinerType|null} [combiner] AlertPolicy combiner * @property {google.protobuf.IBoolValue|null} [enabled] AlertPolicy enabled + * @property {google.rpc.IStatus|null} [validity] AlertPolicy validity * @property {Array.|null} [notificationChannels] AlertPolicy notificationChannels * @property {google.monitoring.v3.IMutationRecord|null} [creationRecord] AlertPolicy creationRecord * @property {google.monitoring.v3.IMutationRecord|null} [mutationRecord] AlertPolicy mutationRecord @@ -1651,6 +1666,14 @@ */ AlertPolicy.prototype.enabled = null; + /** + * AlertPolicy validity. + * @member {google.rpc.IStatus|null|undefined} validity + * @memberof google.monitoring.v3.AlertPolicy + * @instance + */ + AlertPolicy.prototype.validity = null; + /** * AlertPolicy notificationChannels. * @member {Array.} notificationChannels @@ -1722,6 +1745,8 @@ writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); if (message.enabled != null && message.hasOwnProperty("enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.validity != null && message.hasOwnProperty("validity")) + $root.google.rpc.Status.encode(message.validity, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -1784,6 +1809,9 @@ case 17: message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; + case 18: + message.validity = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; case 14: if (!(message.notificationChannels && message.notificationChannels.length)) message.notificationChannels = []; @@ -1873,6 +1901,11 @@ if (error) return "enabled." + error; } + if (message.validity != null && message.hasOwnProperty("validity")) { + var error = $root.google.rpc.Status.verify(message.validity); + if (error) + return "validity." + error; + } if (message.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { if (!Array.isArray(message.notificationChannels)) return "notificationChannels: array expected"; @@ -1954,6 +1987,11 @@ throw TypeError(".google.monitoring.v3.AlertPolicy.enabled: object expected"); message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); } + if (object.validity != null) { + if (typeof object.validity !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.validity: object expected"); + message.validity = $root.google.rpc.Status.fromObject(object.validity); + } if (object.notificationChannels) { if (!Array.isArray(object.notificationChannels)) throw TypeError(".google.monitoring.v3.AlertPolicy.notificationChannels: array expected"); @@ -2001,6 +2039,7 @@ object.mutationRecord = null; object.documentation = null; object.enabled = null; + object.validity = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -2032,6 +2071,8 @@ } if (message.enabled != null && message.hasOwnProperty("enabled")) object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); + if (message.validity != null && message.hasOwnProperty("validity")) + object.validity = $root.google.rpc.Status.toObject(message.validity, options); return object; }; @@ -25044,6 +25085,7 @@ * @property {string|null} [network] InternalChecker network * @property {string|null} [gcpZone] InternalChecker gcpZone * @property {string|null} [peerProjectId] InternalChecker peerProjectId + * @property {google.monitoring.v3.InternalChecker.State|null} [state] InternalChecker state */ /** @@ -25101,6 +25143,14 @@ */ InternalChecker.prototype.peerProjectId = ""; + /** + * InternalChecker state. + * @member {google.monitoring.v3.InternalChecker.State} state + * @memberof google.monitoring.v3.InternalChecker + * @instance + */ + InternalChecker.prototype.state = 0; + /** * Creates a new InternalChecker instance using the specified properties. * @function create @@ -25135,6 +25185,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcpZone); if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerProjectId); + if (message.state != null && message.hasOwnProperty("state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); return writer; }; @@ -25184,6 +25236,9 @@ case 6: message.peerProjectId = reader.string(); break; + case 7: + message.state = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -25234,6 +25289,15 @@ if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) if (!$util.isString(message.peerProjectId)) return "peerProjectId: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -25259,6 +25323,20 @@ message.gcpZone = String(object.gcpZone); if (object.peerProjectId != null) message.peerProjectId = String(object.peerProjectId); + switch (object.state) { + case "UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + } return message; }; @@ -25281,6 +25359,7 @@ object.network = ""; object.gcpZone = ""; object.peerProjectId = ""; + object.state = options.enums === String ? "UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -25292,6 +25371,8 @@ object.gcpZone = message.gcpZone; if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) object.peerProjectId = message.peerProjectId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.monitoring.v3.InternalChecker.State[message.state] : message.state; return object; }; @@ -25306,9 +25387,45 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * State enum. + * @name google.monitoring.v3.InternalChecker.State + * @enum {string} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} RUNNING=2 RUNNING value + */ + InternalChecker.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + return values; + })(); + return InternalChecker; })(); + /** + * UptimeCheckRegion enum. + * @name google.monitoring.v3.UptimeCheckRegion + * @enum {string} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} USA=1 USA value + * @property {number} EUROPE=2 EUROPE value + * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value + * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + */ + v3.UptimeCheckRegion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USA"] = 1; + values[valuesById[2] = "EUROPE"] = 2; + values[valuesById[3] = "SOUTH_AMERICA"] = 3; + values[valuesById[4] = "ASIA_PACIFIC"] = 4; + return values; + })(); + v3.UptimeCheckConfig = (function() { /** @@ -26154,6 +26271,7 @@ * @property {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null} [authInfo] HttpCheck authInfo * @property {boolean|null} [maskHeaders] HttpCheck maskHeaders * @property {Object.|null} [headers] HttpCheck headers + * @property {boolean|null} [validateSsl] HttpCheck validateSsl */ /** @@ -26220,6 +26338,14 @@ */ HttpCheck.prototype.headers = $util.emptyObject; + /** + * HttpCheck validateSsl. + * @member {boolean} validateSsl + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.validateSsl = false; + /** * Creates a new HttpCheck instance using the specified properties. * @function create @@ -26257,6 +26383,8 @@ if (message.headers != null && message.hasOwnProperty("headers")) for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); + if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.validateSsl); return writer; }; @@ -26314,6 +26442,9 @@ reader.pos++; message.headers[key] = reader.string(); break; + case 7: + message.validateSsl = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -26374,6 +26505,9 @@ if (!$util.isString(message.headers[key[i]])) return "headers: string{k:string} expected"; } + if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) + if (typeof message.validateSsl !== "boolean") + return "validateSsl: boolean expected"; return null; }; @@ -26409,6 +26543,8 @@ for (var keys = Object.keys(object.headers), i = 0; i < keys.length; ++i) message.headers[keys[i]] = String(object.headers[keys[i]]); } + if (object.validateSsl != null) + message.validateSsl = Boolean(object.validateSsl); return message; }; @@ -26433,6 +26569,7 @@ object.port = 0; object.authInfo = null; object.maskHeaders = false; + object.validateSsl = false; } if (message.useSsl != null && message.hasOwnProperty("useSsl")) object.useSsl = message.useSsl; @@ -26450,6 +26587,8 @@ for (var j = 0; j < keys2.length; ++j) object.headers[keys2[j]] = message.headers[keys2[j]]; } + if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) + object.validateSsl = message.validateSsl; return object; }; @@ -26871,6 +27010,7 @@ * @memberof google.monitoring.v3.UptimeCheckConfig * @interface IContentMatcher * @property {string|null} [content] ContentMatcher content + * @property {google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|null} [matcher] ContentMatcher matcher */ /** @@ -26896,6 +27036,14 @@ */ ContentMatcher.prototype.content = ""; + /** + * ContentMatcher matcher. + * @member {google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption} matcher + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @instance + */ + ContentMatcher.prototype.matcher = 0; + /** * Creates a new ContentMatcher instance using the specified properties. * @function create @@ -26922,6 +27070,8 @@ writer = $Writer.create(); if (message.content != null && message.hasOwnProperty("content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.matcher != null && message.hasOwnProperty("matcher")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matcher); return writer; }; @@ -26959,6 +27109,9 @@ case 1: message.content = reader.string(); break; + case 2: + message.matcher = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -26997,6 +27150,17 @@ if (message.content != null && message.hasOwnProperty("content")) if (!$util.isString(message.content)) return "content: string expected"; + if (message.matcher != null && message.hasOwnProperty("matcher")) + switch (message.matcher) { + default: + return "matcher: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -27014,6 +27178,28 @@ var message = new $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher(); if (object.content != null) message.content = String(object.content); + switch (object.matcher) { + case "CONTENT_MATCHER_OPTION_UNSPECIFIED": + case 0: + message.matcher = 0; + break; + case "CONTAINS_STRING": + case 1: + message.matcher = 1; + break; + case "NOT_CONTAINS_STRING": + case 2: + message.matcher = 2; + break; + case "MATCHES_REGEX": + case 3: + message.matcher = 3; + break; + case "NOT_MATCHES_REGEX": + case 4: + message.matcher = 4; + break; + } return message; }; @@ -27030,10 +27216,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.content = ""; + object.matcher = options.enums === String ? "CONTENT_MATCHER_OPTION_UNSPECIFIED" : 0; + } if (message.content != null && message.hasOwnProperty("content")) object.content = message.content; + if (message.matcher != null && message.hasOwnProperty("matcher")) + object.matcher = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption[message.matcher] : message.matcher; return object; }; @@ -27048,6 +27238,26 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * ContentMatcherOption enum. + * @name google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption + * @enum {string} + * @property {number} CONTENT_MATCHER_OPTION_UNSPECIFIED=0 CONTENT_MATCHER_OPTION_UNSPECIFIED value + * @property {number} CONTAINS_STRING=1 CONTAINS_STRING value + * @property {number} NOT_CONTAINS_STRING=2 NOT_CONTAINS_STRING value + * @property {number} MATCHES_REGEX=3 MATCHES_REGEX value + * @property {number} NOT_MATCHES_REGEX=4 NOT_MATCHES_REGEX value + */ + ContentMatcher.ContentMatcherOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_MATCHER_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTAINS_STRING"] = 1; + values[valuesById[2] = "NOT_CONTAINS_STRING"] = 2; + values[valuesById[3] = "MATCHES_REGEX"] = 3; + values[valuesById[4] = "NOT_MATCHES_REGEX"] = 4; + return values; + })(); + return ContentMatcher; })(); @@ -27314,26 +27524,6 @@ return UptimeCheckIp; })(); - /** - * UptimeCheckRegion enum. - * @name google.monitoring.v3.UptimeCheckRegion - * @enum {string} - * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value - * @property {number} USA=1 USA value - * @property {number} EUROPE=2 EUROPE value - * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value - * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value - */ - v3.UptimeCheckRegion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USA"] = 1; - values[valuesById[2] = "EUROPE"] = 2; - values[valuesById[3] = "SOUTH_AMERICA"] = 3; - values[valuesById[4] = "ASIA_PACIFIC"] = 4; - return values; - })(); - /** * GroupResourceType enum. * @name google.monitoring.v3.GroupResourceType diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 46a2ae4ad6f..62f7e4d9994 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -168,6 +168,10 @@ "type": "google.protobuf.BoolValue", "id": 17 }, + "validity": { + "type": "google.rpc.Status", + "id": 18 + }, "notificationChannels": { "rule": "repeated", "type": "string", @@ -2067,6 +2071,9 @@ } }, "InternalChecker": { + "options": { + "deprecated": true + }, "fields": { "name": { "type": "string", @@ -2087,9 +2094,31 @@ "peerProjectId": { "type": "string", "id": 6 + }, + "state": { + "type": "State", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "UNSPECIFIED": 0, + "CREATING": 1, + "RUNNING": 2 + } } } }, + "UptimeCheckRegion": { + "values": { + "REGION_UNSPECIFIED": 0, + "USA": 1, + "EUROPE": 2, + "SOUTH_AMERICA": 3, + "ASIA_PACIFIC": 4 + } + }, "UptimeCheckConfig": { "oneofs": { "resource": { @@ -2150,12 +2179,18 @@ }, "isInternal": { "type": "bool", - "id": 15 + "id": 15, + "options": { + "deprecated": true + } }, "internalCheckers": { "rule": "repeated", "type": "InternalChecker", - "id": 14 + "id": 14, + "options": { + "deprecated": true + } } }, "nested": { @@ -2197,6 +2232,10 @@ "keyType": "string", "type": "string", "id": 6 + }, + "validateSsl": { + "type": "bool", + "id": 7 } }, "nested": { @@ -2227,6 +2266,21 @@ "content": { "type": "string", "id": 1 + }, + "matcher": { + "type": "ContentMatcherOption", + "id": 2 + } + }, + "nested": { + "ContentMatcherOption": { + "values": { + "CONTENT_MATCHER_OPTION_UNSPECIFIED": 0, + "CONTAINS_STRING": 1, + "NOT_CONTAINS_STRING": 2, + "MATCHES_REGEX": 3, + "NOT_MATCHES_REGEX": 4 + } } } } @@ -2248,15 +2302,6 @@ } } }, - "UptimeCheckRegion": { - "values": { - "REGION_UNSPECIFIED": 0, - "USA": 1, - "EUROPE": 2, - "SOUTH_AMERICA": 3, - "ASIA_PACIFIC": 4 - } - }, "GroupResourceType": { "values": { "RESOURCE_TYPE_UNSPECIFIED": 0, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7598d9f4f7c..e51a9e811fb 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-15T12:17:52.310628Z", + "updateTime": "2019-11-19T12:22:16.660786Z", "sources": [ { "generator": { "name": "artman", - "version": "0.41.1", - "dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e" + "version": "0.42.1", + "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f6808ff4e8b966cd571e99279d4a2780ed97dff2", - "internalRef": "280581337" + "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", + "internalRef": "281088257" } }, { From 337f98b65cf87697f2cbe95232eff576f25dbc40 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2020 14:05:41 -0800 Subject: [PATCH 254/422] chore: release 1.7.0 (#344) --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index d3c407c2ff3..2ff50195b90 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [1.7.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.6.1...v1.7.0) (2019-12-31) + + +### Features + +* adds ContentMatcherOption ([#336](https://www.github.com/googleapis/nodejs-monitoring/issues/336)) ([003b8f7](https://www.github.com/googleapis/nodejs-monitoring/commit/003b8f7bc30c79b11aa393f0272e2554761707d4)) + ### [1.6.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.6.0...v1.6.1) (2019-12-05) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 938523dfbd8..394d1b36b68 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.6.1", + "version": "1.7.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index d10edf9cbee..741fe4ef178 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.6.1", + "@google-cloud/monitoring": "^1.7.0", "yargs": "^15.0.0" }, "devDependencies": { From 35044a60ba23f05b8c8daa6757dd01cef26c855d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Jan 2020 09:58:45 -0800 Subject: [PATCH 255/422] build: add **/*.d.ts to coverage ignore list; various updates to comments --- packages/google-cloud-monitoring/.nycrc | 1 + .../protos/google/monitoring/v3/alert.proto | 4 +- .../protos/google/monitoring/v3/service.proto | 2 +- .../protos/google/monitoring/v3/uptime.proto | 42 +- .../protos/protos.d.ts | 2 +- .../google-cloud-monitoring/protos/protos.js | 2 +- .../src/v3/doc/google/api/doc_metric.js | 100 +- .../v3/doc/google/monitoring/v3/doc_alert.js | 4 +- .../doc/google/monitoring/v3/doc_service.js | 2 +- .../google-cloud-monitoring/synth.metadata | 2256 ++++++++++++++++- 10 files changed, 2349 insertions(+), 66 deletions(-) diff --git a/packages/google-cloud-monitoring/.nycrc b/packages/google-cloud-monitoring/.nycrc index 367688844eb..b18d5472b62 100644 --- a/packages/google-cloud-monitoring/.nycrc +++ b/packages/google-cloud-monitoring/.nycrc @@ -12,6 +12,7 @@ "**/scripts", "**/protos", "**/test", + "**/*.d.ts", ".jsdoc.js", "**/.jsdoc.js", "karma.conf.js", diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index a4ea225d577..fc811a01c48 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -302,8 +302,8 @@ message AlertPolicy { // conditions. repeated Condition conditions = 12; - // How to combine the results of multiple conditions - // to determine if an incident should be opened. + // How to combine the results of multiple conditions to determine if an + // incident should be opened. ConditionCombinerType combiner = 6; // Whether or not the policy is enabled. On write, the default interpretation diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto index 7de203319af..b0daa551e80 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto @@ -151,7 +151,7 @@ message ServiceLevelObjective { ServiceLevelIndicator service_level_indicator = 3; // The fraction of service that must be good in order for this objective to be - // met. `0 < goal <= 1`. + // met. `0 < goal <= 0.999`. double goal = 4; // The time period over which the objective will be evaluated. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index eb424e97151..780a2578dff 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -83,27 +83,6 @@ message InternalChecker { State state = 7; } -// The regions from which an Uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in Uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { @@ -304,6 +283,27 @@ message UptimeCheckConfig { repeated InternalChecker internal_checkers = 14 [deprecated = true]; } +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // Contains the region, location, and list of IP // addresses where checkers in the location run from. message UptimeCheckIp { diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 23cc020301b..023411078cc 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 387c542f939..13051d7bea4 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 6280578f493..068c6038fe1 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js @@ -56,9 +56,27 @@ * 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 + * 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)** @@ -72,33 +90,40 @@ * * **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) + * * `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 (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 +138,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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index 961f70ce119..f703ca6b4cd 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -66,8 +66,8 @@ * This object should have the same structure as [Condition]{@link google.monitoring.v3.Condition} * * @property {number} combiner - * How to combine the results of multiple conditions - * to determine if an incident should be opened. + * How to combine the results of multiple conditions to determine if an + * incident should be opened. * * The number should be among the values of [ConditionCombinerType]{@link google.monitoring.v3.ConditionCombinerType} * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js index 22da60afed1..a10c3a3bca7 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js @@ -174,7 +174,7 @@ const Service = { * * @property {number} goal * The fraction of service that must be good in order for this objective to be - * met. `0 < goal <= 1`. + * met. `0 < goal <= 0.999`. * * @property {Object} rollingPeriod * A rolling time period, semantically "in the past ``". diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index e51a9e811fb..9623f27d14f 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-19T12:22:16.660786Z", + "updateTime": "2020-01-03T12:17:40.646023Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" + "version": "0.43.0", + "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", - "internalRef": "281088257" + "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", + "internalRef": "287908369" } }, { @@ -35,5 +35,2251 @@ "config": "google/monitoring/artman_monitoring.yaml" } } + ], + "newFiles": [ + { + "path": "synth.metadata" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "linkinator.config.json" + }, + { + "path": ".prettierignore" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".gitignore" + }, + { + "path": "synth.py" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "README.md" + }, + { + "path": "package-lock.json" + }, + { + "path": ".prettierrc" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": "codecov.yaml" + }, + { + "path": ".nycrc" + }, + { + "path": "package.json" + }, + { + "path": "webpack.config.js" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "renovate.json" + }, + { + "path": "LICENSE" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": ".eslintignore" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/common.cfg" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": "test/gapic-v3.js" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "system-test/metric_service_smoke_test.js" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/google/monitoring/v3/mutation_record.proto" + }, + { + "path": "protos/google/monitoring/v3/common.proto" + }, + { + "path": "protos/google/monitoring/v3/group_service.proto" + }, + { + "path": "protos/google/monitoring/v3/uptime.proto" + }, + { + "path": "protos/google/monitoring/v3/metric_service.proto" + }, + { + "path": "protos/google/monitoring/v3/alert.proto" + }, + { + "path": "protos/google/monitoring/v3/notification_service.proto" + }, + { + "path": "protos/google/monitoring/v3/span_context.proto" + }, + { + "path": "protos/google/monitoring/v3/alert_service.proto" + }, + { + "path": "protos/google/monitoring/v3/dropped_labels.proto" + }, + { + "path": "protos/google/monitoring/v3/metric.proto" + }, + { + "path": "protos/google/monitoring/v3/group.proto" + }, + { + "path": "protos/google/monitoring/v3/service.proto" + }, + { + "path": "protos/google/monitoring/v3/notification.proto" + }, + { + "path": "protos/google/monitoring/v3/uptime_service.proto" + }, + { + "path": "protos/google/monitoring/v3/service_service.proto" + }, + { + "path": ".git/shallow" + }, + { + "path": ".git/HEAD" + }, + { + "path": ".git/config" + }, + { + "path": ".git/packed-refs" + }, + { + "path": ".git/index" + }, + { + "path": ".git/objects/pack/pack-93025bec537e8b71efaeb4f1098b407b2ca3841d.pack" + }, + { + "path": ".git/objects/pack/pack-93025bec537e8b71efaeb4f1098b407b2ca3841d.idx" + }, + { + "path": ".git/logs/HEAD" + }, + { + "path": ".git/logs/refs/heads/master" + }, + { + "path": ".git/logs/refs/heads/autosynth" + }, + { + "path": ".git/logs/refs/remotes/origin/HEAD" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/remotes/origin/HEAD" + }, + { + "path": ".git/refs/tags/v1.7.0" + }, + { + "path": "src/index.js" + }, + { + "path": "src/browser.js" + }, + { + "path": "src/v3/uptime_check_service_client.js" + }, + { + "path": "src/v3/alert_policy_service_client_config.json" + }, + { + "path": "src/v3/metric_service_client.js" + }, + { + "path": "src/v3/uptime_check_service_client_config.json" + }, + { + "path": "src/v3/notification_channel_service_proto_list.json" + }, + { + "path": "src/v3/metric_service_proto_list.json" + }, + { + "path": "src/v3/index.js" + }, + { + "path": "src/v3/alert_policy_service_client.js" + }, + { + "path": "src/v3/service_monitoring_service_proto_list.json" + }, + { + "path": "src/v3/service_monitoring_service_client_config.json" + }, + { + "path": "src/v3/group_service_client_config.json" + }, + { + "path": "src/v3/alert_policy_service_proto_list.json" + }, + { + "path": "src/v3/metric_service_client_config.json" + }, + { + "path": "src/v3/notification_channel_service_client_config.json" + }, + { + "path": "src/v3/group_service_proto_list.json" + }, + { + "path": "src/v3/group_service_client.js" + }, + { + "path": "src/v3/service_monitoring_service_client.js" + }, + { + "path": "src/v3/notification_channel_service_client.js" + }, + { + "path": "src/v3/uptime_check_service_proto_list.json" + }, + { + "path": "src/v3/doc/google/api/doc_label.js" + }, + { + "path": "src/v3/doc/google/api/doc_distribution.js" + }, + { + "path": "src/v3/doc/google/api/doc_monitored_resource.js" + }, + { + "path": "src/v3/doc/google/api/doc_metric.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_wrappers.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_empty.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_struct.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_alert.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_metric_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_uptime_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_notification_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_alert_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_mutation_record.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_group.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_uptime.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_notification.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_metric.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_service_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_group_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_common.js" + }, + { + "path": "src/v3/doc/google/rpc/doc_status.js" + }, + { + "path": "node_modules/progress/package.json" + }, + { + "path": "node_modules/is-ci/package.json" + }, + { + "path": "node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/destroy/package.json" + }, + { + "path": "node_modules/power-assert-context-formatter/package.json" + }, + { + "path": "node_modules/fast-json-stable-stringify/package.json" + }, + { + "path": "node_modules/nice-try/package.json" + }, + { + "path": "node_modules/which-module/package.json" + }, + { + "path": "node_modules/array-find/package.json" + }, + { + "path": "node_modules/catharsis/package.json" + }, + { + "path": "node_modules/is-promise/package.json" + }, + { + "path": "node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/doctrine/package.json" + }, + { + "path": "node_modules/callsites/package.json" + }, + { + "path": "node_modules/diff/package.json" + }, + { + "path": "node_modules/hosted-git-info/package.json" + }, + { + "path": "node_modules/color-name/package.json" + }, + { + "path": "node_modules/defer-to-connect/package.json" + }, + { + "path": "node_modules/unpipe/package.json" + }, + { + "path": "node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/http-errors/package.json" + }, + { + "path": "node_modules/eventemitter3/package.json" + }, + { + "path": "node_modules/esutils/package.json" + }, + { + "path": "node_modules/he/package.json" + }, + { + "path": "node_modules/on-finished/package.json" + }, + { + "path": "node_modules/linkinator/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/chalk/package.json" + }, + { + "path": "node_modules/update-notifier/package.json" + }, + { + "path": "node_modules/update-notifier/node_modules/chalk/package.json" + }, + { + "path": "node_modules/p-cancelable/package.json" + }, + { + "path": "node_modules/markdown-it/package.json" + }, + { + "path": "node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/require-main-filename/package.json" + }, + { + "path": "node_modules/fast-diff/package.json" + }, + { + "path": "node_modules/lodash.camelcase/package.json" + }, + { + "path": "node_modules/redent/package.json" + }, + { + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/range-parser/package.json" + }, + { + "path": "node_modules/string.prototype.trimright/package.json" + }, + { + "path": "node_modules/inflight/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/htmlparser2/package.json" + }, + { + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/semver-diff/package.json" + }, + { + "path": "node_modules/semver-diff/node_modules/semver/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/ms/package.json" + }, + { + "path": "node_modules/linkify-it/package.json" + }, + { + "path": "node_modules/through/package.json" + }, + { + "path": "node_modules/power-assert-renderer-file/package.json" + }, + { + "path": "node_modules/string-width/package.json" + }, + { + "path": "node_modules/html-escaper/package.json" + }, + { + "path": "node_modules/type/package.json" + }, + { + "path": "node_modules/type-fest/package.json" + }, + { + "path": "node_modules/intelli-espower-loader/package.json" + }, + { + "path": "node_modules/parseurl/package.json" + }, + { + "path": "node_modules/google-p12-pem/package.json" + }, + { + "path": "node_modules/get-caller-file/package.json" + }, + { + "path": "node_modules/klaw/package.json" + }, + { + "path": "node_modules/map-obj/package.json" + }, + { + "path": "node_modules/node-fetch/package.json" + }, + { + "path": "node_modules/jsonexport/package.json" + }, + { + "path": "node_modules/isexe/package.json" + }, + { + "path": "node_modules/escallmatch/package.json" + }, + { + "path": "node_modules/escallmatch/node_modules/esprima/package.json" + }, + { + "path": "node_modules/espower/package.json" + }, + { + "path": "node_modules/espower/node_modules/source-map/package.json" + }, + { + "path": "node_modules/run-async/package.json" + }, + { + "path": "node_modules/validate-npm-package-license/package.json" + }, + { + "path": "node_modules/file-entry-cache/package.json" + }, + { + "path": "node_modules/meow/package.json" + }, + { + "path": "node_modules/concat-map/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/xmlcreate/package.json" + }, + { + "path": "node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/yallist/package.json" + }, + { + "path": "node_modules/json-bigint/package.json" + }, + { + "path": "node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/cliui/package.json" + }, + { + "path": "node_modules/toidentifier/package.json" + }, + { + "path": "node_modules/balanced-match/package.json" + }, + { + "path": "node_modules/marked/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/jsdoc-region-tag/package.json" + }, + { + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + }, + { + "path": "node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/xtend/package.json" + }, + { + "path": "node_modules/is-arguments/package.json" + }, + { + "path": "node_modules/set-blocking/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/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/strip-ansi/package.json" + }, + { + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/esprima/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/minimatch/package.json" + }, + { + "path": "node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/growl/package.json" + }, + { + "path": "node_modules/string.prototype.trimleft/package.json" + }, + { + "path": "node_modules/istanbul-lib-coverage/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-text-encoding/package.json" + }, + { + "path": "node_modules/server-destroy/package.json" + }, + { + "path": "node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/d/package.json" + }, + { + "path": "node_modules/protobufjs/package.json" + }, + { + "path": "node_modules/domhandler/package.json" + }, + { + "path": "node_modules/ansi-escapes/package.json" + }, + { + "path": "node_modules/power-assert-renderer-base/package.json" + }, + { + "path": "node_modules/boolbase/package.json" + }, + { + "path": "node_modules/indent-string/package.json" + }, + { + "path": "node_modules/lodash/package.json" + }, + { + "path": "node_modules/taffydb/package.json" + }, + { + "path": "node_modules/extend/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/dom-serializer/package.json" + }, + { + "path": "node_modules/end-of-stream/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" + }, + { + "path": "node_modules/is-callable/package.json" + }, + { + "path": "node_modules/es5-ext/package.json" + }, + { + "path": "node_modules/stringifier/package.json" + }, + { + "path": "node_modules/es6-weak-map/package.json" + }, + { + "path": "node_modules/camelcase-keys/package.json" + }, + { + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/js-yaml/package.json" + }, + { + "path": "node_modules/cli-boxes/package.json" + }, + { + "path": "node_modules/is-obj/package.json" + }, + { + "path": "node_modules/is-typedarray/package.json" + }, + { + "path": "node_modules/registry-auth-token/package.json" + }, + { + "path": "node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/buffer-equal-constant-time/package.json" + }, + { + "path": "node_modules/@bcoe/v8-coverage/package.json" + }, + { + "path": "node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/stream-shift/package.json" + }, + { + "path": "node_modules/is-extglob/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/index.js" + }, + { + "path": "node_modules/typedarray-to-buffer/README.md" + }, + { + "path": "node_modules/typedarray-to-buffer/.airtap.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/.travis.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/LICENSE" + }, + { + "path": "node_modules/typedarray-to-buffer/test/basic.js" + }, + { + "path": "node_modules/restore-cursor/package.json" + }, + { + "path": "node_modules/mimic-response/package.json" + }, + { + "path": "node_modules/normalize-url/package.json" + }, + { + "path": "node_modules/fresh/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/indexof/package.json" + }, + { + "path": "node_modules/codecov/package.json" + }, + { + "path": "node_modules/ajv/package.json" + }, + { + "path": "node_modules/is-path-inside/package.json" + }, + { + "path": "node_modules/import-lazy/package.json" + }, + { + "path": "node_modules/json-schema-traverse/package.json" + }, + { + "path": "node_modules/rxjs/package.json" + }, + { + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/figures/package.json" + }, + { + "path": "node_modules/underscore/package.json" + }, + { + "path": "node_modules/finalhandler/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/debug/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/ms/package.json" + }, + { + "path": "node_modules/ignore/package.json" + }, + { + "path": "node_modules/argv/package.json" + }, + { + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/graceful-fs/package.json" + }, + { + "path": "node_modules/google-gax/package.json" + }, + { + "path": "node_modules/onetime/package.json" + }, + { + "path": "node_modules/path-key/package.json" + }, + { + "path": "node_modules/core-util-is/package.json" + }, + { + "path": "node_modules/array-filter/package.json" + }, + { + "path": "node_modules/prepend-http/package.json" + }, + { + "path": "node_modules/write/package.json" + }, + { + "path": "node_modules/duplexify/package.json" + }, + { + "path": "node_modules/camelcase/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/empower-assert/package.json" + }, + { + "path": "node_modules/boxen/package.json" + }, + { + "path": "node_modules/boxen/node_modules/chalk/package.json" + }, + { + "path": "node_modules/node-environment-flags/package.json" + }, + { + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + }, + { + "path": "node_modules/c8/package.json" + }, + { + "path": "node_modules/gcp-metadata/package.json" + }, + { + "path": "node_modules/json-buffer/package.json" + }, + { + "path": "node_modules/mkdirp/package.json" + }, + { + "path": "node_modules/bluebird/package.json" + }, + { + "path": "node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/serve-static/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/mime/package.json" + }, + { + "path": "node_modules/yargs-unparser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/lines-and-columns/package.json" + }, + { + "path": "node_modules/is-url/package.json" + }, + { + "path": "node_modules/chalk/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/supports-color/package.json" + }, + { + "path": "node_modules/chalk/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/locate-path/package.json" + }, + { + "path": "node_modules/spdx-expression-parse/package.json" + }, + { + "path": "node_modules/power-assert-util-string-width/package.json" + }, + { + "path": "node_modules/esquery/package.json" + }, + { + "path": "node_modules/to-readable-stream/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/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/strip-ansi/package.json" + }, + { + "path": "node_modules/is-arrayish/package.json" + }, + { + "path": "node_modules/prettier-linter-helpers/package.json" + }, + { + "path": "node_modules/chardet/package.json" + }, + { + "path": "node_modules/amdefine/package.json" + }, + { + "path": "node_modules/http-cache-semantics/package.json" + }, + { + "path": "node_modules/has-flag/package.json" + }, + { + "path": "node_modules/cheerio/package.json" + }, + { + "path": "node_modules/domelementtype/package.json" + }, + { + "path": "node_modules/@szmarczak/http-timer/package.json" + }, + { + "path": "node_modules/tmp/package.json" + }, + { + "path": "node_modules/entities/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/ee-first/package.json" + }, + { + "path": "node_modules/object-inspect/package.json" + }, + { + "path": "node_modules/deep-equal/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/strip-ansi/package.json" + }, + { + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/spdx-correct/package.json" + }, + { + "path": "node_modules/get-stream/package.json" + }, + { + "path": "node_modules/power-assert/package.json" + }, + { + "path": "node_modules/statuses/package.json" + }, + { + "path": "node_modules/@istanbuljs/schema/package.json" + }, + { + "path": "node_modules/es6-set/package.json" + }, + { + "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/istanbul-reports/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/etag/package.json" + }, + { + "path": "node_modules/y18n/package.json" + }, + { + "path": "node_modules/diff-match-patch/package.json" + }, + { + "path": "node_modules/es6-iterator/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/semver/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" + }, + { + "path": "node_modules/uuid/package.json" + }, + { + "path": "node_modules/event-target-shim/package.json" + }, + { + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/widest-line/package.json" + }, + { + "path": "node_modules/ignore-walk/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/function-bind/package.json" + }, + { + "path": "node_modules/object-is/package.json" + }, + { + "path": "node_modules/@types/color-name/package.json" + }, + { + "path": "node_modules/@types/node/package.json" + }, + { + "path": "node_modules/@types/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/@types/normalize-package-data/package.json" + }, + { + "path": "node_modules/@types/is-windows/package.json" + }, + { + "path": "node_modules/@types/minimist/package.json" + }, + { + "path": "node_modules/@types/fs-extra/package.json" + }, + { + "path": "node_modules/@types/long/package.json" + }, + { + "path": "node_modules/is-windows/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/global-dirs/package.json" + }, + { + "path": "node_modules/power-assert-renderer-diagram/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/es6-symbol/package.json" + }, + { + "path": "node_modules/parse-json/package.json" + }, + { + "path": "node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/spdx-license-ids/package.json" + }, + { + "path": "node_modules/google-auth-library/package.json" + }, + { + "path": "node_modules/brace-expansion/package.json" + }, + { + "path": "node_modules/type-name/package.json" + }, + { + "path": "node_modules/define-properties/package.json" + }, + { + "path": "node_modules/universal-deep-strict-equal/package.json" + }, + { + "path": "node_modules/jws/package.json" + }, + { + "path": "node_modules/nth-check/package.json" + }, + { + "path": "node_modules/empower/package.json" + }, + { + "path": "node_modules/send/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/send/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/mime/package.json" + }, + { + "path": "node_modules/require-directory/package.json" + }, + { + "path": "node_modules/object.assign/package.json" + }, + { + "path": "node_modules/is-npm/package.json" + }, + { + "path": "node_modules/min-indent/package.json" + }, + { + "path": "node_modules/functional-red-black-tree/package.json" + }, + { + "path": "node_modules/read-pkg/package.json" + }, + { + "path": "node_modules/read-pkg/node_modules/type-fest/package.json" + }, + { + "path": "node_modules/registry-url/package.json" + }, + { + "path": "node_modules/is-regex/package.json" + }, + { + "path": "node_modules/es-abstract/package.json" + }, + { + "path": "node_modules/parent-module/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/power-assert-context-traversal/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/make-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/ext/package.json" + }, + { + "path": "node_modules/ext/node_modules/type/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/css-what/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/es6-map/package.json" + }, + { + "path": "node_modules/call-signature/package.json" + }, + { + "path": "node_modules/package-json/package.json" + }, + { + "path": "node_modules/package-json/node_modules/semver/package.json" + }, + { + "path": "node_modules/css-select/package.json" + }, + { + "path": "node_modules/eslint-plugin-prettier/package.json" + }, + { + "path": "node_modules/p-finally/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/acorn-jsx/package.json" + }, + { + "path": "node_modules/glob/package.json" + }, + { + "path": "node_modules/mocha/package.json" + }, + { + "path": "node_modules/mocha/node_modules/color-name/package.json" + }, + { + "path": "node_modules/mocha/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ms/package.json" + }, + { + "path": "node_modules/mocha/node_modules/string-width/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/mocha/node_modules/cliui/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/mocha/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/mocha/node_modules/has-flag/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/which/package.json" + }, + { + "path": "node_modules/mocha/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/mocha/node_modules/find-up/package.json" + }, + { + "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/mocha/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs/package.json" + }, + { + "path": "node_modules/mocha/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/event-emitter/package.json" + }, + { + "path": "node_modules/@protobufjs/codegen/package.json" + }, + { + "path": "node_modules/@protobufjs/base64/package.json" + }, + { + "path": "node_modules/@protobufjs/utf8/package.json" + }, + { + "path": "node_modules/@protobufjs/pool/package.json" + }, + { + "path": "node_modules/@protobufjs/float/package.json" + }, + { + "path": "node_modules/@protobufjs/fetch/package.json" + }, + { + "path": "node_modules/@protobufjs/path/package.json" + }, + { + "path": "node_modules/@protobufjs/aspromise/package.json" + }, + { + "path": "node_modules/@protobufjs/inquire/package.json" + }, + { + "path": "node_modules/@protobufjs/eventemitter/package.json" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/lodash.has/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/has-symbols/package.json" + }, + { + "path": "node_modules/espurify/package.json" + }, + { + "path": "node_modules/lodash.at/package.json" + }, + { + "path": "node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/merge-estraverse-visitors/package.json" + }, + { + "path": "node_modules/ansi-colors/package.json" + }, + { + "path": "node_modules/p-try/package.json" + }, + { + "path": "node_modules/escope/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/abort-controller/package.json" + }, + { + "path": "node_modules/which/package.json" + }, + { + "path": "node_modules/astral-regex/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/minimist/package.json" + }, + { + "path": "node_modules/clone-response/package.json" + }, + { + "path": "node_modules/ecdsa-sig-formatter/package.json" + }, + { + "path": "node_modules/requizzle/package.json" + }, + { + "path": "node_modules/base64-js/package.json" + }, + { + "path": "node_modules/object-keys/package.json" + }, + { + "path": "node_modules/trim-newlines/package.json" + }, + { + "path": "node_modules/deep-is/package.json" + }, + { + "path": "node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/shebang-regex/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/semver/package.json" + }, + { + "path": "node_modules/unique-string/package.json" + }, + { + "path": "node_modules/decamelize/package.json" + }, + { + "path": "node_modules/acorn/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/strip-ansi/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/got/package.json" + }, + { + "path": "node_modules/sprintf-js/package.json" + }, + { + "path": "node_modules/isarray/package.json" + }, + { + "path": "node_modules/string_decoder/package.json" + }, + { + "path": "node_modules/p-limit/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/mimic-fn/package.json" + }, + { + "path": "node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/ini/package.json" + }, + { + "path": "node_modules/js2xmlparser/package.json" + }, + { + "path": "node_modules/spdx-exceptions/package.json" + }, + { + "path": "node_modules/external-editor/package.json" + }, + { + "path": "node_modules/power-assert-formatter/package.json" + }, + { + "path": "node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/text-table/package.json" + }, + { + "path": "node_modules/domutils/package.json" + }, + { + "path": "node_modules/supports-color/package.json" + }, + { + "path": "node_modules/strip-indent/package.json" + }, + { + "path": "node_modules/fs.realpath/package.json" + }, + { + "path": "node_modules/parse5/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/empower-core/package.json" + }, + { + "path": "node_modules/acorn-es7-plugin/package.json" + }, + { + "path": "node_modules/p-timeout/package.json" + }, + { + "path": "node_modules/espree/package.json" + }, + { + "path": "node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/responselike/package.json" + }, + { + "path": "node_modules/next-tick/package.json" + }, + { + "path": "node_modules/esrecurse/package.json" + }, + { + "path": "node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/source-map/package.json" + }, + { + "path": "node_modules/find-up/package.json" + }, + { + "path": "node_modules/traverse/package.json" + }, + { + "path": "node_modules/es-to-primitive/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/safe-buffer/package.json" + }, + { + "path": "node_modules/uc.micro/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/gtoken/package.json" + }, + { + "path": "node_modules/urlgrey/package.json" + }, + { + "path": "node_modules/convert-source-map/package.json" + }, + { + "path": "node_modules/is-date-object/package.json" + }, + { + "path": "node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/iconv-lite/package.json" + }, + { + "path": "node_modules/is-glob/package.json" + }, + { + "path": "node_modules/furi/package.json" + }, + { + "path": "node_modules/tslib/package.json" + }, + { + "path": "node_modules/markdown-it-anchor/package.json" + }, + { + "path": "node_modules/browser-stdout/package.json" + }, + { + "path": "node_modules/pump/package.json" + }, + { + "path": "node_modules/process-nextick-args/package.json" + }, + { + "path": "node_modules/deep-extend/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/type-check/package.json" + }, + { + "path": "node_modules/teeny-request/package.json" + }, + { + "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/jwa/package.json" + }, + { + "path": "node_modules/walkdir/package.json" + }, + { + "path": "node_modules/hard-rejection/package.json" + }, + { + "path": "node_modules/espower-source/package.json" + }, + { + "path": "node_modules/espower-source/node_modules/acorn/package.json" + }, + { + "path": "node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/quick-lru/package.json" + }, + { + "path": "node_modules/path-exists/package.json" + }, + { + "path": "node_modules/jsdoc/package.json" + }, + { + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/cacheable-request/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/escape-html/package.json" + }, + { + "path": "node_modules/power-assert-renderer-assertion/package.json" + }, + { + "path": "node_modules/minimist-options/package.json" + }, + { + "path": "node_modules/minimist-options/node_modules/arrify/package.json" + }, + { + "path": "node_modules/latest-version/package.json" + }, + { + "path": "node_modules/optionator/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/ansi-styles/package.json" + }, + { + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/power-assert-renderer-comparison/package.json" + }, + { + "path": "node_modules/flatted/package.json" + }, + { + "path": "node_modules/inherits/package.json" + }, + { + "path": "node_modules/depd/package.json" + }, + { + "path": "node_modules/es6-promisify/package.json" + }, + { + "path": "node_modules/long/package.json" + }, + { + "path": "node_modules/regexpp/package.json" + }, + { + "path": "node_modules/cli-width/package.json" + }, + { + "path": "node_modules/call-matcher/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/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-command/package.json" + }, + { + "path": "node_modules/eslint/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/eslint/node_modules/which/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/eslint/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/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/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/mdurl/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/package.json" + }, + { + "path": "node_modules/espower-loader/package.json" + }, + { + "path": "node_modules/object.getownpropertydescriptors/package.json" + }, + { + "path": "node_modules/yargs/package.json" + }, + { + "path": "node_modules/ci-info/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/eslint-visitor-keys/package.json" + }, + { + "path": "node_modules/agent-base/package.json" + }, + { + "path": "node_modules/flat/package.json" + }, + { + "path": "node_modules/through2/package.json" + }, + { + "path": "node_modules/gaxios/package.json" + }, + { + "path": "node_modules/p-queue/package.json" + }, + { + "path": "node_modules/encodeurl/package.json" + }, + { + "path": "node_modules/js-tokens/package.json" + }, + { + "path": "node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/eslint-config-prettier/package.json" + }, + { + "path": "node_modules/uri-js/package.json" + }, + { + "path": "node_modules/test-exclude/package.json" + }, + { + "path": "node_modules/safer-buffer/package.json" + }, + { + "path": "node_modules/prettier/package.json" + }, + { + "path": "node_modules/regexp.prototype.flags/package.json" + }, + { + "path": "node_modules/yargs-parser/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/configstore/package.json" + }, + { + "path": "node_modules/is-plain-obj/package.json" + }, + { + "path": "node_modules/eastasianwidth/package.json" + }, + { + "path": "node_modules/has-yarn/package.json" + }, + { + "path": "node_modules/core-js/package.json" + }, + { + "path": "samples/alerts.js" + }, + { + "path": "samples/.gitignore" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/uptime.js" + }, + { + "path": "samples/metrics.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/test/alerts.test.js" + }, + { + "path": "samples/test/quickstart.test.js" + }, + { + "path": "samples/test/metrics.test.js" + }, + { + "path": "samples/test/uptime.test.js" + }, + { + "path": "__pycache__/synth.cpython-36.pyc" + }, + { + "path": "smoke-test/metric_service_smoke_test.js" + }, + { + "path": "smoke-test/.eslintrc.yml" + } ] } \ No newline at end of file From 9e96825db082d324f9931621ea0ce1d182cfef04 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 16 Jan 2020 17:02:24 -0800 Subject: [PATCH 256/422] docs: update license header --- .../smoke-test/metric_service_smoke_test.js | 2 +- .../google-cloud-monitoring/src/browser.js | 2 +- .../src/v3/alert_policy_service_client.js | 2 +- .../src/v3/doc/google/api/doc_distribution.js | 2 +- .../src/v3/doc/google/api/doc_label.js | 2 +- .../src/v3/doc/google/api/doc_metric.js | 2 +- .../doc/google/api/doc_monitored_resource.js | 2 +- .../v3/doc/google/monitoring/v3/doc_alert.js | 2 +- .../google/monitoring/v3/doc_alert_service.js | 2 +- .../v3/doc/google/monitoring/v3/doc_common.js | 2 +- .../v3/doc/google/monitoring/v3/doc_group.js | 2 +- .../google/monitoring/v3/doc_group_service.js | 2 +- .../v3/doc/google/monitoring/v3/doc_metric.js | 2 +- .../monitoring/v3/doc_metric_service.js | 2 +- .../monitoring/v3/doc_mutation_record.js | 2 +- .../google/monitoring/v3/doc_notification.js | 2 +- .../monitoring/v3/doc_notification_service.js | 2 +- .../doc/google/monitoring/v3/doc_service.js | 2 +- .../monitoring/v3/doc_service_service.js | 2 +- .../v3/doc/google/monitoring/v3/doc_uptime.js | 2 +- .../monitoring/v3/doc_uptime_service.js | 2 +- .../src/v3/doc/google/protobuf/doc_any.js | 2 +- .../v3/doc/google/protobuf/doc_duration.js | 2 +- .../src/v3/doc/google/protobuf/doc_empty.js | 2 +- .../v3/doc/google/protobuf/doc_field_mask.js | 2 +- .../src/v3/doc/google/protobuf/doc_struct.js | 2 +- .../v3/doc/google/protobuf/doc_timestamp.js | 2 +- .../v3/doc/google/protobuf/doc_wrappers.js | 2 +- .../src/v3/doc/google/rpc/doc_status.js | 2 +- .../src/v3/group_service_client.js | 2 +- .../google-cloud-monitoring/src/v3/index.js | 2 +- .../src/v3/metric_service_client.js | 2 +- .../v3/notification_channel_service_client.js | 2 +- .../v3/service_monitoring_service_client.js | 2 +- .../src/v3/uptime_check_service_client.js | 2 +- .../google-cloud-monitoring/synth.metadata | 2256 +---------------- .../google-cloud-monitoring/test/gapic-v3.js | 2 +- .../google-cloud-monitoring/webpack.config.js | 2 +- 38 files changed, 42 insertions(+), 2288 deletions(-) diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js index 728f1b6636e..085f31334bd 100644 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.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/packages/google-cloud-monitoring/src/browser.js b/packages/google-cloud-monitoring/src/browser.js index ddbcd7ecb9a..68dc62d25d6 100644 --- a/packages/google-cloud-monitoring/src/browser.js +++ b/packages/google-cloud-monitoring/src/browser.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/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 0f75c006f95..27503d2eac9 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js index 95e6d5596e2..b7e06749ec5 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js index 74d87098038..24d32531adc 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js index 068c6038fe1..7b324ed2d65 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js index 8d5e132a417..be4e189fc16 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index f703ca6b4cd..ba14b3590ce 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js index c8a5ea983c1..dc6dbd56e1a 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index e91053425d8..6fc93f993d4 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js index 2e6c17e4e8e..2626b0f74da 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js index 2a96d95f761..e1692ee9350 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js index b9bd3bad055..db79df90acc 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index 28fec4cfe49..63db16157a1 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js index c4b4104ba3e..11849884b18 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js index ec50625c3b4..dd42dd7200a 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js index 04587966ba7..189aa9c895f 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js index a10c3a3bca7..cc56022008d 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js index 78856efd49e..4709a231119 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js index 7d9e27fe05f..4f171a93428 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index e301085e3a6..b0402ee3b80 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js index cdd2fc80e49..813682aa336 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js index 1275f8f4d13..bd4b4ee6067 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js index 0b446dd9ce4..1e3961d6609 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js index 011207b8626..59e745f36c2 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js index ae7e4ef1ff6..a143b9a6d2d 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js index c457acc0c7d..ad801cc9a10 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js index 6ecf67beb7e..158af088ad6 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.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/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js index 432ab6bb928..80ec5037662 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.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/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index b6f056c85a5..96ae437971b 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_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/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js index ceaeae9e567..e93937c9cec 100644 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 5ed5919417a..5d1ef8ab5c7 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 86dbbbac584..3662d169daf 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_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/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js index 20d3b178828..ac6e5fb2c53 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index ce1fab1237f..baf28fc51b4 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 9623f27d14f..5fbee071f1b 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2020-01-03T12:17:40.646023Z", + "updateTime": "2020-01-15T12:24:20.481832Z", "sources": [ { "generator": { "name": "artman", - "version": "0.43.0", - "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" + "version": "0.44.0", + "dockerImage": "googleapis/artman@sha256:10a6d0342b8d62544810ac5ad86c3b21049ec0696608ac60175da8e513234344" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", - "internalRef": "287908369" + "sha": "d99df0d67057a233c711187e0689baa4f8e6333d", + "internalRef": "289709813" } }, { @@ -35,2251 +35,5 @@ "config": "google/monitoring/artman_monitoring.yaml" } } - ], - "newFiles": [ - { - "path": "synth.metadata" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "linkinator.config.json" - }, - { - "path": ".prettierignore" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".gitignore" - }, - { - "path": "synth.py" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "README.md" - }, - { - "path": "package-lock.json" - }, - { - "path": ".prettierrc" - }, - { - "path": ".readme-partials.yml" - }, - { - "path": "codecov.yaml" - }, - { - "path": ".nycrc" - }, - { - "path": "package.json" - }, - { - "path": "webpack.config.js" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": "renovate.json" - }, - { - "path": "LICENSE" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": ".eslintignore" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/common.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": "test/gapic-v3.js" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "system-test/metric_service_smoke_test.js" - }, - { - "path": "system-test/.eslintrc.yml" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/google/monitoring/v3/mutation_record.proto" - }, - { - "path": "protos/google/monitoring/v3/common.proto" - }, - { - "path": "protos/google/monitoring/v3/group_service.proto" - }, - { - "path": "protos/google/monitoring/v3/uptime.proto" - }, - { - "path": "protos/google/monitoring/v3/metric_service.proto" - }, - { - "path": "protos/google/monitoring/v3/alert.proto" - }, - { - "path": "protos/google/monitoring/v3/notification_service.proto" - }, - { - "path": "protos/google/monitoring/v3/span_context.proto" - }, - { - "path": "protos/google/monitoring/v3/alert_service.proto" - }, - { - "path": "protos/google/monitoring/v3/dropped_labels.proto" - }, - { - "path": "protos/google/monitoring/v3/metric.proto" - }, - { - "path": "protos/google/monitoring/v3/group.proto" - }, - { - "path": "protos/google/monitoring/v3/service.proto" - }, - { - "path": "protos/google/monitoring/v3/notification.proto" - }, - { - "path": "protos/google/monitoring/v3/uptime_service.proto" - }, - { - "path": "protos/google/monitoring/v3/service_service.proto" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/config" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/index" - }, - { - "path": ".git/objects/pack/pack-93025bec537e8b71efaeb4f1098b407b2ca3841d.pack" - }, - { - "path": ".git/objects/pack/pack-93025bec537e8b71efaeb4f1098b407b2ca3841d.idx" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/heads/master" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/refs/tags/v1.7.0" - }, - { - "path": "src/index.js" - }, - { - "path": "src/browser.js" - }, - { - "path": "src/v3/uptime_check_service_client.js" - }, - { - "path": "src/v3/alert_policy_service_client_config.json" - }, - { - "path": "src/v3/metric_service_client.js" - }, - { - "path": "src/v3/uptime_check_service_client_config.json" - }, - { - "path": "src/v3/notification_channel_service_proto_list.json" - }, - { - "path": "src/v3/metric_service_proto_list.json" - }, - { - "path": "src/v3/index.js" - }, - { - "path": "src/v3/alert_policy_service_client.js" - }, - { - "path": "src/v3/service_monitoring_service_proto_list.json" - }, - { - "path": "src/v3/service_monitoring_service_client_config.json" - }, - { - "path": "src/v3/group_service_client_config.json" - }, - { - "path": "src/v3/alert_policy_service_proto_list.json" - }, - { - "path": "src/v3/metric_service_client_config.json" - }, - { - "path": "src/v3/notification_channel_service_client_config.json" - }, - { - "path": "src/v3/group_service_proto_list.json" - }, - { - "path": "src/v3/group_service_client.js" - }, - { - "path": "src/v3/service_monitoring_service_client.js" - }, - { - "path": "src/v3/notification_channel_service_client.js" - }, - { - "path": "src/v3/uptime_check_service_proto_list.json" - }, - { - "path": "src/v3/doc/google/api/doc_label.js" - }, - { - "path": "src/v3/doc/google/api/doc_distribution.js" - }, - { - "path": "src/v3/doc/google/api/doc_monitored_resource.js" - }, - { - "path": "src/v3/doc/google/api/doc_metric.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_duration.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_any.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_wrappers.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_empty.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_struct.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_alert.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_metric_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_uptime_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_notification_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_alert_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_mutation_record.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_group.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_uptime.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_notification.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_metric.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_service_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_group_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_common.js" - }, - { - "path": "src/v3/doc/google/rpc/doc_status.js" - }, - { - "path": "node_modules/progress/package.json" - }, - { - "path": "node_modules/is-ci/package.json" - }, - { - "path": "node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/destroy/package.json" - }, - { - "path": "node_modules/power-assert-context-formatter/package.json" - }, - { - "path": "node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/nice-try/package.json" - }, - { - "path": "node_modules/which-module/package.json" - }, - { - "path": "node_modules/array-find/package.json" - }, - { - "path": "node_modules/catharsis/package.json" - }, - { - "path": "node_modules/is-promise/package.json" - }, - { - "path": "node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/doctrine/package.json" - }, - { - "path": "node_modules/callsites/package.json" - }, - { - "path": "node_modules/diff/package.json" - }, - { - "path": "node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/color-name/package.json" - }, - { - "path": "node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/unpipe/package.json" - }, - { - "path": "node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/http-errors/package.json" - }, - { - "path": "node_modules/eventemitter3/package.json" - }, - { - "path": "node_modules/esutils/package.json" - }, - { - "path": "node_modules/he/package.json" - }, - { - "path": "node_modules/on-finished/package.json" - }, - { - "path": "node_modules/linkinator/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/chalk/package.json" - }, - { - "path": "node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/update-notifier/node_modules/chalk/package.json" - }, - { - "path": "node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/markdown-it/package.json" - }, - { - "path": "node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/fast-diff/package.json" - }, - { - "path": "node_modules/lodash.camelcase/package.json" - }, - { - "path": "node_modules/redent/package.json" - }, - { - "path": "node_modules/resolve/package.json" - }, - { - "path": "node_modules/globals/package.json" - }, - { - "path": "node_modules/range-parser/package.json" - }, - { - "path": "node_modules/string.prototype.trimright/package.json" - }, - { - "path": "node_modules/inflight/package.json" - }, - { - "path": "node_modules/debug/package.json" - }, - { - "path": "node_modules/htmlparser2/package.json" - }, - { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/semver-diff/node_modules/semver/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/ms/package.json" - }, - { - "path": "node_modules/linkify-it/package.json" - }, - { - "path": "node_modules/through/package.json" - }, - { - "path": "node_modules/power-assert-renderer-file/package.json" - }, - { - "path": "node_modules/string-width/package.json" - }, - { - "path": "node_modules/html-escaper/package.json" - }, - { - "path": "node_modules/type/package.json" - }, - { - "path": "node_modules/type-fest/package.json" - }, - { - "path": "node_modules/intelli-espower-loader/package.json" - }, - { - "path": "node_modules/parseurl/package.json" - }, - { - "path": "node_modules/google-p12-pem/package.json" - }, - { - "path": "node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/klaw/package.json" - }, - { - "path": "node_modules/map-obj/package.json" - }, - { - "path": "node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/jsonexport/package.json" - }, - { - "path": "node_modules/isexe/package.json" - }, - { - "path": "node_modules/escallmatch/package.json" - }, - { - "path": "node_modules/escallmatch/node_modules/esprima/package.json" - }, - { - "path": "node_modules/espower/package.json" - }, - { - "path": "node_modules/espower/node_modules/source-map/package.json" - }, - { - "path": "node_modules/run-async/package.json" - }, - { - "path": "node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/file-entry-cache/package.json" - }, - { - "path": "node_modules/meow/package.json" - }, - { - "path": "node_modules/concat-map/package.json" - }, - { - "path": "node_modules/term-size/package.json" - }, - { - "path": "node_modules/xmlcreate/package.json" - }, - { - "path": "node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yallist/package.json" - }, - { - "path": "node_modules/json-bigint/package.json" - }, - { - "path": "node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/cliui/package.json" - }, - { - "path": "node_modules/toidentifier/package.json" - }, - { - "path": "node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/marked/package.json" - }, - { - "path": "node_modules/wrappy/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/package.json" - }, - { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" - }, - { - "path": "node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/xtend/package.json" - }, - { - "path": "node_modules/is-arguments/package.json" - }, - { - "path": "node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/istanbul-lib-report/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/strip-ansi/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/esprima/package.json" - }, - { - "path": "node_modules/is-stream-ended/package.json" - }, - { - "path": "node_modules/minimatch/package.json" - }, - { - "path": "node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/growl/package.json" - }, - { - "path": "node_modules/string.prototype.trimleft/package.json" - }, - { - "path": "node_modules/istanbul-lib-coverage/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-text-encoding/package.json" - }, - { - "path": "node_modules/server-destroy/package.json" - }, - { - "path": "node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/d/package.json" - }, - { - "path": "node_modules/protobufjs/package.json" - }, - { - "path": "node_modules/domhandler/package.json" - }, - { - "path": "node_modules/ansi-escapes/package.json" - }, - { - "path": "node_modules/power-assert-renderer-base/package.json" - }, - { - "path": "node_modules/boolbase/package.json" - }, - { - "path": "node_modules/indent-string/package.json" - }, - { - "path": "node_modules/lodash/package.json" - }, - { - "path": "node_modules/taffydb/package.json" - }, - { - "path": "node_modules/extend/package.json" - }, - { - "path": "node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/dom-serializer/package.json" - }, - { - "path": "node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/log-symbols/package.json" - }, - { - "path": "node_modules/is-callable/package.json" - }, - { - "path": "node_modules/es5-ext/package.json" - }, - { - "path": "node_modules/stringifier/package.json" - }, - { - "path": "node_modules/es6-weak-map/package.json" - }, - { - "path": "node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/cli-boxes/package.json" - }, - { - "path": "node_modules/is-obj/package.json" - }, - { - "path": "node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/buffer-equal-constant-time/package.json" - }, - { - "path": "node_modules/@bcoe/v8-coverage/package.json" - }, - { - "path": "node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/restore-cursor/package.json" - }, - { - "path": "node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/fresh/package.json" - }, - { - "path": "node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/indexof/package.json" - }, - { - "path": "node_modules/codecov/package.json" - }, - { - "path": "node_modules/ajv/package.json" - }, - { - "path": "node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/rxjs/package.json" - }, - { - "path": "node_modules/p-locate/package.json" - }, - { - "path": "node_modules/figures/package.json" - }, - { - "path": "node_modules/underscore/package.json" - }, - { - "path": "node_modules/finalhandler/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/debug/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/ms/package.json" - }, - { - "path": "node_modules/ignore/package.json" - }, - { - "path": "node_modules/argv/package.json" - }, - { - "path": "node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/google-gax/package.json" - }, - { - "path": "node_modules/onetime/package.json" - }, - { - "path": "node_modules/path-key/package.json" - }, - { - "path": "node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/array-filter/package.json" - }, - { - "path": "node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/write/package.json" - }, - { - "path": "node_modules/duplexify/package.json" - }, - { - "path": "node_modules/camelcase/package.json" - }, - { - "path": "node_modules/error-ex/package.json" - }, - { - "path": "node_modules/empower-assert/package.json" - }, - { - "path": "node_modules/boxen/package.json" - }, - { - "path": "node_modules/boxen/node_modules/chalk/package.json" - }, - { - "path": "node_modules/node-environment-flags/package.json" - }, - { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" - }, - { - "path": "node_modules/c8/package.json" - }, - { - "path": "node_modules/gcp-metadata/package.json" - }, - { - "path": "node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/bluebird/package.json" - }, - { - "path": "node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/serve-static/package.json" - }, - { - "path": "node_modules/path-parse/package.json" - }, - { - "path": "node_modules/mime/package.json" - }, - { - "path": "node_modules/yargs-unparser/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/lines-and-columns/package.json" - }, - { - "path": "node_modules/is-url/package.json" - }, - { - "path": "node_modules/chalk/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/supports-color/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/locate-path/package.json" - }, - { - "path": "node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/power-assert-util-string-width/package.json" - }, - { - "path": "node_modules/esquery/package.json" - }, - { - "path": "node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/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/strip-ansi/package.json" - }, - { - "path": "node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/prettier-linter-helpers/package.json" - }, - { - "path": "node_modules/chardet/package.json" - }, - { - "path": "node_modules/amdefine/package.json" - }, - { - "path": "node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/has-flag/package.json" - }, - { - "path": "node_modules/cheerio/package.json" - }, - { - "path": "node_modules/domelementtype/package.json" - }, - { - "path": "node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/tmp/package.json" - }, - { - "path": "node_modules/entities/package.json" - }, - { - "path": "node_modules/argparse/package.json" - }, - { - "path": "node_modules/has/package.json" - }, - { - "path": "node_modules/ee-first/package.json" - }, - { - "path": "node_modules/object-inspect/package.json" - }, - { - "path": "node_modules/deep-equal/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/strip-ansi/package.json" - }, - { - "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/get-stream/package.json" - }, - { - "path": "node_modules/power-assert/package.json" - }, - { - "path": "node_modules/statuses/package.json" - }, - { - "path": "node_modules/@istanbuljs/schema/package.json" - }, - { - "path": "node_modules/es6-set/package.json" - }, - { - "path": "node_modules/es6-set/node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/istanbul-reports/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" - }, - { - "path": "node_modules/@grpc/proto-loader/package.json" - }, - { - "path": "node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/etag/package.json" - }, - { - "path": "node_modules/y18n/package.json" - }, - { - "path": "node_modules/diff-match-patch/package.json" - }, - { - "path": "node_modules/es6-iterator/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/semver/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/natural-compare/package.json" - }, - { - "path": "node_modules/uuid/package.json" - }, - { - "path": "node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/arrify/package.json" - }, - { - "path": "node_modules/widest-line/package.json" - }, - { - "path": "node_modules/ignore-walk/package.json" - }, - { - "path": "node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/function-bind/package.json" - }, - { - "path": "node_modules/object-is/package.json" - }, - { - "path": "node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/@types/normalize-package-data/package.json" - }, - { - "path": "node_modules/@types/is-windows/package.json" - }, - { - "path": "node_modules/@types/minimist/package.json" - }, - { - "path": "node_modules/@types/fs-extra/package.json" - }, - { - "path": "node_modules/@types/long/package.json" - }, - { - "path": "node_modules/is-windows/package.json" - }, - { - "path": "node_modules/levn/package.json" - }, - { - "path": "node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/power-assert-renderer-diagram/package.json" - }, - { - "path": "node_modules/is-stream/package.json" - }, - { - "path": "node_modules/es6-symbol/package.json" - }, - { - "path": "node_modules/parse-json/package.json" - }, - { - "path": "node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/google-auth-library/package.json" - }, - { - "path": "node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/type-name/package.json" - }, - { - "path": "node_modules/define-properties/package.json" - }, - { - "path": "node_modules/universal-deep-strict-equal/package.json" - }, - { - "path": "node_modules/jws/package.json" - }, - { - "path": "node_modules/nth-check/package.json" - }, - { - "path": "node_modules/empower/package.json" - }, - { - "path": "node_modules/send/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/send/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/mime/package.json" - }, - { - "path": "node_modules/require-directory/package.json" - }, - { - "path": "node_modules/object.assign/package.json" - }, - { - "path": "node_modules/is-npm/package.json" - }, - { - "path": "node_modules/min-indent/package.json" - }, - { - "path": "node_modules/functional-red-black-tree/package.json" - }, - { - "path": "node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/read-pkg/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/registry-url/package.json" - }, - { - "path": "node_modules/is-regex/package.json" - }, - { - "path": "node_modules/es-abstract/package.json" - }, - { - "path": "node_modules/parent-module/package.json" - }, - { - "path": "node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/import-fresh/package.json" - }, - { - "path": "node_modules/keyv/package.json" - }, - { - "path": "node_modules/estraverse/package.json" - }, - { - "path": "node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/mute-stream/package.json" - }, - { - "path": "node_modules/power-assert-context-traversal/package.json" - }, - { - "path": "node_modules/rimraf/package.json" - }, - { - "path": "node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/get-stdin/package.json" - }, - { - "path": "node_modules/make-dir/package.json" - }, - { - "path": "node_modules/make-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/retry-request/package.json" - }, - { - "path": "node_modules/retry-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/cli-cursor/package.json" - }, - { - "path": "node_modules/ext/package.json" - }, - { - "path": "node_modules/ext/node_modules/type/package.json" - }, - { - "path": "node_modules/is-symbol/package.json" - }, - { - "path": "node_modules/css-what/package.json" - }, - { - "path": "node_modules/punycode/package.json" - }, - { - "path": "node_modules/setprototypeof/package.json" - }, - { - "path": "node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/foreground-child/package.json" - }, - { - "path": "node_modules/es6-map/package.json" - }, - { - "path": "node_modules/call-signature/package.json" - }, - { - "path": "node_modules/package-json/package.json" - }, - { - "path": "node_modules/package-json/node_modules/semver/package.json" - }, - { - "path": "node_modules/css-select/package.json" - }, - { - "path": "node_modules/eslint-plugin-prettier/package.json" - }, - { - "path": "node_modules/p-finally/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/acorn-jsx/package.json" - }, - { - "path": "node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-name/package.json" - }, - { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ms/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/mocha/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-flag/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/which/package.json" - }, - { - "path": "node_modules/mocha/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/mocha/node_modules/find-up/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/event-emitter/package.json" - }, - { - "path": "node_modules/@protobufjs/codegen/package.json" - }, - { - "path": "node_modules/@protobufjs/base64/package.json" - }, - { - "path": "node_modules/@protobufjs/utf8/package.json" - }, - { - "path": "node_modules/@protobufjs/pool/package.json" - }, - { - "path": "node_modules/@protobufjs/float/package.json" - }, - { - "path": "node_modules/@protobufjs/fetch/package.json" - }, - { - "path": "node_modules/@protobufjs/path/package.json" - }, - { - "path": "node_modules/@protobufjs/aspromise/package.json" - }, - { - "path": "node_modules/@protobufjs/inquire/package.json" - }, - { - "path": "node_modules/@protobufjs/eventemitter/package.json" - }, - { - "path": "node_modules/node-forge/package.json" - }, - { - "path": "node_modules/lodash.has/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/has-symbols/package.json" - }, - { - "path": "node_modules/espurify/package.json" - }, - { - "path": "node_modules/lodash.at/package.json" - }, - { - "path": "node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/merge-estraverse-visitors/package.json" - }, - { - "path": "node_modules/ansi-colors/package.json" - }, - { - "path": "node_modules/p-try/package.json" - }, - { - "path": "node_modules/escope/package.json" - }, - { - "path": "node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/abort-controller/package.json" - }, - { - "path": "node_modules/which/package.json" - }, - { - "path": "node_modules/astral-regex/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/minimist/package.json" - }, - { - "path": "node_modules/clone-response/package.json" - }, - { - "path": "node_modules/ecdsa-sig-formatter/package.json" - }, - { - "path": "node_modules/requizzle/package.json" - }, - { - "path": "node_modules/base64-js/package.json" - }, - { - "path": "node_modules/object-keys/package.json" - }, - { - "path": "node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/deep-is/package.json" - }, - { - "path": "node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/shebang-regex/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/semver/package.json" - }, - { - "path": "node_modules/unique-string/package.json" - }, - { - "path": "node_modules/decamelize/package.json" - }, - { - "path": "node_modules/acorn/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/strip-ansi/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/got/package.json" - }, - { - "path": "node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/isarray/package.json" - }, - { - "path": "node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/p-limit/package.json" - }, - { - "path": "node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/ini/package.json" - }, - { - "path": "node_modules/js2xmlparser/package.json" - }, - { - "path": "node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/external-editor/package.json" - }, - { - "path": "node_modules/power-assert-formatter/package.json" - }, - { - "path": "node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/text-table/package.json" - }, - { - "path": "node_modules/domutils/package.json" - }, - { - "path": "node_modules/supports-color/package.json" - }, - { - "path": "node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/parse5/package.json" - }, - { - "path": "node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/empower-core/package.json" - }, - { - "path": "node_modules/acorn-es7-plugin/package.json" - }, - { - "path": "node_modules/p-timeout/package.json" - }, - { - "path": "node_modules/espree/package.json" - }, - { - "path": "node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/responselike/package.json" - }, - { - "path": "node_modules/next-tick/package.json" - }, - { - "path": "node_modules/esrecurse/package.json" - }, - { - "path": "node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/source-map/package.json" - }, - { - "path": "node_modules/find-up/package.json" - }, - { - "path": "node_modules/traverse/package.json" - }, - { - "path": "node_modules/es-to-primitive/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/safe-buffer/package.json" - }, - { - "path": "node_modules/uc.micro/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/gtoken/package.json" - }, - { - "path": "node_modules/urlgrey/package.json" - }, - { - "path": "node_modules/convert-source-map/package.json" - }, - { - "path": "node_modules/is-date-object/package.json" - }, - { - "path": "node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/iconv-lite/package.json" - }, - { - "path": "node_modules/is-glob/package.json" - }, - { - "path": "node_modules/furi/package.json" - }, - { - "path": "node_modules/tslib/package.json" - }, - { - "path": "node_modules/markdown-it-anchor/package.json" - }, - { - "path": "node_modules/browser-stdout/package.json" - }, - { - "path": "node_modules/pump/package.json" - }, - { - "path": "node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/deep-extend/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/type-check/package.json" - }, - { - "path": "node_modules/teeny-request/package.json" - }, - { - "path": "node_modules/teeny-request/node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/jwa/package.json" - }, - { - "path": "node_modules/walkdir/package.json" - }, - { - "path": "node_modules/hard-rejection/package.json" - }, - { - "path": "node_modules/espower-source/package.json" - }, - { - "path": "node_modules/espower-source/node_modules/acorn/package.json" - }, - { - "path": "node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/path-exists/package.json" - }, - { - "path": "node_modules/jsdoc/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/escape-html/package.json" - }, - { - "path": "node_modules/power-assert-renderer-assertion/package.json" - }, - { - "path": "node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" - }, - { - "path": "node_modules/latest-version/package.json" - }, - { - "path": "node_modules/optionator/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/ansi-styles/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/power-assert-renderer-comparison/package.json" - }, - { - "path": "node_modules/flatted/package.json" - }, - { - "path": "node_modules/inherits/package.json" - }, - { - "path": "node_modules/depd/package.json" - }, - { - "path": "node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/long/package.json" - }, - { - "path": "node_modules/regexpp/package.json" - }, - { - "path": "node_modules/cli-width/package.json" - }, - { - "path": "node_modules/call-matcher/package.json" - }, - { - "path": "node_modules/eslint/package.json" - }, - { - "path": "node_modules/eslint/node_modules/debug/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-command/package.json" - }, - { - "path": "node_modules/eslint/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/eslint/node_modules/which/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/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/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/mdurl/package.json" - }, - { - "path": "node_modules/v8-to-istanbul/package.json" - }, - { - "path": "node_modules/espower-loader/package.json" - }, - { - "path": "node_modules/object.getownpropertydescriptors/package.json" - }, - { - "path": "node_modules/yargs/package.json" - }, - { - "path": "node_modules/ci-info/package.json" - }, - { - "path": "node_modules/color-convert/package.json" - }, - { - "path": "node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/eslint-visitor-keys/package.json" - }, - { - "path": "node_modules/agent-base/package.json" - }, - { - "path": "node_modules/flat/package.json" - }, - { - "path": "node_modules/through2/package.json" - }, - { - "path": "node_modules/gaxios/package.json" - }, - { - "path": "node_modules/p-queue/package.json" - }, - { - "path": "node_modules/encodeurl/package.json" - }, - { - "path": "node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/eslint-config-prettier/package.json" - }, - { - "path": "node_modules/uri-js/package.json" - }, - { - "path": "node_modules/test-exclude/package.json" - }, - { - "path": "node_modules/safer-buffer/package.json" - }, - { - "path": "node_modules/prettier/package.json" - }, - { - "path": "node_modules/regexp.prototype.flags/package.json" - }, - { - "path": "node_modules/yargs-parser/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/configstore/package.json" - }, - { - "path": "node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/eastasianwidth/package.json" - }, - { - "path": "node_modules/has-yarn/package.json" - }, - { - "path": "node_modules/core-js/package.json" - }, - { - "path": "samples/alerts.js" - }, - { - "path": "samples/.gitignore" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/uptime.js" - }, - { - "path": "samples/metrics.js" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/test/alerts.test.js" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "samples/test/metrics.test.js" - }, - { - "path": "samples/test/uptime.test.js" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - }, - { - "path": "smoke-test/metric_service_smoke_test.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - } ] } \ No newline at end of file diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js index 632a50c9d2c..ff6cca815a9 100644 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ b/packages/google-cloud-monitoring/test/gapic-v3.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/packages/google-cloud-monitoring/webpack.config.js b/packages/google-cloud-monitoring/webpack.config.js index 316a28deb69..402b3e0e480 100644 --- a/packages/google-cloud-monitoring/webpack.config.js +++ b/packages/google-cloud-monitoring/webpack.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. From 5af35f2be929261469f291b822551170bf7b7310 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Jan 2020 02:20:44 +0100 Subject: [PATCH 257/422] chore(deps): update dependency mocha to v7 (#347) --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 394d1b36b68..6dd21f3da85 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -51,7 +51,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", - "mocha": "^6.0.0", + "mocha": "^7.0.0", "power-assert": "^1.4.4", "prettier": "^1.7.4" } diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 741fe4ef178..e8991ae4483 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^6.0.0", + "mocha": "^7.0.0", "p-retry": "^4.0.0", "uuid": "^3.3.2" } From 3f6d99081d26aae27eb25b62f86e5e4bdab8a29f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jan 2020 16:39:54 -0800 Subject: [PATCH 258/422] docs: update docstring on method [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .../src/v3/doc/google/rpc/doc_status.js | 60 +-- .../google-cloud-monitoring/synth.metadata | 451 +++++++++++++++++- 2 files changed, 452 insertions(+), 59 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js index 80ec5037662..750e0af7689 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js @@ -18,67 +18,19 @@ /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * used by [gRPC](https://github.com/grpc). Each `Status` message contains + * three pieces of data: error code, error message, and error details. * - * - Simple to use and understand for most users - * - Flexible enough to meet unexpected needs - * - * # Overview - * - * The `Status` message contains three pieces of data: error code, error - * message, and error details. The error code should be an enum value of - * google.rpc.Code, but it may accept additional error codes - * if needed. The error message should be a developer-facing English message - * that helps developers *understand* and *resolve* the error. If a localized - * user-facing error message is needed, put the localized message in the error - * details or localize it in the client. The optional error details may contain - * arbitrary information about the error. There is a predefined set of error - * detail types in the package `google.rpc` that can be used for common error - * conditions. - * - * # Language mapping - * - * The `Status` message is the logical representation of the error model, but it - * is not necessarily the actual wire format. When the `Status` message is - * exposed in different client libraries and different wire protocols, it can be - * mapped differently. For example, it will likely be mapped to some exceptions - * in Java, but more likely mapped to some error codes in C. - * - * # Other uses - * - * The error model and the `Status` message can be used in a variety of - * environments, either with or without APIs, to provide a - * consistent developer experience across different environments. - * - * Example uses of this error model include: - * - * - Partial errors. If a service needs to return partial errors to the client, - * it may embed the `Status` in the normal response to indicate the partial - * errors. - * - * - Workflow errors. A typical workflow has multiple steps. Each step may - * have a `Status` message for error reporting. - * - * - Batch operations. If a client uses batch request and batch response, the - * `Status` message should be used directly inside batch response, one for - * each error sub-response. - * - * - Asynchronous operations. If an API call embeds asynchronous operation - * results in its response, the status of those operations should be - * represented directly using the `Status` message. - * - * - Logging. If some API errors are stored in logs, the message `Status` could - * be used directly after any stripping needed for security/privacy reasons. + * You can find out more about this error model and how to work with it in the + * [API Design Guide](https://cloud.google.com/apis/design/errors). * * @property {number} code - * The status code, which should be an enum value of - * google.rpc.Code. + * The status code, which should be an enum value of google.rpc.Code. * * @property {string} message * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized - * by the client. + * google.rpc.Status.details field, or localized by the client. * * @property {Object[]} details * A list of messages that carry the error details. There is a common set of diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 5fbee071f1b..07f0dbb3174 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,20 @@ { - "updateTime": "2020-01-15T12:24:20.481832Z", + "updateTime": "2020-01-22T12:22:24.682607Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.0", - "dockerImage": "googleapis/artman@sha256:10a6d0342b8d62544810ac5ad86c3b21049ec0696608ac60175da8e513234344" + "version": "0.44.1", + "dockerImage": "googleapis/artman@sha256:5599b61e56a372d21b671969ee915fbca0f6c3a0daaeb898d01f8f685f1bbc8b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d99df0d67057a233c711187e0689baa4f8e6333d", - "internalRef": "289709813" + "sha": "cda99c1f7dc5e4ca9b1caeae1dc330838cbc1461", + "internalRef": "290800639", + "log": "cda99c1f7dc5e4ca9b1caeae1dc330838cbc1461\nChange api_name to 'asset' for v1p1beta1\n\nPiperOrigin-RevId: 290800639\n\n94e9e90c303a820ce40643d9129e7f0d2054e8a1\nAdds Google Maps Road service\n\nPiperOrigin-RevId: 290795667\n\na3b23dcb2eaecce98c600c7d009451bdec52dbda\nrpc: new message ErrorInfo, other comment updates\n\nPiperOrigin-RevId: 290781668\n\n26420ef4e46c37f193c0fbe53d6ebac481de460e\nAdd proto definition for Org Policy v1.\n\nPiperOrigin-RevId: 290771923\n\n7f0dab8177cf371ae019a082e2512de7ac102888\nPublish Routes Preferred API v1 service definitions.\n\nPiperOrigin-RevId: 290326986\n\nad6e508d0728e1d1bca6e3f328cd562718cb772d\nFix: Qualify resource type references with \"jobs.googleapis.com/\"\n\nPiperOrigin-RevId: 290285762\n\n58e770d568a2b78168ddc19a874178fee8265a9d\ncts client library\n\nPiperOrigin-RevId: 290146169\n\naf9daa4c3b4c4a8b7133b81588dd9ffd37270af2\nAdd more programming language options to public proto\n\nPiperOrigin-RevId: 290144091\n\nd9f2bbf2df301ef84641d4cec7c828736a0bd907\ntalent: add missing resource.proto dep to Bazel build target\n\nPiperOrigin-RevId: 290143164\n\n3b3968237451d027b42471cd28884a5a1faed6c7\nAnnotate Talent API.\nAdd gRPC service config for retry.\nUpdate bazel file with google.api.resource dependency.\n\nPiperOrigin-RevId: 290125172\n\n0735b4b096872960568d1f366bfa75b7b0e1f1a3\nWeekly library update.\n\nPiperOrigin-RevId: 289939042\n\n8760d3d9a4543d7f9c0d1c7870aca08b116e4095\nWeekly library update.\n\nPiperOrigin-RevId: 289939020\n\n8607df842f782a901805187e02fff598145b0b0e\nChange Talent API timeout to 30s.\n\nPiperOrigin-RevId: 289912621\n\n908155991fe32570653bcb72ecfdcfc896642f41\nAdd Recommendations AI V1Beta1\n\nPiperOrigin-RevId: 289901914\n\n5c9a8c2bebd8b71aa66d1cc473edfaac837a2c78\nAdding no-arg method signatures for ListBillingAccounts and ListServices\n\nPiperOrigin-RevId: 289891136\n\n50b0e8286ac988b0593bd890eb31fef6ea2f5767\nlongrunning: add grpc service config and default_host annotation to operations.proto\n\nPiperOrigin-RevId: 289876944\n\n6cac27dabe51c54807b0401698c32d34998948a9\n Updating default deadline for Cloud Security Command Center's v1 APIs.\n\nPiperOrigin-RevId: 289875412\n\n" } }, { @@ -35,5 +36,445 @@ "config": "google/monitoring/artman_monitoring.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/monitoring/v3/alert.proto" + }, + { + "path": "protos/google/monitoring/v3/alert_service.proto" + }, + { + "path": "protos/google/monitoring/v3/common.proto" + }, + { + "path": "protos/google/monitoring/v3/dropped_labels.proto" + }, + { + "path": "protos/google/monitoring/v3/group.proto" + }, + { + "path": "protos/google/monitoring/v3/group_service.proto" + }, + { + "path": "protos/google/monitoring/v3/metric.proto" + }, + { + "path": "protos/google/monitoring/v3/metric_service.proto" + }, + { + "path": "protos/google/monitoring/v3/mutation_record.proto" + }, + { + "path": "protos/google/monitoring/v3/notification.proto" + }, + { + "path": "protos/google/monitoring/v3/notification_service.proto" + }, + { + "path": "protos/google/monitoring/v3/service.proto" + }, + { + "path": "protos/google/monitoring/v3/service_service.proto" + }, + { + "path": "protos/google/monitoring/v3/span_context.proto" + }, + { + "path": "protos/google/monitoring/v3/uptime.proto" + }, + { + "path": "protos/google/monitoring/v3/uptime_service.proto" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "renovate.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/.gitignore" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/alerts.js" + }, + { + "path": "samples/metrics.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/test/alerts.test.js" + }, + { + "path": "samples/test/metrics.test.js" + }, + { + "path": "samples/test/quickstart.test.js" + }, + { + "path": "samples/test/uptime.test.js" + }, + { + "path": "samples/uptime.js" + }, + { + "path": "smoke-test/.eslintrc.yml" + }, + { + "path": "smoke-test/metric_service_smoke_test.js" + }, + { + "path": "src/browser.js" + }, + { + "path": "src/index.js" + }, + { + "path": "src/v3/alert_policy_service_client.js" + }, + { + "path": "src/v3/alert_policy_service_client_config.json" + }, + { + "path": "src/v3/alert_policy_service_proto_list.json" + }, + { + "path": "src/v3/doc/google/api/doc_distribution.js" + }, + { + "path": "src/v3/doc/google/api/doc_label.js" + }, + { + "path": "src/v3/doc/google/api/doc_metric.js" + }, + { + "path": "src/v3/doc/google/api/doc_monitored_resource.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_alert.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_alert_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_common.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_group.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_group_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_metric.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_metric_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_mutation_record.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_notification.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_notification_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_service_service.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_uptime.js" + }, + { + "path": "src/v3/doc/google/monitoring/v3/doc_uptime_service.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_empty.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_struct.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v3/doc/google/protobuf/doc_wrappers.js" + }, + { + "path": "src/v3/doc/google/rpc/doc_status.js" + }, + { + "path": "src/v3/group_service_client.js" + }, + { + "path": "src/v3/group_service_client_config.json" + }, + { + "path": "src/v3/group_service_proto_list.json" + }, + { + "path": "src/v3/index.js" + }, + { + "path": "src/v3/metric_service_client.js" + }, + { + "path": "src/v3/metric_service_client_config.json" + }, + { + "path": "src/v3/metric_service_proto_list.json" + }, + { + "path": "src/v3/notification_channel_service_client.js" + }, + { + "path": "src/v3/notification_channel_service_client_config.json" + }, + { + "path": "src/v3/notification_channel_service_proto_list.json" + }, + { + "path": "src/v3/service_monitoring_service_client.js" + }, + { + "path": "src/v3/service_monitoring_service_client_config.json" + }, + { + "path": "src/v3/service_monitoring_service_proto_list.json" + }, + { + "path": "src/v3/uptime_check_service_client.js" + }, + { + "path": "src/v3/uptime_check_service_client_config.json" + }, + { + "path": "src/v3/uptime_check_service_proto_list.json" + }, + { + "path": "synth.metadata" + }, + { + "path": "synth.py" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "system-test/metric_service_smoke_test.js" + }, + { + "path": "test/gapic-v3.js" + }, + { + "path": "test/mocha.opts" + }, + { + "path": "webpack.config.js" + } ] } \ No newline at end of file From 05e5b8ac93bffdae03b69a97e3ae0d03dcb3bcb6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jan 2020 11:42:13 -0800 Subject: [PATCH 259/422] chore: updated proto files --- .../protos/protos.d.ts | 178 +++++++++--------- .../google-cloud-monitoring/protos/protos.js | 40 ++-- .../protos/protos.json | 18 +- .../google-cloud-monitoring/synth.metadata | 12 +- 4 files changed, 124 insertions(+), 124 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 023411078cc..ea09c9b2897 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -753,7 +753,7 @@ export namespace google { conditions?: (google.monitoring.v3.AlertPolicy.ICondition[]|null); /** AlertPolicy combiner */ - combiner?: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|null); + combiner?: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType|null); /** AlertPolicy enabled */ enabled?: (google.protobuf.IBoolValue|null); @@ -796,7 +796,7 @@ export namespace google { public conditions: google.monitoring.v3.AlertPolicy.ICondition[]; /** AlertPolicy combiner. */ - public combiner: google.monitoring.v3.AlertPolicy.ConditionCombinerType; + public combiner: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType); /** AlertPolicy enabled. */ public enabled?: (google.protobuf.IBoolValue|null); @@ -1210,7 +1210,7 @@ export namespace google { denominatorAggregations?: (google.monitoring.v3.IAggregation[]|null); /** MetricThreshold comparison */ - comparison?: (google.monitoring.v3.ComparisonType|null); + comparison?: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType|null); /** MetricThreshold thresholdValue */ thresholdValue?: (number|null); @@ -1244,7 +1244,7 @@ export namespace google { public denominatorAggregations: google.monitoring.v3.IAggregation[]; /** MetricThreshold comparison. */ - public comparison: google.monitoring.v3.ComparisonType; + public comparison: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType); /** MetricThreshold thresholdValue. */ public thresholdValue: number; @@ -1451,7 +1451,7 @@ export namespace google { boolValue?: (boolean|null); /** TypedValue int64Value */ - int64Value?: (number|Long|null); + int64Value?: (number|Long|string|null); /** TypedValue doubleValue */ doubleValue?: (number|null); @@ -1476,7 +1476,7 @@ export namespace google { public boolValue: boolean; /** TypedValue int64Value. */ - public int64Value: (number|Long); + public int64Value: (number|Long|string); /** TypedValue doubleValue. */ public doubleValue: number; @@ -1664,10 +1664,10 @@ export namespace google { alignmentPeriod?: (google.protobuf.IDuration|null); /** Aggregation perSeriesAligner */ - perSeriesAligner?: (google.monitoring.v3.Aggregation.Aligner|null); + perSeriesAligner?: (google.monitoring.v3.Aggregation.Aligner|keyof typeof google.monitoring.v3.Aggregation.Aligner|null); /** Aggregation crossSeriesReducer */ - crossSeriesReducer?: (google.monitoring.v3.Aggregation.Reducer|null); + crossSeriesReducer?: (google.monitoring.v3.Aggregation.Reducer|keyof typeof google.monitoring.v3.Aggregation.Reducer|null); /** Aggregation groupByFields */ groupByFields?: (string[]|null); @@ -1686,10 +1686,10 @@ export namespace google { public alignmentPeriod?: (google.protobuf.IDuration|null); /** Aggregation perSeriesAligner. */ - public perSeriesAligner: google.monitoring.v3.Aggregation.Aligner; + public perSeriesAligner: (google.monitoring.v3.Aggregation.Aligner|keyof typeof google.monitoring.v3.Aggregation.Aligner); /** Aggregation crossSeriesReducer. */ - public crossSeriesReducer: google.monitoring.v3.Aggregation.Reducer; + public crossSeriesReducer: (google.monitoring.v3.Aggregation.Reducer|keyof typeof google.monitoring.v3.Aggregation.Reducer); /** Aggregation groupByFields. */ public groupByFields: string[]; @@ -3991,7 +3991,7 @@ export namespace google { orderBy?: (string|null); /** ListTimeSeriesRequest view */ - view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); + view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); /** ListTimeSeriesRequest pageSize */ pageSize?: (number|null); @@ -4025,7 +4025,7 @@ export namespace google { public orderBy: string; /** ListTimeSeriesRequest view. */ - public view: google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView; + public view: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView); /** ListTimeSeriesRequest pageSize. */ public pageSize: number; @@ -4717,10 +4717,10 @@ export namespace google { metadata?: (google.api.IMonitoredResourceMetadata|null); /** TimeSeries metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|null); + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); /** TimeSeries valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|null); + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); /** TimeSeries points */ points?: (google.monitoring.v3.IPoint[]|null); @@ -4745,10 +4745,10 @@ export namespace google { public metadata?: (google.api.IMonitoredResourceMetadata|null); /** TimeSeries metricKind. */ - public metricKind: google.api.MetricDescriptor.MetricKind; + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); /** TimeSeries valueType. */ - public valueType: google.api.MetricDescriptor.ValueType; + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); /** TimeSeries points. */ public points: google.monitoring.v3.IPoint[]; @@ -6454,7 +6454,7 @@ export namespace google { userLabels?: ({ [k: string]: string }|null); /** NotificationChannel verificationStatus */ - verificationStatus?: (google.monitoring.v3.NotificationChannel.VerificationStatus|null); + verificationStatus?: (google.monitoring.v3.NotificationChannel.VerificationStatus|keyof typeof google.monitoring.v3.NotificationChannel.VerificationStatus|null); /** NotificationChannel enabled */ enabled?: (google.protobuf.IBoolValue|null); @@ -6488,7 +6488,7 @@ export namespace google { public userLabels: { [k: string]: string }; /** NotificationChannel verificationStatus. */ - public verificationStatus: google.monitoring.v3.NotificationChannel.VerificationStatus; + public verificationStatus: (google.monitoring.v3.NotificationChannel.VerificationStatus|keyof typeof google.monitoring.v3.NotificationChannel.VerificationStatus); /** NotificationChannel enabled. */ public enabled?: (google.protobuf.IBoolValue|null); @@ -7499,7 +7499,7 @@ export namespace google { name?: (string|null); /** GetServiceLevelObjectiveRequest view */ - view?: (google.monitoring.v3.ServiceLevelObjective.View|null); + view?: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View|null); } /** Represents a GetServiceLevelObjectiveRequest. */ @@ -7515,7 +7515,7 @@ export namespace google { public name: string; /** GetServiceLevelObjectiveRequest view. */ - public view: google.monitoring.v3.ServiceLevelObjective.View; + public view: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View); /** * Creates a new GetServiceLevelObjectiveRequest instance using the specified properties. @@ -7604,7 +7604,7 @@ export namespace google { pageToken?: (string|null); /** ListServiceLevelObjectivesRequest view */ - view?: (google.monitoring.v3.ServiceLevelObjective.View|null); + view?: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View|null); } /** Represents a ListServiceLevelObjectivesRequest. */ @@ -7629,7 +7629,7 @@ export namespace google { public pageToken: string; /** ListServiceLevelObjectivesRequest view. */ - public view: google.monitoring.v3.ServiceLevelObjective.View; + public view: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View); /** * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. @@ -8597,7 +8597,7 @@ export namespace google { rollingPeriod?: (google.protobuf.IDuration|null); /** ServiceLevelObjective calendarPeriod */ - calendarPeriod?: (google.type.CalendarPeriod|null); + calendarPeriod?: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod|null); } /** Represents a ServiceLevelObjective. */ @@ -8625,7 +8625,7 @@ export namespace google { public rollingPeriod?: (google.protobuf.IDuration|null); /** ServiceLevelObjective calendarPeriod. */ - public calendarPeriod: google.type.CalendarPeriod; + public calendarPeriod: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod); /** ServiceLevelObjective period. */ public period?: ("rollingPeriod"|"calendarPeriod"); @@ -10761,7 +10761,7 @@ export namespace google { peerProjectId?: (string|null); /** InternalChecker state */ - state?: (google.monitoring.v3.InternalChecker.State|null); + state?: (google.monitoring.v3.InternalChecker.State|keyof typeof google.monitoring.v3.InternalChecker.State|null); } /** Represents an InternalChecker. */ @@ -10789,7 +10789,7 @@ export namespace google { public peerProjectId: string; /** InternalChecker state. */ - public state: google.monitoring.v3.InternalChecker.State; + public state: (google.monitoring.v3.InternalChecker.State|keyof typeof google.monitoring.v3.InternalChecker.State); /** * Creates a new InternalChecker instance using the specified properties. @@ -10872,15 +10872,6 @@ export namespace google { } } - /** UptimeCheckRegion enum. */ - enum UptimeCheckRegion { - REGION_UNSPECIFIED = 0, - USA = 1, - EUROPE = 2, - SOUTH_AMERICA = 3, - ASIA_PACIFIC = 4 - } - /** Properties of an UptimeCheckConfig. */ interface IUptimeCheckConfig { @@ -11052,7 +11043,7 @@ export namespace google { groupId?: (string|null); /** ResourceGroup resourceType */ - resourceType?: (google.monitoring.v3.GroupResourceType|null); + resourceType?: (google.monitoring.v3.GroupResourceType|keyof typeof google.monitoring.v3.GroupResourceType|null); } /** Represents a ResourceGroup. */ @@ -11068,7 +11059,7 @@ export namespace google { public groupId: string; /** ResourceGroup resourceType. */ - public resourceType: google.monitoring.v3.GroupResourceType; + public resourceType: (google.monitoring.v3.GroupResourceType|keyof typeof google.monitoring.v3.GroupResourceType); /** * Creates a new ResourceGroup instance using the specified properties. @@ -11463,7 +11454,7 @@ export namespace google { content?: (string|null); /** ContentMatcher matcher */ - matcher?: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|null); + matcher?: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|keyof typeof google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|null); } /** Represents a ContentMatcher. */ @@ -11479,7 +11470,7 @@ export namespace google { public content: string; /** ContentMatcher matcher. */ - public matcher: google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption; + public matcher: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|keyof typeof google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption); /** * Creates a new ContentMatcher instance using the specified properties. @@ -11565,11 +11556,20 @@ export namespace google { } } + /** UptimeCheckRegion enum. */ + enum UptimeCheckRegion { + REGION_UNSPECIFIED = 0, + USA = 1, + EUROPE = 2, + SOUTH_AMERICA = 3, + ASIA_PACIFIC = 4 + } + /** Properties of an UptimeCheckIp. */ interface IUptimeCheckIp { /** UptimeCheckIp region */ - region?: (google.monitoring.v3.UptimeCheckRegion|null); + region?: (google.monitoring.v3.UptimeCheckRegion|keyof typeof google.monitoring.v3.UptimeCheckRegion|null); /** UptimeCheckIp location */ location?: (string|null); @@ -11588,7 +11588,7 @@ export namespace google { constructor(properties?: google.monitoring.v3.IUptimeCheckIp); /** UptimeCheckIp region. */ - public region: google.monitoring.v3.UptimeCheckRegion; + public region: (google.monitoring.v3.UptimeCheckRegion|keyof typeof google.monitoring.v3.UptimeCheckRegion); /** UptimeCheckIp location. */ public location: string; @@ -12022,7 +12022,7 @@ export namespace google { interface IDistribution { /** Distribution count */ - count?: (number|Long|null); + count?: (number|Long|string|null); /** Distribution mean */ mean?: (number|null); @@ -12037,7 +12037,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); @@ -12053,7 +12053,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; @@ -12068,7 +12068,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[]; @@ -12766,7 +12766,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. */ @@ -12794,7 +12794,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. @@ -13066,7 +13066,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); @@ -13085,7 +13085,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; @@ -13194,10 +13194,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); @@ -13212,7 +13212,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. */ @@ -13234,10 +13234,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; @@ -13252,7 +13252,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. @@ -13331,7 +13331,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); @@ -13350,7 +13350,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); @@ -14240,10 +14240,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); @@ -14280,10 +14280,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; @@ -15058,7 +15058,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); @@ -15131,7 +15131,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; @@ -15377,13 +15377,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); @@ -15408,13 +15408,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; @@ -15913,7 +15913,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); @@ -15938,7 +15938,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[]; @@ -16034,16 +16034,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); @@ -16065,16 +16065,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; @@ -16664,7 +16664,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents an Any. */ @@ -16680,7 +16680,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. @@ -16757,7 +16757,7 @@ export namespace google { interface ITimestamp { /** Timestamp seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Timestamp nanos */ nanos?: (number|null); @@ -16773,7 +16773,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; @@ -16853,7 +16853,7 @@ export namespace google { interface IDuration { /** Duration seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Duration nanos */ nanos?: (number|null); @@ -16869,7 +16869,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; @@ -17129,7 +17129,7 @@ export namespace google { interface IInt64Value { /** Int64Value value */ - value?: (number|Long|null); + value?: (number|Long|string|null); } /** Represents an Int64Value. */ @@ -17142,7 +17142,7 @@ export namespace google { constructor(properties?: google.protobuf.IInt64Value); /** Int64Value value. */ - public value: (number|Long); + public value: (number|Long|string); /** * Creates a new Int64Value instance using the specified properties. @@ -17219,7 +17219,7 @@ export namespace google { interface IUInt64Value { /** UInt64Value value */ - value?: (number|Long|null); + value?: (number|Long|string|null); } /** Represents a UInt64Value. */ @@ -17232,7 +17232,7 @@ export namespace google { constructor(properties?: google.protobuf.IUInt64Value); /** UInt64Value value. */ - public value: (number|Long); + public value: (number|Long|string); /** * Creates a new UInt64Value instance using the specified properties. @@ -17669,7 +17669,7 @@ export namespace google { interface IBytesValue { /** BytesValue value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents a BytesValue. */ @@ -17682,7 +17682,7 @@ export namespace google { constructor(properties?: google.protobuf.IBytesValue); /** BytesValue value. */ - public value: Uint8Array; + public value: (Uint8Array|string); /** * Creates a new BytesValue instance using the specified properties. @@ -18023,7 +18023,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); @@ -18051,7 +18051,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; diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 13051d7bea4..55971a21c12 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -25406,26 +25406,6 @@ return InternalChecker; })(); - /** - * UptimeCheckRegion enum. - * @name google.monitoring.v3.UptimeCheckRegion - * @enum {string} - * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value - * @property {number} USA=1 USA value - * @property {number} EUROPE=2 EUROPE value - * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value - * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value - */ - v3.UptimeCheckRegion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USA"] = 1; - values[valuesById[2] = "EUROPE"] = 2; - values[valuesById[3] = "SOUTH_AMERICA"] = 3; - values[valuesById[4] = "ASIA_PACIFIC"] = 4; - return values; - })(); - v3.UptimeCheckConfig = (function() { /** @@ -27264,6 +27244,26 @@ return UptimeCheckConfig; })(); + /** + * UptimeCheckRegion enum. + * @name google.monitoring.v3.UptimeCheckRegion + * @enum {string} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} USA=1 USA value + * @property {number} EUROPE=2 EUROPE value + * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value + * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + */ + v3.UptimeCheckRegion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USA"] = 1; + values[valuesById[2] = "EUROPE"] = 2; + values[valuesById[3] = "SOUTH_AMERICA"] = 3; + values[valuesById[4] = "ASIA_PACIFIC"] = 4; + return values; + })(); + v3.UptimeCheckIp = (function() { /** diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 62f7e4d9994..c782aa45c3c 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -2110,15 +2110,6 @@ } } }, - "UptimeCheckRegion": { - "values": { - "REGION_UNSPECIFIED": 0, - "USA": 1, - "EUROPE": 2, - "SOUTH_AMERICA": 3, - "ASIA_PACIFIC": 4 - } - }, "UptimeCheckConfig": { "oneofs": { "resource": { @@ -2286,6 +2277,15 @@ } } }, + "UptimeCheckRegion": { + "values": { + "REGION_UNSPECIFIED": 0, + "USA": 1, + "EUROPE": 2, + "SOUTH_AMERICA": 3, + "ASIA_PACIFIC": 4 + } + }, "UptimeCheckIp": { "fields": { "region": { diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 07f0dbb3174..ed0f3832f28 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-01-22T12:22:24.682607Z", + "updateTime": "2020-01-29T12:26:40.437371Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.1", - "dockerImage": "googleapis/artman@sha256:5599b61e56a372d21b671969ee915fbca0f6c3a0daaeb898d01f8f685f1bbc8b" + "version": "0.44.4", + "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cda99c1f7dc5e4ca9b1caeae1dc330838cbc1461", - "internalRef": "290800639", - "log": "cda99c1f7dc5e4ca9b1caeae1dc330838cbc1461\nChange api_name to 'asset' for v1p1beta1\n\nPiperOrigin-RevId: 290800639\n\n94e9e90c303a820ce40643d9129e7f0d2054e8a1\nAdds Google Maps Road service\n\nPiperOrigin-RevId: 290795667\n\na3b23dcb2eaecce98c600c7d009451bdec52dbda\nrpc: new message ErrorInfo, other comment updates\n\nPiperOrigin-RevId: 290781668\n\n26420ef4e46c37f193c0fbe53d6ebac481de460e\nAdd proto definition for Org Policy v1.\n\nPiperOrigin-RevId: 290771923\n\n7f0dab8177cf371ae019a082e2512de7ac102888\nPublish Routes Preferred API v1 service definitions.\n\nPiperOrigin-RevId: 290326986\n\nad6e508d0728e1d1bca6e3f328cd562718cb772d\nFix: Qualify resource type references with \"jobs.googleapis.com/\"\n\nPiperOrigin-RevId: 290285762\n\n58e770d568a2b78168ddc19a874178fee8265a9d\ncts client library\n\nPiperOrigin-RevId: 290146169\n\naf9daa4c3b4c4a8b7133b81588dd9ffd37270af2\nAdd more programming language options to public proto\n\nPiperOrigin-RevId: 290144091\n\nd9f2bbf2df301ef84641d4cec7c828736a0bd907\ntalent: add missing resource.proto dep to Bazel build target\n\nPiperOrigin-RevId: 290143164\n\n3b3968237451d027b42471cd28884a5a1faed6c7\nAnnotate Talent API.\nAdd gRPC service config for retry.\nUpdate bazel file with google.api.resource dependency.\n\nPiperOrigin-RevId: 290125172\n\n0735b4b096872960568d1f366bfa75b7b0e1f1a3\nWeekly library update.\n\nPiperOrigin-RevId: 289939042\n\n8760d3d9a4543d7f9c0d1c7870aca08b116e4095\nWeekly library update.\n\nPiperOrigin-RevId: 289939020\n\n8607df842f782a901805187e02fff598145b0b0e\nChange Talent API timeout to 30s.\n\nPiperOrigin-RevId: 289912621\n\n908155991fe32570653bcb72ecfdcfc896642f41\nAdd Recommendations AI V1Beta1\n\nPiperOrigin-RevId: 289901914\n\n5c9a8c2bebd8b71aa66d1cc473edfaac837a2c78\nAdding no-arg method signatures for ListBillingAccounts and ListServices\n\nPiperOrigin-RevId: 289891136\n\n50b0e8286ac988b0593bd890eb31fef6ea2f5767\nlongrunning: add grpc service config and default_host annotation to operations.proto\n\nPiperOrigin-RevId: 289876944\n\n6cac27dabe51c54807b0401698c32d34998948a9\n Updating default deadline for Cloud Security Command Center's v1 APIs.\n\nPiperOrigin-RevId: 289875412\n\n" + "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\n8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\ne26cab8afd19d396b929039dac5d874cf0b5336c\nexpr: add default_host and method_signature annotations to CelService\n\nPiperOrigin-RevId: 291240093\n\n06093ae3952441c34ec176d1f7431b8765cec0be\nirm: fix v1alpha2 bazel build by adding missing proto imports\n\nPiperOrigin-RevId: 291227940\n\na8a2514af326e4673063f9a3c9d0ef1091c87e6c\nAdd proto annotation for cloud/irm API\n\nPiperOrigin-RevId: 291217859\n\n8d16f76de065f530d395a4c7eabbf766d6a120fd\nGenerate Memcache v1beta2 API protos and gRPC ServiceConfig files\n\nPiperOrigin-RevId: 291008516\n\n3af1dabd93df9a9f17bf3624d3b875c11235360b\ngrafeas: Add containeranalysis default_host to Grafeas service\n\nPiperOrigin-RevId: 290965849\n\nbe2663fa95e31cba67d0cd62611a6674db9f74b7\nfix(google/maps/roads): add missing opening bracket\n\nPiperOrigin-RevId: 290964086\n\nfacc26550a0af0696e0534bc9cae9df14275aa7c\nUpdating v2 protos with the latest inline documentation (in comments) and adding a per-service .yaml file.\n\nPiperOrigin-RevId: 290952261\n\n" } }, { From 01ddf0b28300b92aa01af59ab180c2214ba14728 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 31 Jan 2020 08:07:56 -0800 Subject: [PATCH 260/422] fix: updated proto files with new proto annotations --- .../protos/google/monitoring/v3/alert.proto | 21 + .../google/monitoring/v3/alert_service.proto | 53 +- .../protos/google/monitoring/v3/common.proto | 463 ++++++----- .../protos/google/monitoring/v3/group.proto | 10 + .../google/monitoring/v3/group_service.proto | 77 +- .../google/monitoring/v3/metric_service.proto | 128 ++- .../google/monitoring/v3/notification.proto | 20 + .../monitoring/v3/notification_service.proto | 111 ++- .../protos/google/monitoring/v3/service.proto | 18 + .../monitoring/v3/service_service.proto | 104 ++- .../protos/google/monitoring/v3/uptime.proto | 77 +- .../google/monitoring/v3/uptime_service.proto | 53 +- .../protos/protos.d.ts | 248 ++++++ .../google-cloud-monitoring/protos/protos.js | 765 +++++++++++++++++- .../protos/protos.json | 584 ++++++++++--- .../src/v3/alert_policy_service_client.js | 12 +- .../v3/doc/google/monitoring/v3/doc_alert.js | 4 + .../google/monitoring/v3/doc_alert_service.js | 10 +- .../v3/doc/google/monitoring/v3/doc_common.js | 463 ++++++----- .../google/monitoring/v3/doc_group_service.js | 14 +- .../monitoring/v3/doc_metric_service.js | 26 +- .../google/monitoring/v3/doc_notification.js | 5 + .../monitoring/v3/doc_notification_service.js | 24 +- .../monitoring/v3/doc_service_service.js | 26 +- .../monitoring/v3/doc_uptime_service.js | 10 +- .../src/v3/group_service_client.js | 18 +- .../src/v3/metric_service_client.js | 38 +- .../v3/notification_channel_service_client.js | 28 +- .../v3/service_monitoring_service_client.js | 30 +- .../src/v3/uptime_check_service_client.js | 12 +- .../google-cloud-monitoring/synth.metadata | 448 +--------- 31 files changed, 2627 insertions(+), 1273 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index fc811a01c48..d65e00dba40 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.monitoring.v3; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/mutation_record.proto"; import "google/protobuf/duration.proto"; @@ -35,6 +36,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // this state. For an overview of alert policies, see // [Introduction to Alerting](/monitoring/alerts/). message AlertPolicy { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicy" + pattern: "projects/{project}/alertPolicies/{alert_policy}" + pattern: "organizations/{organization}/alertPolicies/{alert_policy}" + pattern: "folders/{folder}/alertPolicies/{alert_policy}" + pattern: "*" + }; + // A content string and a MIME type that describes the content string's // format. message Documentation { @@ -54,6 +63,14 @@ message AlertPolicy { // should open an incident. If a condition evaluates to true, it signifies // that something is wrong. message Condition { + option (google.api.resource) = { + type: "monitoring.googleapis.com/AlertPolicyCondition" + pattern: "projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}" + pattern: "*" + }; + // Specifies how many time series must fail a predicate to trigger a // condition. If not specified, then a `{count: 1}` trigger is used. message Trigger { @@ -300,10 +317,14 @@ message AlertPolicy { // OR according to the `combiner` field. If the combined conditions evaluate // to true, then an incident is created. A policy can have from one to six // conditions. + // If |condition_time_series_uery_language| is present, it must be the only + // |condition|. repeated Condition conditions = 12; // How to combine the results of multiple conditions to determine if an // incident should be opened. + // If condition_time_series_query_language is present, this must be + // COMBINE_UNSPECIFIED. ConditionCombinerType combiner = 6; // Whether or not the policy is enabled. On write, the default interpretation diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index de5a30f0293..a88c376f5a1 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -18,10 +18,12 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/alert.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -51,6 +53,7 @@ service AlertPolicyService { option (google.api.http) = { get: "/v3/{name=projects/*}/alertPolicies" }; + option (google.api.method_signature) = "name"; } // Gets a single alerting policy. @@ -58,6 +61,7 @@ service AlertPolicyService { option (google.api.http) = { get: "/v3/{name=projects/*/alertPolicies/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new alerting policy. @@ -66,6 +70,7 @@ service AlertPolicyService { post: "/v3/{name=projects/*}/alertPolicies" body: "alert_policy" }; + option (google.api.method_signature) = "name,alert_policy"; } // Deletes an alerting policy. @@ -73,6 +78,7 @@ service AlertPolicyService { option (google.api.http) = { delete: "/v3/{name=projects/*/alertPolicies/*}" }; + option (google.api.method_signature) = "name"; } // Updates an alerting policy. You can either replace the entire policy with @@ -84,12 +90,13 @@ service AlertPolicyService { patch: "/v3/{alert_policy.name=projects/*/alertPolicies/*}" body: "alert_policy" }; + option (google.api.method_signature) = "update_mask,alert_policy"; } } // The protocol for the `CreateAlertPolicy` request. message CreateAlertPolicyRequest { - // The project in which to create the alerting policy. The format is + // Required. The project in which to create the alerting policy. The format is // `projects/[PROJECT_ID]`. // // Note that this field names the parent container in which the alerting @@ -97,25 +104,35 @@ message CreateAlertPolicyRequest { // policy that is returned will have a name that contains a normalized // representation of this name as a prefix but adds a suffix of the form // `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. - string name = 3; - - // The requested alerting policy. You should omit the `name` field in this + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/AlertPolicy" + } + ]; + + // Required. The requested alerting policy. You should omit the `name` field in this // policy. The name will be returned in the new policy, including // a new [ALERT_POLICY_ID] value. - AlertPolicy alert_policy = 2; + AlertPolicy alert_policy = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `GetAlertPolicy` request. message GetAlertPolicyRequest { - // The alerting policy to retrieve. The format is + // Required. The alerting policy to retrieve. The format is // // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/AlertPolicy" + } + ]; } // The protocol for the `ListAlertPolicies` request. message ListAlertPoliciesRequest { - // The project whose alert policies are to be listed. The format is + // Required. The project whose alert policies are to be listed. The format is // // projects/[PROJECT_ID] // @@ -124,7 +141,12 @@ message ListAlertPoliciesRequest { // by name, use the // [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] // operation, instead. - string name = 4; + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/AlertPolicy" + } + ]; // If provided, this field specifies the criteria that must be met by // alert policies to be included in the response. @@ -190,15 +212,20 @@ message UpdateAlertPolicyRequest { // fields listed in `update_mask`. // If `update_mask` is not empty, any fields in this policy that are // not in `update_mask` are ignored. - AlertPolicy alert_policy = 3; + AlertPolicy alert_policy = 3 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `DeleteAlertPolicy` request. message DeleteAlertPolicyRequest { - // The alerting policy to delete. The format is: + // Required. The alerting policy to delete. The format is: // // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] // // For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/AlertPolicy" + } + ]; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 1e89b0dcdaf..a4093b1c388 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -79,329 +79,372 @@ message TimeInterval { google.protobuf.Timestamp start_time = 1; } -// Describes how to combine multiple time series to provide different views of -// the data. Aggregation consists of an alignment step on individual time -// series (`alignment_period` and `per_series_aligner`) followed by an optional -// reduction step of the data across the aligned time series -// (`cross_series_reducer` and `group_by_fields`). For more details, see -// [Aggregation](/monitoring/api/learn_more#aggregation). +// Describes how to combine multiple time series to provide a different view of +// the data. Aggregation of time series is done in two steps. First, each time +// series in the set is _aligned_ to the same time interval boundaries, then the +// set of time series is optionally _reduced_ in number. +// +// Alignment consists of applying the `per_series_aligner` operation +// to each time series after its data has been divided into regular +// `alignment_period` time intervals. This process takes _all_ of the data +// points in an alignment period, applies a mathematical transformation such as +// averaging, minimum, maximum, delta, etc., and converts them into a single +// data point per period. +// +// Reduction is when the aligned and transformed time series can optionally be +// combined, reducing the number of time series through similar mathematical +// transformations. Reduction involves applying a `cross_series_reducer` to +// all the time series, optionally sorting the time series into subsets with +// `group_by_fields`, and applying the reducer to each subset. +// +// The raw time series data can contain a huge amount of information from +// multiple sources. Alignment and reduction transforms this mass of data into +// a more manageable and representative collection of data, for example "the +// 95% latency across the average of all tasks in a cluster". This +// representative data can be more easily graphed and comprehended, and the +// individual time series data is still available for later drilldown. For more +// details, see [Aggregating Time +// Series](/monitoring/api/v3/metrics#aggregating_time_series). message Aggregation { - // The Aligner describes how to bring the data points in a single - // time series into temporal alignment. + // The `Aligner` specifies the operation that will be applied to the data + // points in each alignment period in a time series. Except for + // `ALIGN_NONE`, which specifies that no operation be applied, each alignment + // operation replaces the set of data values in each alignment period with + // a single value: the result of applying the operation to the data values. + // An aligned time series has a single data value at the end of each + // `alignment_period`. + // + // An alignment operation can change the data type of the values, too. For + // example, if you apply a counting operation to boolean values, the data + // `value_type` in the original time series is `BOOLEAN`, but the `value_type` + // in the aligned result is `INT64`. enum Aligner { - // No alignment. Raw data is returned. Not valid if cross-time - // series reduction is requested. The value type of the result is - // the same as the value type of the input. + // No alignment. Raw data is returned. Not valid if cross-series reduction + // is requested. The `value_type` of the result is the same as the + // `value_type` of the input. ALIGN_NONE = 0; - // Align and convert to delta metric type. This alignment is valid - // for cumulative metrics and delta metrics. Aligning an existing - // delta metric to a delta metric requires that the alignment - // period be increased. The value type of the result is the same - // as the value type of the input. + // Align and convert to + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. + // The output is `delta = y1 - y0`. // - // One can think of this aligner as a rate but without time units; that - // is, the output is conceptually (second_point - first_point). + // This alignment is valid for + // [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and + // `DELTA` metrics. If the selected alignment period results in periods + // with no data, then the aligned value for such a period is created by + // interpolation. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_DELTA = 1; - // Align and convert to a rate. This alignment is valid for - // cumulative metrics and delta metrics with numeric values. The output is a - // gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align and convert to a rate. The result is computed as + // `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". + // Think of this aligner as providing the slope of the line that passes + // through the value at the start and at the end of the `alignment_period`. // - // One can think of this aligner as conceptually providing the slope of - // the line that passes through the value at the start and end of the - // window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), - // and the output unit is one that has a "/time" dimension. + // This aligner is valid for `CUMULATIVE` + // and `DELTA` metrics with numeric values. If the selected alignment + // period results in periods with no data, then the aligned value for + // such a period is created by interpolation. The output is a `GAUGE` + // metric with `value_type` `DOUBLE`. // - // If, by rate, you are looking for percentage change, see the - // `ALIGN_PERCENT_CHANGE` aligner option. + // If, by "rate", you mean "percentage change", see the + // `ALIGN_PERCENT_CHANGE` aligner instead. ALIGN_RATE = 2; - // Align by interpolating between adjacent points around the - // period boundary. This alignment is valid for gauge - // metrics with numeric values. The value type of the result is the same - // as the value type of the input. + // Align by interpolating between adjacent points around the alignment + // period boundary. This aligner is valid for `GAUGE` metrics with + // numeric values. The `value_type` of the aligned result is the same as the + // `value_type` of the input. ALIGN_INTERPOLATE = 3; - // Align by shifting the oldest data point before the period - // boundary to the boundary. This alignment is valid for gauge - // metrics. The value type of the result is the same as the - // value type of the input. + // Align by moving the most recent data point before the end of the + // alignment period to the boundary at the end of the alignment + // period. This aligner is valid for `GAUGE` metrics. The `value_type` of + // the aligned result is the same as the `value_type` of the input. ALIGN_NEXT_OLDER = 4; - // Align time series via aggregation. The resulting data point in - // the alignment period is the minimum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the minimum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MIN = 10; - // Align time series via aggregation. The resulting data point in - // the alignment period is the maximum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // values. The value type of the result is the same as the value - // type of the input. + // Align the time series by returning the maximum value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is the same as + // the `value_type` of the input. ALIGN_MAX = 11; - // Align time series via aggregation. The resulting data point in - // the alignment period is the average or arithmetic mean of all - // data points in the period. This alignment is valid for gauge and delta - // metrics with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the mean value in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric values. The `value_type` of the aligned result is `DOUBLE`. ALIGN_MEAN = 12; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // or Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of values in each alignment + // period. This aligner is valid for `GAUGE` and `DELTA` metrics with + // numeric or Boolean values. The `value_type` of the aligned result is + // `INT64`. ALIGN_COUNT = 13; - // Align time series via aggregation. The resulting data point in - // the alignment period is the sum of all data points in the - // period. This alignment is valid for gauge and delta metrics with numeric - // and distribution values. The value type of the output is the - // same as the value type of the input. + // Align the time series by returning the sum of the values in each + // alignment period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with numeric and distribution values. The `value_type` of the + // aligned result is the same as the `value_type` of the input. ALIGN_SUM = 14; - // Align time series via aggregation. The resulting data point in - // the alignment period is the standard deviation of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with numeric values. The value type of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the standard deviation of the values + // in each alignment period. This aligner is valid for `GAUGE` and + // `DELTA` metrics with numeric values. The `value_type` of the output is + // `DOUBLE`. ALIGN_STDDEV = 15; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of True-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `True` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_TRUE = 16; - // Align time series via aggregation. The resulting data point in - // the alignment period is the count of False-valued data points in the - // period. This alignment is valid for gauge metrics with - // Boolean values. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Align the time series by returning the number of `False` values in + // each alignment period. This aligner is valid for `GAUGE` metrics with + // Boolean values. The `value_type` of the output is `INT64`. ALIGN_COUNT_FALSE = 24; - // Align time series via aggregation. The resulting data point in - // the alignment period is the fraction of True-valued data points in the - // period. This alignment is valid for gauge metrics with Boolean values. - // The output value is in the range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by returning the ratio of the number of `True` + // values to the total number of values in each alignment period. This + // aligner is valid for `GAUGE` metrics with Boolean values. The output + // value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. ALIGN_FRACTION_TRUE = 17; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 99th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 99th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_99 = 18; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 95th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 95th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_95 = 19; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 50th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 50th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_50 = 20; - // Align time series via aggregation. The resulting data point in - // the alignment period is the 5th percentile of all data - // points in the period. This alignment is valid for gauge and delta metrics - // with distribution values. The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Align the time series by using [percentile + // aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + // data point in each alignment period is the 5th percentile of all data + // points in the period. This aligner is valid for `GAUGE` and `DELTA` + // metrics with distribution values. The output is a `GAUGE` metric with + // `value_type` `DOUBLE`. ALIGN_PERCENTILE_05 = 21; - // Align and convert to a percentage change. This alignment is valid for - // gauge and delta metrics with numeric values. This alignment conceptually - // computes the equivalent of "((current - previous)/previous)*100" - // where previous value is determined based on the alignmentPeriod. - // In the event that previous is 0 the calculated value is infinity with the - // exception that if both (current - previous) and previous are 0 the - // calculated value is 0. - // A 10 minute moving mean is computed at each point of the time window + // Align and convert to a percentage change. This aligner is valid for + // `GAUGE` and `DELTA` metrics with numeric values. This alignment returns + // `((current - previous)/previous) * 100`, where the value of `previous` is + // determined based on the `alignment_period`. + // + // If the values of `current` and `previous` are both 0, then the returned + // value is 0. If only `previous` is 0, the returned value is infinity. + // + // A 10-minute moving mean is computed at each point of the alignment period // prior to the above calculation to smooth the metric and prevent false - // positives from very short lived spikes. - // Only applicable for data that is >= 0. Any values < 0 are treated as - // no data. While delta metrics are accepted by this alignment special care - // should be taken that the values for the metric will always be positive. - // The output is a gauge metric with value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // positives from very short-lived spikes. The moving mean is only + // applicable for data whose values are `>= 0`. Any values `< 0` are + // treated as a missing datapoint, and are ignored. While `DELTA` + // metrics are accepted by this alignment, special care should be taken that + // the values for the metric will always be positive. The output is a + // `GAUGE` metric with `value_type` `DOUBLE`. ALIGN_PERCENT_CHANGE = 23; } - // A Reducer describes how to aggregate data points from multiple - // time series into a single time series. + // A Reducer operation describes how to aggregate data points from multiple + // time series into a single time series, where the value of each data point + // in the resulting series is a function of all the already aligned values in + // the input time series. enum Reducer { - // No cross-time series reduction. The output of the aligner is + // No cross-time series reduction. The output of the `Aligner` is // returned. REDUCE_NONE = 0; - // Reduce by computing the mean across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric or distribution values. The value type of the - // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the mean value across time series for each + // alignment period. This reducer is valid for + // [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and + // [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with + // numeric or distribution values. The `value_type` of the output is + // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. REDUCE_MEAN = 1; - // Reduce by computing the minimum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the minimum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MIN = 2; - // Reduce by computing the maximum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric values. The value type of the output - // is the same as the value type of the input. + // Reduce by computing the maximum value across time series for each + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric values. The `value_type` of the output is the same as the + // `value_type` of the input. REDUCE_MAX = 3; // Reduce by computing the sum across time series for each - // alignment period. This reducer is valid for delta and - // gauge metrics with numeric and distribution values. The value type of - // the output is the same as the value type of the input. + // alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + // with numeric and distribution values. The `value_type` of the output is + // the same as the `value_type` of the input. REDUCE_SUM = 4; // Reduce by computing the standard deviation across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics with numeric or distribution values. The value type of - // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics with numeric or distribution values. The `value_type` + // of the output is `DOUBLE`. REDUCE_STDDEV = 5; - // Reduce by computing the count of data points across time series - // for each alignment period. This reducer is valid for delta - // and gauge metrics of numeric, Boolean, distribution, and string value - // type. The value type of the output is - // [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of data points across time series + // for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of numeric, Boolean, distribution, and string + // `value_type`. The `value_type` of the output is `INT64`. REDUCE_COUNT = 6; - // Reduce by computing the count of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `True`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_TRUE = 7; - // Reduce by computing the count of False-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The value type of - // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64]. + // Reduce by computing the number of `False`-valued data points across time + // series for each alignment period. This reducer is valid for `DELTA` and + // `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + // is `INT64`. REDUCE_COUNT_FALSE = 15; - // Reduce by computing the fraction of True-valued data points across time - // series for each alignment period. This reducer is valid for delta - // and gauge metrics of Boolean value type. The output value is in the - // range [0, 1] and has value type - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + // Reduce by computing the ratio of the number of `True`-valued data points + // to the total number of data points for each alignment period. This + // reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. + // The output value is in the range [0.0, 1.0] and has `value_type` + // `DOUBLE`. REDUCE_FRACTION_TRUE = 8; - // Reduce by computing 99th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [99th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_99 = 9; - // Reduce by computing 95th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [95th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_95 = 10; - // Reduce by computing 50th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [50th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_50 = 11; - // Reduce by computing 5th percentile of data points across time series - // for each alignment period. This reducer is valid for gauge and delta - // metrics of numeric and distribution type. The value of the output is - // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE] + // Reduce by computing the [5th + // percentile](https://en.wikipedia.org/wiki/Percentile) of data points + // across time series for each alignment period. This reducer is valid for + // `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + // of the output is `DOUBLE`. REDUCE_PERCENTILE_05 = 12; } - // The alignment period for per-[time series][google.monitoring.v3.TimeSeries] - // alignment. If present, `alignmentPeriod` must be at least 60 - // seconds. After per-time series alignment, each time series will - // contain data points only on the period boundaries. If - // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then - // this field is ignored. If `perSeriesAligner` is specified and - // does not equal `ALIGN_NONE`, then this field must be defined; - // otherwise an error is returned. + // The `alignment_period` specifies a time interval, in seconds, that is used + // to divide the data in all the + // [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + // time. This will be done before the per-series aligner can be applied to + // the data. + // + // The value must be at least 60 seconds. If a per-series aligner other than + // `ALIGN_NONE` is specified, this field is required or an error is returned. + // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is + // specified, then this field is ignored. google.protobuf.Duration alignment_period = 1; - // The approach to be used to align individual time series. Not all - // alignment functions may be applied to all time series, depending - // on the metric type and value type of the original time - // series. Alignment may change the metric type or the value type of + // An `Aligner` describes how to bring the data points in a single + // time series into temporal alignment. Except for `ALIGN_NONE`, all + // alignments cause all the data points in an `alignment_period` to be + // mathematically grouped together, resulting in a single data point for + // each `alignment_period` with end timestamp at the end of the period. + // + // Not all alignment operations may be applied to all time series. The valid + // choices depend on the `metric_kind` and `value_type` of the original time + // series. Alignment can change the `metric_kind` or the `value_type` of // the time series. // // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is + // series reduction. If `cross_series_reducer` is specified, then + // `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + // and `alignment_period` must be specified; otherwise, an error is // returned. Aligner per_series_aligner = 2; - // The approach to be used to combine time series. Not all reducer - // functions may be applied to all time series, depending on the - // metric type and the value type of the original time - // series. Reduction may change the metric type of value type of the - // time series. + // The reduction operation to be used to combine time series into a single + // time series, where the value of each data point in the resulting series is + // a function of all the already aligned values in the input time series. // - // Time series data must be aligned in order to perform cross-time - // series reduction. If `crossSeriesReducer` is specified, then - // `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - // and `alignmentPeriod` must be specified; otherwise, an error is - // returned. + // Not all reducer operations can be applied to all time series. The valid + // choices depend on the `metric_kind` and the `value_type` of the original + // time series. Reduction can yield a time series with a different + // `metric_kind` or `value_type` than the input time series. + // + // Time series data must first be aligned (see `per_series_aligner`) in order + // to perform cross-time series reduction. If `cross_series_reducer` is + // specified, then `per_series_aligner` must be specified, and must not be + // `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + // error is returned. Reducer cross_series_reducer = 4; - // The set of fields to preserve when `crossSeriesReducer` is - // specified. The `groupByFields` determine how the time series are + // The set of fields to preserve when `cross_series_reducer` is + // specified. The `group_by_fields` determine how the time series are // partitioned into subsets prior to applying the aggregation - // function. Each subset contains time series that have the same + // operation. Each subset contains time series that have the same // value for each of the grouping fields. Each individual time // series is a member of exactly one subset. The - // `crossSeriesReducer` is applied to each subset of time series. + // `cross_series_reducer` is applied to each subset of time series. // It is not possible to reduce across different resource types, so // this field implicitly contains `resource.type`. Fields not - // specified in `groupByFields` are aggregated away. If - // `groupByFields` is not specified and all the time series have + // specified in `group_by_fields` are aggregated away. If + // `group_by_fields` is not specified and all the time series have // the same resource type, then the time series are aggregated into - // a single output time series. If `crossSeriesReducer` is not + // a single output time series. If `cross_series_reducer` is not // defined, this field is ignored. repeated string group_by_fields = 5; } -// Specifies an ordering relationship on two arguments, here called left and -// right. +// Specifies an ordering relationship on two arguments, called `left` and +// `right`. enum ComparisonType { // No ordering relationship is specified. COMPARISON_UNSPECIFIED = 0; - // The left argument is greater than the right argument. + // True if the left argument is greater than the right argument. COMPARISON_GT = 1; - // The left argument is greater than or equal to the right argument. + // True if the left argument is greater than or equal to the right argument. COMPARISON_GE = 2; - // The left argument is less than the right argument. + // True if the left argument is less than the right argument. COMPARISON_LT = 3; - // The left argument is less than or equal to the right argument. + // True if the left argument is less than or equal to the right argument. COMPARISON_LE = 4; - // The left argument is equal to the right argument. + // True if the left argument is equal to the right argument. COMPARISON_EQ = 5; - // The left argument is not equal to the right argument. + // True if the left argument is not equal to the right argument. COMPARISON_NE = 6; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index 716b270e116..c6428071f33 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -17,6 +17,8 @@ syntax = "proto3"; package google.monitoring.v3; +import "google/api/resource.proto"; + option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; option java_multiple_files = true; @@ -51,6 +53,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // depending on what resources exist and what filters are associated with the // group and its ancestors. message Group { + option (google.api.resource) = { + type: "monitoring.googleapis.com/Group" + pattern: "projects/{project}/groups/{group}" + pattern: "organizations/{organization}/groups/{group}" + pattern: "folders/{folder}/groups/{group}" + pattern: "*" + }; + // Output only. The name of this group. The format is // `"projects/{project_id_or_number}/groups/{group_id}"`. // When creating a group, this field is ignored and a new name is created diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index bf91a916018..5647dcfbffb 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -18,11 +18,13 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/group.proto"; import "google/protobuf/empty.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -55,6 +57,7 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*}/groups" }; + option (google.api.method_signature) = "name"; } // Gets a single group. @@ -62,6 +65,7 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new group. @@ -70,6 +74,7 @@ service GroupService { post: "/v3/{name=projects/*}/groups" body: "group" }; + option (google.api.method_signature) = "name,group"; } // Updates an existing group. @@ -79,6 +84,7 @@ service GroupService { put: "/v3/{group.name=projects/*/groups/*}" body: "group" }; + option (google.api.method_signature) = "group"; } // Deletes an existing group. @@ -86,6 +92,7 @@ service GroupService { option (google.api.http) = { delete: "/v3/{name=projects/*/groups/*}" }; + option (google.api.method_signature) = "name"; } // Lists the monitored resources that are members of a group. @@ -93,14 +100,20 @@ service GroupService { option (google.api.http) = { get: "/v3/{name=projects/*/groups/*}/members" }; + option (google.api.method_signature) = "name"; } } // The `ListGroup` request. message ListGroupsRequest { - // The project whose groups are to be listed. The format is + // Required. The project whose groups are to be listed. The format is // `"projects/{project_id_or_number}"`. - string name = 7; + string name = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Group" + } + ]; // An optional filter consisting of a single group name. The filters limit // the groups returned based on their parent-child relationship with the @@ -109,20 +122,26 @@ message ListGroupsRequest { // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. // Returns groups whose `parentName` field contains the group // name. If no groups have this parent, the results are empty. - string children_of_group = 2; + string children_of_group = 2 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. // Returns groups that are ancestors of the specified group. // The groups are returned in order, starting with the immediate parent and // ending with the most distant ancestor. If the specified group has no // immediate parent, the results are empty. - string ancestors_of_group = 3; + string ancestors_of_group = 3 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. // Returns the descendants of the specified group. This is a superset of // the results returned by the `childrenOfGroup` filter, and includes // children-of-children, and so forth. - string descendants_of_group = 4; + string descendants_of_group = 4 [(google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + }]; } // A positive number that is the maximum number of results to return. @@ -147,20 +166,30 @@ message ListGroupsResponse { // The `GetGroup` request. message GetGroupRequest { - // The group to retrieve. The format is + // Required. The group to retrieve. The format is // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; } // The `CreateGroup` request. message CreateGroupRequest { - // The project in which to create the group. The format is + // Required. The project in which to create the group. The format is // `"projects/{project_id_or_number}"`. - string name = 4; - - // A group definition. It is an error to define the `name` field because + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Group" + } + ]; + + // Required. A group definition. It is an error to define the `name` field because // the system assigns the name. - Group group = 2; + Group group = 2 [(google.api.field_behavior) = REQUIRED]; // If true, validate this request but do not create the group. bool validate_only = 3; @@ -168,9 +197,9 @@ message CreateGroupRequest { // The `UpdateGroup` request. message UpdateGroupRequest { - // The new definition of the group. All fields of the existing group, + // Required. The new definition of the group. All fields of the existing group, // excepting `name`, are replaced with the corresponding fields of this group. - Group group = 2; + Group group = 2 [(google.api.field_behavior) = REQUIRED]; // If true, validate this request but do not update the existing group. bool validate_only = 3; @@ -179,9 +208,14 @@ message UpdateGroupRequest { // The `DeleteGroup` request. The default behavior is to be able to delete a // single group without any descendants. message DeleteGroupRequest { - // The group to delete. The format is + // Required. The group to delete. The format is // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; // If this field is true, then the request means to delete a group with all // its descendants. Otherwise, the request means to delete a group only when @@ -191,9 +225,14 @@ message DeleteGroupRequest { // The `ListGroupMembers` request. message ListGroupMembersRequest { - // The group whose members are listed. The format is + // Required. The group whose members are listed. The format is // `"projects/{project_id_or_number}/groups/{group_id}"`. - string name = 7; + string name = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Group" + } + ]; // A positive number that is the maximum number of results to return. int32 page_size = 3; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 101dee40e97..d5d2c334365 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -18,15 +18,17 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/alert.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/metric.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -34,6 +36,22 @@ option java_multiple_files = true; option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/MetricDescriptor" + pattern: "projects/{project}/metricDescriptors/{metric_descriptor=**}" + pattern: "organizations/{organization}/metricDescriptors/{metric_descriptor=**}" + pattern: "folders/{folder}/metricDescriptors/{metric_descriptor=**}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN +}; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + pattern: "projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN +}; // Manages metric descriptors, monitored resource descriptors, and // time series data. @@ -50,13 +68,15 @@ service MetricService { option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" }; + option (google.api.method_signature) = "name"; } // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { option (google.api.http) = { - get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + get: "/v3/{name=projects/*/monitoredResourceDescriptors/**}" }; + option (google.api.method_signature) = "name"; } // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. @@ -64,6 +84,7 @@ service MetricService { option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" }; + option (google.api.method_signature) = "name"; } // Gets a single metric descriptor. This method does not require a Stackdriver account. @@ -71,6 +92,7 @@ service MetricService { option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.method_signature) = "name"; } // Creates a new metric descriptor. @@ -81,6 +103,7 @@ service MetricService { post: "/v3/{name=projects/*}/metricDescriptors" body: "metric_descriptor" }; + option (google.api.method_signature) = "name,metric_descriptor"; } // Deletes a metric descriptor. Only user-created @@ -89,6 +112,7 @@ service MetricService { option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" }; + option (google.api.method_signature) = "name"; } // Lists time series that match a filter. This method does not require a Stackdriver account. @@ -96,6 +120,7 @@ service MetricService { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" }; + option (google.api.method_signature) = "name,filter,interval,view"; } // Creates or adds data to one or more time series. @@ -107,14 +132,20 @@ service MetricService { post: "/v3/{name=projects/*}/timeSeries" body: "*" }; + option (google.api.method_signature) = "name,time_series"; } } // The `ListMonitoredResourceDescriptors` request. message ListMonitoredResourceDescriptorsRequest { - // The project on which to execute the request. The format is + // Required. The project on which to execute the request. The format is // `"projects/{project_id_or_number}"`. - string name = 5; + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + } + ]; // An optional [filter](/monitoring/api/v3/filters) describing // the descriptors to be returned. The filter can reference @@ -148,18 +179,28 @@ message ListMonitoredResourceDescriptorsResponse { // The `GetMonitoredResourceDescriptor` request. message GetMonitoredResourceDescriptorRequest { - // The monitored resource descriptor to get. The format is + // Required. The monitored resource descriptor to get. The format is // `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. // The `{resource_type}` is a predefined type, such as // `cloudsql_database`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MonitoredResourceDescriptor" + } + ]; } // The `ListMetricDescriptors` request. message ListMetricDescriptorsRequest { - // The project on which to execute the request. The format is + // Required. The project on which to execute the request. The format is // `"projects/{project_id_or_number}"`. - string name = 5; + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; // If this field is empty, all custom and // system-defined metric descriptors are returned. @@ -194,31 +235,46 @@ message ListMetricDescriptorsResponse { // The `GetMetricDescriptor` request. message GetMetricDescriptorRequest { - // The metric descriptor on which to execute the request. The format is + // Required. The metric descriptor on which to execute the request. The format is // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. // An example value of `{metric_id}` is // `"compute.googleapis.com/instance/disk/read_bytes_count"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; } // The `CreateMetricDescriptor` request. message CreateMetricDescriptorRequest { - // The project on which to execute the request. The format is + // Required. The project on which to execute the request. The format is // `"projects/{project_id_or_number}"`. - string name = 3; - - // The new [custom metric](/monitoring/custom-metrics) + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; + + // Required. The new [custom metric](/monitoring/custom-metrics) // descriptor. - google.api.MetricDescriptor metric_descriptor = 2; + google.api.MetricDescriptor metric_descriptor = 2 [(google.api.field_behavior) = REQUIRED]; } // The `DeleteMetricDescriptor` request. message DeleteMetricDescriptorRequest { - // The metric descriptor on which to execute the request. The format is + // Required. The metric descriptor on which to execute the request. The format is // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. // An example of `{metric_id}` is: // `"custom.googleapis.com/my_test_metric"`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/MetricDescriptor" + } + ]; } // The `ListTimeSeries` request. @@ -234,23 +290,28 @@ message ListTimeSeriesRequest { HEADERS = 1; } - // The project on which to execute the request. The format is + // Required. The project on which to execute the request. The format is // "projects/{project_id_or_number}". - string name = 10; - - // A [monitoring filter](/monitoring/api/v3/filters) that specifies which time + string name = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/TimeSeries" + } + ]; + + // Required. A [monitoring filter](/monitoring/api/v3/filters) that specifies which time // series should be returned. The filter must specify a single metric type, // and can additionally specify metric labels and other information. For // example: // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND // metric.labels.instance_name = "my-instance-name" - string filter = 2; + string filter = 2 [(google.api.field_behavior) = REQUIRED]; - // The time interval for which results should be returned. Only time series + // Required. The time interval for which results should be returned. Only time series // that contain data points in the specified interval are included // in the response. - TimeInterval interval = 4; + TimeInterval interval = 4 [(google.api.field_behavior) = REQUIRED]; // Specifies the alignment of data points in individual time series as // well as how to combine the retrieved time series across specified labels. @@ -263,8 +324,8 @@ message ListTimeSeriesRequest { // currently returned in reverse time order (most recent to oldest). string order_by = 6; - // Specifies which information is returned about the time series. - TimeSeriesView view = 7; + // Required. Specifies which information is returned about the time series. + TimeSeriesView view = 7 [(google.api.field_behavior) = REQUIRED]; // A positive number that is the maximum number of results to return. If // `page_size` is empty or more than 100,000 results, the effective @@ -296,18 +357,23 @@ message ListTimeSeriesResponse { // The `CreateTimeSeries` request. message CreateTimeSeriesRequest { - // The project on which to execute the request. The format is + // Required. The project on which to execute the request. The format is // `"projects/{project_id_or_number}"`. - string name = 3; - - // The new data to be added to a list of time series. + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/TimeSeries" + } + ]; + + // Required. The new data to be added to a list of time series. // Adds at most one data point to each of several time series. The new data // point must be more recent than any other point in its time series. Each // `TimeSeries` value must fully specify a unique time series by supplying // all label values for the metric and the monitored resource. // // The maximum number of `TimeSeries` objects per `Create` request is 200. - repeated TimeSeries time_series = 2; + repeated TimeSeries time_series = 2 [(google.api.field_behavior) = REQUIRED]; } // DEPRECATED. Used to hold per-time-series error status. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index 939ca267718..fb3ef4625d6 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -19,6 +19,7 @@ package google.monitoring.v3; import "google/api/label.proto"; import "google/api/launch_stage.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/protobuf/wrappers.proto"; @@ -33,6 +34,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // the properties of the channel and the set of labels or fields that // must be specified to configure channels of a given type. message NotificationChannelDescriptor { + option (google.api.resource) = { + type: "monitoring.googleapis.com/NotificationChannelDescriptor" + pattern: "projects/{project}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "folders/{folder}/notificationChannelDescriptors/{channel_descriptor}" + pattern: "*" + }; + // The full REST resource name for this descriptor. The syntax is: // // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] @@ -61,6 +70,9 @@ message NotificationChannelDescriptor { // The tiers that support this notification channel; the project service tier // must be one of the supported_tiers. repeated ServiceTier supported_tiers = 5 [deprecated = true]; + + // The product launch stage for channels of this type. + google.api.LaunchStage launch_stage = 7; } // A `NotificationChannel` is a medium through which an alert is @@ -69,6 +81,14 @@ message NotificationChannelDescriptor { // containing sensitive information like authentication tokens or // contact info are only partially populated on retrieval. message NotificationChannel { + option (google.api.resource) = { + type: "monitoring.googleapis.com/NotificationChannel" + pattern: "projects/{project}/notificationChannels/{notification_channel}" + pattern: "organizations/{organization}/notificationChannels/{notification_channel}" + pattern: "folders/{folder}/notificationChannels/{notification_channel}" + pattern: "*" + }; + // Indicates whether the channel has been verified or not. It is illegal // to specify this field in a // [`CreateNotificationChannel`][google.monitoring.v3.NotificationChannelService.CreateNotificationChannel] diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index 263acf83b62..959cc049695 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -18,12 +18,14 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/notification.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -47,6 +49,7 @@ service NotificationChannelService { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannelDescriptors" }; + option (google.api.method_signature) = "name"; } // Gets a single channel descriptor. The descriptor indicates which fields @@ -55,6 +58,7 @@ service NotificationChannelService { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannelDescriptors/*}" }; + option (google.api.method_signature) = "name"; } // Lists the notification channels that have been created for the project. @@ -62,6 +66,7 @@ service NotificationChannelService { option (google.api.http) = { get: "/v3/{name=projects/*}/notificationChannels" }; + option (google.api.method_signature) = "name"; } // Gets a single notification channel. The channel includes the relevant @@ -73,6 +78,7 @@ service NotificationChannelService { option (google.api.http) = { get: "/v3/{name=projects/*/notificationChannels/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new notification channel, representing a single notification @@ -82,6 +88,7 @@ service NotificationChannelService { post: "/v3/{name=projects/*}/notificationChannels" body: "notification_channel" }; + option (google.api.method_signature) = "name,notification_channel"; } // Updates a notification channel. Fields not specified in the field mask @@ -91,6 +98,7 @@ service NotificationChannelService { patch: "/v3/{notification_channel.name=projects/*/notificationChannels/*}" body: "notification_channel" }; + option (google.api.method_signature) = "update_mask,notification_channel"; } // Deletes a notification channel. @@ -98,6 +106,7 @@ service NotificationChannelService { option (google.api.http) = { delete: "/v3/{name=projects/*/notificationChannels/*}" }; + option (google.api.method_signature) = "name,force"; } // Causes a verification code to be delivered to the channel. The code @@ -107,6 +116,7 @@ service NotificationChannelService { post: "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode" body: "*" }; + option (google.api.method_signature) = "name"; } // Requests a verification code for an already verified channel that can then @@ -135,6 +145,7 @@ service NotificationChannelService { post: "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode" body: "*" }; + option (google.api.method_signature) = "name"; } // Verifies a `NotificationChannel` by proving receipt of the code @@ -145,12 +156,13 @@ service NotificationChannelService { post: "/v3/{name=projects/*/notificationChannels/*}:verify" body: "*" }; + option (google.api.method_signature) = "name,code"; } } // The `ListNotificationChannelDescriptors` request. message ListNotificationChannelDescriptorsRequest { - // The REST resource name of the parent from which to retrieve + // Required. The REST resource name of the parent from which to retrieve // the notification channel descriptors. The expected syntax is: // // projects/[PROJECT_ID] @@ -159,7 +171,12 @@ message ListNotificationChannelDescriptorsRequest { // descriptors; to retrieve a single descriptor by name, use the // [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] // operation, instead. - string name = 4; + string name = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/NotificationChannelDescriptor" + } + ]; // The maximum number of results to return in a single response. If // not set to a positive number, a reasonable value will be chosen by the @@ -187,14 +204,19 @@ message ListNotificationChannelDescriptorsResponse { // The `GetNotificationChannelDescriptor` response. message GetNotificationChannelDescriptorRequest { - // The channel type for which to execute the request. The format is + // Required. The channel type for which to execute the request. The format is // `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannelDescriptor" + } + ]; } // The `CreateNotificationChannel` request. message CreateNotificationChannelRequest { - // The project on which to execute the request. The format is: + // Required. The project on which to execute the request. The format is: // // projects/[PROJECT_ID] // @@ -202,22 +224,32 @@ message CreateNotificationChannelRequest { // written. This does not name the newly created channel. The resulting // channel's name will have a normalized version of this field as a prefix, // but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - string name = 3; - - // The definition of the `NotificationChannel` to create. - NotificationChannel notification_channel = 2; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/NotificationChannel" + } + ]; + + // Required. The definition of the `NotificationChannel` to create. + NotificationChannel notification_channel = 2 [(google.api.field_behavior) = REQUIRED]; } // The `ListNotificationChannels` request. message ListNotificationChannelsRequest { - // The project on which to execute the request. The format is + // Required. The project on which to execute the request. The format is // `projects/[PROJECT_ID]`. That is, this names the container // in which to look for the notification channels; it does not name a // specific channel. To query a specific channel by REST resource name, use // the // [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] // operation. - string name = 5; + string name = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/NotificationChannel" + } + ]; // If provided, this field specifies the criteria that must be met by // notification channels to be included in the response. @@ -259,9 +291,14 @@ message ListNotificationChannelsResponse { // The `GetNotificationChannel` request. message GetNotificationChannelRequest { - // The channel for which to execute the request. The format is + // Required. The channel for which to execute the request. The format is // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; } // The `UpdateNotificationChannel` request. @@ -269,18 +306,23 @@ message UpdateNotificationChannelRequest { // The fields to update. google.protobuf.FieldMask update_mask = 2; - // A description of the changes to be applied to the specified + // Required. A description of the changes to be applied to the specified // notification channel. The description must provide a definition for // fields to be updated; the names of these fields should also be // included in the `update_mask`. - NotificationChannel notification_channel = 3; + NotificationChannel notification_channel = 3 [(google.api.field_behavior) = REQUIRED]; } // The `DeleteNotificationChannel` request. message DeleteNotificationChannelRequest { - // The channel for which to execute the request. The format is + // Required. The channel for which to execute the request. The format is // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - string name = 3; + string name = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; // If true, the notification channel will be deleted regardless of its // use in alert policies (the policies will be updated to remove the @@ -291,16 +333,26 @@ message DeleteNotificationChannelRequest { // The `SendNotificationChannelVerificationCode` request. message SendNotificationChannelVerificationCodeRequest { - // The notification channel to which to send a verification code. - string name = 1; + // Required. The notification channel to which to send a verification code. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; } // The `GetNotificationChannelVerificationCode` request. message GetNotificationChannelVerificationCodeRequest { - // The notification channel for which a verification code is to be generated + // Required. The notification channel for which a verification code is to be generated // and retrieved. This must name a channel that is already verified; if // the specified channel is not verified, the request will fail. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; // The desired expiration time. If specified, the API will guarantee that // the returned code will not be valid after the specified timestamp; @@ -330,15 +382,20 @@ message GetNotificationChannelVerificationCodeResponse { // The `VerifyNotificationChannel` request. message VerifyNotificationChannelRequest { - // The notification channel to verify. - string name = 1; - - // The verification code that was delivered to the channel as + // Required. The notification channel to verify. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/NotificationChannel" + } + ]; + + // Required. The verification code that was delivered to the channel as // a result of invoking the `SendNotificationChannelVerificationCode` API // method or that was retrieved from a verified channel via // `GetNotificationChannelVerificationCode`. For example, one might have // "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only // guaranteed that the code is valid UTF-8; one should not // make any assumptions regarding the structure or format of the code). - string code = 2; + string code = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto index b0daa551e80..82a953bde7a 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/type/calendar_period.proto"; @@ -35,6 +36,14 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // Stackdriver Monitoring, a `Service` acts as the root resource under which // operational aspects of the service are accessible. message Service { + option (google.api.resource) = { + type: "monitoring.googleapis.com/Service" + pattern: "projects/{project}/services/{service}" + pattern: "organizations/{organization}/services/{service}" + pattern: "folders/{folder}/services/{service}" + pattern: "*" + }; + // Custom view of service telemetry. Currently a place-holder pending final // design. message Custom { @@ -118,6 +127,15 @@ message Service { // "99% of requests in each rolling week have latency below 200 milliseconds" or // "99.5% of requests in each calendar month return successfully." message ServiceLevelObjective { + option (google.api.resource) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + pattern: "projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}" + pattern: "*" + history: ORIGINALLY_SINGLE_PATTERN + }; + // `ServiceLevelObjective.View` determines what form of // `ServiceLevelObjective` is returned from `GetServiceLevelObjective`, // `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto index e0a35833e5b..5b9c096a064 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto @@ -18,11 +18,13 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/service.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -48,6 +50,7 @@ service ServiceMonitoringService { post: "/v3/{parent=*/*}/services" body: "service" }; + option (google.api.method_signature) = "parent,service"; } // Get the named `Service`. @@ -55,6 +58,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{name=*/*/services/*}" }; + option (google.api.method_signature) = "name"; } // List `Service`s for this workspace. @@ -62,6 +66,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{parent=*/*}/services" }; + option (google.api.method_signature) = "parent"; } // Update this `Service`. @@ -70,6 +75,7 @@ service ServiceMonitoringService { patch: "/v3/{service.name=*/*/services/*}" body: "service" }; + option (google.api.method_signature) = "service"; } // Soft delete this `Service`. @@ -77,6 +83,7 @@ service ServiceMonitoringService { option (google.api.http) = { delete: "/v3/{name=*/*/services/*}" }; + option (google.api.method_signature) = "name"; } // Create a `ServiceLevelObjective` for the given `Service`. @@ -85,6 +92,7 @@ service ServiceMonitoringService { post: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" body: "service_level_objective" }; + option (google.api.method_signature) = "parent,service_level_objective"; } // Get a `ServiceLevelObjective` by name. @@ -92,6 +100,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" }; + option (google.api.method_signature) = "name"; } // List the `ServiceLevelObjective`s for the given `Service`. @@ -99,6 +108,7 @@ service ServiceMonitoringService { option (google.api.http) = { get: "/v3/{parent=*/*/services/*}/serviceLevelObjectives" }; + option (google.api.method_signature) = "parent"; } // Update the given `ServiceLevelObjective`. @@ -107,6 +117,7 @@ service ServiceMonitoringService { patch: "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}" body: "service_level_objective" }; + option (google.api.method_signature) = "service_level_objective"; } // Delete the given `ServiceLevelObjective`. @@ -114,35 +125,51 @@ service ServiceMonitoringService { option (google.api.http) = { delete: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" }; + option (google.api.method_signature) = "name"; } } // The `CreateService` request. message CreateServiceRequest { - // Resource name of the parent workspace. + // Required. Resource name of the parent workspace. // Of the form `projects/{project_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Service" + } + ]; // Optional. The Service id to use for this Service. If omitted, an id will be // generated instead. Must match the pattern [a-z0-9\-]+ string service_id = 3; - // The `Service` to create. - Service service = 2; + // Required. The `Service` to create. + Service service = 2 [(google.api.field_behavior) = REQUIRED]; } // The `GetService` request. message GetServiceRequest { - // Resource name of the `Service`. + // Required. Resource name of the `Service`. // Of the form `projects/{project_id}/services/{service_id}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; } // The `ListServices` request. message ListServicesRequest { - // Resource name of the parent `Workspace`. + // Required. Resource name of the parent `Workspace`. // Of the form `projects/{project_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/Service" + } + ]; // A filter specifying what `Service`s to return. The filter currently // supports the following fields: @@ -184,9 +211,9 @@ message ListServicesResponse { // The `UpdateService` request. message UpdateServiceRequest { - // The `Service` to draw updates from. + // Required. The `Service` to draw updates from. // The given `name` specifies the resource to update. - Service service = 1; + Service service = 1 [(google.api.field_behavior) = REQUIRED]; // A set of field paths defining which fields to use for the update. google.protobuf.FieldMask update_mask = 2; @@ -194,34 +221,49 @@ message UpdateServiceRequest { // The `DeleteService` request. message DeleteServiceRequest { - // Resource name of the `Service` to delete. - // Of the form `projects/{project_id}/service/{service_id}`. - string name = 1; + // Required. Resource name of the `Service` to delete. + // Of the form `projects/{project_id}/services/{service_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; } // The `CreateServiceLevelObjective` request. message CreateServiceLevelObjectiveRequest { - // Resource name of the parent `Service`. + // Required. Resource name of the parent `Service`. // Of the form `projects/{project_id}/services/{service_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; // Optional. The ServiceLevelObjective id to use for this // ServiceLevelObjective. If omitted, an id will be generated instead. Must // match the pattern [a-z0-9\-]+ string service_level_objective_id = 3; - // The `ServiceLevelObjective` to create. + // Required. The `ServiceLevelObjective` to create. // The provided `name` will be respected if no `ServiceLevelObjective` exists // with this name. - ServiceLevelObjective service_level_objective = 2; + ServiceLevelObjective service_level_objective = 2 [(google.api.field_behavior) = REQUIRED]; } // The `GetServiceLevelObjective` request. message GetServiceLevelObjectiveRequest { - // Resource name of the `ServiceLevelObjective` to get. + // Required. Resource name of the `ServiceLevelObjective` to get. // Of the form // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + } + ]; // View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the // `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the @@ -232,9 +274,14 @@ message GetServiceLevelObjectiveRequest { // The `ListServiceLevelObjectives` request. message ListServiceLevelObjectivesRequest { - // Resource name of the parent `Service`. + // Required. Resource name of the parent `Service`. // Of the form `projects/{project_id}/services/{service_id}`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/Service" + } + ]; // A filter specifying what `ServiceLevelObjective`s to return. string filter = 2; @@ -268,9 +315,9 @@ message ListServiceLevelObjectivesResponse { // The `UpdateServiceLevelObjective` request. message UpdateServiceLevelObjectiveRequest { - // The `ServiceLevelObjective` to draw updates from. + // Required. The `ServiceLevelObjective` to draw updates from. // The given `name` specifies the resource to update. - ServiceLevelObjective service_level_objective = 1; + ServiceLevelObjective service_level_objective = 1 [(google.api.field_behavior) = REQUIRED]; // A set of field paths defining which fields to use for the update. google.protobuf.FieldMask update_mask = 2; @@ -278,8 +325,13 @@ message UpdateServiceLevelObjectiveRequest { // The `DeleteServiceLevelObjective` request. message DeleteServiceLevelObjectiveRequest { - // Resource name of the `ServiceLevelObjective` to delete. + // Required. Resource name of the `ServiceLevelObjective` to delete. // Of the form // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/ServiceLevelObjective" + } + ]; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 780a2578dff..7cb4947d507 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/monitored_resource.proto"; +import "google/api/resource.proto"; import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; @@ -27,6 +28,27 @@ option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { @@ -86,6 +108,14 @@ message InternalChecker { // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { + option (google.api.resource) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + pattern: "projects/{project}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "folders/{folder}/uptimeCheckConfigs/{uptime_check_config}" + pattern: "*" + }; + // The resource submessage for group checks. It can be used instead of a // monitored resource, when multiple resources are being monitored. message ResourceGroup { @@ -283,25 +313,21 @@ message UptimeCheckConfig { repeated InternalChecker internal_checkers = 14 [deprecated = true]; } -// The regions from which an Uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in Uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; +// The supported resource types that can be used as values of +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. +enum GroupResourceType { + // Default value (not valid). + RESOURCE_TYPE_UNSPECIFIED = 0; - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). + INSTANCE = 1; - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; + // A group of Amazon ELB load balancers. + AWS_ELB_LOAD_BALANCER = 2; } // Contains the region, location, and list of IP @@ -322,20 +348,3 @@ message UptimeCheckIp { // interpreting this field in either IPv4 or IPv6 format. string ip_address = 3; } - -// The supported resource types that can be used as values of -// `group_resource.resource_type`. -// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. -// The resource types `gae_app` and `uptime_url` are not valid here because -// group checks on App Engine modules and URLs are not allowed. -enum GroupResourceType { - // Default value (not valid). - RESOURCE_TYPE_UNSPECIFIED = 0; - - // A group of instances from Google Cloud Platform (GCP) or - // Amazon Web Services (AWS). - INSTANCE = 1; - - // A group of Amazon ELB load balancers. - AWS_ELB_LOAD_BALANCER = 2; -} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index 203db186411..9c7bf796144 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -18,11 +18,13 @@ syntax = "proto3"; package google.monitoring.v3; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/monitoring/v3/uptime.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -import "google/api/client.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -52,6 +54,7 @@ service UptimeCheckService { option (google.api.http) = { get: "/v3/{parent=projects/*}/uptimeCheckConfigs" }; + option (google.api.method_signature) = "parent"; } // Gets a single Uptime check configuration. @@ -59,6 +62,7 @@ service UptimeCheckService { option (google.api.http) = { get: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Creates a new Uptime check configuration. @@ -67,6 +71,7 @@ service UptimeCheckService { post: "/v3/{parent=projects/*}/uptimeCheckConfigs" body: "uptime_check_config" }; + option (google.api.method_signature) = "parent,uptime_check_config"; } // Updates an Uptime check configuration. You can either replace the entire @@ -78,6 +83,7 @@ service UptimeCheckService { patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}" body: "uptime_check_config" }; + option (google.api.method_signature) = "uptime_check_config"; } // Deletes an Uptime check configuration. Note that this method will fail @@ -87,6 +93,7 @@ service UptimeCheckService { option (google.api.http) = { delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}" }; + option (google.api.method_signature) = "name"; } // Returns the list of IP addresses that checkers run from @@ -99,9 +106,14 @@ service UptimeCheckService { // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // The project whose Uptime check configurations are listed. The format + // Required. The project whose Uptime check configurations are listed. The format // is `projects/[PROJECT_ID]`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; // The maximum number of results to return in a single response. The server // may further constrain the maximum number of results returned in a single @@ -134,19 +146,29 @@ message ListUptimeCheckConfigsResponse { // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // The Uptime check configuration to retrieve. The format + // Required. The Uptime check configuration to retrieve. The format // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; } // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // The project in which to create the Uptime check. The format + // Required. The project in which to create the Uptime check. The format // is `projects/[PROJECT_ID]`. - string parent = 1; - - // The new Uptime check configuration. - UptimeCheckConfig uptime_check_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; + + // Required. The new Uptime check configuration. + UptimeCheckConfig uptime_check_config = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `UpdateUptimeCheckConfig` request. @@ -168,14 +190,19 @@ message UpdateUptimeCheckConfigRequest { // The following fields can be updated: `display_name`, // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and // `selected_regions`. - UptimeCheckConfig uptime_check_config = 3; + UptimeCheckConfig uptime_check_config = 3 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // The Uptime check configuration to delete. The format + // Required. The Uptime check configuration to delete. The format // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "monitoring.googleapis.com/UptimeCheckConfig" + } + ]; } // The protocol for the `ListUptimeCheckIps` request. diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index ea09c9b2897..729dd9cc841 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -12018,6 +12018,242 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 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); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: 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 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 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; + + /** + * 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 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; + + /** + * 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; + + /** + * 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 + } + } + + /** 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 { @@ -15104,6 +15340,9 @@ export namespace google { /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } /** Represents a FileOptions. */ @@ -15276,6 +15515,9 @@ export namespace google { /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } /** Represents a MessageOptions. */ @@ -15396,6 +15638,12 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } /** Represents a FieldOptions. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 55971a21c12..dd1631e7ea7 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -28459,6 +28459,587 @@ return CustomHttpPattern; })(); + /** + * 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; + })(); + + 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 && 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 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() { /** @@ -36617,6 +37198,7 @@ * @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 */ /** @@ -36629,6 +37211,7 @@ */ 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) @@ -36803,6 +37386,14 @@ */ FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** * Creates a new FileOptions instance using the specified properties. * @function create @@ -36870,6 +37461,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.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; }; @@ -36969,6 +37563,11 @@ 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; @@ -37079,6 +37678,15 @@ 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; }; @@ -37156,6 +37764,16 @@ 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; }; @@ -37172,8 +37790,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } if (options.defaults) { object.javaPackage = ""; object.javaOuterClassname = ""; @@ -37241,6 +37861,11 @@ 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; }; @@ -37285,6 +37910,7 @@ * @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 */ /** @@ -37343,6 +37969,14 @@ */ 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 @@ -37378,6 +38012,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.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; }; @@ -37429,6 +38065,9 @@ 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; @@ -37485,6 +38124,11 @@ 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; }; @@ -37518,6 +38162,11 @@ 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; }; @@ -37541,6 +38190,7 @@ 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; @@ -37555,6 +38205,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.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; @@ -37585,6 +38237,8 @@ * @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 */ /** @@ -37597,6 +38251,7 @@ */ 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) @@ -37659,6 +38314,22 @@ */ 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 @@ -37698,6 +38369,14 @@ 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; }; @@ -37755,6 +38434,19 @@ 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; @@ -37829,6 +38521,27 @@ return "uninterpretedOption." + error; } } + 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; }; @@ -37890,6 +38603,44 @@ 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[".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; }; @@ -37906,8 +38657,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } if (options.defaults) { object.ctype = options.enums === String ? "STRING" : 0; object.packed = false; @@ -37915,6 +38668,7 @@ 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; @@ -37933,6 +38687,13 @@ 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; }; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index c782aa45c3c..22bbef149f8 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -11,7 +11,10 @@ "java_multiple_files": true, "java_outer_classname": "UptimeProto", "java_package": "com.google.monitoring.v3", - "php_namespace": "Google\\Cloud\\Monitoring\\V3" + "php_namespace": "Google\\Cloud\\Monitoring\\V3", + "(google.api.resource_definition).type": "monitoring.googleapis.com/MonitoredResourceDescriptor", + "(google.api.resource_definition).pattern": "*", + "(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN" }, "nested": { "AlertPolicyService": { @@ -24,14 +27,16 @@ "requestType": "ListAlertPoliciesRequest", "responseType": "ListAlertPoliciesResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/alertPolicies" + "(google.api.http).get": "/v3/{name=projects/*}/alertPolicies", + "(google.api.method_signature)": "name" } }, "GetAlertPolicy": { "requestType": "GetAlertPolicyRequest", "responseType": "AlertPolicy", "options": { - "(google.api.http).get": "/v3/{name=projects/*/alertPolicies/*}" + "(google.api.http).get": "/v3/{name=projects/*/alertPolicies/*}", + "(google.api.method_signature)": "name" } }, "CreateAlertPolicy": { @@ -39,14 +44,16 @@ "responseType": "AlertPolicy", "options": { "(google.api.http).post": "/v3/{name=projects/*}/alertPolicies", - "(google.api.http).body": "alert_policy" + "(google.api.http).body": "alert_policy", + "(google.api.method_signature)": "name,alert_policy" } }, "DeleteAlertPolicy": { "requestType": "DeleteAlertPolicyRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/alertPolicies/*}" + "(google.api.http).delete": "/v3/{name=projects/*/alertPolicies/*}", + "(google.api.method_signature)": "name" } }, "UpdateAlertPolicy": { @@ -54,7 +61,8 @@ "responseType": "AlertPolicy", "options": { "(google.api.http).patch": "/v3/{alert_policy.name=projects/*/alertPolicies/*}", - "(google.api.http).body": "alert_policy" + "(google.api.http).body": "alert_policy", + "(google.api.method_signature)": "update_mask,alert_policy" } } } @@ -63,11 +71,18 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/AlertPolicy" + } }, "alertPolicy": { "type": "AlertPolicy", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -75,7 +90,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/AlertPolicy" + } } } }, @@ -83,7 +102,11 @@ "fields": { "name": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/AlertPolicy" + } }, "filter": { "type": "string", @@ -124,7 +147,10 @@ }, "alertPolicy": { "type": "AlertPolicy", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -132,7 +158,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/AlertPolicy" + } } } }, @@ -472,14 +502,16 @@ "requestType": "ListGroupsRequest", "responseType": "ListGroupsResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/groups" + "(google.api.http).get": "/v3/{name=projects/*}/groups", + "(google.api.method_signature)": "name" } }, "GetGroup": { "requestType": "GetGroupRequest", "responseType": "Group", "options": { - "(google.api.http).get": "/v3/{name=projects/*/groups/*}" + "(google.api.http).get": "/v3/{name=projects/*/groups/*}", + "(google.api.method_signature)": "name" } }, "CreateGroup": { @@ -487,7 +519,8 @@ "responseType": "Group", "options": { "(google.api.http).post": "/v3/{name=projects/*}/groups", - "(google.api.http).body": "group" + "(google.api.http).body": "group", + "(google.api.method_signature)": "name,group" } }, "UpdateGroup": { @@ -495,21 +528,24 @@ "responseType": "Group", "options": { "(google.api.http).put": "/v3/{group.name=projects/*/groups/*}", - "(google.api.http).body": "group" + "(google.api.http).body": "group", + "(google.api.method_signature)": "group" } }, "DeleteGroup": { "requestType": "DeleteGroupRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/groups/*}" + "(google.api.http).delete": "/v3/{name=projects/*/groups/*}", + "(google.api.method_signature)": "name" } }, "ListGroupMembers": { "requestType": "ListGroupMembersRequest", "responseType": "ListGroupMembersResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*/groups/*}/members" + "(google.api.http).get": "/v3/{name=projects/*/groups/*}/members", + "(google.api.method_signature)": "name" } } } @@ -527,19 +563,32 @@ "fields": { "name": { "type": "string", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/Group" + } }, "childrenOfGroup": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } }, "ancestorsOfGroup": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } }, "descendantsOfGroup": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } }, "pageSize": { "type": "int32", @@ -568,7 +617,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } } } }, @@ -576,11 +629,18 @@ "fields": { "name": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/Group" + } }, "group": { "type": "Group", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "validateOnly": { "type": "bool", @@ -592,7 +652,10 @@ "fields": { "group": { "type": "Group", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "validateOnly": { "type": "bool", @@ -604,7 +667,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } }, "recursive": { "type": "bool", @@ -616,7 +683,11 @@ "fields": { "name": { "type": "string", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } }, "pageSize": { "type": "int32", @@ -687,28 +758,32 @@ "requestType": "ListMonitoredResourceDescriptorsRequest", "responseType": "ListMonitoredResourceDescriptorsResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/monitoredResourceDescriptors" + "(google.api.http).get": "/v3/{name=projects/*}/monitoredResourceDescriptors", + "(google.api.method_signature)": "name" } }, "GetMonitoredResourceDescriptor": { "requestType": "GetMonitoredResourceDescriptorRequest", "responseType": "google.api.MonitoredResourceDescriptor", "options": { - "(google.api.http).get": "/v3/{name=projects/*/monitoredResourceDescriptors/*}" + "(google.api.http).get": "/v3/{name=projects/*/monitoredResourceDescriptors/**}", + "(google.api.method_signature)": "name" } }, "ListMetricDescriptors": { "requestType": "ListMetricDescriptorsRequest", "responseType": "ListMetricDescriptorsResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/metricDescriptors" + "(google.api.http).get": "/v3/{name=projects/*}/metricDescriptors", + "(google.api.method_signature)": "name" } }, "GetMetricDescriptor": { "requestType": "GetMetricDescriptorRequest", "responseType": "google.api.MetricDescriptor", "options": { - "(google.api.http).get": "/v3/{name=projects/*/metricDescriptors/**}" + "(google.api.http).get": "/v3/{name=projects/*/metricDescriptors/**}", + "(google.api.method_signature)": "name" } }, "CreateMetricDescriptor": { @@ -716,21 +791,24 @@ "responseType": "google.api.MetricDescriptor", "options": { "(google.api.http).post": "/v3/{name=projects/*}/metricDescriptors", - "(google.api.http).body": "metric_descriptor" + "(google.api.http).body": "metric_descriptor", + "(google.api.method_signature)": "name,metric_descriptor" } }, "DeleteMetricDescriptor": { "requestType": "DeleteMetricDescriptorRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/metricDescriptors/**}" + "(google.api.http).delete": "/v3/{name=projects/*/metricDescriptors/**}", + "(google.api.method_signature)": "name" } }, "ListTimeSeries": { "requestType": "ListTimeSeriesRequest", "responseType": "ListTimeSeriesResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/timeSeries" + "(google.api.http).get": "/v3/{name=projects/*}/timeSeries", + "(google.api.method_signature)": "name,filter,interval,view" } }, "CreateTimeSeries": { @@ -738,7 +816,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).post": "/v3/{name=projects/*}/timeSeries", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,time_series" } } } @@ -747,7 +826,11 @@ "fields": { "name": { "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/MonitoredResourceDescriptor" + } }, "filter": { "type": "string", @@ -780,7 +863,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/MonitoredResourceDescriptor" + } } } }, @@ -788,7 +875,11 @@ "fields": { "name": { "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/MetricDescriptor" + } }, "filter": { "type": "string", @@ -821,7 +912,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/MetricDescriptor" + } } } }, @@ -829,11 +924,18 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/MetricDescriptor" + } }, "metricDescriptor": { "type": "google.api.MetricDescriptor", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -841,7 +943,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/MetricDescriptor" + } } } }, @@ -849,15 +955,25 @@ "fields": { "name": { "type": "string", - "id": 10 + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/TimeSeries" + } }, "filter": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "interval": { "type": "TimeInterval", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "aggregation": { "type": "Aggregation", @@ -869,7 +985,10 @@ }, "view": { "type": "TimeSeriesView", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "pageSize": { "type": "int32", @@ -911,12 +1030,19 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/TimeSeries" + } }, "timeSeries": { "rule": "repeated", "type": "TimeSeries", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1020,28 +1146,32 @@ "requestType": "ListNotificationChannelDescriptorsRequest", "responseType": "ListNotificationChannelDescriptorsResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/notificationChannelDescriptors" + "(google.api.http).get": "/v3/{name=projects/*}/notificationChannelDescriptors", + "(google.api.method_signature)": "name" } }, "GetNotificationChannelDescriptor": { "requestType": "GetNotificationChannelDescriptorRequest", "responseType": "NotificationChannelDescriptor", "options": { - "(google.api.http).get": "/v3/{name=projects/*/notificationChannelDescriptors/*}" + "(google.api.http).get": "/v3/{name=projects/*/notificationChannelDescriptors/*}", + "(google.api.method_signature)": "name" } }, "ListNotificationChannels": { "requestType": "ListNotificationChannelsRequest", "responseType": "ListNotificationChannelsResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/notificationChannels" + "(google.api.http).get": "/v3/{name=projects/*}/notificationChannels", + "(google.api.method_signature)": "name" } }, "GetNotificationChannel": { "requestType": "GetNotificationChannelRequest", "responseType": "NotificationChannel", "options": { - "(google.api.http).get": "/v3/{name=projects/*/notificationChannels/*}" + "(google.api.http).get": "/v3/{name=projects/*/notificationChannels/*}", + "(google.api.method_signature)": "name" } }, "CreateNotificationChannel": { @@ -1049,7 +1179,8 @@ "responseType": "NotificationChannel", "options": { "(google.api.http).post": "/v3/{name=projects/*}/notificationChannels", - "(google.api.http).body": "notification_channel" + "(google.api.http).body": "notification_channel", + "(google.api.method_signature)": "name,notification_channel" } }, "UpdateNotificationChannel": { @@ -1057,14 +1188,16 @@ "responseType": "NotificationChannel", "options": { "(google.api.http).patch": "/v3/{notification_channel.name=projects/*/notificationChannels/*}", - "(google.api.http).body": "notification_channel" + "(google.api.http).body": "notification_channel", + "(google.api.method_signature)": "update_mask,notification_channel" } }, "DeleteNotificationChannel": { "requestType": "DeleteNotificationChannelRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/notificationChannels/*}" + "(google.api.http).delete": "/v3/{name=projects/*/notificationChannels/*}", + "(google.api.method_signature)": "name,force" } }, "SendNotificationChannelVerificationCode": { @@ -1072,7 +1205,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" } }, "GetNotificationChannelVerificationCode": { @@ -1080,7 +1214,8 @@ "responseType": "GetNotificationChannelVerificationCodeResponse", "options": { "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" } }, "VerifyNotificationChannel": { @@ -1088,7 +1223,8 @@ "responseType": "NotificationChannel", "options": { "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:verify", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,code" } } } @@ -1097,7 +1233,11 @@ "fields": { "name": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/NotificationChannelDescriptor" + } }, "pageSize": { "type": "int32", @@ -1126,7 +1266,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/NotificationChannelDescriptor" + } } } }, @@ -1134,11 +1278,18 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/NotificationChannel" + } }, "notificationChannel": { "type": "NotificationChannel", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1146,7 +1297,11 @@ "fields": { "name": { "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/NotificationChannel" + } }, "filter": { "type": "string", @@ -1183,7 +1338,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/NotificationChannel" + } } } }, @@ -1195,7 +1354,10 @@ }, "notificationChannel": { "type": "NotificationChannel", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1203,7 +1365,11 @@ "fields": { "name": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/NotificationChannel" + } }, "force": { "type": "bool", @@ -1215,7 +1381,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/NotificationChannel" + } } } }, @@ -1223,7 +1393,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/NotificationChannel" + } }, "expireTime": { "type": "google.protobuf.Timestamp", @@ -1247,11 +1421,18 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/NotificationChannel" + } }, "code": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1346,21 +1527,24 @@ "responseType": "Service", "options": { "(google.api.http).post": "/v3/{parent=*/*}/services", - "(google.api.http).body": "service" + "(google.api.http).body": "service", + "(google.api.method_signature)": "parent,service" } }, "GetService": { "requestType": "GetServiceRequest", "responseType": "Service", "options": { - "(google.api.http).get": "/v3/{name=*/*/services/*}" + "(google.api.http).get": "/v3/{name=*/*/services/*}", + "(google.api.method_signature)": "name" } }, "ListServices": { "requestType": "ListServicesRequest", "responseType": "ListServicesResponse", "options": { - "(google.api.http).get": "/v3/{parent=*/*}/services" + "(google.api.http).get": "/v3/{parent=*/*}/services", + "(google.api.method_signature)": "parent" } }, "UpdateService": { @@ -1368,14 +1552,16 @@ "responseType": "Service", "options": { "(google.api.http).patch": "/v3/{service.name=*/*/services/*}", - "(google.api.http).body": "service" + "(google.api.http).body": "service", + "(google.api.method_signature)": "service" } }, "DeleteService": { "requestType": "DeleteServiceRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=*/*/services/*}" + "(google.api.http).delete": "/v3/{name=*/*/services/*}", + "(google.api.method_signature)": "name" } }, "CreateServiceLevelObjective": { @@ -1383,21 +1569,24 @@ "responseType": "ServiceLevelObjective", "options": { "(google.api.http).post": "/v3/{parent=*/*/services/*}/serviceLevelObjectives", - "(google.api.http).body": "service_level_objective" + "(google.api.http).body": "service_level_objective", + "(google.api.method_signature)": "parent,service_level_objective" } }, "GetServiceLevelObjective": { "requestType": "GetServiceLevelObjectiveRequest", "responseType": "ServiceLevelObjective", "options": { - "(google.api.http).get": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + "(google.api.http).get": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}", + "(google.api.method_signature)": "name" } }, "ListServiceLevelObjectives": { "requestType": "ListServiceLevelObjectivesRequest", "responseType": "ListServiceLevelObjectivesResponse", "options": { - "(google.api.http).get": "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + "(google.api.http).get": "/v3/{parent=*/*/services/*}/serviceLevelObjectives", + "(google.api.method_signature)": "parent" } }, "UpdateServiceLevelObjective": { @@ -1405,14 +1594,16 @@ "responseType": "ServiceLevelObjective", "options": { "(google.api.http).patch": "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}", - "(google.api.http).body": "service_level_objective" + "(google.api.http).body": "service_level_objective", + "(google.api.method_signature)": "service_level_objective" } }, "DeleteServiceLevelObjective": { "requestType": "DeleteServiceLevelObjectiveRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + "(google.api.http).delete": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}", + "(google.api.method_signature)": "name" } } } @@ -1421,7 +1612,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/Service" + } }, "serviceId": { "type": "string", @@ -1429,7 +1624,10 @@ }, "service": { "type": "Service", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1437,7 +1635,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Service" + } } } }, @@ -1445,7 +1647,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/Service" + } }, "filter": { "type": "string", @@ -1478,7 +1684,10 @@ "fields": { "service": { "type": "Service", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1490,7 +1699,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Service" + } } } }, @@ -1498,7 +1711,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Service" + } }, "serviceLevelObjectiveId": { "type": "string", @@ -1506,7 +1723,10 @@ }, "serviceLevelObjective": { "type": "ServiceLevelObjective", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -1514,7 +1734,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/ServiceLevelObjective" + } }, "view": { "type": "ServiceLevelObjective.View", @@ -1526,7 +1750,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/Service" + } }, "filter": { "type": "string", @@ -1563,7 +1791,10 @@ "fields": { "serviceLevelObjective": { "type": "ServiceLevelObjective", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "updateMask": { "type": "google.protobuf.FieldMask", @@ -1575,7 +1806,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/ServiceLevelObjective" + } } } }, @@ -1930,14 +2165,16 @@ "requestType": "ListUptimeCheckConfigsRequest", "responseType": "ListUptimeCheckConfigsResponse", "options": { - "(google.api.http).get": "/v3/{parent=projects/*}/uptimeCheckConfigs" + "(google.api.http).get": "/v3/{parent=projects/*}/uptimeCheckConfigs", + "(google.api.method_signature)": "parent" } }, "GetUptimeCheckConfig": { "requestType": "GetUptimeCheckConfigRequest", "responseType": "UptimeCheckConfig", "options": { - "(google.api.http).get": "/v3/{name=projects/*/uptimeCheckConfigs/*}" + "(google.api.http).get": "/v3/{name=projects/*/uptimeCheckConfigs/*}", + "(google.api.method_signature)": "name" } }, "CreateUptimeCheckConfig": { @@ -1945,7 +2182,8 @@ "responseType": "UptimeCheckConfig", "options": { "(google.api.http).post": "/v3/{parent=projects/*}/uptimeCheckConfigs", - "(google.api.http).body": "uptime_check_config" + "(google.api.http).body": "uptime_check_config", + "(google.api.method_signature)": "parent,uptime_check_config" } }, "UpdateUptimeCheckConfig": { @@ -1953,14 +2191,16 @@ "responseType": "UptimeCheckConfig", "options": { "(google.api.http).patch": "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}", - "(google.api.http).body": "uptime_check_config" + "(google.api.http).body": "uptime_check_config", + "(google.api.method_signature)": "uptime_check_config" } }, "DeleteUptimeCheckConfig": { "requestType": "DeleteUptimeCheckConfigRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}" + "(google.api.http).delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}", + "(google.api.method_signature)": "name" } }, "ListUptimeCheckIps": { @@ -1976,7 +2216,11 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/UptimeCheckConfig" + } }, "pageSize": { "type": "int32", @@ -2009,7 +2253,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/UptimeCheckConfig" + } } } }, @@ -2017,11 +2265,18 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/UptimeCheckConfig" + } }, "uptimeCheckConfig": { "type": "UptimeCheckConfig", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -2033,7 +2288,10 @@ }, "uptimeCheckConfig": { "type": "UptimeCheckConfig", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -2041,7 +2299,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/UptimeCheckConfig" + } } } }, @@ -2410,6 +2672,104 @@ } } }, + "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 + } + }, + "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 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, "Distribution": { "fields": { "count": { @@ -2543,22 +2903,6 @@ } } }, - "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" - }, "MonitoredResourceDescriptor": { "fields": { "name": { diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js index 27503d2eac9..d3464b2be85 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js @@ -255,7 +255,7 @@ class AlertPolicyServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project whose alert policies are to be listed. The format is + * Required. The project whose alert policies are to be listed. The format is * * projects/[PROJECT_ID] * @@ -388,7 +388,7 @@ class AlertPolicyServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project whose alert policies are to be listed. The format is + * Required. The project whose alert policies are to be listed. The format is * * projects/[PROJECT_ID] * @@ -454,7 +454,7 @@ class AlertPolicyServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The alerting policy to retrieve. The format is + * Required. The alerting policy to retrieve. The format is * * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] * @param {Object} [options] @@ -510,7 +510,7 @@ class AlertPolicyServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project in which to create the alerting policy. The format is + * Required. The project in which to create the alerting policy. The format is * `projects/[PROJECT_ID]`. * * Note that this field names the parent container in which the alerting @@ -519,7 +519,7 @@ class AlertPolicyServiceClient { * representation of this name as a prefix but adds a suffix of the form * `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. * @param {Object} request.alertPolicy - * The requested alerting policy. You should omit the `name` field in this + * Required. The requested alerting policy. You should omit the `name` field in this * policy. The name will be returned in the new policy, including * a new [ALERT_POLICY_ID] value. * @@ -582,7 +582,7 @@ class AlertPolicyServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The alerting policy to delete. The format is: + * Required. The alerting policy to delete. The format is: * * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js index ba14b3590ce..b24f7f5d3ce 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js @@ -62,12 +62,16 @@ * OR according to the `combiner` field. If the combined conditions evaluate * to true, then an incident is created. A policy can have from one to six * conditions. + * If |condition_time_series_uery_language| is present, it must be the only + * |condition|. * * This object should have the same structure as [Condition]{@link google.monitoring.v3.Condition} * * @property {number} combiner * How to combine the results of multiple conditions to determine if an * incident should be opened. + * If condition_time_series_query_language is present, this must be + * COMBINE_UNSPECIFIED. * * The number should be among the values of [ConditionCombinerType]{@link google.monitoring.v3.ConditionCombinerType} * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js index dc6dbd56e1a..470321ec7c6 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js @@ -19,7 +19,7 @@ * The protocol for the `CreateAlertPolicy` request. * * @property {string} name - * The project in which to create the alerting policy. The format is + * Required. The project in which to create the alerting policy. The format is * `projects/[PROJECT_ID]`. * * Note that this field names the parent container in which the alerting @@ -29,7 +29,7 @@ * `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. * * @property {Object} alertPolicy - * The requested alerting policy. You should omit the `name` field in this + * Required. The requested alerting policy. You should omit the `name` field in this * policy. The name will be returned in the new policy, including * a new [ALERT_POLICY_ID] value. * @@ -47,7 +47,7 @@ const CreateAlertPolicyRequest = { * The protocol for the `GetAlertPolicy` request. * * @property {string} name - * The alerting policy to retrieve. The format is + * Required. The alerting policy to retrieve. The format is * * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] * @@ -63,7 +63,7 @@ const GetAlertPolicyRequest = { * The protocol for the `ListAlertPolicies` request. * * @property {string} name - * The project whose alert policies are to be listed. The format is + * Required. The project whose alert policies are to be listed. The format is * * projects/[PROJECT_ID] * @@ -173,7 +173,7 @@ const UpdateAlertPolicyRequest = { * The protocol for the `DeleteAlertPolicy` request. * * @property {string} name - * The alerting policy to delete. The format is: + * Required. The alerting policy to delete. The format is: * * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js index 6fc93f993d4..de50b3b985c 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js @@ -86,69 +86,99 @@ const TimeInterval = { }; /** - * Describes how to combine multiple time series to provide different views of - * the data. Aggregation consists of an alignment step on individual time - * series (`alignment_period` and `per_series_aligner`) followed by an optional - * reduction step of the data across the aligned time series - * (`cross_series_reducer` and `group_by_fields`). For more details, see - * [Aggregation](https://cloud.google.com/monitoring/api/learn_more#aggregation). + * Describes how to combine multiple time series to provide a different view of + * the data. Aggregation of time series is done in two steps. First, each time + * series in the set is _aligned_ to the same time interval boundaries, then the + * set of time series is optionally _reduced_ in number. + * + * Alignment consists of applying the `per_series_aligner` operation + * to each time series after its data has been divided into regular + * `alignment_period` time intervals. This process takes _all_ of the data + * points in an alignment period, applies a mathematical transformation such as + * averaging, minimum, maximum, delta, etc., and converts them into a single + * data point per period. + * + * Reduction is when the aligned and transformed time series can optionally be + * combined, reducing the number of time series through similar mathematical + * transformations. Reduction involves applying a `cross_series_reducer` to + * all the time series, optionally sorting the time series into subsets with + * `group_by_fields`, and applying the reducer to each subset. + * + * The raw time series data can contain a huge amount of information from + * multiple sources. Alignment and reduction transforms this mass of data into + * a more manageable and representative collection of data, for example "the + * 95% latency across the average of all tasks in a cluster". This + * representative data can be more easily graphed and comprehended, and the + * individual time series data is still available for later drilldown. For more + * details, see [Aggregating Time + * Series](https://cloud.google.com/monitoring/api/v3/metrics#aggregating_time_series). * * @property {Object} alignmentPeriod - * The alignment period for per-time series - * alignment. If present, `alignmentPeriod` must be at least 60 - * seconds. After per-time series alignment, each time series will - * contain data points only on the period boundaries. If - * `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then - * this field is ignored. If `perSeriesAligner` is specified and - * does not equal `ALIGN_NONE`, then this field must be defined; - * otherwise an error is returned. + * The `alignment_period` specifies a time interval, in seconds, that is used + * to divide the data in all the + * time series into consistent blocks of + * time. This will be done before the per-series aligner can be applied to + * the data. + * + * The value must be at least 60 seconds. If a per-series aligner other than + * `ALIGN_NONE` is specified, this field is required or an error is returned. + * If no per-series aligner is specified, or the aligner `ALIGN_NONE` is + * specified, then this field is ignored. * * This object should have the same structure as [Duration]{@link google.protobuf.Duration} * * @property {number} perSeriesAligner - * The approach to be used to align individual time series. Not all - * alignment functions may be applied to all time series, depending - * on the metric type and value type of the original time - * series. Alignment may change the metric type or the value type of + * An `Aligner` describes how to bring the data points in a single + * time series into temporal alignment. Except for `ALIGN_NONE`, all + * alignments cause all the data points in an `alignment_period` to be + * mathematically grouped together, resulting in a single data point for + * each `alignment_period` with end timestamp at the end of the period. + * + * Not all alignment operations may be applied to all time series. The valid + * choices depend on the `metric_kind` and `value_type` of the original time + * series. Alignment can change the `metric_kind` or the `value_type` of * the time series. * * Time series data must be aligned in order to perform cross-time - * series reduction. If `crossSeriesReducer` is specified, then - * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - * and `alignmentPeriod` must be specified; otherwise, an error is + * series reduction. If `cross_series_reducer` is specified, then + * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + * and `alignment_period` must be specified; otherwise, an error is * returned. * * The number should be among the values of [Aligner]{@link google.monitoring.v3.Aligner} * * @property {number} crossSeriesReducer - * The approach to be used to combine time series. Not all reducer - * functions may be applied to all time series, depending on the - * metric type and the value type of the original time - * series. Reduction may change the metric type of value type of the - * time series. + * The reduction operation to be used to combine time series into a single + * time series, where the value of each data point in the resulting series is + * a function of all the already aligned values in the input time series. * - * Time series data must be aligned in order to perform cross-time - * series reduction. If `crossSeriesReducer` is specified, then - * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` - * and `alignmentPeriod` must be specified; otherwise, an error is - * returned. + * Not all reducer operations can be applied to all time series. The valid + * choices depend on the `metric_kind` and the `value_type` of the original + * time series. Reduction can yield a time series with a different + * `metric_kind` or `value_type` than the input time series. + * + * Time series data must first be aligned (see `per_series_aligner`) in order + * to perform cross-time series reduction. If `cross_series_reducer` is + * specified, then `per_series_aligner` must be specified, and must not be + * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + * error is returned. * * The number should be among the values of [Reducer]{@link google.monitoring.v3.Reducer} * * @property {string[]} groupByFields - * The set of fields to preserve when `crossSeriesReducer` is - * specified. The `groupByFields` determine how the time series are + * The set of fields to preserve when `cross_series_reducer` is + * specified. The `group_by_fields` determine how the time series are * partitioned into subsets prior to applying the aggregation - * function. Each subset contains time series that have the same + * operation. Each subset contains time series that have the same * value for each of the grouping fields. Each individual time * series is a member of exactly one subset. The - * `crossSeriesReducer` is applied to each subset of time series. + * `cross_series_reducer` is applied to each subset of time series. * It is not possible to reduce across different resource types, so * this field implicitly contains `resource.type`. Fields not - * specified in `groupByFields` are aggregated away. If - * `groupByFields` is not specified and all the time series have + * specified in `group_by_fields` are aggregated away. If + * `group_by_fields` is not specified and all the time series have * the same resource type, then the time series are aggregated into - * a single output time series. If `crossSeriesReducer` is not + * a single output time series. If `cross_series_reducer` is not * defined, this field is ignored. * * @typedef Aggregation @@ -159,8 +189,18 @@ const Aggregation = { // This is for documentation. Actual contents will be loaded by gRPC. /** - * The Aligner describes how to bring the data points in a single - * time series into temporal alignment. + * The `Aligner` specifies the operation that will be applied to the data + * points in each alignment period in a time series. Except for + * `ALIGN_NONE`, which specifies that no operation be applied, each alignment + * operation replaces the set of data values in each alignment period with + * a single value: the result of applying the operation to the data values. + * An aligned time series has a single data value at the end of each + * `alignment_period`. + * + * An alignment operation can change the data type of the values, too. For + * example, if you apply a counting operation to boolean values, the data + * `value_type` in the original time series is `BOOLEAN`, but the `value_type` + * in the aligned result is `INT64`. * * @enum {number} * @memberof google.monitoring.v3 @@ -168,196 +208,194 @@ const Aggregation = { Aligner: { /** - * No alignment. Raw data is returned. Not valid if cross-time - * series reduction is requested. The value type of the result is - * the same as the value type of the input. + * No alignment. Raw data is returned. Not valid if cross-series reduction + * is requested. The `value_type` of the result is the same as the + * `value_type` of the input. */ ALIGN_NONE: 0, /** - * Align and convert to delta metric type. This alignment is valid - * for cumulative metrics and delta metrics. Aligning an existing - * delta metric to a delta metric requires that the alignment - * period be increased. The value type of the result is the same - * as the value type of the input. + * Align and convert to + * DELTA. + * The output is `delta = y1 - y0`. * - * One can think of this aligner as a rate but without time units; that - * is, the output is conceptually (second_point - first_point). + * This alignment is valid for + * CUMULATIVE and + * `DELTA` metrics. If the selected alignment period results in periods + * with no data, then the aligned value for such a period is created by + * interpolation. The `value_type` of the aligned result is the same as + * the `value_type` of the input. */ ALIGN_DELTA: 1, /** - * Align and convert to a rate. This alignment is valid for - * cumulative metrics and delta metrics with numeric values. The output is a - * gauge metric with value type - * DOUBLE. + * Align and convert to a rate. The result is computed as + * `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". + * Think of this aligner as providing the slope of the line that passes + * through the value at the start and at the end of the `alignment_period`. * - * One can think of this aligner as conceptually providing the slope of - * the line that passes through the value at the start and end of the - * window. In other words, this is conceptually ((y1 - y0)/(t1 - t0)), - * and the output unit is one that has a "/time" dimension. + * This aligner is valid for `CUMULATIVE` + * and `DELTA` metrics with numeric values. If the selected alignment + * period results in periods with no data, then the aligned value for + * such a period is created by interpolation. The output is a `GAUGE` + * metric with `value_type` `DOUBLE`. * - * If, by rate, you are looking for percentage change, see the - * `ALIGN_PERCENT_CHANGE` aligner option. + * If, by "rate", you mean "percentage change", see the + * `ALIGN_PERCENT_CHANGE` aligner instead. */ ALIGN_RATE: 2, /** - * Align by interpolating between adjacent points around the - * period boundary. This alignment is valid for gauge - * metrics with numeric values. The value type of the result is the same - * as the value type of the input. + * Align by interpolating between adjacent points around the alignment + * period boundary. This aligner is valid for `GAUGE` metrics with + * numeric values. The `value_type` of the aligned result is the same as the + * `value_type` of the input. */ ALIGN_INTERPOLATE: 3, /** - * Align by shifting the oldest data point before the period - * boundary to the boundary. This alignment is valid for gauge - * metrics. The value type of the result is the same as the - * value type of the input. + * Align by moving the most recent data point before the end of the + * alignment period to the boundary at the end of the alignment + * period. This aligner is valid for `GAUGE` metrics. The `value_type` of + * the aligned result is the same as the `value_type` of the input. */ ALIGN_NEXT_OLDER: 4, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the minimum of all data points in the - * period. This alignment is valid for gauge and delta metrics with numeric - * values. The value type of the result is the same as the value - * type of the input. + * Align the time series by returning the minimum value in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric values. The `value_type` of the aligned result is the same as + * the `value_type` of the input. */ ALIGN_MIN: 10, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the maximum of all data points in the - * period. This alignment is valid for gauge and delta metrics with numeric - * values. The value type of the result is the same as the value - * type of the input. + * Align the time series by returning the maximum value in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric values. The `value_type` of the aligned result is the same as + * the `value_type` of the input. */ ALIGN_MAX: 11, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the average or arithmetic mean of all - * data points in the period. This alignment is valid for gauge and delta - * metrics with numeric values. The value type of the output is - * DOUBLE. + * Align the time series by returning the mean value in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric values. The `value_type` of the aligned result is `DOUBLE`. */ ALIGN_MEAN: 12, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the count of all data points in the - * period. This alignment is valid for gauge and delta metrics with numeric - * or Boolean values. The value type of the output is - * INT64. + * Align the time series by returning the number of values in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric or Boolean values. The `value_type` of the aligned result is + * `INT64`. */ ALIGN_COUNT: 13, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the sum of all data points in the - * period. This alignment is valid for gauge and delta metrics with numeric - * and distribution values. The value type of the output is the - * same as the value type of the input. + * Align the time series by returning the sum of the values in each + * alignment period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with numeric and distribution values. The `value_type` of the + * aligned result is the same as the `value_type` of the input. */ ALIGN_SUM: 14, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the standard deviation of all data - * points in the period. This alignment is valid for gauge and delta metrics - * with numeric values. The value type of the output is - * DOUBLE. + * Align the time series by returning the standard deviation of the values + * in each alignment period. This aligner is valid for `GAUGE` and + * `DELTA` metrics with numeric values. The `value_type` of the output is + * `DOUBLE`. */ ALIGN_STDDEV: 15, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the count of True-valued data points in the - * period. This alignment is valid for gauge metrics with - * Boolean values. The value type of the output is - * INT64. + * Align the time series by returning the number of `True` values in + * each alignment period. This aligner is valid for `GAUGE` metrics with + * Boolean values. The `value_type` of the output is `INT64`. */ ALIGN_COUNT_TRUE: 16, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the count of False-valued data points in the - * period. This alignment is valid for gauge metrics with - * Boolean values. The value type of the output is - * INT64. + * Align the time series by returning the number of `False` values in + * each alignment period. This aligner is valid for `GAUGE` metrics with + * Boolean values. The `value_type` of the output is `INT64`. */ ALIGN_COUNT_FALSE: 24, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the fraction of True-valued data points in the - * period. This alignment is valid for gauge metrics with Boolean values. - * The output value is in the range [0, 1] and has value type - * DOUBLE. + * Align the time series by returning the ratio of the number of `True` + * values to the total number of values in each alignment period. This + * aligner is valid for `GAUGE` metrics with Boolean values. The output + * value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. */ ALIGN_FRACTION_TRUE: 17, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the 99th percentile of all data - * points in the period. This alignment is valid for gauge and delta metrics - * with distribution values. The output is a gauge metric with value type - * DOUBLE. + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 99th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. */ ALIGN_PERCENTILE_99: 18, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the 95th percentile of all data - * points in the period. This alignment is valid for gauge and delta metrics - * with distribution values. The output is a gauge metric with value type - * DOUBLE. + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 95th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. */ ALIGN_PERCENTILE_95: 19, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the 50th percentile of all data - * points in the period. This alignment is valid for gauge and delta metrics - * with distribution values. The output is a gauge metric with value type - * DOUBLE. + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 50th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. */ ALIGN_PERCENTILE_50: 20, /** - * Align time series via aggregation. The resulting data point in - * the alignment period is the 5th percentile of all data - * points in the period. This alignment is valid for gauge and delta metrics - * with distribution values. The output is a gauge metric with value type - * DOUBLE. + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 5th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. */ ALIGN_PERCENTILE_05: 21, /** - * Align and convert to a percentage change. This alignment is valid for - * gauge and delta metrics with numeric values. This alignment conceptually - * computes the equivalent of "((current - previous)/previous)*100" - * where previous value is determined based on the alignmentPeriod. - * In the event that previous is 0 the calculated value is infinity with the - * exception that if both (current - previous) and previous are 0 the - * calculated value is 0. - * A 10 minute moving mean is computed at each point of the time window + * Align and convert to a percentage change. This aligner is valid for + * `GAUGE` and `DELTA` metrics with numeric values. This alignment returns + * `((current - previous)/previous) * 100`, where the value of `previous` is + * determined based on the `alignment_period`. + * + * If the values of `current` and `previous` are both 0, then the returned + * value is 0. If only `previous` is 0, the returned value is infinity. + * + * A 10-minute moving mean is computed at each point of the alignment period * prior to the above calculation to smooth the metric and prevent false - * positives from very short lived spikes. - * Only applicable for data that is >= 0. Any values < 0 are treated as - * no data. While delta metrics are accepted by this alignment special care - * should be taken that the values for the metric will always be positive. - * The output is a gauge metric with value type - * DOUBLE. + * positives from very short-lived spikes. The moving mean is only + * applicable for data whose values are `>= 0`. Any values `< 0` are + * treated as a missing datapoint, and are ignored. While `DELTA` + * metrics are accepted by this alignment, special care should be taken that + * the values for the metric will always be positive. The output is a + * `GAUGE` metric with `value_type` `DOUBLE`. */ ALIGN_PERCENT_CHANGE: 23 }, /** - * A Reducer describes how to aggregate data points from multiple - * time series into a single time series. + * A Reducer operation describes how to aggregate data points from multiple + * time series into a single time series, where the value of each data point + * in the resulting series is a function of all the already aligned values in + * the input time series. * * @enum {number} * @memberof google.monitoring.v3 @@ -365,122 +403,127 @@ const Aggregation = { Reducer: { /** - * No cross-time series reduction. The output of the aligner is + * No cross-time series reduction. The output of the `Aligner` is * returned. */ REDUCE_NONE: 0, /** - * Reduce by computing the mean across time series for each - * alignment period. This reducer is valid for delta and - * gauge metrics with numeric or distribution values. The value type of the - * output is DOUBLE. + * Reduce by computing the mean value across time series for each + * alignment period. This reducer is valid for + * DELTA and + * GAUGE metrics with + * numeric or distribution values. The `value_type` of the output is + * DOUBLE. */ REDUCE_MEAN: 1, /** - * Reduce by computing the minimum across time series for each - * alignment period. This reducer is valid for delta and - * gauge metrics with numeric values. The value type of the output - * is the same as the value type of the input. + * Reduce by computing the minimum value across time series for each + * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + * with numeric values. The `value_type` of the output is the same as the + * `value_type` of the input. */ REDUCE_MIN: 2, /** - * Reduce by computing the maximum across time series for each - * alignment period. This reducer is valid for delta and - * gauge metrics with numeric values. The value type of the output - * is the same as the value type of the input. + * Reduce by computing the maximum value across time series for each + * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + * with numeric values. The `value_type` of the output is the same as the + * `value_type` of the input. */ REDUCE_MAX: 3, /** * Reduce by computing the sum across time series for each - * alignment period. This reducer is valid for delta and - * gauge metrics with numeric and distribution values. The value type of - * the output is the same as the value type of the input. + * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + * with numeric and distribution values. The `value_type` of the output is + * the same as the `value_type` of the input. */ REDUCE_SUM: 4, /** * Reduce by computing the standard deviation across time series - * for each alignment period. This reducer is valid for delta - * and gauge metrics with numeric or distribution values. The value type of - * the output is DOUBLE. + * for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics with numeric or distribution values. The `value_type` + * of the output is `DOUBLE`. */ REDUCE_STDDEV: 5, /** - * Reduce by computing the count of data points across time series - * for each alignment period. This reducer is valid for delta - * and gauge metrics of numeric, Boolean, distribution, and string value - * type. The value type of the output is - * INT64. + * Reduce by computing the number of data points across time series + * for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics of numeric, Boolean, distribution, and string + * `value_type`. The `value_type` of the output is `INT64`. */ REDUCE_COUNT: 6, /** - * Reduce by computing the count of True-valued data points across time - * series for each alignment period. This reducer is valid for delta - * and gauge metrics of Boolean value type. The value type of - * the output is INT64. + * Reduce by computing the number of `True`-valued data points across time + * series for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + * is `INT64`. */ REDUCE_COUNT_TRUE: 7, /** - * Reduce by computing the count of False-valued data points across time - * series for each alignment period. This reducer is valid for delta - * and gauge metrics of Boolean value type. The value type of - * the output is INT64. + * Reduce by computing the number of `False`-valued data points across time + * series for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + * is `INT64`. */ REDUCE_COUNT_FALSE: 15, /** - * Reduce by computing the fraction of True-valued data points across time - * series for each alignment period. This reducer is valid for delta - * and gauge metrics of Boolean value type. The output value is in the - * range [0, 1] and has value type - * DOUBLE. + * Reduce by computing the ratio of the number of `True`-valued data points + * to the total number of data points for each alignment period. This + * reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. + * The output value is in the range [0.0, 1.0] and has `value_type` + * `DOUBLE`. */ REDUCE_FRACTION_TRUE: 8, /** - * Reduce by computing 99th percentile of data points across time series - * for each alignment period. This reducer is valid for gauge and delta - * metrics of numeric and distribution type. The value of the output is - * DOUBLE + * Reduce by computing the [99th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. */ REDUCE_PERCENTILE_99: 9, /** - * Reduce by computing 95th percentile of data points across time series - * for each alignment period. This reducer is valid for gauge and delta - * metrics of numeric and distribution type. The value of the output is - * DOUBLE + * Reduce by computing the [95th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. */ REDUCE_PERCENTILE_95: 10, /** - * Reduce by computing 50th percentile of data points across time series - * for each alignment period. This reducer is valid for gauge and delta - * metrics of numeric and distribution type. The value of the output is - * DOUBLE + * Reduce by computing the [50th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. */ REDUCE_PERCENTILE_50: 11, /** - * Reduce by computing 5th percentile of data points across time series - * for each alignment period. This reducer is valid for gauge and delta - * metrics of numeric and distribution type. The value of the output is - * DOUBLE + * Reduce by computing the [5th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. */ REDUCE_PERCENTILE_05: 12 } }; /** - * Specifies an ordering relationship on two arguments, here called left and - * right. + * Specifies an ordering relationship on two arguments, called `left` and + * `right`. * * @enum {number} * @memberof google.monitoring.v3 @@ -493,32 +536,32 @@ const ComparisonType = { COMPARISON_UNSPECIFIED: 0, /** - * The left argument is greater than the right argument. + * True if the left argument is greater than the right argument. */ COMPARISON_GT: 1, /** - * The left argument is greater than or equal to the right argument. + * True if the left argument is greater than or equal to the right argument. */ COMPARISON_GE: 2, /** - * The left argument is less than the right argument. + * True if the left argument is less than the right argument. */ COMPARISON_LT: 3, /** - * The left argument is less than or equal to the right argument. + * True if the left argument is less than or equal to the right argument. */ COMPARISON_LE: 4, /** - * The left argument is equal to the right argument. + * True if the left argument is equal to the right argument. */ COMPARISON_EQ: 5, /** - * The left argument is not equal to the right argument. + * True if the left argument is not equal to the right argument. */ COMPARISON_NE: 6 }; diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js index e1692ee9350..7d9a40b30d2 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js @@ -19,7 +19,7 @@ * The `ListGroup` request. * * @property {string} name - * The project whose groups are to be listed. The format is + * Required. The project whose groups are to be listed. The format is * `"projects/{project_id_or_number}"`. * * @property {string} childrenOfGroup @@ -81,7 +81,7 @@ const ListGroupsResponse = { * The `GetGroup` request. * * @property {string} name - * The group to retrieve. The format is + * Required. The group to retrieve. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * * @typedef GetGroupRequest @@ -96,11 +96,11 @@ const GetGroupRequest = { * The `CreateGroup` request. * * @property {string} name - * The project in which to create the group. The format is + * Required. The project in which to create the group. The format is * `"projects/{project_id_or_number}"`. * * @property {Object} group - * A group definition. It is an error to define the `name` field because + * Required. A group definition. It is an error to define the `name` field because * the system assigns the name. * * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} @@ -120,7 +120,7 @@ const CreateGroupRequest = { * The `UpdateGroup` request. * * @property {Object} group - * The new definition of the group. All fields of the existing group, + * Required. The new definition of the group. All fields of the existing group, * excepting `name`, are replaced with the corresponding fields of this group. * * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} @@ -141,7 +141,7 @@ const UpdateGroupRequest = { * single group without any descendants. * * @property {string} name - * The group to delete. The format is + * Required. The group to delete. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * * @property {boolean} recursive @@ -161,7 +161,7 @@ const DeleteGroupRequest = { * The `ListGroupMembers` request. * * @property {string} name - * The group whose members are listed. The format is + * Required. The group whose members are listed. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * * @property {number} pageSize diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js index 63db16157a1..7947a0f7ce7 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js @@ -19,7 +19,7 @@ * The `ListMonitoredResourceDescriptors` request. * * @property {string} name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * * @property {string} filter @@ -73,7 +73,7 @@ const ListMonitoredResourceDescriptorsResponse = { * The `GetMonitoredResourceDescriptor` request. * * @property {string} name - * The monitored resource descriptor to get. The format is + * Required. The monitored resource descriptor to get. The format is * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. * The `{resource_type}` is a predefined type, such as * `cloudsql_database`. @@ -90,7 +90,7 @@ const GetMonitoredResourceDescriptorRequest = { * The `ListMetricDescriptors` request. * * @property {string} name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * * @property {string} filter @@ -145,7 +145,7 @@ const ListMetricDescriptorsResponse = { * The `GetMetricDescriptor` request. * * @property {string} name - * The metric descriptor on which to execute the request. The format is + * Required. The metric descriptor on which to execute the request. The format is * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example value of `{metric_id}` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. @@ -162,11 +162,11 @@ const GetMetricDescriptorRequest = { * The `CreateMetricDescriptor` request. * * @property {string} name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * * @property {Object} metricDescriptor - * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) + * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) * descriptor. * * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} @@ -183,7 +183,7 @@ const CreateMetricDescriptorRequest = { * The `DeleteMetricDescriptor` request. * * @property {string} name - * The metric descriptor on which to execute the request. The format is + * Required. The metric descriptor on which to execute the request. The format is * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example of `{metric_id}` is: * `"custom.googleapis.com/my_test_metric"`. @@ -200,11 +200,11 @@ const DeleteMetricDescriptorRequest = { * The `ListTimeSeries` request. * * @property {string} name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * "projects/{project_id_or_number}". * * @property {string} filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time * series should be returned. The filter must specify a single metric type, * and can additionally specify metric labels and other information. For * example: @@ -213,7 +213,7 @@ const DeleteMetricDescriptorRequest = { * metric.labels.instance_name = "my-instance-name" * * @property {Object} interval - * The time interval for which results should be returned. Only time series + * Required. The time interval for which results should be returned. Only time series * that contain data points in the specified interval are included * in the response. * @@ -233,7 +233,7 @@ const DeleteMetricDescriptorRequest = { * currently returned in reverse time order (most recent to oldest). * * @property {number} view - * Specifies which information is returned about the time series. + * Required. Specifies which information is returned about the time series. * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * @@ -309,11 +309,11 @@ const ListTimeSeriesResponse = { * The `CreateTimeSeries` request. * * @property {string} name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * * @property {Object[]} timeSeries - * The new data to be added to a list of time series. + * Required. The new data to be added to a list of time series. * Adds at most one data point to each of several time series. The new data * point must be more recent than any other point in its time series. Each * `TimeSeries` value must fully specify a unique time series by supplying diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js index dd42dd7200a..a1393ad9764 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js @@ -53,6 +53,11 @@ * * The number should be among the values of [ServiceTier]{@link google.monitoring.v3.ServiceTier} * + * @property {number} launchStage + * The product launch stage for channels of this type. + * + * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} + * * @typedef NotificationChannelDescriptor * @memberof google.monitoring.v3 * @see [google.monitoring.v3.NotificationChannelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js index 189aa9c895f..c45d834ae50 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js @@ -19,7 +19,7 @@ * The `ListNotificationChannelDescriptors` request. * * @property {string} name - * The REST resource name of the parent from which to retrieve + * Required. The REST resource name of the parent from which to retrieve * the notification channel descriptors. The expected syntax is: * * projects/[PROJECT_ID] @@ -74,7 +74,7 @@ const ListNotificationChannelDescriptorsResponse = { * The `GetNotificationChannelDescriptor` response. * * @property {string} name - * The channel type for which to execute the request. The format is + * Required. The channel type for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. * * @typedef GetNotificationChannelDescriptorRequest @@ -89,7 +89,7 @@ const GetNotificationChannelDescriptorRequest = { * The `CreateNotificationChannel` request. * * @property {string} name - * The project on which to execute the request. The format is: + * Required. The project on which to execute the request. The format is: * * projects/[PROJECT_ID] * @@ -99,7 +99,7 @@ const GetNotificationChannelDescriptorRequest = { * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. * * @property {Object} notificationChannel - * The definition of the `NotificationChannel` to create. + * Required. The definition of the `NotificationChannel` to create. * * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} * @@ -115,7 +115,7 @@ const CreateNotificationChannelRequest = { * The `ListNotificationChannels` request. * * @property {string} name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `projects/[PROJECT_ID]`. That is, this names the container * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use @@ -182,7 +182,7 @@ const ListNotificationChannelsResponse = { * The `GetNotificationChannel` request. * * @property {string} name - * The channel for which to execute the request. The format is + * Required. The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * * @typedef GetNotificationChannelRequest @@ -202,7 +202,7 @@ const GetNotificationChannelRequest = { * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} * * @property {Object} notificationChannel - * A description of the changes to be applied to the specified + * Required. A description of the changes to be applied to the specified * notification channel. The description must provide a definition for * fields to be updated; the names of these fields should also be * included in the `update_mask`. @@ -221,7 +221,7 @@ const UpdateNotificationChannelRequest = { * The `DeleteNotificationChannel` request. * * @property {string} name - * The channel for which to execute the request. The format is + * Required. The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * * @property {boolean} force @@ -242,7 +242,7 @@ const DeleteNotificationChannelRequest = { * The `SendNotificationChannelVerificationCode` request. * * @property {string} name - * The notification channel to which to send a verification code. + * Required. The notification channel to which to send a verification code. * * @typedef SendNotificationChannelVerificationCodeRequest * @memberof google.monitoring.v3 @@ -256,7 +256,7 @@ const SendNotificationChannelVerificationCodeRequest = { * The `GetNotificationChannelVerificationCode` request. * * @property {string} name - * The notification channel for which a verification code is to be generated + * Required. The notification channel for which a verification code is to be generated * and retrieved. This must name a channel that is already verified; if * the specified channel is not verified, the request will fail. * @@ -309,10 +309,10 @@ const GetNotificationChannelVerificationCodeResponse = { * The `VerifyNotificationChannel` request. * * @property {string} name - * The notification channel to verify. + * Required. The notification channel to verify. * * @property {string} code - * The verification code that was delivered to the channel as + * Required. The verification code that was delivered to the channel as * a result of invoking the `SendNotificationChannelVerificationCode` API * method or that was retrieved from a verified channel via * `GetNotificationChannelVerificationCode`. For example, one might have diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js index 4709a231119..0add0041cf3 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js @@ -19,7 +19,7 @@ * The `CreateService` request. * * @property {string} parent - * Resource name of the parent workspace. + * Required. Resource name of the parent workspace. * Of the form `projects/{project_id}`. * * @property {string} serviceId @@ -27,7 +27,7 @@ * generated instead. Must match the pattern [a-z0-9\-]+ * * @property {Object} service - * The `Service` to create. + * Required. The `Service` to create. * * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} * @@ -43,7 +43,7 @@ const CreateServiceRequest = { * The `GetService` request. * * @property {string} name - * Resource name of the `Service`. + * Required. Resource name of the `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * * @typedef GetServiceRequest @@ -58,7 +58,7 @@ const GetServiceRequest = { * The `ListServices` request. * * @property {string} parent - * Resource name of the parent `Workspace`. + * Required. Resource name of the parent `Workspace`. * Of the form `projects/{project_id}`. * * @property {string} filter @@ -120,7 +120,7 @@ const ListServicesResponse = { * The `UpdateService` request. * * @property {Object} service - * The `Service` to draw updates from. + * Required. The `Service` to draw updates from. * The given `name` specifies the resource to update. * * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} @@ -142,8 +142,8 @@ const UpdateServiceRequest = { * The `DeleteService` request. * * @property {string} name - * Resource name of the `Service` to delete. - * Of the form `projects/{project_id}/service/{service_id}`. + * Required. Resource name of the `Service` to delete. + * Of the form `projects/{project_id}/services/{service_id}`. * * @typedef DeleteServiceRequest * @memberof google.monitoring.v3 @@ -157,7 +157,7 @@ const DeleteServiceRequest = { * The `CreateServiceLevelObjective` request. * * @property {string} parent - * Resource name of the parent `Service`. + * Required. Resource name of the parent `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * * @property {string} serviceLevelObjectiveId @@ -166,7 +166,7 @@ const DeleteServiceRequest = { * match the pattern [a-z0-9\-]+ * * @property {Object} serviceLevelObjective - * The `ServiceLevelObjective` to create. + * Required. The `ServiceLevelObjective` to create. * The provided `name` will be respected if no `ServiceLevelObjective` exists * with this name. * @@ -184,7 +184,7 @@ const CreateServiceLevelObjectiveRequest = { * The `GetServiceLevelObjective` request. * * @property {string} name - * Resource name of the `ServiceLevelObjective` to get. + * Required. Resource name of the `ServiceLevelObjective` to get. * Of the form * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. * @@ -208,7 +208,7 @@ const GetServiceLevelObjectiveRequest = { * The `ListServiceLevelObjectives` request. * * @property {string} parent - * Resource name of the parent `Service`. + * Required. Resource name of the parent `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * * @property {string} filter @@ -264,7 +264,7 @@ const ListServiceLevelObjectivesResponse = { * The `UpdateServiceLevelObjective` request. * * @property {Object} serviceLevelObjective - * The `ServiceLevelObjective` to draw updates from. + * Required. The `ServiceLevelObjective` to draw updates from. * The given `name` specifies the resource to update. * * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} @@ -286,7 +286,7 @@ const UpdateServiceLevelObjectiveRequest = { * The `DeleteServiceLevelObjective` request. * * @property {string} name - * Resource name of the `ServiceLevelObjective` to delete. + * Required. Resource name of the `ServiceLevelObjective` to delete. * Of the form * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. * diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js index b0402ee3b80..29457c29cc0 100644 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js @@ -19,7 +19,7 @@ * The protocol for the `ListUptimeCheckConfigs` request. * * @property {string} parent - * The project whose Uptime check configurations are listed. The format + * Required. The project whose Uptime check configurations are listed. The format * is `projects/[PROJECT_ID]`. * * @property {number} pageSize @@ -72,7 +72,7 @@ const ListUptimeCheckConfigsResponse = { * The protocol for the `GetUptimeCheckConfig` request. * * @property {string} name - * The Uptime check configuration to retrieve. The format + * Required. The Uptime check configuration to retrieve. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef GetUptimeCheckConfigRequest @@ -87,11 +87,11 @@ const GetUptimeCheckConfigRequest = { * The protocol for the `CreateUptimeCheckConfig` request. * * @property {string} parent - * The project in which to create the Uptime check. The format + * Required. The project in which to create the Uptime check. The format * is `projects/[PROJECT_ID]`. * * @property {Object} uptimeCheckConfig - * The new Uptime check configuration. + * Required. The new Uptime check configuration. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @@ -141,7 +141,7 @@ const UpdateUptimeCheckConfigRequest = { * The protocol for the `DeleteUptimeCheckConfig` request. * * @property {string} name - * The Uptime check configuration to delete. The format + * Required. The Uptime check configuration to delete. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * * @typedef DeleteUptimeCheckConfigRequest diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js index 96ae437971b..fd4b15582bf 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.js @@ -261,7 +261,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project whose groups are to be listed. The format is + * Required. The project whose groups are to be listed. The format is * `"projects/{project_id_or_number}"`. * @param {string} [request.childrenOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. @@ -389,7 +389,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project whose groups are to be listed. The format is + * Required. The project whose groups are to be listed. The format is * `"projects/{project_id_or_number}"`. * @param {string} [request.childrenOfGroup] * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. @@ -450,7 +450,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The group to retrieve. The format is + * Required. The group to retrieve. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -505,10 +505,10 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project in which to create the group. The format is + * Required. The project in which to create the group. The format is * `"projects/{project_id_or_number}"`. * @param {Object} request.group - * A group definition. It is an error to define the `name` field because + * Required. A group definition. It is an error to define the `name` field because * the system assigns the name. * * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} @@ -573,7 +573,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.group - * The new definition of the group. All fields of the existing group, + * Required. The new definition of the group. All fields of the existing group, * excepting `name`, are replaced with the corresponding fields of this group. * * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} @@ -632,7 +632,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The group to delete. The format is + * Required. The group to delete. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * @param {boolean} [request.recursive] * If this field is true, then the request means to delete a group with all @@ -683,7 +683,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The group whose members are listed. The format is + * Required. The group whose members are listed. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -811,7 +811,7 @@ class GroupServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The group whose members are listed. The format is + * Required. The group whose members are listed. The format is * `"projects/{project_id_or_number}/groups/{group_id}"`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js index 5d1ef8ab5c7..d6e8cfce1a5 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.js @@ -261,7 +261,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * @param {string} [request.filter] * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing @@ -386,7 +386,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * @param {string} [request.filter] * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing @@ -440,7 +440,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The monitored resource descriptor to get. The format is + * Required. The monitored resource descriptor to get. The format is * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. * The `{resource_type}` is a predefined type, such as * `cloudsql_database`. @@ -501,7 +501,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * @param {string} [request.filter] * If this field is empty, all custom and @@ -627,7 +627,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * @param {string} [request.filter] * If this field is empty, all custom and @@ -682,7 +682,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The metric descriptor on which to execute the request. The format is + * Required. The metric descriptor on which to execute the request. The format is * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example value of `{metric_id}` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. @@ -741,10 +741,10 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * @param {Object} request.metricDescriptor - * The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) + * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) * descriptor. * * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} @@ -811,7 +811,7 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The metric descriptor on which to execute the request. The format is + * Required. The metric descriptor on which to execute the request. The format is * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. * An example of `{metric_id}` is: * `"custom.googleapis.com/my_test_metric"`. @@ -864,10 +864,10 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * "projects/{project_id_or_number}". * @param {string} request.filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time * series should be returned. The filter must specify a single metric type, * and can additionally specify metric labels and other information. For * example: @@ -875,13 +875,13 @@ class MetricServiceClient { * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" * @param {Object} request.interval - * The time interval for which results should be returned. Only time series + * Required. The time interval for which results should be returned. Only time series * that contain data points in the specified interval are included * in the response. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * @param {number} request.view - * Specifies which information is returned about the time series. + * Required. Specifies which information is returned about the time series. * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * @param {Object} [request.aggregation] @@ -1024,10 +1024,10 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * "projects/{project_id_or_number}". * @param {string} request.filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time + * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time * series should be returned. The filter must specify a single metric type, * and can additionally specify metric labels and other information. For * example: @@ -1035,13 +1035,13 @@ class MetricServiceClient { * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" * @param {Object} request.interval - * The time interval for which results should be returned. Only time series + * Required. The time interval for which results should be returned. Only time series * that contain data points in the specified interval are included * in the response. * * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} * @param {number} request.view - * Specifies which information is returned about the time series. + * Required. Specifies which information is returned about the time series. * * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} * @param {Object} [request.aggregation] @@ -1111,10 +1111,10 @@ class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `"projects/{project_id_or_number}"`. * @param {Object[]} request.timeSeries - * The new data to be added to a list of time series. + * Required. The new data to be added to a list of time series. * Adds at most one data point to each of several time series. The new data * point must be more recent than any other point in its time series. Each * `TimeSeries` value must fully specify a unique time series by supplying diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js index 3662d169daf..103c9fc32e5 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js @@ -261,7 +261,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The REST resource name of the parent from which to retrieve + * Required. The REST resource name of the parent from which to retrieve * the notification channel descriptors. The expected syntax is: * * projects/[PROJECT_ID] @@ -385,7 +385,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The REST resource name of the parent from which to retrieve + * Required. The REST resource name of the parent from which to retrieve * the notification channel descriptors. The expected syntax is: * * projects/[PROJECT_ID] @@ -439,7 +439,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The channel type for which to execute the request. The format is + * Required. The channel type for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -498,7 +498,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `projects/[PROJECT_ID]`. That is, this names the container * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use @@ -633,7 +633,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is + * Required. The project on which to execute the request. The format is * `projects/[PROJECT_ID]`. That is, this names the container * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use @@ -701,7 +701,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The channel for which to execute the request. The format is + * Required. The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -761,7 +761,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The project on which to execute the request. The format is: + * Required. The project on which to execute the request. The format is: * * projects/[PROJECT_ID] * @@ -770,7 +770,7 @@ class NotificationChannelServiceClient { * channel's name will have a normalized version of this field as a prefix, * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. * @param {Object} request.notificationChannel - * The definition of the `NotificationChannel` to create. + * Required. The definition of the `NotificationChannel` to create. * * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} * @param {Object} [options] @@ -836,7 +836,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.notificationChannel - * A description of the changes to be applied to the specified + * Required. A description of the changes to be applied to the specified * notification channel. The description must provide a definition for * fields to be updated; the names of these fields should also be * included in the `update_mask`. @@ -903,7 +903,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The channel for which to execute the request. The format is + * Required. The channel for which to execute the request. The format is * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. * @param {boolean} [request.force] * If true, the notification channel will be deleted regardless of its @@ -960,7 +960,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The notification channel to which to send a verification code. + * Required. The notification channel to which to send a verification code. * @param {Object} [options] * Optional parameters. You 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. @@ -1030,7 +1030,7 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The notification channel for which a verification code is to be generated + * Required. The notification channel for which a verification code is to be generated * and retrieved. This must name a channel that is already verified; if * the specified channel is not verified, the request will fail. * @param {Object} [request.expireTime] @@ -1104,9 +1104,9 @@ class NotificationChannelServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The notification channel to verify. + * Required. The notification channel to verify. * @param {string} request.code - * The verification code that was delivered to the channel as + * Required. The verification code that was delivered to the channel as * a result of invoking the `SendNotificationChannelVerificationCode` API * method or that was retrieved from a verified channel via * `GetNotificationChannelVerificationCode`. For example, one might have diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js index ac6e5fb2c53..237f13f8657 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js @@ -260,10 +260,10 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent workspace. + * Required. Resource name of the parent workspace. * Of the form `projects/{project_id}`. * @param {Object} request.service - * The `Service` to create. + * Required. The `Service` to create. * * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} * @param {string} [request.serviceId] @@ -327,7 +327,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the `Service`. + * Required. Resource name of the `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -382,7 +382,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent `Workspace`. + * Required. Resource name of the parent `Workspace`. * Of the form `projects/{project_id}`. * @param {string} [request.filter] * A filter specifying what `Service`s to return. The filter currently @@ -511,7 +511,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent `Workspace`. + * Required. Resource name of the parent `Workspace`. * Of the form `projects/{project_id}`. * @param {string} [request.filter] * A filter specifying what `Service`s to return. The filter currently @@ -573,7 +573,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.service - * The `Service` to draw updates from. + * Required. The `Service` to draw updates from. * The given `name` specifies the resource to update. * * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} @@ -634,8 +634,8 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the `Service` to delete. - * Of the form `projects/{project_id}/service/{service_id}`. + * Required. Resource name of the `Service` to delete. + * Of the form `projects/{project_id}/services/{service_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. @@ -681,10 +681,10 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent `Service`. + * Required. Resource name of the parent `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * @param {Object} request.serviceLevelObjective - * The `ServiceLevelObjective` to create. + * Required. The `ServiceLevelObjective` to create. * The provided `name` will be respected if no `ServiceLevelObjective` exists * with this name. * @@ -755,7 +755,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the `ServiceLevelObjective` to get. + * Required. Resource name of the `ServiceLevelObjective` to get. * Of the form * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. * @param {number} [request.view] @@ -822,7 +822,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent `Service`. + * Required. Resource name of the parent `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * @param {string} [request.filter] * A filter specifying what `ServiceLevelObjective`s to return. @@ -948,7 +948,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Resource name of the parent `Service`. + * Required. Resource name of the parent `Service`. * Of the form `projects/{project_id}/services/{service_id}`. * @param {string} [request.filter] * A filter specifying what `ServiceLevelObjective`s to return. @@ -1003,7 +1003,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {Object} request.serviceLevelObjective - * The `ServiceLevelObjective` to draw updates from. + * Required. The `ServiceLevelObjective` to draw updates from. * The given `name` specifies the resource to update. * * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} @@ -1068,7 +1068,7 @@ class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Resource name of the `ServiceLevelObjective` to delete. + * Required. Resource name of the `ServiceLevelObjective` to delete. * Of the form * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. * @param {Object} [options] diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js index baf28fc51b4..3f322c5f032 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js @@ -258,7 +258,7 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose Uptime check configurations are listed. The format + * Required. The project whose Uptime check configurations are listed. The format * is `projects/[PROJECT_ID]`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -375,7 +375,7 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project whose Uptime check configurations are listed. The format + * Required. The project whose Uptime check configurations are listed. The format * is `projects/[PROJECT_ID]`. * @param {number} [request.pageSize] * The maximum number of resources contained in the underlying API @@ -421,7 +421,7 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The Uptime check configuration to retrieve. The format + * Required. The Uptime check configuration to retrieve. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, @@ -476,10 +476,10 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The project in which to create the Uptime check. The format + * Required. The project in which to create the Uptime check. The format * is `projects/[PROJECT_ID]`. * @param {Object} request.uptimeCheckConfig - * The new Uptime check configuration. + * Required. The new Uptime check configuration. * * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} * @param {Object} [options] @@ -626,7 +626,7 @@ class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The Uptime check configuration to delete. The format + * Required. The Uptime check configuration to delete. The format * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. * @param {Object} [options] * Optional parameters. You can override the default settings for this call, e.g, timeout, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index ed0f3832f28..2eb4d0dde6f 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-01-29T12:26:40.437371Z", + "updateTime": "2020-01-31T12:25:54.656390Z", "sources": [ { "generator": { @@ -12,9 +12,9 @@ "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\n8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\ne26cab8afd19d396b929039dac5d874cf0b5336c\nexpr: add default_host and method_signature annotations to CelService\n\nPiperOrigin-RevId: 291240093\n\n06093ae3952441c34ec176d1f7431b8765cec0be\nirm: fix v1alpha2 bazel build by adding missing proto imports\n\nPiperOrigin-RevId: 291227940\n\na8a2514af326e4673063f9a3c9d0ef1091c87e6c\nAdd proto annotation for cloud/irm API\n\nPiperOrigin-RevId: 291217859\n\n8d16f76de065f530d395a4c7eabbf766d6a120fd\nGenerate Memcache v1beta2 API protos and gRPC ServiceConfig files\n\nPiperOrigin-RevId: 291008516\n\n3af1dabd93df9a9f17bf3624d3b875c11235360b\ngrafeas: Add containeranalysis default_host to Grafeas service\n\nPiperOrigin-RevId: 290965849\n\nbe2663fa95e31cba67d0cd62611a6674db9f74b7\nfix(google/maps/roads): add missing opening bracket\n\nPiperOrigin-RevId: 290964086\n\nfacc26550a0af0696e0534bc9cae9df14275aa7c\nUpdating v2 protos with the latest inline documentation (in comments) and adding a per-service .yaml file.\n\nPiperOrigin-RevId: 290952261\n\n" + "sha": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7", + "internalRef": "292450564", + "log": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\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" } }, { @@ -36,445 +36,5 @@ "config": "google/monitoring/artman_monitoring.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/monitoring/v3/alert.proto" - }, - { - "path": "protos/google/monitoring/v3/alert_service.proto" - }, - { - "path": "protos/google/monitoring/v3/common.proto" - }, - { - "path": "protos/google/monitoring/v3/dropped_labels.proto" - }, - { - "path": "protos/google/monitoring/v3/group.proto" - }, - { - "path": "protos/google/monitoring/v3/group_service.proto" - }, - { - "path": "protos/google/monitoring/v3/metric.proto" - }, - { - "path": "protos/google/monitoring/v3/metric_service.proto" - }, - { - "path": "protos/google/monitoring/v3/mutation_record.proto" - }, - { - "path": "protos/google/monitoring/v3/notification.proto" - }, - { - "path": "protos/google/monitoring/v3/notification_service.proto" - }, - { - "path": "protos/google/monitoring/v3/service.proto" - }, - { - "path": "protos/google/monitoring/v3/service_service.proto" - }, - { - "path": "protos/google/monitoring/v3/span_context.proto" - }, - { - "path": "protos/google/monitoring/v3/uptime.proto" - }, - { - "path": "protos/google/monitoring/v3/uptime_service.proto" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "renovate.json" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/.gitignore" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/alerts.js" - }, - { - "path": "samples/metrics.js" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/test/alerts.test.js" - }, - { - "path": "samples/test/metrics.test.js" - }, - { - "path": "samples/test/quickstart.test.js" - }, - { - "path": "samples/test/uptime.test.js" - }, - { - "path": "samples/uptime.js" - }, - { - "path": "smoke-test/.eslintrc.yml" - }, - { - "path": "smoke-test/metric_service_smoke_test.js" - }, - { - "path": "src/browser.js" - }, - { - "path": "src/index.js" - }, - { - "path": "src/v3/alert_policy_service_client.js" - }, - { - "path": "src/v3/alert_policy_service_client_config.json" - }, - { - "path": "src/v3/alert_policy_service_proto_list.json" - }, - { - "path": "src/v3/doc/google/api/doc_distribution.js" - }, - { - "path": "src/v3/doc/google/api/doc_label.js" - }, - { - "path": "src/v3/doc/google/api/doc_metric.js" - }, - { - "path": "src/v3/doc/google/api/doc_monitored_resource.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_alert.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_alert_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_common.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_group.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_group_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_metric.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_metric_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_mutation_record.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_notification.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_notification_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_service_service.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_uptime.js" - }, - { - "path": "src/v3/doc/google/monitoring/v3/doc_uptime_service.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_any.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_duration.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_empty.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_field_mask.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_struct.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_timestamp.js" - }, - { - "path": "src/v3/doc/google/protobuf/doc_wrappers.js" - }, - { - "path": "src/v3/doc/google/rpc/doc_status.js" - }, - { - "path": "src/v3/group_service_client.js" - }, - { - "path": "src/v3/group_service_client_config.json" - }, - { - "path": "src/v3/group_service_proto_list.json" - }, - { - "path": "src/v3/index.js" - }, - { - "path": "src/v3/metric_service_client.js" - }, - { - "path": "src/v3/metric_service_client_config.json" - }, - { - "path": "src/v3/metric_service_proto_list.json" - }, - { - "path": "src/v3/notification_channel_service_client.js" - }, - { - "path": "src/v3/notification_channel_service_client_config.json" - }, - { - "path": "src/v3/notification_channel_service_proto_list.json" - }, - { - "path": "src/v3/service_monitoring_service_client.js" - }, - { - "path": "src/v3/service_monitoring_service_client_config.json" - }, - { - "path": "src/v3/service_monitoring_service_proto_list.json" - }, - { - "path": "src/v3/uptime_check_service_client.js" - }, - { - "path": "src/v3/uptime_check_service_client_config.json" - }, - { - "path": "src/v3/uptime_check_service_proto_list.json" - }, - { - "path": "synth.metadata" - }, - { - "path": "synth.py" - }, - { - "path": "system-test/.eslintrc.yml" - }, - { - "path": "system-test/metric_service_smoke_test.js" - }, - { - "path": "test/gapic-v3.js" - }, - { - "path": "test/mocha.opts" - }, - { - "path": "webpack.config.js" - } ] } \ No newline at end of file From 996a42ab552e024502e4008e43343cb4c26a5ed8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:22:48 -0800 Subject: [PATCH 261/422] chore: skip img.shields.io in docs test --- packages/google-cloud-monitoring/linkinator.config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/linkinator.config.json b/packages/google-cloud-monitoring/linkinator.config.json index 924edef684c..0c7bde97719 100644 --- a/packages/google-cloud-monitoring/linkinator.config.json +++ b/packages/google-cloud-monitoring/linkinator.config.json @@ -3,6 +3,7 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "https://cloud.google.com/monitoring/workspaces/tiers" + "https://cloud.google.com/monitoring/workspaces/tiers", + "img.shields.io" ] } From d08d4ff2fdb16d169bbab7df276d3518fd0c822d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 4 Feb 2020 19:57:35 -0800 Subject: [PATCH 262/422] test: modernize mocha config (#356) --- packages/google-cloud-monitoring/.mocharc.json | 5 +++++ packages/google-cloud-monitoring/package.json | 2 -- packages/google-cloud-monitoring/test/mocha.opts | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 packages/google-cloud-monitoring/.mocharc.json delete mode 100644 packages/google-cloud-monitoring/test/mocha.opts diff --git a/packages/google-cloud-monitoring/.mocharc.json b/packages/google-cloud-monitoring/.mocharc.json new file mode 100644 index 00000000000..670c5e2c24b --- /dev/null +++ b/packages/google-cloud-monitoring/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 6dd21f3da85..d3f0090d475 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -46,13 +46,11 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", - "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.5.0", "mocha": "^7.0.0", - "power-assert": "^1.4.4", "prettier": "^1.7.4" } } diff --git a/packages/google-cloud-monitoring/test/mocha.opts b/packages/google-cloud-monitoring/test/mocha.opts deleted file mode 100644 index 8751e7bae37..00000000000 --- a/packages/google-cloud-monitoring/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require intelli-espower-loader ---timeout 10000 ---throw-deprecation From db4bae17a62ff59856ab14f95566c592cae12020 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Feb 2020 19:37:42 +0100 Subject: [PATCH 263/422] chore(deps): update dependency linkinator to v2 (#358) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d3f0090d475..d89662cb759 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -49,7 +49,7 @@ "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", + "linkinator": "^2.0.0", "mocha": "^7.0.0", "prettier": "^1.7.4" } From e599fc1449fe309841266f46cabf38c70d80bb05 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 12 Feb 2020 11:19:15 -0800 Subject: [PATCH 264/422] build: add GitHub actions config for unit tests (#361) --- packages/google-cloud-monitoring/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d89662cb759..ed693b23fdd 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -34,7 +34,8 @@ "test": "c8 mocha", "fix": "eslint '**/*.js' --fix", "docs-test": "linkinator docs", - "predocs-test": "npm run docs" + "predocs-test": "npm run docs", + "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { "google-gax": "^1.7.5" From 509272900a7c57e816928cf46dbd5fd924b989d7 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Tue, 18 Feb 2020 09:42:17 -0800 Subject: [PATCH 265/422] feat!: monitoring convert to typescript (#360) * feat: monitoring conversion by delete js file and add ts from generator * upgrade package.json * fixed samples test by modify the matched path * prelint, add eslint for samples test * fix upstream proto links, get rid of synth hack Co-authored-by: Benjamin E. Coe --- packages/google-cloud-monitoring/.gitignore | 3 +- packages/google-cloud-monitoring/.jsdoc.js | 2 +- .../linkinator.config.json | 1 - packages/google-cloud-monitoring/package.json | 41 +- .../google/cloud/common_resources.proto | 52 + .../protos/google/monitoring/v3/alert.proto | 36 +- .../google/monitoring/v3/alert_service.proto | 26 +- .../google/monitoring/v3/group_service.proto | 65 +- .../google/monitoring/v3/metric_service.proto | 87 +- .../monitoring/v3/notification_service.proto | 34 +- .../protos/protos.d.ts | 16058 +++---- .../google-cloud-monitoring/protos/protos.js | 38746 ++++++++-------- .../protos/protos.json | 2034 +- .../smoke-test/.eslintrc.yml | 3 - .../smoke-test/metric_service_smoke_test.js | 98 - .../google-cloud-monitoring/src/browser.js | 21 - packages/google-cloud-monitoring/src/index.js | 117 - packages/google-cloud-monitoring/src/index.ts | 45 + .../src/v3/alert_policy_service_client.js | 836 - .../src/v3/alert_policy_service_client.ts | 2086 + .../alert_policy_service_client_config.json | 35 +- .../v3/alert_policy_service_proto_list.json | 17 +- .../src/v3/doc/google/api/doc_distribution.js | 270 - .../src/v3/doc/google/api/doc_label.js | 62 - .../src/v3/doc/google/api/doc_metric.js | 317 - .../doc/google/api/doc_monitored_resource.js | 136 - .../v3/doc/google/monitoring/v3/doc_alert.js | 418 - .../google/monitoring/v3/doc_alert_service.js | 188 - .../v3/doc/google/monitoring/v3/doc_common.js | 603 - .../v3/doc/google/monitoring/v3/doc_group.js | 75 - .../google/monitoring/v3/doc_group_service.js | 222 - .../v3/doc/google/monitoring/v3/doc_metric.js | 113 - .../monitoring/v3/doc_metric_service.js | 332 - .../monitoring/v3/doc_mutation_record.js | 35 - .../google/monitoring/v3/doc_notification.js | 190 - .../monitoring/v3/doc_notification_service.js | 329 - .../doc/google/monitoring/v3/doc_service.js | 539 - .../monitoring/v3/doc_service_service.js | 299 - .../v3/doc/google/monitoring/v3/doc_uptime.js | 469 - .../monitoring/v3/doc_uptime_service.js | 202 - .../src/v3/doc/google/protobuf/doc_any.js | 137 - .../v3/doc/google/protobuf/doc_duration.js | 97 - .../src/v3/doc/google/protobuf/doc_empty.js | 34 - .../v3/doc/google/protobuf/doc_field_mask.js | 228 - .../src/v3/doc/google/protobuf/doc_struct.js | 112 - .../v3/doc/google/protobuf/doc_timestamp.js | 117 - .../v3/doc/google/protobuf/doc_wrappers.js | 32 - .../src/v3/doc/google/rpc/doc_status.js | 47 - .../src/v3/group_service_client.js | 933 - .../src/v3/group_service_client.ts | 2244 + .../src/v3/group_service_client_config.json | 41 +- .../src/v3/group_service_proto_list.json | 17 +- .../google-cloud-monitoring/src/v3/index.js | 29 - .../google-cloud-monitoring/src/v3/index.ts | 24 + .../src/v3/metric_service_client.js | 1282 - .../src/v3/metric_service_client.ts | 2831 ++ .../src/v3/metric_service_client_config.json | 45 +- .../src/v3/metric_service_proto_list.json | 17 +- .../v3/notification_channel_service_client.js | 1286 - .../v3/notification_channel_service_client.ts | 2677 ++ ...ication_channel_service_client_config.json | 53 +- ...tification_channel_service_proto_list.json | 17 +- .../v3/service_monitoring_service_client.js | 1238 - .../v3/service_monitoring_service_client.ts | 2565 + ...vice_monitoring_service_client_config.json | 51 +- ...service_monitoring_service_proto_list.json | 17 +- .../src/v3/uptime_check_service_client.js | 884 - .../src/v3/uptime_check_service_client.ts | 2207 + .../uptime_check_service_client_config.json | 39 +- .../v3/uptime_check_service_proto_list.json | 15 + .../google-cloud-monitoring/synth.metadata | 21 +- packages/google-cloud-monitoring/synth.py | 35 +- .../system-test/fixtures/sample/src/index.js | 32 + .../system-test/fixtures/sample/src/index.ts | 30 + .../system-test/install.ts | 51 + ..._test.js => metrics_service_smoke_test.ts} | 10 +- .../test/gapic-alert_policy_service-v3.ts | 339 + .../test/gapic-group_service-v3.ts | 396 + .../test/gapic-metric_service-v3.ts | 510 + .../gapic-notification_channel_service-v3.ts | 671 + .../gapic-service_monitoring_service-v3.ts | 652 + .../test/gapic-uptime_check_service-v3.ts | 405 + .../google-cloud-monitoring/test/gapic-v3.js | 3170 -- .../google-cloud-monitoring/tsconfig.json | 19 + packages/google-cloud-monitoring/tslint.json | 3 + .../google-cloud-monitoring/webpack.config.js | 36 +- 86 files changed, 47079 insertions(+), 43859 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/google/cloud/common_resources.proto delete mode 100644 packages/google-cloud-monitoring/smoke-test/.eslintrc.yml delete mode 100644 packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js delete mode 100644 packages/google-cloud-monitoring/src/browser.js delete mode 100644 packages/google-cloud-monitoring/src/index.js create mode 100644 packages/google-cloud-monitoring/src/index.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js delete mode 100644 packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js delete mode 100644 packages/google-cloud-monitoring/src/v3/group_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/group_service_client.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/index.js create mode 100644 packages/google-cloud-monitoring/src/v3/index.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/metric_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/metric_service_client.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts delete mode 100644 packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js create mode 100644 packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts create mode 100644 packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-monitoring/system-test/install.ts rename packages/google-cloud-monitoring/system-test/{metric_service_smoke_test.js => metrics_service_smoke_test.ts} (94%) create mode 100644 packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic-group_service-v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts delete mode 100644 packages/google-cloud-monitoring/test/gapic-v3.js create mode 100644 packages/google-cloud-monitoring/tsconfig.json create mode 100644 packages/google-cloud-monitoring/tslint.json diff --git a/packages/google-cloud-monitoring/.gitignore b/packages/google-cloud-monitoring/.gitignore index a4b7d6a3c59..5d32b23782f 100644 --- a/packages/google-cloud-monitoring/.gitignore +++ b/packages/google-cloud-monitoring/.gitignore @@ -1,6 +1,7 @@ **/*.log **/node_modules .coverage +coverage .nyc_output docs/ out/ @@ -9,7 +10,5 @@ system-test/secrets.js system-test/*key.json *.lock .DS_Store -google-cloud-logging-winston-*.tgz -google-cloud-logging-bunyan-*.tgz package-lock.json __pycache__ diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 97b97e65002..05a557abc58 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.jsdoc.js @@ -31,7 +31,7 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src' ], includePattern: '\\.js$' }, diff --git a/packages/google-cloud-monitoring/linkinator.config.json b/packages/google-cloud-monitoring/linkinator.config.json index 0c7bde97719..b555215ca02 100644 --- a/packages/google-cloud-monitoring/linkinator.config.json +++ b/packages/google-cloud-monitoring/linkinator.config.json @@ -3,7 +3,6 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "https://cloud.google.com/monitoring/workspaces/tiers", "img.shields.io" ] } diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index ed693b23fdd..bdf25194eb4 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -8,10 +8,10 @@ "node": ">=8.10.0" }, "repository": "googleapis/nodejs-monitoring", - "main": "src/index.js", + "main": "build/src/index.js", "files": [ - "src", - "protos" + "build/src", + "build/protos" ], "keywords": [ "google apis client", @@ -28,30 +28,43 @@ ], "scripts": { "docs": "jsdoc -c .jsdoc.js", - "lint": "eslint '**/*.js'", - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", - "system-test": "mocha system-test/*.js --timeout 600000", - "test": "c8 mocha", - "fix": "eslint '**/*.js' --fix", + "lint": "gts fix && eslint --fix samples/*.js", + "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", + "system-test": "mocha build/system-test", + "test": "c8 mocha build/test", + "fix": "gts fix && eslint 'samples/**/*.js' --fix", "docs-test": "linkinator docs", "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "prepare": "npm run compile" }, "dependencies": { - "google-gax": "^1.7.5" + "google-gax": "^1.14.1" }, "devDependencies": { - "c8": "^7.0.0", - "codecov": "^3.0.0", + "@types/mocha": "^5.2.5", + "@types/node": "^12.12.27", + "c8": "^7.1.0", + "codecov": "^3.6.5", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", + "gts": "^1.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^7.0.0", - "prettier": "^1.7.4" + "mocha": "^7.0.1", + "null-loader": "^3.0.0", + "pack-n-play": "^1.0.0-2", + "prettier": "^1.13.7", + "ts-loader": "^6.2.1", + "typescript": "^3.7.0", + "webpack": "^4.41.6", + "webpack-cli": "^3.3.11" } } diff --git a/packages/google-cloud-monitoring/protos/google/cloud/common_resources.proto b/packages/google-cloud-monitoring/protos/google/cloud/common_resources.proto new file mode 100644 index 00000000000..56c9f800d5e --- /dev/null +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index d65e00dba40..a498ff07a21 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -89,7 +89,7 @@ message AlertPolicy { // A condition type that compares a collection of time series // against a threshold. message MetricThreshold { - // A [filter](/monitoring/api/v3/filters) that + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the @@ -114,11 +114,11 @@ message AlertPolicy { // field. repeated Aggregation aggregations = 8; - // A [filter](/monitoring/api/v3/filters) that identifies a time - // series that should be used as the denominator of a ratio that will be - // compared with the threshold. If a `denominator_filter` is specified, - // the time series specified by the `filter` field will be used as the - // numerator. + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + // identifies a time series that should be used as the denominator of a + // ratio that will be compared with the threshold. If a + // `denominator_filter` is specified, the time series specified by the + // `filter` field will be used as the numerator. // // The filter must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. @@ -175,7 +175,7 @@ message AlertPolicy { // when a time series for the specified metric of a monitored // resource does not include any data in the specified `duration`. message MetricAbsence { - // A [filter](/monitoring/api/v3/filters) that + // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the @@ -216,9 +216,9 @@ message AlertPolicy { } // Required if the condition exists. The unique resource name for this - // condition. Its syntax is: + // condition. Its format is: // - // projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] // // `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the // condition is created as part of a new or updated alerting policy. @@ -264,7 +264,7 @@ message AlertPolicy { COMBINE_UNSPECIFIED = 0; // Combine conditions using the logical `AND` operator. An - // incident is created only if all conditions are met + // incident is created only if all the conditions are met // simultaneously. This combiner is satisfied if all conditions are // met, even if they are met on completely different resources. AND = 1; @@ -280,9 +280,9 @@ message AlertPolicy { } // Required if the policy exists. The resource name for this policy. The - // syntax is: + // format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] // // `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy // is created. When calling the @@ -317,14 +317,14 @@ message AlertPolicy { // OR according to the `combiner` field. If the combined conditions evaluate // to true, then an incident is created. A policy can have from one to six // conditions. - // If |condition_time_series_uery_language| is present, it must be the only - // |condition|. + // If `condition_time_series_query_language` is present, it must be the only + // `condition`. repeated Condition conditions = 12; // How to combine the results of multiple conditions to determine if an // incident should be opened. - // If condition_time_series_query_language is present, this must be - // COMBINE_UNSPECIFIED. + // If `condition_time_series_query_language` is present, this must be + // `COMBINE_UNSPECIFIED`. ConditionCombinerType combiner = 6; // Whether or not the policy is enabled. On write, the default interpretation @@ -345,9 +345,9 @@ message AlertPolicy { // [`NotificationChannel`][google.monitoring.v3.NotificationChannel] // objects that are returned from the [`ListNotificationChannels`] // [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - // method. The syntax of the entries in this field is: + // method. The format of the entries in this field is: // - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] repeated string notification_channels = 14; // A read-only record of the creation of the alerting policy. If provided diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index a88c376f5a1..8115b3875fc 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -96,14 +96,16 @@ service AlertPolicyService { // The protocol for the `CreateAlertPolicy` request. message CreateAlertPolicyRequest { - // Required. The project in which to create the alerting policy. The format is - // `projects/[PROJECT_ID]`. + // Required. The project in which to create the alerting policy. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting // policy will be written, not the name of the created policy. The alerting // policy that is returned will have a name that contains a normalized // representation of this name as a prefix but adds a suffix of the form - // `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. + // `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + // container. string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -113,15 +115,15 @@ message CreateAlertPolicyRequest { // Required. The requested alerting policy. You should omit the `name` field in this // policy. The name will be returned in the new policy, including - // a new [ALERT_POLICY_ID] value. + // a new `[ALERT_POLICY_ID]` value. AlertPolicy alert_policy = 2 [(google.api.field_behavior) = REQUIRED]; } // The protocol for the `GetAlertPolicy` request. message GetAlertPolicyRequest { - // Required. The alerting policy to retrieve. The format is + // Required. The alerting policy to retrieve. The format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -132,9 +134,9 @@ message GetAlertPolicyRequest { // The protocol for the `ListAlertPolicies` request. message ListAlertPoliciesRequest { - // Required. The project whose alert policies are to be listed. The format is + // Required. The project whose alert policies are to be listed. The format is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting // policies to be listed are stored. To retrieve a single alerting policy @@ -152,7 +154,7 @@ message ListAlertPoliciesRequest { // alert policies to be included in the response. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string filter = 5; // A comma-separated list of fields by which to sort the result. Supports @@ -160,7 +162,7 @@ message ListAlertPoliciesRequest { // prefixed with a minus sign to sort by the field in descending order. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string order_by = 6; // The maximum number of results to return in a single response. @@ -179,7 +181,7 @@ message ListAlertPoliciesResponse { // If there might be more results than were returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } @@ -219,7 +221,7 @@ message UpdateAlertPolicyRequest { message DeleteAlertPolicyRequest { // Required. The alerting policy to delete. The format is: // - // projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] + // projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] // // For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. string name = 3 [ diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 5647dcfbffb..39b80512e5b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -106,8 +106,9 @@ service GroupService { // The `ListGroup` request. message ListGroupsRequest { - // Required. The project whose groups are to be listed. The format is - // `"projects/{project_id_or_number}"`. + // Required. The project whose groups are to be listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 7 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -119,14 +120,20 @@ message ListGroupsRequest { // the groups returned based on their parent-child relationship with the // specified group. If no filter is specified, all groups are returned. oneof filter { - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - // Returns groups whose `parentName` field contains the group + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // + // Returns groups whose `parent_name` field contains the group // name. If no groups have this parent, the results are empty. string children_of_group = 2 [(google.api.resource_reference) = { type: "monitoring.googleapis.com/Group" }]; - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // Returns groups that are ancestors of the specified group. // The groups are returned in order, starting with the immediate parent and // ending with the most distant ancestor. If the specified group has no @@ -135,9 +142,12 @@ message ListGroupsRequest { type: "monitoring.googleapis.com/Group" }]; - // A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. + // A group name. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // Returns the descendants of the specified group. This is a superset of - // the results returned by the `childrenOfGroup` filter, and includes + // the results returned by the `children_of_group` filter, and includes // children-of-children, and so forth. string descendants_of_group = 4 [(google.api.resource_reference) = { type: "monitoring.googleapis.com/Group" @@ -147,7 +157,7 @@ message ListGroupsRequest { // A positive number that is the maximum number of results to return. int32 page_size = 5; - // If this field is not empty then it must contain the `nextPageToken` value + // If this field is not empty then it must contain the `next_page_token` value // returned by a previous call to this method. Using this field causes the // method to return additional results from the previous method call. string page_token = 6; @@ -160,14 +170,15 @@ message ListGroupsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetGroup` request. message GetGroupRequest { - // Required. The group to retrieve. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. + // Required. The group to retrieve. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -178,8 +189,9 @@ message GetGroupRequest { // The `CreateGroup` request. message CreateGroupRequest { - // Required. The project in which to create the group. The format is - // `"projects/{project_id_or_number}"`. + // Required. The project in which to create the group. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 4 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -208,8 +220,9 @@ message UpdateGroupRequest { // The `DeleteGroup` request. The default behavior is to be able to delete a // single group without any descendants. message DeleteGroupRequest { - // Required. The group to delete. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. + // Required. The group to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -225,8 +238,9 @@ message DeleteGroupRequest { // The `ListGroupMembers` request. message ListGroupMembersRequest { - // Required. The group whose members are listed. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. + // Required. The group whose members are listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] string name = 7 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -237,18 +251,19 @@ message ListGroupMembersRequest { // A positive number that is the maximum number of results to return. int32 page_size = 3; - // If this field is not empty then it must contain the `nextPageToken` value + // If this field is not empty then it must contain the `next_page_token` value // returned by a previous call to this method. Using this field causes the // method to return additional results from the previous method call. string page_token = 4; - // An optional [list filter](/monitoring/api/learn_more#filtering) describing - // the members to be returned. The filter may reference the type, labels, and - // metadata of monitored resources that comprise the group. - // For example, to return only resources representing Compute Engine VM - // instances, use this filter: + // An optional [list + // filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + // describing the members to be returned. The filter may reference the type, + // labels, and metadata of monitored resources that comprise the group. For + // example, to return only resources representing Compute Engine VM instances, + // use this filter: // - // resource.type = "gce_instance" + // `resource.type = "gce_instance"` string filter = 5; // An optional time interval for which results should be returned. Only @@ -265,7 +280,7 @@ message ListGroupMembersResponse { // If there are more results than have been returned, then this field is // set to a non-empty value. To see the additional results, use that value as - // `pageToken` in the next call to this method. + // `page_token` in the next call to this method. string next_page_token = 2; // The total number of elements matching this request. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index d5d2c334365..56263d1289d 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -97,7 +97,7 @@ service MetricService { // Creates a new metric descriptor. // User-created metric descriptors define - // [custom metrics](/monitoring/custom-metrics). + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { post: "/v3/{name=projects/*}/metricDescriptors" @@ -107,7 +107,8 @@ service MetricService { } // Deletes a metric descriptor. Only user-created - // [custom metrics](/monitoring/custom-metrics) can be deleted. + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + // deleted. rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v3/{name=projects/*/metricDescriptors/**}" @@ -138,8 +139,9 @@ service MetricService { // The `ListMonitoredResourceDescriptors` request. message ListMonitoredResourceDescriptorsRequest { - // Required. The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 5 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -147,11 +149,10 @@ message ListMonitoredResourceDescriptorsRequest { } ]; - // An optional [filter](/monitoring/api/v3/filters) describing - // the descriptors to be returned. The filter can reference - // the descriptor's type and labels. For example, the - // following filter returns only Google Compute Engine descriptors - // that have an `id` label: + // An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + // describing the descriptors to be returned. The filter can reference the + // descriptor's type and labels. For example, the following filter returns + // only Google Compute Engine descriptors that have an `id` label: // // resource.type = starts_with("gce_") AND resource.label:id string filter = 2; @@ -173,15 +174,17 @@ message ListMonitoredResourceDescriptorsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetMonitoredResourceDescriptor` request. message GetMonitoredResourceDescriptorRequest { - // Required. The monitored resource descriptor to get. The format is - // `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. - // The `{resource_type}` is a predefined type, such as + // Required. The monitored resource descriptor to get. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + // + // The `[RESOURCE_TYPE]` is a predefined type, such as // `cloudsql_database`. string name = 3 [ (google.api.field_behavior) = REQUIRED, @@ -193,8 +196,9 @@ message GetMonitoredResourceDescriptorRequest { // The `ListMetricDescriptors` request. message ListMetricDescriptorsRequest { - // Required. The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 5 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -204,10 +208,10 @@ message ListMetricDescriptorsRequest { // If this field is empty, all custom and // system-defined metric descriptors are returned. - // Otherwise, the [filter](/monitoring/api/v3/filters) + // Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) // specifies which metric descriptors are to be // returned. For example, the following filter matches all - // [custom metrics](/monitoring/custom-metrics): + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics): // // metric.type = starts_with("custom.googleapis.com/") string filter = 2; @@ -229,15 +233,17 @@ message ListMetricDescriptorsResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } // The `GetMetricDescriptor` request. message GetMetricDescriptorRequest { - // Required. The metric descriptor on which to execute the request. The format is - // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - // An example value of `{metric_id}` is + // Required. The metric descriptor on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + // + // An example value of `[METRIC_ID]` is // `"compute.googleapis.com/instance/disk/read_bytes_count"`. string name = 3 [ (google.api.field_behavior) = REQUIRED, @@ -249,8 +255,9 @@ message GetMetricDescriptorRequest { // The `CreateMetricDescriptor` request. message CreateMetricDescriptorRequest { - // Required. The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -258,16 +265,18 @@ message CreateMetricDescriptorRequest { } ]; - // Required. The new [custom metric](/monitoring/custom-metrics) + // Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) // descriptor. google.api.MetricDescriptor metric_descriptor = 2 [(google.api.field_behavior) = REQUIRED]; } // The `DeleteMetricDescriptor` request. message DeleteMetricDescriptorRequest { - // Required. The metric descriptor on which to execute the request. The format is - // `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - // An example of `{metric_id}` is: + // Required. The metric descriptor on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + // + // An example of `[METRIC_ID]` is: // `"custom.googleapis.com/my_test_metric"`. string name = 3 [ (google.api.field_behavior) = REQUIRED, @@ -290,19 +299,20 @@ message ListTimeSeriesRequest { HEADERS = 1; } - // Required. The project on which to execute the request. The format is - // "projects/{project_id_or_number}". + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 10 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "monitoring.googleapis.com/TimeSeries" + type: "cloudresourcemanager.googleapis.com/Project" } ]; - // Required. A [monitoring filter](/monitoring/api/v3/filters) that specifies which time - // series should be returned. The filter must specify a single metric type, - // and can additionally specify metric labels and other information. For - // example: + // Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + // that specifies which time series should be returned. The filter must + // specify a single metric type, and can additionally specify metric labels + // and other information. For example: // // metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND // metric.labels.instance_name = "my-instance-name" @@ -347,7 +357,7 @@ message ListTimeSeriesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; // Query execution errors that may have caused the time series data returned @@ -357,12 +367,13 @@ message ListTimeSeriesResponse { // The `CreateTimeSeries` request. message CreateTimeSeriesRequest { - // Required. The project on which to execute the request. The format is - // `"projects/{project_id_or_number}"`. + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "monitoring.googleapis.com/TimeSeries" + type: "cloudresourcemanager.googleapis.com/Project" } ]; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index 959cc049695..2ba8ae29844 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -165,7 +165,7 @@ message ListNotificationChannelDescriptorsRequest { // Required. The REST resource name of the parent from which to retrieve // the notification channel descriptors. The expected syntax is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // // Note that this names the parent container in which to look for the // descriptors; to retrieve a single descriptor by name, use the @@ -204,8 +204,9 @@ message ListNotificationChannelDescriptorsResponse { // The `GetNotificationChannelDescriptor` response. message GetNotificationChannelDescriptorRequest { - // Required. The channel type for which to execute the request. The format is - // `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. + // Required. The channel type for which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -218,10 +219,10 @@ message GetNotificationChannelDescriptorRequest { message CreateNotificationChannelRequest { // Required. The project on which to execute the request. The format is: // - // projects/[PROJECT_ID] + // projects/[PROJECT_ID_OR_NUMBER] // - // Note that this names the container into which the channel will be - // written. This does not name the newly created channel. The resulting + // This names the container into which the channel will be + // written, this does not name the newly created channel. The resulting // channel's name will have a normalized version of this field as a prefix, // but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. string name = 3 [ @@ -237,8 +238,11 @@ message CreateNotificationChannelRequest { // The `ListNotificationChannels` request. message ListNotificationChannelsRequest { - // Required. The project on which to execute the request. The format is - // `projects/[PROJECT_ID]`. That is, this names the container + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + // + // This names the container // in which to look for the notification channels; it does not name a // specific channel. To query a specific channel by REST resource name, use // the @@ -255,7 +259,7 @@ message ListNotificationChannelsRequest { // notification channels to be included in the response. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string filter = 6; // A comma-separated list of fields by which to sort the result. Supports @@ -263,7 +267,7 @@ message ListNotificationChannelsRequest { // a minus sign to sort in descending rather than ascending order. // // For more details, see [sorting and - // filtering](/monitoring/api/v3/sorting-and-filtering). + // filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). string order_by = 7; // The maximum number of results to return in a single response. If @@ -291,8 +295,9 @@ message ListNotificationChannelsResponse { // The `GetNotificationChannel` request. message GetNotificationChannelRequest { - // Required. The channel for which to execute the request. The format is - // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + // Required. The channel for which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -315,8 +320,9 @@ message UpdateNotificationChannelRequest { // The `DeleteNotificationChannel` request. message DeleteNotificationChannelRequest { - // Required. The channel for which to execute the request. The format is - // `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. + // Required. The channel for which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] string name = 3 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 729dd9cc841..7ab2191afbc 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -23,12964 +23,13150 @@ export namespace google { /** Namespace v3. */ namespace v3 { - /** Represents an AlertPolicyService */ - class AlertPolicyService extends $protobuf.rpc.Service { - - /** - * Constructs a new AlertPolicyService 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 AlertPolicy. */ + interface IAlertPolicy { - /** - * Creates new AlertPolicyService 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): AlertPolicyService; + /** AlertPolicy name */ + name?: (string|null); - /** - * Calls ListAlertPolicies. - * @param request ListAlertPoliciesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAlertPoliciesResponse - */ - public listAlertPolicies(request: google.monitoring.v3.IListAlertPoliciesRequest, callback: google.monitoring.v3.AlertPolicyService.ListAlertPoliciesCallback): void; + /** AlertPolicy displayName */ + displayName?: (string|null); - /** - * Calls ListAlertPolicies. - * @param request ListAlertPoliciesRequest message or plain object - * @returns Promise - */ - public listAlertPolicies(request: google.monitoring.v3.IListAlertPoliciesRequest): Promise; + /** AlertPolicy documentation */ + documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null); - /** - * Calls GetAlertPolicy. - * @param request GetAlertPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AlertPolicy - */ - public getAlertPolicy(request: google.monitoring.v3.IGetAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.GetAlertPolicyCallback): void; + /** AlertPolicy userLabels */ + userLabels?: ({ [k: string]: string }|null); - /** - * Calls GetAlertPolicy. - * @param request GetAlertPolicyRequest message or plain object - * @returns Promise - */ - public getAlertPolicy(request: google.monitoring.v3.IGetAlertPolicyRequest): Promise; + /** AlertPolicy conditions */ + conditions?: (google.monitoring.v3.AlertPolicy.ICondition[]|null); - /** - * Calls CreateAlertPolicy. - * @param request CreateAlertPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AlertPolicy - */ - public createAlertPolicy(request: google.monitoring.v3.ICreateAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.CreateAlertPolicyCallback): void; + /** AlertPolicy combiner */ + combiner?: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType|null); - /** - * Calls CreateAlertPolicy. - * @param request CreateAlertPolicyRequest message or plain object - * @returns Promise - */ - public createAlertPolicy(request: google.monitoring.v3.ICreateAlertPolicyRequest): Promise; + /** AlertPolicy enabled */ + enabled?: (google.protobuf.IBoolValue|null); - /** - * Calls DeleteAlertPolicy. - * @param request DeleteAlertPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteAlertPolicy(request: google.monitoring.v3.IDeleteAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.DeleteAlertPolicyCallback): void; + /** AlertPolicy validity */ + validity?: (google.rpc.IStatus|null); - /** - * Calls DeleteAlertPolicy. - * @param request DeleteAlertPolicyRequest message or plain object - * @returns Promise - */ - public deleteAlertPolicy(request: google.monitoring.v3.IDeleteAlertPolicyRequest): Promise; + /** AlertPolicy notificationChannels */ + notificationChannels?: (string[]|null); - /** - * Calls UpdateAlertPolicy. - * @param request UpdateAlertPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AlertPolicy - */ - public updateAlertPolicy(request: google.monitoring.v3.IUpdateAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.UpdateAlertPolicyCallback): void; + /** AlertPolicy creationRecord */ + creationRecord?: (google.monitoring.v3.IMutationRecord|null); - /** - * Calls UpdateAlertPolicy. - * @param request UpdateAlertPolicyRequest message or plain object - * @returns Promise - */ - public updateAlertPolicy(request: google.monitoring.v3.IUpdateAlertPolicyRequest): Promise; + /** AlertPolicy mutationRecord */ + mutationRecord?: (google.monitoring.v3.IMutationRecord|null); } - namespace AlertPolicyService { + /** Represents an AlertPolicy. */ + class AlertPolicy implements IAlertPolicy { /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. - * @param error Error, if any - * @param [response] ListAlertPoliciesResponse + * Constructs a new AlertPolicy. + * @param [properties] Properties to set */ - type ListAlertPoliciesCallback = (error: (Error|null), response?: google.monitoring.v3.ListAlertPoliciesResponse) => void; + constructor(properties?: google.monitoring.v3.IAlertPolicy); - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. - * @param error Error, if any - * @param [response] AlertPolicy - */ - type GetAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; + /** AlertPolicy name. */ + public name: string; - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. - * @param error Error, if any - * @param [response] AlertPolicy - */ - type CreateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; + /** AlertPolicy displayName. */ + public displayName: string; - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteAlertPolicyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** AlertPolicy documentation. */ + public documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null); - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. - * @param error Error, if any - * @param [response] AlertPolicy - */ - type UpdateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; - } + /** AlertPolicy userLabels. */ + public userLabels: { [k: string]: string }; - /** Properties of a CreateAlertPolicyRequest. */ - interface ICreateAlertPolicyRequest { + /** AlertPolicy conditions. */ + public conditions: google.monitoring.v3.AlertPolicy.ICondition[]; - /** CreateAlertPolicyRequest name */ - name?: (string|null); + /** AlertPolicy combiner. */ + public combiner: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType); - /** CreateAlertPolicyRequest alertPolicy */ - alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); - } + /** AlertPolicy enabled. */ + public enabled?: (google.protobuf.IBoolValue|null); - /** Represents a CreateAlertPolicyRequest. */ - class CreateAlertPolicyRequest implements ICreateAlertPolicyRequest { + /** AlertPolicy validity. */ + public validity?: (google.rpc.IStatus|null); - /** - * Constructs a new CreateAlertPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.ICreateAlertPolicyRequest); + /** AlertPolicy notificationChannels. */ + public notificationChannels: string[]; - /** CreateAlertPolicyRequest name. */ - public name: string; + /** AlertPolicy creationRecord. */ + public creationRecord?: (google.monitoring.v3.IMutationRecord|null); - /** CreateAlertPolicyRequest alertPolicy. */ - public alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + /** AlertPolicy mutationRecord. */ + public mutationRecord?: (google.monitoring.v3.IMutationRecord|null); /** - * Creates a new CreateAlertPolicyRequest instance using the specified properties. + * Creates a new AlertPolicy instance using the specified properties. * @param [properties] Properties to set - * @returns CreateAlertPolicyRequest instance + * @returns AlertPolicy instance */ - public static create(properties?: google.monitoring.v3.ICreateAlertPolicyRequest): google.monitoring.v3.CreateAlertPolicyRequest; + public static create(properties?: google.monitoring.v3.IAlertPolicy): google.monitoring.v3.AlertPolicy; /** - * Encodes the specified CreateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. - * @param message CreateAlertPolicyRequest message or plain object to encode + * Encodes the specified AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. + * @param message AlertPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. - * @param message CreateAlertPolicyRequest message or plain object to encode + * Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. + * @param message AlertPolicy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer. + * Decodes an AlertPolicy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateAlertPolicyRequest + * @returns AlertPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateAlertPolicyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy; /** - * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes an AlertPolicy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateAlertPolicyRequest + * @returns AlertPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateAlertPolicyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy; /** - * Verifies a CreateAlertPolicyRequest message. + * Verifies an AlertPolicy message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AlertPolicy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateAlertPolicyRequest + * @returns AlertPolicy */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateAlertPolicyRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy; /** - * Creates a plain object from a CreateAlertPolicyRequest message. Also converts values to other types if specified. - * @param message CreateAlertPolicyRequest + * Creates a plain object from an AlertPolicy message. Also converts values to other types if specified. + * @param message AlertPolicy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.AlertPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateAlertPolicyRequest to JSON. + * Converts this AlertPolicy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetAlertPolicyRequest. */ - interface IGetAlertPolicyRequest { - - /** GetAlertPolicyRequest name */ - name?: (string|null); - } + namespace AlertPolicy { - /** Represents a GetAlertPolicyRequest. */ - class GetAlertPolicyRequest implements IGetAlertPolicyRequest { + /** Properties of a Documentation. */ + interface IDocumentation { - /** - * Constructs a new GetAlertPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IGetAlertPolicyRequest); + /** Documentation content */ + content?: (string|null); - /** GetAlertPolicyRequest name. */ - public name: string; + /** Documentation mimeType */ + mimeType?: (string|null); + } - /** - * Creates a new GetAlertPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAlertPolicyRequest instance - */ - public static create(properties?: google.monitoring.v3.IGetAlertPolicyRequest): google.monitoring.v3.GetAlertPolicyRequest; + /** Represents a Documentation. */ + class Documentation implements IDocumentation { - /** - * Encodes the specified GetAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. - * @param message GetAlertPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IGetAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. - * @param message GetAlertPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IGetAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Documentation. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.IDocumentation); - /** - * Decodes a GetAlertPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetAlertPolicyRequest; + /** Documentation content. */ + public content: string; - /** - * Decodes a GetAlertPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetAlertPolicyRequest; + /** Documentation mimeType. */ + public mimeType: string; - /** - * Verifies a GetAlertPolicyRequest message. - * @param message Plain object 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 Documentation instance using the specified properties. + * @param [properties] Properties to set + * @returns Documentation instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.IDocumentation): google.monitoring.v3.AlertPolicy.Documentation; - /** - * Creates a GetAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAlertPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetAlertPolicyRequest; + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a GetAlertPolicyRequest message. Also converts values to other types if specified. - * @param message GetAlertPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.GetAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this GetAlertPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a Documentation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Documentation; - /** Properties of a ListAlertPoliciesRequest. */ - interface IListAlertPoliciesRequest { + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Documentation; - /** ListAlertPoliciesRequest name */ - name?: (string|null); + /** + * Verifies a Documentation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListAlertPoliciesRequest filter */ - filter?: (string|null); + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Documentation + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Documentation; - /** ListAlertPoliciesRequest orderBy */ - orderBy?: (string|null); + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @param message Documentation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListAlertPoliciesRequest pageSize */ - pageSize?: (number|null); + /** + * Converts this Documentation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListAlertPoliciesRequest pageToken */ - pageToken?: (string|null); - } + /** Properties of a Condition. */ + interface ICondition { - /** Represents a ListAlertPoliciesRequest. */ - class ListAlertPoliciesRequest implements IListAlertPoliciesRequest { + /** Condition name */ + name?: (string|null); - /** - * Constructs a new ListAlertPoliciesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListAlertPoliciesRequest); + /** Condition displayName */ + displayName?: (string|null); - /** ListAlertPoliciesRequest name. */ - public name: string; + /** Condition conditionThreshold */ + conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null); - /** ListAlertPoliciesRequest filter. */ - public filter: string; + /** Condition conditionAbsent */ + conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + } - /** ListAlertPoliciesRequest orderBy. */ - public orderBy: string; + /** Represents a Condition. */ + class Condition implements ICondition { - /** ListAlertPoliciesRequest pageSize. */ - public pageSize: number; + /** + * Constructs a new Condition. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.ICondition); - /** ListAlertPoliciesRequest pageToken. */ - public pageToken: string; + /** Condition name. */ + public name: string; - /** - * Creates a new ListAlertPoliciesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAlertPoliciesRequest instance - */ - public static create(properties?: google.monitoring.v3.IListAlertPoliciesRequest): google.monitoring.v3.ListAlertPoliciesRequest; + /** Condition displayName. */ + public displayName: string; - /** - * Encodes the specified ListAlertPoliciesRequest message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. - * @param message ListAlertPoliciesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListAlertPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Condition conditionThreshold. */ + public conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null); - /** - * Encodes the specified ListAlertPoliciesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. - * @param message ListAlertPoliciesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListAlertPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Condition conditionAbsent. */ + public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); - /** - * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAlertPoliciesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListAlertPoliciesRequest; + /** Condition condition. */ + public condition?: ("conditionThreshold"|"conditionAbsent"); - /** - * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAlertPoliciesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListAlertPoliciesRequest; + /** + * Creates a new Condition instance using the specified properties. + * @param [properties] Properties to set + * @returns Condition instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.ICondition): google.monitoring.v3.AlertPolicy.Condition; - /** - * Verifies a ListAlertPoliciesRequest message. - * @param message 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 Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ListAlertPoliciesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAlertPoliciesRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListAlertPoliciesRequest; + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ListAlertPoliciesRequest message. Also converts values to other types if specified. - * @param message ListAlertPoliciesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListAlertPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Condition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition; - /** - * Converts this ListAlertPoliciesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition; - /** Properties of a ListAlertPoliciesResponse. */ - interface IListAlertPoliciesResponse { + /** + * Verifies a Condition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListAlertPoliciesResponse alertPolicies */ - alertPolicies?: (google.monitoring.v3.IAlertPolicy[]|null); + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Condition + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition; - /** ListAlertPoliciesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @param message Condition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a ListAlertPoliciesResponse. */ - class ListAlertPoliciesResponse implements IListAlertPoliciesResponse { + /** + * Converts this Condition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new ListAlertPoliciesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListAlertPoliciesResponse); + namespace Condition { - /** ListAlertPoliciesResponse alertPolicies. */ - public alertPolicies: google.monitoring.v3.IAlertPolicy[]; + /** Properties of a Trigger. */ + interface ITrigger { - /** ListAlertPoliciesResponse nextPageToken. */ - public nextPageToken: string; + /** Trigger count */ + count?: (number|null); - /** - * Creates a new ListAlertPoliciesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAlertPoliciesResponse instance - */ - public static create(properties?: google.monitoring.v3.IListAlertPoliciesResponse): google.monitoring.v3.ListAlertPoliciesResponse; + /** Trigger percent */ + percent?: (number|null); + } - /** - * Encodes the specified ListAlertPoliciesResponse message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. - * @param message ListAlertPoliciesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListAlertPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Trigger. */ + class Trigger implements ITrigger { - /** - * Encodes the specified ListAlertPoliciesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. - * @param message ListAlertPoliciesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListAlertPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Trigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger); - /** - * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAlertPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListAlertPoliciesResponse; + /** Trigger count. */ + public count: number; - /** - * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAlertPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListAlertPoliciesResponse; + /** Trigger percent. */ + public percent: number; - /** - * Verifies a ListAlertPoliciesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Trigger type. */ + public type?: ("count"|"percent"); - /** - * Creates a ListAlertPoliciesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAlertPoliciesResponse - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListAlertPoliciesResponse; + /** + * Creates a new Trigger instance using the specified properties. + * @param [properties] Properties to set + * @returns Trigger instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger): google.monitoring.v3.AlertPolicy.Condition.Trigger; - /** - * Creates a plain object from a ListAlertPoliciesResponse message. Also converts values to other types if specified. - * @param message ListAlertPoliciesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListAlertPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ListAlertPoliciesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an UpdateAlertPolicyRequest. */ - interface IUpdateAlertPolicyRequest { + /** + * Decodes a Trigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.Trigger; - /** UpdateAlertPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.Trigger; - /** UpdateAlertPolicyRequest alertPolicy */ - alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); - } + /** + * Verifies a Trigger message. + * @param message 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 UpdateAlertPolicyRequest. */ - class UpdateAlertPolicyRequest implements IUpdateAlertPolicyRequest { + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trigger + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.Trigger; - /** - * Constructs a new UpdateAlertPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IUpdateAlertPolicyRequest); + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @param message Trigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UpdateAlertPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Converts this Trigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** UpdateAlertPolicyRequest alertPolicy. */ - public alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + /** Properties of a MetricThreshold. */ + interface IMetricThreshold { - /** - * Creates a new UpdateAlertPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAlertPolicyRequest instance - */ - public static create(properties?: google.monitoring.v3.IUpdateAlertPolicyRequest): google.monitoring.v3.UpdateAlertPolicyRequest; + /** MetricThreshold filter */ + filter?: (string|null); - /** - * Encodes the specified UpdateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. - * @param message UpdateAlertPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IUpdateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MetricThreshold aggregations */ + aggregations?: (google.monitoring.v3.IAggregation[]|null); - /** - * Encodes the specified UpdateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. - * @param message UpdateAlertPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IUpdateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateAlertPolicyRequest; + /** MetricThreshold denominatorFilter */ + denominatorFilter?: (string|null); - /** - * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateAlertPolicyRequest; + /** MetricThreshold denominatorAggregations */ + denominatorAggregations?: (google.monitoring.v3.IAggregation[]|null); - /** - * Verifies an UpdateAlertPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** MetricThreshold comparison */ + comparison?: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType|null); - /** - * Creates an UpdateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAlertPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateAlertPolicyRequest; + /** MetricThreshold thresholdValue */ + thresholdValue?: (number|null); - /** - * Creates a plain object from an UpdateAlertPolicyRequest message. Also converts values to other types if specified. - * @param message UpdateAlertPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UpdateAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MetricThreshold duration */ + duration?: (google.protobuf.IDuration|null); - /** - * Converts this UpdateAlertPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MetricThreshold trigger */ + trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + } - /** Properties of a DeleteAlertPolicyRequest. */ - interface IDeleteAlertPolicyRequest { + /** Represents a MetricThreshold. */ + class MetricThreshold implements IMetricThreshold { - /** DeleteAlertPolicyRequest name */ - name?: (string|null); - } + /** + * Constructs a new MetricThreshold. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold); - /** Represents a DeleteAlertPolicyRequest. */ - class DeleteAlertPolicyRequest implements IDeleteAlertPolicyRequest { + /** MetricThreshold filter. */ + public filter: string; - /** - * Constructs a new DeleteAlertPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IDeleteAlertPolicyRequest); + /** MetricThreshold aggregations. */ + public aggregations: google.monitoring.v3.IAggregation[]; - /** DeleteAlertPolicyRequest name. */ - public name: string; + /** MetricThreshold denominatorFilter. */ + public denominatorFilter: string; - /** - * Creates a new DeleteAlertPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAlertPolicyRequest instance - */ - public static create(properties?: google.monitoring.v3.IDeleteAlertPolicyRequest): google.monitoring.v3.DeleteAlertPolicyRequest; + /** MetricThreshold denominatorAggregations. */ + public denominatorAggregations: google.monitoring.v3.IAggregation[]; - /** - * Encodes the specified DeleteAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. - * @param message DeleteAlertPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IDeleteAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MetricThreshold comparison. */ + public comparison: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType); - /** - * Encodes the specified DeleteAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. - * @param message DeleteAlertPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MetricThreshold thresholdValue. */ + public thresholdValue: number; - /** - * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteAlertPolicyRequest; + /** MetricThreshold duration. */ + public duration?: (google.protobuf.IDuration|null); - /** - * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteAlertPolicyRequest; + /** MetricThreshold trigger. */ + public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); - /** - * Verifies a DeleteAlertPolicyRequest message. - * @param message Plain object 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 MetricThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricThreshold instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - /** - * Creates a DeleteAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAlertPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteAlertPolicyRequest; + /** + * Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @param message MetricThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a DeleteAlertPolicyRequest message. Also converts values to other types if specified. - * @param message DeleteAlertPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.DeleteAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @param message MetricThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this DeleteAlertPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a MetricThreshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - /** Properties of an AlertPolicy. */ - interface IAlertPolicy { + /** + * Decodes a MetricThreshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - /** AlertPolicy name */ - name?: (string|null); + /** + * Verifies a MetricThreshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** AlertPolicy displayName */ - displayName?: (string|null); + /** + * Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricThreshold + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - /** AlertPolicy documentation */ - documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null); + /** + * Creates a plain object from a MetricThreshold message. Also converts values to other types if specified. + * @param message MetricThreshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AlertPolicy userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** + * Converts this MetricThreshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** AlertPolicy conditions */ - conditions?: (google.monitoring.v3.AlertPolicy.ICondition[]|null); + /** Properties of a MetricAbsence. */ + interface IMetricAbsence { - /** AlertPolicy combiner */ - combiner?: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType|null); + /** MetricAbsence filter */ + filter?: (string|null); - /** AlertPolicy enabled */ - enabled?: (google.protobuf.IBoolValue|null); + /** MetricAbsence aggregations */ + aggregations?: (google.monitoring.v3.IAggregation[]|null); - /** AlertPolicy validity */ - validity?: (google.rpc.IStatus|null); + /** MetricAbsence duration */ + duration?: (google.protobuf.IDuration|null); - /** AlertPolicy notificationChannels */ - notificationChannels?: (string[]|null); + /** MetricAbsence trigger */ + trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + } - /** AlertPolicy creationRecord */ - creationRecord?: (google.monitoring.v3.IMutationRecord|null); + /** Represents a MetricAbsence. */ + class MetricAbsence implements IMetricAbsence { - /** AlertPolicy mutationRecord */ - mutationRecord?: (google.monitoring.v3.IMutationRecord|null); + /** + * Constructs a new MetricAbsence. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence); + + /** MetricAbsence filter. */ + public filter: string; + + /** MetricAbsence aggregations. */ + public aggregations: google.monitoring.v3.IAggregation[]; + + /** MetricAbsence duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** MetricAbsence trigger. */ + public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + + /** + * Creates a new MetricAbsence instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricAbsence instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Encodes the specified MetricAbsence message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @param message MetricAbsence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricAbsence message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @param message MetricAbsence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Verifies a MetricAbsence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricAbsence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricAbsence + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + + /** + * Creates a plain object from a MetricAbsence message. Also converts values to other types if specified. + * @param message MetricAbsence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricAbsence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricAbsence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** ConditionCombinerType enum. */ + enum ConditionCombinerType { + COMBINE_UNSPECIFIED = 0, + AND = 1, + OR = 2, + AND_WITH_MATCHING_RESOURCE = 3 + } } - /** Represents an AlertPolicy. */ - class AlertPolicy implements IAlertPolicy { + /** Properties of a TypedValue. */ + interface ITypedValue { - /** - * Constructs a new AlertPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IAlertPolicy); + /** TypedValue boolValue */ + boolValue?: (boolean|null); - /** AlertPolicy name. */ - public name: string; + /** TypedValue int64Value */ + int64Value?: (number|Long|string|null); - /** AlertPolicy displayName. */ - public displayName: string; + /** TypedValue doubleValue */ + doubleValue?: (number|null); - /** AlertPolicy documentation. */ - public documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null); + /** TypedValue stringValue */ + stringValue?: (string|null); - /** AlertPolicy userLabels. */ - public userLabels: { [k: string]: string }; + /** TypedValue distributionValue */ + distributionValue?: (google.api.IDistribution|null); + } - /** AlertPolicy conditions. */ - public conditions: google.monitoring.v3.AlertPolicy.ICondition[]; + /** Represents a TypedValue. */ + class TypedValue implements ITypedValue { - /** AlertPolicy combiner. */ - public combiner: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType); + /** + * Constructs a new TypedValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ITypedValue); - /** AlertPolicy enabled. */ - public enabled?: (google.protobuf.IBoolValue|null); + /** TypedValue boolValue. */ + public boolValue: boolean; - /** AlertPolicy validity. */ - public validity?: (google.rpc.IStatus|null); + /** TypedValue int64Value. */ + public int64Value: (number|Long|string); - /** AlertPolicy notificationChannels. */ - public notificationChannels: string[]; + /** TypedValue doubleValue. */ + public doubleValue: number; - /** AlertPolicy creationRecord. */ - public creationRecord?: (google.monitoring.v3.IMutationRecord|null); + /** TypedValue stringValue. */ + public stringValue: string; - /** AlertPolicy mutationRecord. */ - public mutationRecord?: (google.monitoring.v3.IMutationRecord|null); + /** TypedValue distributionValue. */ + public distributionValue?: (google.api.IDistribution|null); + + /** TypedValue value. */ + public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); /** - * Creates a new AlertPolicy instance using the specified properties. + * Creates a new TypedValue instance using the specified properties. * @param [properties] Properties to set - * @returns AlertPolicy instance + * @returns TypedValue instance */ - public static create(properties?: google.monitoring.v3.IAlertPolicy): google.monitoring.v3.AlertPolicy; + public static create(properties?: google.monitoring.v3.ITypedValue): google.monitoring.v3.TypedValue; /** - * Encodes the specified AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. - * @param message AlertPolicy message or plain object to encode + * Encodes the specified TypedValue message. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. - * @param message AlertPolicy message or plain object to encode + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AlertPolicy message from the specified reader or buffer. + * Decodes a TypedValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AlertPolicy + * @returns TypedValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TypedValue; /** - * Decodes an AlertPolicy message from the specified reader or buffer, length delimited. + * Decodes a TypedValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AlertPolicy + * @returns TypedValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TypedValue; /** - * Verifies an AlertPolicy message. + * Verifies a TypedValue message. * @param message Plain 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 AlertPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AlertPolicy + * @returns TypedValue */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TypedValue; /** - * Creates a plain object from an AlertPolicy message. Also converts values to other types if specified. - * @param message AlertPolicy + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * @param message TypedValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.AlertPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AlertPolicy to JSON. + * Converts this TypedValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AlertPolicy { - - /** Properties of a Documentation. */ - interface IDocumentation { + /** Properties of a TimeInterval. */ + interface ITimeInterval { - /** Documentation content */ - content?: (string|null); + /** TimeInterval endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Documentation mimeType */ - mimeType?: (string|null); - } + /** TimeInterval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + } - /** Represents a Documentation. */ - class Documentation implements IDocumentation { + /** Represents a TimeInterval. */ + class TimeInterval implements ITimeInterval { - /** - * Constructs a new Documentation. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.AlertPolicy.IDocumentation); + /** + * Constructs a new TimeInterval. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ITimeInterval); - /** Documentation content. */ - public content: string; + /** TimeInterval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Documentation mimeType. */ - public mimeType: string; + /** TimeInterval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a new Documentation instance using the specified properties. - * @param [properties] Properties to set - * @returns Documentation instance - */ - public static create(properties?: google.monitoring.v3.AlertPolicy.IDocumentation): google.monitoring.v3.AlertPolicy.Documentation; + /** + * Creates a new TimeInterval instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeInterval instance + */ + public static create(properties?: google.monitoring.v3.ITimeInterval): google.monitoring.v3.TimeInterval; - /** - * Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. - * @param message Documentation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. - * @param message Documentation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Documentation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Documentation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Documentation; + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Documentation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Documentation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Documentation; + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeInterval; - /** - * Verifies a Documentation message. - * @param message 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 TimeInterval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeInterval; - /** - * Creates a Documentation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Documentation - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Documentation; + /** + * Verifies a TimeInterval message. + * @param message Plain object 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 Documentation message. Also converts values to other types if specified. - * @param message Documentation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.AlertPolicy.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeInterval + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeInterval; - /** - * Converts this Documentation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @param message TimeInterval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Condition. */ - interface ICondition { + /** + * Converts this TimeInterval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Condition name */ - name?: (string|null); + /** Properties of an Aggregation. */ + interface IAggregation { - /** Condition displayName */ - displayName?: (string|null); + /** Aggregation alignmentPeriod */ + alignmentPeriod?: (google.protobuf.IDuration|null); - /** Condition conditionThreshold */ - conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null); + /** Aggregation perSeriesAligner */ + perSeriesAligner?: (google.monitoring.v3.Aggregation.Aligner|keyof typeof google.monitoring.v3.Aggregation.Aligner|null); - /** Condition conditionAbsent */ - conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); - } + /** Aggregation crossSeriesReducer */ + crossSeriesReducer?: (google.monitoring.v3.Aggregation.Reducer|keyof typeof google.monitoring.v3.Aggregation.Reducer|null); - /** Represents a Condition. */ - class Condition implements ICondition { + /** Aggregation groupByFields */ + groupByFields?: (string[]|null); + } - /** - * Constructs a new Condition. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.AlertPolicy.ICondition); + /** Represents an Aggregation. */ + class Aggregation implements IAggregation { - /** Condition name. */ - public name: string; + /** + * Constructs a new Aggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IAggregation); - /** Condition displayName. */ - public displayName: string; + /** Aggregation alignmentPeriod. */ + public alignmentPeriod?: (google.protobuf.IDuration|null); - /** Condition conditionThreshold. */ - public conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null); + /** Aggregation perSeriesAligner. */ + public perSeriesAligner: (google.monitoring.v3.Aggregation.Aligner|keyof typeof google.monitoring.v3.Aggregation.Aligner); - /** Condition conditionAbsent. */ - public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + /** Aggregation crossSeriesReducer. */ + public crossSeriesReducer: (google.monitoring.v3.Aggregation.Reducer|keyof typeof google.monitoring.v3.Aggregation.Reducer); - /** Condition condition. */ - public condition?: ("conditionThreshold"|"conditionAbsent"); + /** Aggregation groupByFields. */ + public groupByFields: string[]; - /** - * Creates a new Condition instance using the specified properties. - * @param [properties] Properties to set - * @returns Condition instance - */ - public static create(properties?: google.monitoring.v3.AlertPolicy.ICondition): google.monitoring.v3.AlertPolicy.Condition; + /** + * Creates a new Aggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns Aggregation instance + */ + public static create(properties?: google.monitoring.v3.IAggregation): google.monitoring.v3.Aggregation; - /** - * Encodes the specified Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. - * @param message Condition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. - * @param message Condition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @param message Aggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Condition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Condition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition; + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Aggregation; - /** - * Decodes a Condition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Condition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition; + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Aggregation; - /** - * Verifies a Condition message. - * @param message 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 Aggregation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a Condition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Condition - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition; - - /** - * Creates a plain object from a Condition message. Also converts values to other types if specified. - * @param message Condition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.AlertPolicy.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Condition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Condition { - - /** Properties of a Trigger. */ - interface ITrigger { - - /** Trigger count */ - count?: (number|null); - - /** Trigger percent */ - percent?: (number|null); - } - - /** Represents a Trigger. */ - class Trigger implements ITrigger { - - /** - * Constructs a new Trigger. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger); - - /** Trigger count. */ - public count: number; - - /** Trigger percent. */ - public percent: number; - - /** Trigger type. */ - public type?: ("count"|"percent"); - - /** - * Creates a new Trigger instance using the specified properties. - * @param [properties] Properties to set - * @returns Trigger instance - */ - public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger): google.monitoring.v3.AlertPolicy.Condition.Trigger; - - /** - * Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. - * @param message Trigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. - * @param message Trigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.Trigger; - - /** - * Decodes a Trigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.Trigger; - - /** - * Verifies a Trigger message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trigger - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.Trigger; - - /** - * Creates a plain object from a Trigger message. Also converts values to other types if specified. - * @param message Trigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MetricThreshold. */ - interface IMetricThreshold { - - /** MetricThreshold filter */ - filter?: (string|null); - - /** MetricThreshold aggregations */ - aggregations?: (google.monitoring.v3.IAggregation[]|null); - - /** MetricThreshold denominatorFilter */ - denominatorFilter?: (string|null); - - /** MetricThreshold denominatorAggregations */ - denominatorAggregations?: (google.monitoring.v3.IAggregation[]|null); - - /** MetricThreshold comparison */ - comparison?: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType|null); - - /** MetricThreshold thresholdValue */ - thresholdValue?: (number|null); - - /** MetricThreshold duration */ - duration?: (google.protobuf.IDuration|null); - - /** MetricThreshold trigger */ - trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); - } - - /** Represents a MetricThreshold. */ - class MetricThreshold implements IMetricThreshold { - - /** - * Constructs a new MetricThreshold. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold); - - /** MetricThreshold filter. */ - public filter: string; - - /** MetricThreshold aggregations. */ - public aggregations: google.monitoring.v3.IAggregation[]; - - /** MetricThreshold denominatorFilter. */ - public denominatorFilter: string; - - /** MetricThreshold denominatorAggregations. */ - public denominatorAggregations: google.monitoring.v3.IAggregation[]; - - /** MetricThreshold comparison. */ - public comparison: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType); - - /** MetricThreshold thresholdValue. */ - public thresholdValue: number; - - /** MetricThreshold duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** MetricThreshold trigger. */ - public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); - - /** - * Creates a new MetricThreshold instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricThreshold instance - */ - public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - - /** - * Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. - * @param message MetricThreshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. - * @param message MetricThreshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricThreshold message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - - /** - * Decodes a MetricThreshold message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - - /** - * Verifies a MetricThreshold message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricThreshold - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold; - - /** - * Creates a plain object from a MetricThreshold message. Also converts values to other types if specified. - * @param message MetricThreshold - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricThreshold to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MetricAbsence. */ - interface IMetricAbsence { - - /** MetricAbsence filter */ - filter?: (string|null); - - /** MetricAbsence aggregations */ - aggregations?: (google.monitoring.v3.IAggregation[]|null); - - /** MetricAbsence duration */ - duration?: (google.protobuf.IDuration|null); - - /** MetricAbsence trigger */ - trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); - } - - /** Represents a MetricAbsence. */ - class MetricAbsence implements IMetricAbsence { - - /** - * Constructs a new MetricAbsence. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence); - - /** MetricAbsence filter. */ - public filter: string; - - /** MetricAbsence aggregations. */ - public aggregations: google.monitoring.v3.IAggregation[]; - - /** MetricAbsence duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** MetricAbsence trigger. */ - public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); - - /** - * Creates a new MetricAbsence instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricAbsence instance - */ - public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; - - /** - * Encodes the specified MetricAbsence message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. - * @param message MetricAbsence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricAbsence message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. - * @param message MetricAbsence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricAbsence message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricAbsence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; - - /** - * Decodes a MetricAbsence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricAbsence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; - - /** - * Verifies a MetricAbsence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MetricAbsence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricAbsence - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricAbsence; + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregation + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Aggregation; - /** - * Creates a plain object from a MetricAbsence message. Also converts values to other types if specified. - * @param message MetricAbsence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricAbsence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @param message Aggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this MetricAbsence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this Aggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Aggregation { + + /** Aligner enum. */ + enum Aligner { + ALIGN_NONE = 0, + ALIGN_DELTA = 1, + ALIGN_RATE = 2, + ALIGN_INTERPOLATE = 3, + ALIGN_NEXT_OLDER = 4, + ALIGN_MIN = 10, + ALIGN_MAX = 11, + ALIGN_MEAN = 12, + ALIGN_COUNT = 13, + ALIGN_SUM = 14, + ALIGN_STDDEV = 15, + ALIGN_COUNT_TRUE = 16, + ALIGN_COUNT_FALSE = 24, + ALIGN_FRACTION_TRUE = 17, + ALIGN_PERCENTILE_99 = 18, + ALIGN_PERCENTILE_95 = 19, + ALIGN_PERCENTILE_50 = 20, + ALIGN_PERCENTILE_05 = 21, + ALIGN_PERCENT_CHANGE = 23 } - /** ConditionCombinerType enum. */ - enum ConditionCombinerType { - COMBINE_UNSPECIFIED = 0, - AND = 1, - OR = 2, - AND_WITH_MATCHING_RESOURCE = 3 + /** Reducer enum. */ + enum Reducer { + REDUCE_NONE = 0, + REDUCE_MEAN = 1, + REDUCE_MIN = 2, + REDUCE_MAX = 3, + REDUCE_SUM = 4, + REDUCE_STDDEV = 5, + REDUCE_COUNT = 6, + REDUCE_COUNT_TRUE = 7, + REDUCE_COUNT_FALSE = 15, + REDUCE_FRACTION_TRUE = 8, + REDUCE_PERCENTILE_99 = 9, + REDUCE_PERCENTILE_95 = 10, + REDUCE_PERCENTILE_50 = 11, + REDUCE_PERCENTILE_05 = 12 } } - /** Properties of a TypedValue. */ - interface ITypedValue { - - /** TypedValue boolValue */ - boolValue?: (boolean|null); + /** ComparisonType enum. */ + enum ComparisonType { + COMPARISON_UNSPECIFIED = 0, + COMPARISON_GT = 1, + COMPARISON_GE = 2, + COMPARISON_LT = 3, + COMPARISON_LE = 4, + COMPARISON_EQ = 5, + COMPARISON_NE = 6 + } - /** TypedValue int64Value */ - int64Value?: (number|Long|string|null); + /** ServiceTier enum. */ + enum ServiceTier { + SERVICE_TIER_UNSPECIFIED = 0, + SERVICE_TIER_BASIC = 1, + SERVICE_TIER_PREMIUM = 2 + } - /** TypedValue doubleValue */ - doubleValue?: (number|null); + /** Properties of a MutationRecord. */ + interface IMutationRecord { - /** TypedValue stringValue */ - stringValue?: (string|null); + /** MutationRecord mutateTime */ + mutateTime?: (google.protobuf.ITimestamp|null); - /** TypedValue distributionValue */ - distributionValue?: (google.api.IDistribution|null); + /** MutationRecord mutatedBy */ + mutatedBy?: (string|null); } - /** Represents a TypedValue. */ - class TypedValue implements ITypedValue { + /** Represents a MutationRecord. */ + class MutationRecord implements IMutationRecord { /** - * Constructs a new TypedValue. + * Constructs a new MutationRecord. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ITypedValue); - - /** TypedValue boolValue. */ - public boolValue: boolean; - - /** TypedValue int64Value. */ - public int64Value: (number|Long|string); - - /** TypedValue doubleValue. */ - public doubleValue: number; - - /** TypedValue stringValue. */ - public stringValue: string; + constructor(properties?: google.monitoring.v3.IMutationRecord); - /** TypedValue distributionValue. */ - public distributionValue?: (google.api.IDistribution|null); + /** MutationRecord mutateTime. */ + public mutateTime?: (google.protobuf.ITimestamp|null); - /** TypedValue value. */ - public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); + /** MutationRecord mutatedBy. */ + public mutatedBy: string; /** - * Creates a new TypedValue instance using the specified properties. + * Creates a new MutationRecord instance using the specified properties. * @param [properties] Properties to set - * @returns TypedValue instance + * @returns MutationRecord instance */ - public static create(properties?: google.monitoring.v3.ITypedValue): google.monitoring.v3.TypedValue; + public static create(properties?: google.monitoring.v3.IMutationRecord): google.monitoring.v3.MutationRecord; /** - * Encodes the specified TypedValue message. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. - * @param message TypedValue message or plain object to encode + * Encodes the specified MutationRecord message. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @param message MutationRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IMutationRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. - * @param message TypedValue message or plain object to encode + * Encodes the specified MutationRecord message, length delimited. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @param message MutationRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IMutationRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TypedValue message from the specified reader or buffer. + * Decodes a MutationRecord message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TypedValue + * @returns MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.MutationRecord; + + /** + * Decodes a MutationRecord message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutationRecord * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TypedValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.MutationRecord; + + /** + * Verifies a MutationRecord message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MutationRecord message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutationRecord + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.MutationRecord; + + /** + * Creates a plain object from a MutationRecord message. Also converts values to other types if specified. + * @param message MutationRecord + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.MutationRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutationRecord to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents an AlertPolicyService */ + class AlertPolicyService extends $protobuf.rpc.Service { + + /** + * Constructs a new AlertPolicyService 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 AlertPolicyService 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): AlertPolicyService; + + /** + * Calls ListAlertPolicies. + * @param request ListAlertPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAlertPoliciesResponse + */ + public listAlertPolicies(request: google.monitoring.v3.IListAlertPoliciesRequest, callback: google.monitoring.v3.AlertPolicyService.ListAlertPoliciesCallback): void; + + /** + * Calls ListAlertPolicies. + * @param request ListAlertPoliciesRequest message or plain object + * @returns Promise + */ + public listAlertPolicies(request: google.monitoring.v3.IListAlertPoliciesRequest): Promise; + + /** + * Calls GetAlertPolicy. + * @param request GetAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AlertPolicy + */ + public getAlertPolicy(request: google.monitoring.v3.IGetAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.GetAlertPolicyCallback): void; + + /** + * Calls GetAlertPolicy. + * @param request GetAlertPolicyRequest message or plain object + * @returns Promise + */ + public getAlertPolicy(request: google.monitoring.v3.IGetAlertPolicyRequest): Promise; + + /** + * Calls CreateAlertPolicy. + * @param request CreateAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AlertPolicy + */ + public createAlertPolicy(request: google.monitoring.v3.ICreateAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.CreateAlertPolicyCallback): void; + + /** + * Calls CreateAlertPolicy. + * @param request CreateAlertPolicyRequest message or plain object + * @returns Promise + */ + public createAlertPolicy(request: google.monitoring.v3.ICreateAlertPolicyRequest): Promise; + + /** + * Calls DeleteAlertPolicy. + * @param request DeleteAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAlertPolicy(request: google.monitoring.v3.IDeleteAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.DeleteAlertPolicyCallback): void; + + /** + * Calls DeleteAlertPolicy. + * @param request DeleteAlertPolicyRequest message or plain object + * @returns Promise + */ + public deleteAlertPolicy(request: google.monitoring.v3.IDeleteAlertPolicyRequest): Promise; + + /** + * Calls UpdateAlertPolicy. + * @param request UpdateAlertPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AlertPolicy + */ + public updateAlertPolicy(request: google.monitoring.v3.IUpdateAlertPolicyRequest, callback: google.monitoring.v3.AlertPolicyService.UpdateAlertPolicyCallback): void; + + /** + * Calls UpdateAlertPolicy. + * @param request UpdateAlertPolicyRequest message or plain object + * @returns Promise + */ + public updateAlertPolicy(request: google.monitoring.v3.IUpdateAlertPolicyRequest): Promise; + } + + namespace AlertPolicyService { /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TypedValue - * @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.monitoring.v3.AlertPolicyService#listAlertPolicies}. + * @param error Error, if any + * @param [response] ListAlertPoliciesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TypedValue; + type ListAlertPoliciesCallback = (error: (Error|null), response?: google.monitoring.v3.ListAlertPoliciesResponse) => void; /** - * Verifies a TypedValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. + * @param error Error, if any + * @param [response] AlertPolicy */ - public static verify(message: { [k: string]: any }): (string|null); + type GetAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; /** - * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TypedValue + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. + * @param error Error, if any + * @param [response] AlertPolicy */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TypedValue; + type CreateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; /** - * Creates a plain object from a TypedValue message. Also converts values to other types if specified. - * @param message TypedValue - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. + * @param error Error, if any + * @param [response] Empty */ - public static toObject(message: google.monitoring.v3.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DeleteAlertPolicyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Converts this TypedValue to JSON. - * @returns JSON object + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. + * @param error Error, if any + * @param [response] AlertPolicy */ - public toJSON(): { [k: string]: any }; + type UpdateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; } - /** Properties of a TimeInterval. */ - interface ITimeInterval { + /** Properties of a CreateAlertPolicyRequest. */ + interface ICreateAlertPolicyRequest { - /** TimeInterval endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** CreateAlertPolicyRequest name */ + name?: (string|null); - /** TimeInterval startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** CreateAlertPolicyRequest alertPolicy */ + alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); } - /** Represents a TimeInterval. */ - class TimeInterval implements ITimeInterval { + /** Represents a CreateAlertPolicyRequest. */ + class CreateAlertPolicyRequest implements ICreateAlertPolicyRequest { /** - * Constructs a new TimeInterval. + * Constructs a new CreateAlertPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ITimeInterval); + constructor(properties?: google.monitoring.v3.ICreateAlertPolicyRequest); - /** TimeInterval endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** CreateAlertPolicyRequest name. */ + public name: string; - /** TimeInterval startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** CreateAlertPolicyRequest alertPolicy. */ + public alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); /** - * Creates a new TimeInterval instance using the specified properties. + * Creates a new CreateAlertPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TimeInterval instance + * @returns CreateAlertPolicyRequest instance */ - public static create(properties?: google.monitoring.v3.ITimeInterval): google.monitoring.v3.TimeInterval; + public static create(properties?: google.monitoring.v3.ICreateAlertPolicyRequest): google.monitoring.v3.CreateAlertPolicyRequest; /** - * Encodes the specified TimeInterval message. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. - * @param message TimeInterval message or plain object to encode + * Encodes the specified CreateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @param message CreateAlertPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. - * @param message TimeInterval message or plain object to encode + * Encodes the specified CreateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @param message CreateAlertPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeInterval message from the specified reader or buffer. + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeInterval + * @returns CreateAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeInterval; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateAlertPolicyRequest; /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeInterval + * @returns CreateAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeInterval; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateAlertPolicyRequest; /** - * Verifies a TimeInterval message. + * Verifies a CreateAlertPolicyRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeInterval + * @returns CreateAlertPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeInterval; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateAlertPolicyRequest; /** - * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. - * @param message TimeInterval + * Creates a plain object from a CreateAlertPolicyRequest message. Also converts values to other types if specified. + * @param message CreateAlertPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeInterval to JSON. + * Converts this CreateAlertPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Aggregation. */ - interface IAggregation { - - /** Aggregation alignmentPeriod */ - alignmentPeriod?: (google.protobuf.IDuration|null); - - /** Aggregation perSeriesAligner */ - perSeriesAligner?: (google.monitoring.v3.Aggregation.Aligner|keyof typeof google.monitoring.v3.Aggregation.Aligner|null); - - /** Aggregation crossSeriesReducer */ - crossSeriesReducer?: (google.monitoring.v3.Aggregation.Reducer|keyof typeof google.monitoring.v3.Aggregation.Reducer|null); + /** Properties of a GetAlertPolicyRequest. */ + interface IGetAlertPolicyRequest { - /** Aggregation groupByFields */ - groupByFields?: (string[]|null); + /** GetAlertPolicyRequest name */ + name?: (string|null); } - /** Represents an Aggregation. */ - class Aggregation implements IAggregation { + /** Represents a GetAlertPolicyRequest. */ + class GetAlertPolicyRequest implements IGetAlertPolicyRequest { /** - * Constructs a new Aggregation. + * Constructs a new GetAlertPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IAggregation); - - /** Aggregation alignmentPeriod. */ - public alignmentPeriod?: (google.protobuf.IDuration|null); - - /** Aggregation perSeriesAligner. */ - public perSeriesAligner: (google.monitoring.v3.Aggregation.Aligner|keyof typeof google.monitoring.v3.Aggregation.Aligner); - - /** Aggregation crossSeriesReducer. */ - public crossSeriesReducer: (google.monitoring.v3.Aggregation.Reducer|keyof typeof google.monitoring.v3.Aggregation.Reducer); + constructor(properties?: google.monitoring.v3.IGetAlertPolicyRequest); - /** Aggregation groupByFields. */ - public groupByFields: string[]; + /** GetAlertPolicyRequest name. */ + public name: string; /** - * Creates a new Aggregation instance using the specified properties. + * Creates a new GetAlertPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Aggregation instance + * @returns GetAlertPolicyRequest instance */ - public static create(properties?: google.monitoring.v3.IAggregation): google.monitoring.v3.Aggregation; + public static create(properties?: google.monitoring.v3.IGetAlertPolicyRequest): google.monitoring.v3.GetAlertPolicyRequest; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. - * @param message Aggregation message or plain object to encode + * Encodes the specified GetAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. + * @param message GetAlertPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. - * @param message Aggregation message or plain object to encode + * Encodes the specified GetAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. + * @param message GetAlertPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Aggregation + * @returns GetAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Aggregation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetAlertPolicyRequest; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Aggregation + * @returns GetAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Aggregation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetAlertPolicyRequest; /** - * Verifies an Aggregation message. + * Verifies a GetAlertPolicyRequest message. * @param message Plain 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 Aggregation message from a plain object. Also converts values to their respective internal types. + * Creates a GetAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Aggregation + * @returns GetAlertPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Aggregation; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetAlertPolicyRequest; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. - * @param message Aggregation + * Creates a plain object from a GetAlertPolicyRequest message. Also converts values to other types if specified. + * @param message GetAlertPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Aggregation to JSON. + * Converts this GetAlertPolicyRequest to JSON. * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Aggregation { - - /** Aligner enum. */ - enum Aligner { - ALIGN_NONE = 0, - ALIGN_DELTA = 1, - ALIGN_RATE = 2, - ALIGN_INTERPOLATE = 3, - ALIGN_NEXT_OLDER = 4, - ALIGN_MIN = 10, - ALIGN_MAX = 11, - ALIGN_MEAN = 12, - ALIGN_COUNT = 13, - ALIGN_SUM = 14, - ALIGN_STDDEV = 15, - ALIGN_COUNT_TRUE = 16, - ALIGN_COUNT_FALSE = 24, - ALIGN_FRACTION_TRUE = 17, - ALIGN_PERCENTILE_99 = 18, - ALIGN_PERCENTILE_95 = 19, - ALIGN_PERCENTILE_50 = 20, - ALIGN_PERCENTILE_05 = 21, - ALIGN_PERCENT_CHANGE = 23 - } - - /** Reducer enum. */ - enum Reducer { - REDUCE_NONE = 0, - REDUCE_MEAN = 1, - REDUCE_MIN = 2, - REDUCE_MAX = 3, - REDUCE_SUM = 4, - REDUCE_STDDEV = 5, - REDUCE_COUNT = 6, - REDUCE_COUNT_TRUE = 7, - REDUCE_COUNT_FALSE = 15, - REDUCE_FRACTION_TRUE = 8, - REDUCE_PERCENTILE_99 = 9, - REDUCE_PERCENTILE_95 = 10, - REDUCE_PERCENTILE_50 = 11, - REDUCE_PERCENTILE_05 = 12 - } + */ + public toJSON(): { [k: string]: any }; } - /** ComparisonType enum. */ - enum ComparisonType { - COMPARISON_UNSPECIFIED = 0, - COMPARISON_GT = 1, - COMPARISON_GE = 2, - COMPARISON_LT = 3, - COMPARISON_LE = 4, - COMPARISON_EQ = 5, - COMPARISON_NE = 6 - } + /** Properties of a ListAlertPoliciesRequest. */ + interface IListAlertPoliciesRequest { - /** ServiceTier enum. */ - enum ServiceTier { - SERVICE_TIER_UNSPECIFIED = 0, - SERVICE_TIER_BASIC = 1, - SERVICE_TIER_PREMIUM = 2 - } + /** ListAlertPoliciesRequest name */ + name?: (string|null); - /** Properties of a MutationRecord. */ - interface IMutationRecord { + /** ListAlertPoliciesRequest filter */ + filter?: (string|null); - /** MutationRecord mutateTime */ - mutateTime?: (google.protobuf.ITimestamp|null); + /** ListAlertPoliciesRequest orderBy */ + orderBy?: (string|null); - /** MutationRecord mutatedBy */ - mutatedBy?: (string|null); + /** ListAlertPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListAlertPoliciesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a MutationRecord. */ - class MutationRecord implements IMutationRecord { + /** Represents a ListAlertPoliciesRequest. */ + class ListAlertPoliciesRequest implements IListAlertPoliciesRequest { /** - * Constructs a new MutationRecord. + * Constructs a new ListAlertPoliciesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IMutationRecord); + constructor(properties?: google.monitoring.v3.IListAlertPoliciesRequest); - /** MutationRecord mutateTime. */ - public mutateTime?: (google.protobuf.ITimestamp|null); + /** ListAlertPoliciesRequest name. */ + public name: string; - /** MutationRecord mutatedBy. */ - public mutatedBy: string; + /** ListAlertPoliciesRequest filter. */ + public filter: string; + + /** ListAlertPoliciesRequest orderBy. */ + public orderBy: string; + + /** ListAlertPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListAlertPoliciesRequest pageToken. */ + public pageToken: string; /** - * Creates a new MutationRecord instance using the specified properties. + * Creates a new ListAlertPoliciesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns MutationRecord instance + * @returns ListAlertPoliciesRequest instance */ - public static create(properties?: google.monitoring.v3.IMutationRecord): google.monitoring.v3.MutationRecord; + public static create(properties?: google.monitoring.v3.IListAlertPoliciesRequest): google.monitoring.v3.ListAlertPoliciesRequest; /** - * Encodes the specified MutationRecord message. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. - * @param message MutationRecord message or plain object to encode + * Encodes the specified ListAlertPoliciesRequest message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. + * @param message ListAlertPoliciesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IMutationRecord, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListAlertPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MutationRecord message, length delimited. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. - * @param message MutationRecord message or plain object to encode + * Encodes the specified ListAlertPoliciesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. + * @param message ListAlertPoliciesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IMutationRecord, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListAlertPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MutationRecord message from the specified reader or buffer. + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MutationRecord + * @returns ListAlertPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.MutationRecord; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListAlertPoliciesRequest; /** - * Decodes a MutationRecord message from the specified reader or buffer, length delimited. + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MutationRecord + * @returns ListAlertPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.MutationRecord; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListAlertPoliciesRequest; /** - * Verifies a MutationRecord message. + * Verifies a ListAlertPoliciesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MutationRecord message from a plain object. Also converts values to their respective internal types. + * Creates a ListAlertPoliciesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MutationRecord + * @returns ListAlertPoliciesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.MutationRecord; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListAlertPoliciesRequest; /** - * Creates a plain object from a MutationRecord message. Also converts values to other types if specified. - * @param message MutationRecord + * Creates a plain object from a ListAlertPoliciesRequest message. Also converts values to other types if specified. + * @param message ListAlertPoliciesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.MutationRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListAlertPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MutationRecord to JSON. + * Converts this ListAlertPoliciesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a GroupService */ - class GroupService extends $protobuf.rpc.Service { + /** Properties of a ListAlertPoliciesResponse. */ + interface IListAlertPoliciesResponse { - /** - * Constructs a new GroupService 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); + /** ListAlertPoliciesResponse alertPolicies */ + alertPolicies?: (google.monitoring.v3.IAlertPolicy[]|null); + + /** ListAlertPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAlertPoliciesResponse. */ + class ListAlertPoliciesResponse implements IListAlertPoliciesResponse { /** - * Creates new GroupService 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. + * Constructs a new ListAlertPoliciesResponse. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): GroupService; + constructor(properties?: google.monitoring.v3.IListAlertPoliciesResponse); + + /** ListAlertPoliciesResponse alertPolicies. */ + public alertPolicies: google.monitoring.v3.IAlertPolicy[]; + + /** ListAlertPoliciesResponse nextPageToken. */ + public nextPageToken: string; /** - * Calls ListGroups. - * @param request ListGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListGroupsResponse + * Creates a new ListAlertPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAlertPoliciesResponse instance */ - public listGroups(request: google.monitoring.v3.IListGroupsRequest, callback: google.monitoring.v3.GroupService.ListGroupsCallback): void; + public static create(properties?: google.monitoring.v3.IListAlertPoliciesResponse): google.monitoring.v3.ListAlertPoliciesResponse; /** - * Calls ListGroups. - * @param request ListGroupsRequest message or plain object - * @returns Promise + * Encodes the specified ListAlertPoliciesResponse message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. + * @param message ListAlertPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listGroups(request: google.monitoring.v3.IListGroupsRequest): Promise; + public static encode(message: google.monitoring.v3.IListAlertPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetGroup. - * @param request GetGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Group + * Encodes the specified ListAlertPoliciesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. + * @param message ListAlertPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getGroup(request: google.monitoring.v3.IGetGroupRequest, callback: google.monitoring.v3.GroupService.GetGroupCallback): void; + public static encodeDelimited(message: google.monitoring.v3.IListAlertPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetGroup. - * @param request GetGroupRequest message or plain object - * @returns Promise + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAlertPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getGroup(request: google.monitoring.v3.IGetGroupRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListAlertPoliciesResponse; /** - * Calls CreateGroup. - * @param request CreateGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Group + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAlertPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createGroup(request: google.monitoring.v3.ICreateGroupRequest, callback: google.monitoring.v3.GroupService.CreateGroupCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListAlertPoliciesResponse; /** - * Calls CreateGroup. - * @param request CreateGroupRequest message or plain object - * @returns Promise + * Verifies a ListAlertPoliciesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createGroup(request: google.monitoring.v3.ICreateGroupRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateGroup. - * @param request UpdateGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Group + * Creates a ListAlertPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAlertPoliciesResponse */ - public updateGroup(request: google.monitoring.v3.IUpdateGroupRequest, callback: google.monitoring.v3.GroupService.UpdateGroupCallback): void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListAlertPoliciesResponse; /** - * Calls UpdateGroup. - * @param request UpdateGroupRequest message or plain object - * @returns Promise + * Creates a plain object from a ListAlertPoliciesResponse message. Also converts values to other types if specified. + * @param message ListAlertPoliciesResponse + * @param [options] Conversion options + * @returns Plain object */ - public updateGroup(request: google.monitoring.v3.IUpdateGroupRequest): Promise; + public static toObject(message: google.monitoring.v3.ListAlertPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteGroup. - * @param request DeleteGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this ListAlertPoliciesResponse to JSON. + * @returns JSON object */ - public deleteGroup(request: google.monitoring.v3.IDeleteGroupRequest, callback: google.monitoring.v3.GroupService.DeleteGroupCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateAlertPolicyRequest. */ + interface IUpdateAlertPolicyRequest { + + /** UpdateAlertPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAlertPolicyRequest alertPolicy */ + alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); + } + + /** Represents an UpdateAlertPolicyRequest. */ + class UpdateAlertPolicyRequest implements IUpdateAlertPolicyRequest { /** - * Calls DeleteGroup. - * @param request DeleteGroupRequest message or plain object - * @returns Promise + * Constructs a new UpdateAlertPolicyRequest. + * @param [properties] Properties to set */ - public deleteGroup(request: google.monitoring.v3.IDeleteGroupRequest): Promise; + constructor(properties?: google.monitoring.v3.IUpdateAlertPolicyRequest); + + /** UpdateAlertPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAlertPolicyRequest alertPolicy. */ + public alertPolicy?: (google.monitoring.v3.IAlertPolicy|null); /** - * Calls ListGroupMembers. - * @param request ListGroupMembersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListGroupMembersResponse + * Creates a new UpdateAlertPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAlertPolicyRequest instance */ - public listGroupMembers(request: google.monitoring.v3.IListGroupMembersRequest, callback: google.monitoring.v3.GroupService.ListGroupMembersCallback): void; + public static create(properties?: google.monitoring.v3.IUpdateAlertPolicyRequest): google.monitoring.v3.UpdateAlertPolicyRequest; /** - * Calls ListGroupMembers. - * @param request ListGroupMembersRequest message or plain object - * @returns Promise + * Encodes the specified UpdateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. + * @param message UpdateAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listGroupMembers(request: google.monitoring.v3.IListGroupMembersRequest): Promise; - } + public static encode(message: google.monitoring.v3.IUpdateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - namespace GroupService { + /** + * Encodes the specified UpdateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. + * @param message UpdateAlertPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. - * @param error Error, if any - * @param [response] ListGroupsResponse + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListGroupsCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupsResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateAlertPolicyRequest; /** - * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. - * @param error Error, if any - * @param [response] Group + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateAlertPolicyRequest; /** - * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. - * @param error Error, if any - * @param [response] Group + * Verifies an UpdateAlertPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. - * @param error Error, if any - * @param [response] Group + * Creates an UpdateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAlertPolicyRequest */ - type UpdateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateAlertPolicyRequest; /** - * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from an UpdateAlertPolicyRequest message. Also converts values to other types if specified. + * @param message UpdateAlertPolicyRequest + * @param [options] Conversion options + * @returns Plain object */ - type DeleteGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.monitoring.v3.UpdateAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. - * @param error Error, if any - * @param [response] ListGroupMembersResponse + * Converts this UpdateAlertPolicyRequest to JSON. + * @returns JSON object */ - type ListGroupMembersCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupMembersResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a ListGroupsRequest. */ - interface IListGroupsRequest { + /** Properties of a DeleteAlertPolicyRequest. */ + interface IDeleteAlertPolicyRequest { - /** ListGroupsRequest name */ + /** DeleteAlertPolicyRequest name */ name?: (string|null); - - /** ListGroupsRequest childrenOfGroup */ - childrenOfGroup?: (string|null); - - /** ListGroupsRequest ancestorsOfGroup */ - ancestorsOfGroup?: (string|null); - - /** ListGroupsRequest descendantsOfGroup */ - descendantsOfGroup?: (string|null); - - /** ListGroupsRequest pageSize */ - pageSize?: (number|null); - - /** ListGroupsRequest pageToken */ - pageToken?: (string|null); } - /** Represents a ListGroupsRequest. */ - class ListGroupsRequest implements IListGroupsRequest { + /** Represents a DeleteAlertPolicyRequest. */ + class DeleteAlertPolicyRequest implements IDeleteAlertPolicyRequest { /** - * Constructs a new ListGroupsRequest. + * Constructs a new DeleteAlertPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListGroupsRequest); + constructor(properties?: google.monitoring.v3.IDeleteAlertPolicyRequest); - /** ListGroupsRequest name. */ + /** DeleteAlertPolicyRequest name. */ public name: string; - /** ListGroupsRequest childrenOfGroup. */ - public childrenOfGroup: string; - - /** ListGroupsRequest ancestorsOfGroup. */ - public ancestorsOfGroup: string; - - /** ListGroupsRequest descendantsOfGroup. */ - public descendantsOfGroup: string; - - /** ListGroupsRequest pageSize. */ - public pageSize: number; - - /** ListGroupsRequest pageToken. */ - public pageToken: string; - - /** ListGroupsRequest filter. */ - public filter?: ("childrenOfGroup"|"ancestorsOfGroup"|"descendantsOfGroup"); - /** - * Creates a new ListGroupsRequest instance using the specified properties. + * Creates a new DeleteAlertPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListGroupsRequest instance + * @returns DeleteAlertPolicyRequest instance */ - public static create(properties?: google.monitoring.v3.IListGroupsRequest): google.monitoring.v3.ListGroupsRequest; + public static create(properties?: google.monitoring.v3.IDeleteAlertPolicyRequest): google.monitoring.v3.DeleteAlertPolicyRequest; /** - * Encodes the specified ListGroupsRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. - * @param message ListGroupsRequest message or plain object to encode + * Encodes the specified DeleteAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. + * @param message DeleteAlertPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDeleteAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGroupsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. - * @param message ListGroupsRequest message or plain object to encode + * Encodes the specified DeleteAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. + * @param message DeleteAlertPolicyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDeleteAlertPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGroupsRequest message from the specified reader or buffer. + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGroupsRequest + * @returns DeleteAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteAlertPolicyRequest; /** - * Decodes a ListGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGroupsRequest + * @returns DeleteAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteAlertPolicyRequest; /** - * Verifies a ListGroupsRequest message. + * Verifies a DeleteAlertPolicyRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGroupsRequest + * @returns DeleteAlertPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupsRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteAlertPolicyRequest; /** - * Creates a plain object from a ListGroupsRequest message. Also converts values to other types if specified. - * @param message ListGroupsRequest + * Creates a plain object from a DeleteAlertPolicyRequest message. Also converts values to other types if specified. + * @param message DeleteAlertPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.DeleteAlertPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGroupsRequest to JSON. + * Converts this DeleteAlertPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListGroupsResponse. */ - interface IListGroupsResponse { - - /** ListGroupsResponse group */ - group?: (google.monitoring.v3.IGroup[]|null); + /** Properties of a DroppedLabels. */ + interface IDroppedLabels { - /** ListGroupsResponse nextPageToken */ - nextPageToken?: (string|null); + /** DroppedLabels label */ + label?: ({ [k: string]: string }|null); } - /** Represents a ListGroupsResponse. */ - class ListGroupsResponse implements IListGroupsResponse { + /** Represents a DroppedLabels. */ + class DroppedLabels implements IDroppedLabels { /** - * Constructs a new ListGroupsResponse. + * Constructs a new DroppedLabels. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListGroupsResponse); - - /** ListGroupsResponse group. */ - public group: google.monitoring.v3.IGroup[]; + constructor(properties?: google.monitoring.v3.IDroppedLabels); - /** ListGroupsResponse nextPageToken. */ - public nextPageToken: string; + /** DroppedLabels label. */ + public label: { [k: string]: string }; /** - * Creates a new ListGroupsResponse instance using the specified properties. + * Creates a new DroppedLabels instance using the specified properties. * @param [properties] Properties to set - * @returns ListGroupsResponse instance + * @returns DroppedLabels instance */ - public static create(properties?: google.monitoring.v3.IListGroupsResponse): google.monitoring.v3.ListGroupsResponse; + public static create(properties?: google.monitoring.v3.IDroppedLabels): google.monitoring.v3.DroppedLabels; /** - * Encodes the specified ListGroupsResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. - * @param message ListGroupsResponse message or plain object to encode + * Encodes the specified DroppedLabels message. Does not implicitly {@link google.monitoring.v3.DroppedLabels.verify|verify} messages. + * @param message DroppedLabels message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDroppedLabels, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGroupsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. - * @param message ListGroupsResponse message or plain object to encode + * Encodes the specified DroppedLabels message, length delimited. Does not implicitly {@link google.monitoring.v3.DroppedLabels.verify|verify} messages. + * @param message DroppedLabels message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDroppedLabels, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGroupsResponse message from the specified reader or buffer. + * Decodes a DroppedLabels message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGroupsResponse + * @returns DroppedLabels * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DroppedLabels; /** - * Decodes a ListGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a DroppedLabels message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGroupsResponse + * @returns DroppedLabels * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DroppedLabels; /** - * Verifies a ListGroupsResponse message. + * Verifies a DroppedLabels message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DroppedLabels message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGroupsResponse + * @returns DroppedLabels */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupsResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DroppedLabels; /** - * Creates a plain object from a ListGroupsResponse message. Also converts values to other types if specified. - * @param message ListGroupsResponse + * Creates a plain object from a DroppedLabels message. Also converts values to other types if specified. + * @param message DroppedLabels * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.DroppedLabels, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGroupsResponse to JSON. + * Converts this DroppedLabels to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetGroupRequest. */ - interface IGetGroupRequest { + /** Properties of a Group. */ + interface IGroup { - /** GetGroupRequest name */ + /** Group name */ name?: (string|null); + + /** Group displayName */ + displayName?: (string|null); + + /** Group parentName */ + parentName?: (string|null); + + /** Group filter */ + filter?: (string|null); + + /** Group isCluster */ + isCluster?: (boolean|null); } - /** Represents a GetGroupRequest. */ - class GetGroupRequest implements IGetGroupRequest { + /** Represents a Group. */ + class Group implements IGroup { /** - * Constructs a new GetGroupRequest. + * Constructs a new Group. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetGroupRequest); + constructor(properties?: google.monitoring.v3.IGroup); - /** GetGroupRequest name. */ + /** Group name. */ public name: string; + /** Group displayName. */ + public displayName: string; + + /** Group parentName. */ + public parentName: string; + + /** Group filter. */ + public filter: string; + + /** Group isCluster. */ + public isCluster: boolean; + /** - * Creates a new GetGroupRequest instance using the specified properties. + * Creates a new Group instance using the specified properties. * @param [properties] Properties to set - * @returns GetGroupRequest instance + * @returns Group instance */ - public static create(properties?: google.monitoring.v3.IGetGroupRequest): google.monitoring.v3.GetGroupRequest; + public static create(properties?: google.monitoring.v3.IGroup): google.monitoring.v3.Group; /** - * Encodes the specified GetGroupRequest message. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. - * @param message GetGroupRequest message or plain object to encode + * Encodes the specified Group message. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * @param message Group message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. - * @param message GetGroupRequest message or plain object to encode + * Encodes the specified Group message, length delimited. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * @param message Group message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetGroupRequest message from the specified reader or buffer. + * Decodes a Group message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetGroupRequest + * @returns Group * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Group; /** - * Decodes a GetGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a Group message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetGroupRequest + * @returns Group * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Group; /** - * Verifies a GetGroupRequest message. + * Verifies a Group message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Group message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetGroupRequest + * @returns Group */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetGroupRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Group; /** - * Creates a plain object from a GetGroupRequest message. Also converts values to other types if specified. - * @param message GetGroupRequest + * Creates a plain object from a Group message. Also converts values to other types if specified. + * @param message Group * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.Group, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetGroupRequest to JSON. + * Converts this Group to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateGroupRequest. */ - interface ICreateGroupRequest { + /** Represents a GroupService */ + class GroupService extends $protobuf.rpc.Service { - /** CreateGroupRequest name */ - name?: (string|null); + /** + * Constructs a new GroupService 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); - /** CreateGroupRequest group */ - group?: (google.monitoring.v3.IGroup|null); + /** + * Creates new GroupService 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): GroupService; - /** CreateGroupRequest validateOnly */ - validateOnly?: (boolean|null); - } + /** + * Calls ListGroups. + * @param request ListGroupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGroupsResponse + */ + public listGroups(request: google.monitoring.v3.IListGroupsRequest, callback: google.monitoring.v3.GroupService.ListGroupsCallback): void; - /** Represents a CreateGroupRequest. */ - class CreateGroupRequest implements ICreateGroupRequest { + /** + * Calls ListGroups. + * @param request ListGroupsRequest message or plain object + * @returns Promise + */ + public listGroups(request: google.monitoring.v3.IListGroupsRequest): Promise; /** - * Constructs a new CreateGroupRequest. - * @param [properties] Properties to set + * Calls GetGroup. + * @param request GetGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Group */ - constructor(properties?: google.monitoring.v3.ICreateGroupRequest); + public getGroup(request: google.monitoring.v3.IGetGroupRequest, callback: google.monitoring.v3.GroupService.GetGroupCallback): void; - /** CreateGroupRequest name. */ - public name: string; + /** + * Calls GetGroup. + * @param request GetGroupRequest message or plain object + * @returns Promise + */ + public getGroup(request: google.monitoring.v3.IGetGroupRequest): Promise; - /** CreateGroupRequest group. */ - public group?: (google.monitoring.v3.IGroup|null); + /** + * Calls CreateGroup. + * @param request CreateGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Group + */ + public createGroup(request: google.monitoring.v3.ICreateGroupRequest, callback: google.monitoring.v3.GroupService.CreateGroupCallback): void; - /** CreateGroupRequest validateOnly. */ - public validateOnly: boolean; + /** + * Calls CreateGroup. + * @param request CreateGroupRequest message or plain object + * @returns Promise + */ + public createGroup(request: google.monitoring.v3.ICreateGroupRequest): Promise; /** - * Creates a new CreateGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateGroupRequest instance + * Calls UpdateGroup. + * @param request UpdateGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Group */ - public static create(properties?: google.monitoring.v3.ICreateGroupRequest): google.monitoring.v3.CreateGroupRequest; + public updateGroup(request: google.monitoring.v3.IUpdateGroupRequest, callback: google.monitoring.v3.GroupService.UpdateGroupCallback): void; /** - * Encodes the specified CreateGroupRequest message. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. - * @param message CreateGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateGroup. + * @param request UpdateGroupRequest message or plain object + * @returns Promise */ - public static encode(message: google.monitoring.v3.ICreateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public updateGroup(request: google.monitoring.v3.IUpdateGroupRequest): Promise; /** - * Encodes the specified CreateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. - * @param message CreateGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteGroup. + * @param request DeleteGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static encodeDelimited(message: google.monitoring.v3.ICreateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteGroup(request: google.monitoring.v3.IDeleteGroupRequest, callback: google.monitoring.v3.GroupService.DeleteGroupCallback): void; /** - * Decodes a CreateGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteGroup. + * @param request DeleteGroupRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateGroupRequest; + public deleteGroup(request: google.monitoring.v3.IDeleteGroupRequest): Promise; /** - * Decodes a CreateGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListGroupMembers. + * @param request ListGroupMembersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGroupMembersResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateGroupRequest; + public listGroupMembers(request: google.monitoring.v3.IListGroupMembersRequest, callback: google.monitoring.v3.GroupService.ListGroupMembersCallback): void; /** - * Verifies a CreateGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListGroupMembers. + * @param request ListGroupMembersRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listGroupMembers(request: google.monitoring.v3.IListGroupMembersRequest): Promise; + } + + namespace GroupService { /** - * Creates a CreateGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateGroupRequest + * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. + * @param error Error, if any + * @param [response] ListGroupsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateGroupRequest; + type ListGroupsCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupsResponse) => void; /** - * Creates a plain object from a CreateGroupRequest message. Also converts values to other types if specified. - * @param message CreateGroupRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. + * @param error Error, if any + * @param [response] Group */ - public static toObject(message: google.monitoring.v3.CreateGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; /** - * Converts this CreateGroupRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. + * @param error Error, if any + * @param [response] Group */ - public toJSON(): { [k: string]: any }; + type CreateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. + * @param error Error, if any + * @param [response] Group + */ + type UpdateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. + * @param error Error, if any + * @param [response] ListGroupMembersResponse + */ + type ListGroupMembersCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupMembersResponse) => void; } - /** Properties of an UpdateGroupRequest. */ - interface IUpdateGroupRequest { + /** Properties of a ListGroupsRequest. */ + interface IListGroupsRequest { - /** UpdateGroupRequest group */ - group?: (google.monitoring.v3.IGroup|null); + /** ListGroupsRequest name */ + name?: (string|null); - /** UpdateGroupRequest validateOnly */ - validateOnly?: (boolean|null); + /** ListGroupsRequest childrenOfGroup */ + childrenOfGroup?: (string|null); + + /** ListGroupsRequest ancestorsOfGroup */ + ancestorsOfGroup?: (string|null); + + /** ListGroupsRequest descendantsOfGroup */ + descendantsOfGroup?: (string|null); + + /** ListGroupsRequest pageSize */ + pageSize?: (number|null); + + /** ListGroupsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateGroupRequest. */ - class UpdateGroupRequest implements IUpdateGroupRequest { + /** Represents a ListGroupsRequest. */ + class ListGroupsRequest implements IListGroupsRequest { + + /** + * Constructs a new ListGroupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListGroupsRequest); + + /** ListGroupsRequest name. */ + public name: string; + + /** ListGroupsRequest childrenOfGroup. */ + public childrenOfGroup: string; + + /** ListGroupsRequest ancestorsOfGroup. */ + public ancestorsOfGroup: string; + + /** ListGroupsRequest descendantsOfGroup. */ + public descendantsOfGroup: string; - /** - * Constructs a new UpdateGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IUpdateGroupRequest); + /** ListGroupsRequest pageSize. */ + public pageSize: number; - /** UpdateGroupRequest group. */ - public group?: (google.monitoring.v3.IGroup|null); + /** ListGroupsRequest pageToken. */ + public pageToken: string; - /** UpdateGroupRequest validateOnly. */ - public validateOnly: boolean; + /** ListGroupsRequest filter. */ + public filter?: ("childrenOfGroup"|"ancestorsOfGroup"|"descendantsOfGroup"); /** - * Creates a new UpdateGroupRequest instance using the specified properties. + * Creates a new ListGroupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateGroupRequest instance + * @returns ListGroupsRequest instance */ - public static create(properties?: google.monitoring.v3.IUpdateGroupRequest): google.monitoring.v3.UpdateGroupRequest; + public static create(properties?: google.monitoring.v3.IListGroupsRequest): google.monitoring.v3.ListGroupsRequest; /** - * Encodes the specified UpdateGroupRequest message. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. - * @param message UpdateGroupRequest message or plain object to encode + * Encodes the specified ListGroupsRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * @param message ListGroupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IUpdateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. - * @param message UpdateGroupRequest message or plain object to encode + * Encodes the specified ListGroupsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * @param message ListGroupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IUpdateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateGroupRequest message from the specified reader or buffer. + * Decodes a ListGroupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateGroupRequest + * @returns ListGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupsRequest; /** - * Decodes an UpdateGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGroupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateGroupRequest + * @returns ListGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupsRequest; /** - * Verifies an UpdateGroupRequest message. + * Verifies a ListGroupsRequest message. * @param message Plain 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 UpdateGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGroupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateGroupRequest + * @returns ListGroupsRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateGroupRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupsRequest; /** - * Creates a plain object from an UpdateGroupRequest message. Also converts values to other types if specified. - * @param message UpdateGroupRequest + * Creates a plain object from a ListGroupsRequest message. Also converts values to other types if specified. + * @param message ListGroupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.UpdateGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateGroupRequest to JSON. + * Converts this ListGroupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteGroupRequest. */ - interface IDeleteGroupRequest { + /** Properties of a ListGroupsResponse. */ + interface IListGroupsResponse { - /** DeleteGroupRequest name */ - name?: (string|null); + /** ListGroupsResponse group */ + group?: (google.monitoring.v3.IGroup[]|null); - /** DeleteGroupRequest recursive */ - recursive?: (boolean|null); + /** ListGroupsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteGroupRequest. */ - class DeleteGroupRequest implements IDeleteGroupRequest { + /** Represents a ListGroupsResponse. */ + class ListGroupsResponse implements IListGroupsResponse { /** - * Constructs a new DeleteGroupRequest. + * Constructs a new ListGroupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDeleteGroupRequest); + constructor(properties?: google.monitoring.v3.IListGroupsResponse); - /** DeleteGroupRequest name. */ - public name: string; + /** ListGroupsResponse group. */ + public group: google.monitoring.v3.IGroup[]; - /** DeleteGroupRequest recursive. */ - public recursive: boolean; + /** ListGroupsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteGroupRequest instance using the specified properties. + * Creates a new ListGroupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteGroupRequest instance + * @returns ListGroupsResponse instance */ - public static create(properties?: google.monitoring.v3.IDeleteGroupRequest): google.monitoring.v3.DeleteGroupRequest; + public static create(properties?: google.monitoring.v3.IListGroupsResponse): google.monitoring.v3.ListGroupsResponse; /** - * Encodes the specified DeleteGroupRequest message. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. - * @param message DeleteGroupRequest message or plain object to encode + * Encodes the specified ListGroupsResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * @param message ListGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDeleteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. - * @param message DeleteGroupRequest message or plain object to encode + * Encodes the specified ListGroupsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * @param message ListGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteGroupRequest message from the specified reader or buffer. + * Decodes a ListGroupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteGroupRequest + * @returns ListGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteGroupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupsResponse; /** - * Decodes a DeleteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGroupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteGroupRequest + * @returns ListGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteGroupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupsResponse; /** - * Verifies a DeleteGroupRequest message. + * Verifies a ListGroupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGroupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteGroupRequest + * @returns ListGroupsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteGroupRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupsResponse; /** - * Creates a plain object from a DeleteGroupRequest message. Also converts values to other types if specified. - * @param message DeleteGroupRequest + * Creates a plain object from a ListGroupsResponse message. Also converts values to other types if specified. + * @param message ListGroupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DeleteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteGroupRequest to JSON. + * Converts this ListGroupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListGroupMembersRequest. */ - interface IListGroupMembersRequest { + /** Properties of a GetGroupRequest. */ + interface IGetGroupRequest { - /** ListGroupMembersRequest name */ + /** GetGroupRequest name */ name?: (string|null); - - /** ListGroupMembersRequest pageSize */ - pageSize?: (number|null); - - /** ListGroupMembersRequest pageToken */ - pageToken?: (string|null); - - /** ListGroupMembersRequest filter */ - filter?: (string|null); - - /** ListGroupMembersRequest interval */ - interval?: (google.monitoring.v3.ITimeInterval|null); } - /** Represents a ListGroupMembersRequest. */ - class ListGroupMembersRequest implements IListGroupMembersRequest { + /** Represents a GetGroupRequest. */ + class GetGroupRequest implements IGetGroupRequest { /** - * Constructs a new ListGroupMembersRequest. + * Constructs a new GetGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListGroupMembersRequest); + constructor(properties?: google.monitoring.v3.IGetGroupRequest); - /** ListGroupMembersRequest name. */ + /** GetGroupRequest name. */ public name: string; - /** ListGroupMembersRequest pageSize. */ - public pageSize: number; - - /** ListGroupMembersRequest pageToken. */ - public pageToken: string; - - /** ListGroupMembersRequest filter. */ - public filter: string; - - /** ListGroupMembersRequest interval. */ - public interval?: (google.monitoring.v3.ITimeInterval|null); - /** - * Creates a new ListGroupMembersRequest instance using the specified properties. + * Creates a new GetGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListGroupMembersRequest instance + * @returns GetGroupRequest instance */ - public static create(properties?: google.monitoring.v3.IListGroupMembersRequest): google.monitoring.v3.ListGroupMembersRequest; + public static create(properties?: google.monitoring.v3.IGetGroupRequest): google.monitoring.v3.GetGroupRequest; /** - * Encodes the specified ListGroupMembersRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. - * @param message ListGroupMembersRequest message or plain object to encode + * Encodes the specified GetGroupRequest message. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * @param message GetGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGroupMembersRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. - * @param message ListGroupMembersRequest message or plain object to encode + * Encodes the specified GetGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * @param message GetGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGroupMembersRequest message from the specified reader or buffer. + * Decodes a GetGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGroupMembersRequest + * @returns GetGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupMembersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetGroupRequest; /** - * Decodes a ListGroupMembersRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGroupMembersRequest + * @returns GetGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupMembersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetGroupRequest; /** - * Verifies a ListGroupMembersRequest message. + * Verifies a GetGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListGroupMembersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGroupMembersRequest + * @returns GetGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupMembersRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetGroupRequest; /** - * Creates a plain object from a ListGroupMembersRequest message. Also converts values to other types if specified. - * @param message ListGroupMembersRequest + * Creates a plain object from a GetGroupRequest message. Also converts values to other types if specified. + * @param message GetGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListGroupMembersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGroupMembersRequest to JSON. + * Converts this GetGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListGroupMembersResponse. */ - interface IListGroupMembersResponse { + /** Properties of a CreateGroupRequest. */ + interface ICreateGroupRequest { - /** ListGroupMembersResponse members */ - members?: (google.api.IMonitoredResource[]|null); + /** CreateGroupRequest name */ + name?: (string|null); - /** ListGroupMembersResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateGroupRequest group */ + group?: (google.monitoring.v3.IGroup|null); - /** ListGroupMembersResponse totalSize */ - totalSize?: (number|null); + /** CreateGroupRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListGroupMembersResponse. */ - class ListGroupMembersResponse implements IListGroupMembersResponse { + /** Represents a CreateGroupRequest. */ + class CreateGroupRequest implements ICreateGroupRequest { /** - * Constructs a new ListGroupMembersResponse. + * Constructs a new CreateGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListGroupMembersResponse); - - /** ListGroupMembersResponse members. */ - public members: google.api.IMonitoredResource[]; + constructor(properties?: google.monitoring.v3.ICreateGroupRequest); - /** ListGroupMembersResponse nextPageToken. */ - public nextPageToken: string; + /** CreateGroupRequest name. */ + public name: string; - /** ListGroupMembersResponse totalSize. */ - public totalSize: number; + /** CreateGroupRequest group. */ + public group?: (google.monitoring.v3.IGroup|null); + + /** CreateGroupRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListGroupMembersResponse instance using the specified properties. + * Creates a new CreateGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListGroupMembersResponse instance + * @returns CreateGroupRequest instance */ - public static create(properties?: google.monitoring.v3.IListGroupMembersResponse): google.monitoring.v3.ListGroupMembersResponse; + public static create(properties?: google.monitoring.v3.ICreateGroupRequest): google.monitoring.v3.CreateGroupRequest; /** - * Encodes the specified ListGroupMembersResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. - * @param message ListGroupMembersResponse message or plain object to encode + * Encodes the specified CreateGroupRequest message. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. + * @param message CreateGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListGroupMembersResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. - * @param message ListGroupMembersResponse message or plain object to encode + * Encodes the specified CreateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. + * @param message CreateGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListGroupMembersResponse message from the specified reader or buffer. + * Decodes a CreateGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListGroupMembersResponse + * @returns CreateGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupMembersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateGroupRequest; /** - * Decodes a ListGroupMembersResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListGroupMembersResponse + * @returns CreateGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupMembersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateGroupRequest; /** - * Verifies a ListGroupMembersResponse message. + * Verifies a CreateGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListGroupMembersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListGroupMembersResponse + * @returns CreateGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupMembersResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateGroupRequest; /** - * Creates a plain object from a ListGroupMembersResponse message. Also converts values to other types if specified. - * @param message ListGroupMembersResponse + * Creates a plain object from a CreateGroupRequest message. Also converts values to other types if specified. + * @param message CreateGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListGroupMembersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListGroupMembersResponse to JSON. + * Converts this CreateGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Group. */ - interface IGroup { - - /** Group name */ - name?: (string|null); - - /** Group displayName */ - displayName?: (string|null); - - /** Group parentName */ - parentName?: (string|null); + /** Properties of an UpdateGroupRequest. */ + interface IUpdateGroupRequest { - /** Group filter */ - filter?: (string|null); + /** UpdateGroupRequest group */ + group?: (google.monitoring.v3.IGroup|null); - /** Group isCluster */ - isCluster?: (boolean|null); + /** UpdateGroupRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a Group. */ - class Group implements IGroup { + /** Represents an UpdateGroupRequest. */ + class UpdateGroupRequest implements IUpdateGroupRequest { /** - * Constructs a new Group. + * Constructs a new UpdateGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGroup); - - /** Group name. */ - public name: string; - - /** Group displayName. */ - public displayName: string; - - /** Group parentName. */ - public parentName: string; + constructor(properties?: google.monitoring.v3.IUpdateGroupRequest); - /** Group filter. */ - public filter: string; + /** UpdateGroupRequest group. */ + public group?: (google.monitoring.v3.IGroup|null); - /** Group isCluster. */ - public isCluster: boolean; + /** UpdateGroupRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new Group instance using the specified properties. + * Creates a new UpdateGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Group instance + * @returns UpdateGroupRequest instance */ - public static create(properties?: google.monitoring.v3.IGroup): google.monitoring.v3.Group; + public static create(properties?: google.monitoring.v3.IUpdateGroupRequest): google.monitoring.v3.UpdateGroupRequest; /** - * Encodes the specified Group message. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. - * @param message Group message or plain object to encode + * Encodes the specified UpdateGroupRequest message. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @param message UpdateGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IUpdateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Group message, length delimited. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. - * @param message Group message or plain object to encode + * Encodes the specified UpdateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @param message UpdateGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IUpdateGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Group message from the specified reader or buffer. + * Decodes an UpdateGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Group + * @returns UpdateGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Group; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateGroupRequest; /** - * Decodes a Group message from the specified reader or buffer, length delimited. + * Decodes an UpdateGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Group + * @returns UpdateGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Group; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateGroupRequest; /** - * Verifies a Group message. + * Verifies an UpdateGroupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Group message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Group + * @returns UpdateGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Group; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateGroupRequest; /** - * Creates a plain object from a Group message. Also converts values to other types if specified. - * @param message Group + * Creates a plain object from an UpdateGroupRequest message. Also converts values to other types if specified. + * @param message UpdateGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Group, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.UpdateGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Group to JSON. + * Converts this UpdateGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a MetricService */ - class MetricService extends $protobuf.rpc.Service { - - /** - * Constructs a new MetricService 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 MetricService 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): MetricService; + /** Properties of a DeleteGroupRequest. */ + interface IDeleteGroupRequest { - /** - * 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback): void; + /** DeleteGroupRequest name */ + name?: (string|null); - /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise - */ - public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): Promise; + /** DeleteGroupRequest recursive */ + recursive?: (boolean|null); + } - /** - * Calls GetMonitoredResourceDescriptor. - * @param request GetMonitoredResourceDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor - */ - public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback): void; + /** Represents a DeleteGroupRequest. */ + class DeleteGroupRequest implements IDeleteGroupRequest { /** - * Calls GetMonitoredResourceDescriptor. - * @param request GetMonitoredResourceDescriptorRequest message or plain object - * @returns Promise + * Constructs a new DeleteGroupRequest. + * @param [properties] Properties to set */ - public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): Promise; + constructor(properties?: google.monitoring.v3.IDeleteGroupRequest); - /** - * Calls ListMetricDescriptors. - * @param request ListMetricDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse - */ - public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMetricDescriptorsCallback): void; + /** DeleteGroupRequest name. */ + public name: string; - /** - * Calls ListMetricDescriptors. - * @param request ListMetricDescriptorsRequest message or plain object - * @returns Promise - */ - public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest): Promise; + /** DeleteGroupRequest recursive. */ + public recursive: boolean; /** - * Calls GetMetricDescriptor. - * @param request GetMetricDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetricDescriptor + * Creates a new DeleteGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteGroupRequest instance */ - public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMetricDescriptorCallback): void; + public static create(properties?: google.monitoring.v3.IDeleteGroupRequest): google.monitoring.v3.DeleteGroupRequest; /** - * Calls GetMetricDescriptor. - * @param request GetMetricDescriptorRequest message or plain object - * @returns Promise + * Encodes the specified DeleteGroupRequest message. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * @param message DeleteGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest): Promise; + public static encode(message: google.monitoring.v3.IDeleteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateMetricDescriptor. - * @param request CreateMetricDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetricDescriptor + * Encodes the specified DeleteGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * @param message DeleteGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.CreateMetricDescriptorCallback): void; + public static encodeDelimited(message: google.monitoring.v3.IDeleteGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateMetricDescriptor. - * @param request CreateMetricDescriptorRequest message or plain object - * @returns Promise + * Decodes a DeleteGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteGroupRequest; /** - * Calls DeleteMetricDescriptor. - * @param request DeleteMetricDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a DeleteGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteGroupRequest; /** - * Calls DeleteMetricDescriptor. - * @param request DeleteMetricDescriptorRequest message or plain object - * @returns Promise + * Verifies a DeleteGroupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListTimeSeries. - * @param request ListTimeSeriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + * Creates a DeleteGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteGroupRequest */ - public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest, callback: google.monitoring.v3.MetricService.ListTimeSeriesCallback): void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteGroupRequest; /** - * Calls ListTimeSeries. - * @param request ListTimeSeriesRequest message or plain object - * @returns Promise + * Creates a plain object from a DeleteGroupRequest message. Also converts values to other types if specified. + * @param message DeleteGroupRequest + * @param [options] Conversion options + * @returns Plain object */ - public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest): Promise; + public static toObject(message: google.monitoring.v3.DeleteGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CreateTimeSeries. - * @param request CreateTimeSeriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this DeleteGroupRequest to JSON. + * @returns JSON object */ - public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest, callback: google.monitoring.v3.MetricService.CreateTimeSeriesCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListGroupMembersRequest. */ + interface IListGroupMembersRequest { + + /** ListGroupMembersRequest name */ + name?: (string|null); + + /** ListGroupMembersRequest pageSize */ + pageSize?: (number|null); + + /** ListGroupMembersRequest pageToken */ + pageToken?: (string|null); + + /** ListGroupMembersRequest filter */ + filter?: (string|null); + + /** ListGroupMembersRequest interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); + } + + /** Represents a ListGroupMembersRequest. */ + class ListGroupMembersRequest implements IListGroupMembersRequest { /** - * Calls CreateTimeSeries. - * @param request CreateTimeSeriesRequest message or plain object - * @returns Promise + * Constructs a new ListGroupMembersRequest. + * @param [properties] Properties to set */ - public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest): Promise; - } + constructor(properties?: google.monitoring.v3.IListGroupMembersRequest); - namespace MetricService { + /** ListGroupMembersRequest name. */ + public name: string; + + /** ListGroupMembersRequest pageSize. */ + public pageSize: number; + + /** ListGroupMembersRequest pageToken. */ + public pageToken: string; + + /** ListGroupMembersRequest filter. */ + public filter: string; + + /** ListGroupMembersRequest interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse + * Creates a new ListGroupMembersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGroupMembersRequest instance */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) => void; + public static create(properties?: google.monitoring.v3.IListGroupMembersRequest): google.monitoring.v3.ListGroupMembersRequest; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. - * @param error Error, if any - * @param [response] MonitoredResourceDescriptor + * Encodes the specified ListGroupMembersRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * @param message ListGroupMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetMonitoredResourceDescriptorCallback = (error: (Error|null), response?: google.api.MonitoredResourceDescriptor) => void; + public static encode(message: google.monitoring.v3.IListGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. - * @param error Error, if any - * @param [response] ListMetricDescriptorsResponse + * Encodes the specified ListGroupMembersRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * @param message ListGroupMembersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListMetricDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMetricDescriptorsResponse) => void; + public static encodeDelimited(message: google.monitoring.v3.IListGroupMembersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. - * @param error Error, if any - * @param [response] MetricDescriptor + * Decodes a ListGroupMembersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGroupMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupMembersRequest; /** - * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. - * @param error Error, if any - * @param [response] MetricDescriptor + * Decodes a ListGroupMembersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGroupMembersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupMembersRequest; /** - * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. - * @param error Error, if any - * @param [response] Empty + * Verifies a ListGroupMembersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteMetricDescriptorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. - * @param error Error, if any - * @param [response] ListTimeSeriesResponse + * Creates a ListGroupMembersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGroupMembersRequest */ - type ListTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.ListTimeSeriesResponse) => void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupMembersRequest; /** - * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a ListGroupMembersRequest message. Also converts values to other types if specified. + * @param message ListGroupMembersRequest + * @param [options] Conversion options + * @returns Plain object */ - type CreateTimeSeriesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + public static toObject(message: google.monitoring.v3.ListGroupMembersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { + /** + * Converts this ListGroupMembersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ListMonitoredResourceDescriptorsRequest name */ - name?: (string|null); + /** Properties of a ListGroupMembersResponse. */ + interface IListGroupMembersResponse { - /** ListMonitoredResourceDescriptorsRequest filter */ - filter?: (string|null); + /** ListGroupMembersResponse members */ + members?: (google.api.IMonitoredResource[]|null); - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** ListGroupMembersResponse nextPageToken */ + nextPageToken?: (string|null); - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); + /** ListGroupMembersResponse totalSize */ + totalSize?: (number|null); } - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** Represents a ListGroupMembersResponse. */ + class ListGroupMembersResponse implements IListGroupMembersResponse { /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new ListGroupMembersResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest); - - /** ListMonitoredResourceDescriptorsRequest name. */ - public name: string; + constructor(properties?: google.monitoring.v3.IListGroupMembersResponse); - /** ListMonitoredResourceDescriptorsRequest filter. */ - public filter: string; + /** ListGroupMembersResponse members. */ + public members: google.api.IMonitoredResource[]; - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + /** ListGroupMembersResponse nextPageToken. */ + public nextPageToken: string; - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** ListGroupMembersResponse totalSize. */ + public totalSize: number; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new ListGroupMembersResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance + * @returns ListGroupMembersResponse instance */ - public static create(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static create(properties?: google.monitoring.v3.IListGroupMembersResponse): google.monitoring.v3.ListGroupMembersResponse; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified ListGroupMembersResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * @param message ListGroupMembersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified ListGroupMembersResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * @param message ListGroupMembersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListGroupMembersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a ListGroupMembersResponse 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 ListGroupMembersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListGroupMembersResponse; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGroupMembersResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest + * @returns ListGroupMembersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListGroupMembersResponse; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a ListGroupMembersResponse message. * @param message Plain object 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 ListGroupMembersResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest + * @returns ListGroupMembersResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListGroupMembersResponse; /** - * 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 ListGroupMembersResponse message. Also converts values to other types if specified. + * @param message ListGroupMembersResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListGroupMembersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this ListGroupMembersResponse 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 Point. */ + interface IPoint { - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Point interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); + + /** Point value */ + value?: (google.monitoring.v3.ITypedValue|null); } - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** Represents a Point. */ + class Point implements IPoint { /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new Point. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse); + constructor(properties?: google.monitoring.v3.IPoint); - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + /** Point interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** Point value. */ + public value?: (google.monitoring.v3.ITypedValue|null); /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new Point instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance + * @returns Point instance */ - public static create(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static create(properties?: google.monitoring.v3.IPoint): google.monitoring.v3.Point; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified Point message. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * @param message Point message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * @param message Point message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a Point 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 Point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Point; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a Point message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse + * @returns Point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Point; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a Point message. * @param message Plain object 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 Point message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse + * @returns Point */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Point; /** - * 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 Point message. Also converts values to other types if specified. + * @param message Point * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this Point to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetMonitoredResourceDescriptorRequest. */ - interface IGetMonitoredResourceDescriptorRequest { + /** Properties of a TimeSeries. */ + interface ITimeSeries { - /** GetMonitoredResourceDescriptorRequest name */ - name?: (string|null); + /** TimeSeries metric */ + metric?: (google.api.IMetric|null); + + /** TimeSeries resource */ + resource?: (google.api.IMonitoredResource|null); + + /** TimeSeries metadata */ + metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** TimeSeries metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** TimeSeries valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** TimeSeries points */ + points?: (google.monitoring.v3.IPoint[]|null); } - /** Represents a GetMonitoredResourceDescriptorRequest. */ - class GetMonitoredResourceDescriptorRequest implements IGetMonitoredResourceDescriptorRequest { + /** Represents a TimeSeries. */ + class TimeSeries implements ITimeSeries { /** - * Constructs a new GetMonitoredResourceDescriptorRequest. + * Constructs a new TimeSeries. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest); + constructor(properties?: google.monitoring.v3.ITimeSeries); - /** GetMonitoredResourceDescriptorRequest name. */ - public name: string; + /** TimeSeries metric. */ + public metric?: (google.api.IMetric|null); + + /** TimeSeries resource. */ + public resource?: (google.api.IMonitoredResource|null); + + /** TimeSeries metadata. */ + public metadata?: (google.api.IMonitoredResourceMetadata|null); + + /** TimeSeries metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** TimeSeries valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** TimeSeries points. */ + public points: google.monitoring.v3.IPoint[]; /** - * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * Creates a new TimeSeries instance using the specified properties. * @param [properties] Properties to set - * @returns GetMonitoredResourceDescriptorRequest instance + * @returns TimeSeries instance */ - public static create(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static create(properties?: google.monitoring.v3.ITimeSeries): google.monitoring.v3.TimeSeries; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. - * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * Encodes the specified TimeSeries message. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. - * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * Decodes a TimeSeries message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMonitoredResourceDescriptorRequest + * @returns TimeSeries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeries; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMonitoredResourceDescriptorRequest + * @returns TimeSeries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeries; /** - * Verifies a GetMonitoredResourceDescriptorRequest message. + * Verifies a TimeSeries message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMonitoredResourceDescriptorRequest + * @returns TimeSeries */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeries; /** - * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. - * @param message GetMonitoredResourceDescriptorRequest + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @param message TimeSeries * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetMonitoredResourceDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMonitoredResourceDescriptorRequest to JSON. + * Converts this TimeSeries to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMetricDescriptorsRequest. */ - interface IListMetricDescriptorsRequest { - - /** ListMetricDescriptorsRequest name */ - name?: (string|null); - - /** ListMetricDescriptorsRequest filter */ - filter?: (string|null); - - /** ListMetricDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** Represents a MetricService */ + class MetricService extends $protobuf.rpc.Service { - /** ListMetricDescriptorsRequest pageToken */ - pageToken?: (string|null); - } + /** + * Constructs a new MetricService 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 ListMetricDescriptorsRequest. */ - class ListMetricDescriptorsRequest implements IListMetricDescriptorsRequest { + /** + * Creates new MetricService 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): MetricService; /** - * Constructs a new ListMetricDescriptorsRequest. - * @param [properties] Properties to set + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse */ - constructor(properties?: google.monitoring.v3.IListMetricDescriptorsRequest); + public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback): void; - /** ListMetricDescriptorsRequest name. */ - public name: string; + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise + */ + public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): Promise; - /** ListMetricDescriptorsRequest filter. */ - public filter: string; + /** + * Calls GetMonitoredResourceDescriptor. + * @param request GetMonitoredResourceDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + */ + public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback): void; - /** ListMetricDescriptorsRequest pageSize. */ - public pageSize: number; + /** + * Calls GetMonitoredResourceDescriptor. + * @param request GetMonitoredResourceDescriptorRequest message or plain object + * @returns Promise + */ + public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): Promise; - /** ListMetricDescriptorsRequest pageToken. */ - public pageToken: string; + /** + * Calls ListMetricDescriptors. + * @param request ListMetricDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + */ + public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMetricDescriptorsCallback): void; /** - * Creates a new ListMetricDescriptorsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMetricDescriptorsRequest instance + * Calls ListMetricDescriptors. + * @param request ListMetricDescriptorsRequest message or plain object + * @returns Promise */ - public static create(properties?: google.monitoring.v3.IListMetricDescriptorsRequest): google.monitoring.v3.ListMetricDescriptorsRequest; + public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest): Promise; /** - * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. - * @param message ListMetricDescriptorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetMetricDescriptor. + * @param request GetMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetricDescriptor */ - public static encode(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMetricDescriptorCallback): void; /** - * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. - * @param message ListMetricDescriptorsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetMetricDescriptor. + * @param request GetMetricDescriptorRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest): Promise; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMetricDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateMetricDescriptor. + * @param request CreateMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetricDescriptor */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsRequest; + public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.CreateMetricDescriptorCallback): void; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMetricDescriptorsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateMetricDescriptor. + * @param request CreateMetricDescriptorRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsRequest; + public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest): Promise; /** - * Verifies a ListMetricDescriptorsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteMetricDescriptor. + * @param request DeleteMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback): void; /** - * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMetricDescriptorsRequest + * Calls DeleteMetricDescriptor. + * @param request DeleteMetricDescriptorRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsRequest; + public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest): Promise; /** - * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMetricDescriptorsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls ListTimeSeries. + * @param request ListTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTimeSeriesResponse */ - public static toObject(message: google.monitoring.v3.ListMetricDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest, callback: google.monitoring.v3.MetricService.ListTimeSeriesCallback): void; /** - * Converts this ListMetricDescriptorsRequest to JSON. - * @returns JSON object + * Calls ListTimeSeries. + * @param request ListTimeSeriesRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ListMetricDescriptorsResponse. */ - interface IListMetricDescriptorsResponse { - - /** ListMetricDescriptorsResponse metricDescriptors */ - metricDescriptors?: (google.api.IMetricDescriptor[]|null); - - /** ListMetricDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMetricDescriptorsResponse. */ - class ListMetricDescriptorsResponse implements IListMetricDescriptorsResponse { + public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest): Promise; /** - * Constructs a new ListMetricDescriptorsResponse. - * @param [properties] Properties to set + * Calls CreateTimeSeries. + * @param request CreateTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(properties?: google.monitoring.v3.IListMetricDescriptorsResponse); - - /** ListMetricDescriptorsResponse metricDescriptors. */ - public metricDescriptors: google.api.IMetricDescriptor[]; - - /** ListMetricDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest, callback: google.monitoring.v3.MetricService.CreateTimeSeriesCallback): void; /** - * Creates a new ListMetricDescriptorsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMetricDescriptorsResponse instance + * Calls CreateTimeSeries. + * @param request CreateTimeSeriesRequest message or plain object + * @returns Promise */ - public static create(properties?: google.monitoring.v3.IListMetricDescriptorsResponse): google.monitoring.v3.ListMetricDescriptorsResponse; + public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest): Promise; + } + + namespace MetricService { /** - * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @param message ListMetricDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse */ - public static encode(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) => void; /** - * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @param message ListMetricDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * @param error Error, if any + * @param [response] MonitoredResourceDescriptor */ - public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + type GetMonitoredResourceDescriptorCallback = (error: (Error|null), response?: google.api.MonitoredResourceDescriptor) => void; /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMetricDescriptorsResponse - * @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.monitoring.v3.MetricService#listMetricDescriptors}. + * @param error Error, if any + * @param [response] ListMetricDescriptorsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsResponse; + type ListMetricDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMetricDescriptorsResponse) => void; /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMetricDescriptorsResponse - * @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.monitoring.v3.MetricService#getMetricDescriptor}. + * @param error Error, if any + * @param [response] MetricDescriptor */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsResponse; + type GetMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; /** - * Verifies a ListMetricDescriptorsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * @param error Error, if any + * @param [response] MetricDescriptor */ - public static verify(message: { [k: string]: any }): (string|null); + type CreateMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; /** - * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMetricDescriptorsResponse + * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * @param error Error, if any + * @param [response] Empty */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsResponse; + type DeleteMetricDescriptorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMetricDescriptorsResponse - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * @param error Error, if any + * @param [response] ListTimeSeriesResponse */ - public static toObject(message: google.monitoring.v3.ListMetricDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.ListTimeSeriesResponse) => void; /** - * Converts this ListMetricDescriptorsResponse to JSON. - * @returns JSON object + * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * @param error Error, if any + * @param [response] Empty */ - public toJSON(): { [k: string]: any }; + type CreateTimeSeriesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Properties of a GetMetricDescriptorRequest. */ - interface IGetMetricDescriptorRequest { + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { - /** GetMetricDescriptorRequest name */ + /** ListMonitoredResourceDescriptorsRequest name */ name?: (string|null); + + /** ListMonitoredResourceDescriptorsRequest filter */ + filter?: (string|null); + + /** ListMonitoredResourceDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMonitoredResourceDescriptorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetMetricDescriptorRequest. */ - class GetMetricDescriptorRequest implements IGetMetricDescriptorRequest { + /** Represents a ListMonitoredResourceDescriptorsRequest. */ + class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { /** - * Constructs a new GetMetricDescriptorRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetMetricDescriptorRequest); + constructor(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest); - /** GetMetricDescriptorRequest name. */ + /** ListMonitoredResourceDescriptorsRequest name. */ public name: string; + /** ListMonitoredResourceDescriptorsRequest filter. */ + public filter: string; + + /** ListMonitoredResourceDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMonitoredResourceDescriptorsRequest pageToken. */ + public pageToken: string; + /** - * Creates a new GetMetricDescriptorRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetMetricDescriptorRequest instance + * @returns ListMonitoredResourceDescriptorsRequest instance */ - public static create(properties?: google.monitoring.v3.IGetMetricDescriptorRequest): google.monitoring.v3.GetMetricDescriptorRequest; + public static create(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; /** - * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. - * @param message GetMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. - * @param message GetMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMetricDescriptorRequest 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 GetMetricDescriptorRequest + * @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.monitoring.v3.GetMetricDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; /** - * Decodes a GetMetricDescriptorRequest 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 GetMetricDescriptorRequest + * @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.monitoring.v3.GetMetricDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; /** - * Verifies a GetMetricDescriptorRequest 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 GetMetricDescriptorRequest 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 GetMetricDescriptorRequest + * @returns ListMonitoredResourceDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMetricDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; /** - * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. - * @param message GetMetricDescriptorRequest + * 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.monitoring.v3.GetMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMetricDescriptorRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateMetricDescriptorRequest. */ - interface ICreateMetricDescriptorRequest { + /** Properties of a ListMonitoredResourceDescriptorsResponse. */ + interface IListMonitoredResourceDescriptorsResponse { - /** CreateMetricDescriptorRequest name */ - name?: (string|null); + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ + resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); - /** CreateMetricDescriptorRequest metricDescriptor */ - metricDescriptor?: (google.api.IMetricDescriptor|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateMetricDescriptorRequest. */ - class CreateMetricDescriptorRequest implements ICreateMetricDescriptorRequest { + /** Represents a ListMonitoredResourceDescriptorsResponse. */ + class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { /** - * Constructs a new CreateMetricDescriptorRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest); + constructor(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse); - /** CreateMetricDescriptorRequest name. */ - public name: string; + /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ + public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; - /** CreateMetricDescriptorRequest metricDescriptor. */ - public metricDescriptor?: (google.api.IMetricDescriptor|null); + /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMetricDescriptorRequest instance + * @returns ListMonitoredResourceDescriptorsResponse instance */ - public static create(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest): google.monitoring.v3.CreateMetricDescriptorRequest; + public static create(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; /** - * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. - * @param message CreateMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. - * @param message CreateMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMetricDescriptorRequest 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 CreateMetricDescriptorRequest + * @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.monitoring.v3.CreateMetricDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; /** - * Decodes a CreateMetricDescriptorRequest 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 CreateMetricDescriptorRequest + * @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.monitoring.v3.CreateMetricDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; /** - * Verifies a CreateMetricDescriptorRequest 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 CreateMetricDescriptorRequest 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 CreateMetricDescriptorRequest + * @returns ListMonitoredResourceDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateMetricDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; /** - * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. - * @param message CreateMetricDescriptorRequest + * 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.monitoring.v3.CreateMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMetricDescriptorRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteMetricDescriptorRequest. */ - interface IDeleteMetricDescriptorRequest { + /** Properties of a GetMonitoredResourceDescriptorRequest. */ + interface IGetMonitoredResourceDescriptorRequest { - /** DeleteMetricDescriptorRequest name */ + /** GetMonitoredResourceDescriptorRequest name */ name?: (string|null); } - /** Represents a DeleteMetricDescriptorRequest. */ - class DeleteMetricDescriptorRequest implements IDeleteMetricDescriptorRequest { + /** Represents a GetMonitoredResourceDescriptorRequest. */ + class GetMonitoredResourceDescriptorRequest implements IGetMonitoredResourceDescriptorRequest { /** - * Constructs a new DeleteMetricDescriptorRequest. + * Constructs a new GetMonitoredResourceDescriptorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest); + constructor(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest); - /** DeleteMetricDescriptorRequest name. */ + /** GetMonitoredResourceDescriptorRequest name. */ public name: string; /** - * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. + * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteMetricDescriptorRequest instance + * @returns GetMonitoredResourceDescriptorRequest instance */ - public static create(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static create(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; /** - * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. - * @param message DeleteMetricDescriptorRequest message or plain object to encode + * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. - * @param message DeleteMetricDescriptorRequest message or plain object to encode + * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteMetricDescriptorRequest + * @returns GetMonitoredResourceDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteMetricDescriptorRequest + * @returns GetMonitoredResourceDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; /** - * Verifies a DeleteMetricDescriptorRequest message. + * Verifies a GetMonitoredResourceDescriptorRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteMetricDescriptorRequest + * @returns GetMonitoredResourceDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; /** - * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. - * @param message DeleteMetricDescriptorRequest + * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. + * @param message GetMonitoredResourceDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DeleteMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetMonitoredResourceDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteMetricDescriptorRequest to JSON. + * Converts this GetMonitoredResourceDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTimeSeriesRequest. */ - interface IListTimeSeriesRequest { + /** Properties of a ListMetricDescriptorsRequest. */ + interface IListMetricDescriptorsRequest { - /** ListTimeSeriesRequest name */ + /** ListMetricDescriptorsRequest name */ name?: (string|null); - /** ListTimeSeriesRequest filter */ + /** ListMetricDescriptorsRequest filter */ filter?: (string|null); - /** ListTimeSeriesRequest interval */ - interval?: (google.monitoring.v3.ITimeInterval|null); - - /** ListTimeSeriesRequest aggregation */ - aggregation?: (google.monitoring.v3.IAggregation|null); - - /** ListTimeSeriesRequest orderBy */ - orderBy?: (string|null); - - /** ListTimeSeriesRequest view */ - view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); - - /** ListTimeSeriesRequest pageSize */ + /** ListMetricDescriptorsRequest pageSize */ pageSize?: (number|null); - /** ListTimeSeriesRequest pageToken */ + /** ListMetricDescriptorsRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListTimeSeriesRequest. */ - class ListTimeSeriesRequest implements IListTimeSeriesRequest { + /** Represents a ListMetricDescriptorsRequest. */ + class ListMetricDescriptorsRequest implements IListMetricDescriptorsRequest { /** - * Constructs a new ListTimeSeriesRequest. + * Constructs a new ListMetricDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListTimeSeriesRequest); + constructor(properties?: google.monitoring.v3.IListMetricDescriptorsRequest); - /** ListTimeSeriesRequest name. */ + /** ListMetricDescriptorsRequest name. */ public name: string; - /** ListTimeSeriesRequest filter. */ + /** ListMetricDescriptorsRequest filter. */ public filter: string; - /** ListTimeSeriesRequest interval. */ - public interval?: (google.monitoring.v3.ITimeInterval|null); - - /** ListTimeSeriesRequest aggregation. */ - public aggregation?: (google.monitoring.v3.IAggregation|null); - - /** ListTimeSeriesRequest orderBy. */ - public orderBy: string; - - /** ListTimeSeriesRequest view. */ - public view: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView); - - /** ListTimeSeriesRequest pageSize. */ + /** ListMetricDescriptorsRequest pageSize. */ public pageSize: number; - /** ListTimeSeriesRequest pageToken. */ + /** ListMetricDescriptorsRequest pageToken. */ public pageToken: string; /** - * Creates a new ListTimeSeriesRequest instance using the specified properties. + * Creates a new ListMetricDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTimeSeriesRequest instance + * @returns ListMetricDescriptorsRequest instance */ - public static create(properties?: google.monitoring.v3.IListTimeSeriesRequest): google.monitoring.v3.ListTimeSeriesRequest; + public static create(properties?: google.monitoring.v3.IListMetricDescriptorsRequest): google.monitoring.v3.ListMetricDescriptorsRequest; /** - * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. - * @param message ListTimeSeriesRequest message or plain object to encode + * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @param message ListMetricDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. - * @param message ListTimeSeriesRequest message or plain object to encode + * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @param message ListMetricDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTimeSeriesRequest + * @returns ListMetricDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsRequest; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTimeSeriesRequest + * @returns ListMetricDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsRequest; /** - * Verifies a ListTimeSeriesRequest message. + * Verifies a ListMetricDescriptorsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTimeSeriesRequest + * @returns ListMetricDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsRequest; /** - * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. - * @param message ListTimeSeriesRequest + * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMetricDescriptorsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListMetricDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTimeSeriesRequest to JSON. + * Converts this ListMetricDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListTimeSeriesRequest { - - /** TimeSeriesView enum. */ - enum TimeSeriesView { - FULL = 0, - HEADERS = 1 - } - } - - /** Properties of a ListTimeSeriesResponse. */ - interface IListTimeSeriesResponse { + /** Properties of a ListMetricDescriptorsResponse. */ + interface IListMetricDescriptorsResponse { - /** ListTimeSeriesResponse timeSeries */ - timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + /** ListMetricDescriptorsResponse metricDescriptors */ + metricDescriptors?: (google.api.IMetricDescriptor[]|null); - /** ListTimeSeriesResponse nextPageToken */ + /** ListMetricDescriptorsResponse nextPageToken */ nextPageToken?: (string|null); - - /** ListTimeSeriesResponse executionErrors */ - executionErrors?: (google.rpc.IStatus[]|null); } - /** Represents a ListTimeSeriesResponse. */ - class ListTimeSeriesResponse implements IListTimeSeriesResponse { + /** Represents a ListMetricDescriptorsResponse. */ + class ListMetricDescriptorsResponse implements IListMetricDescriptorsResponse { /** - * Constructs a new ListTimeSeriesResponse. + * Constructs a new ListMetricDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListTimeSeriesResponse); + constructor(properties?: google.monitoring.v3.IListMetricDescriptorsResponse); - /** ListTimeSeriesResponse timeSeries. */ - public timeSeries: google.monitoring.v3.ITimeSeries[]; + /** ListMetricDescriptorsResponse metricDescriptors. */ + public metricDescriptors: google.api.IMetricDescriptor[]; - /** ListTimeSeriesResponse nextPageToken. */ + /** ListMetricDescriptorsResponse nextPageToken. */ public nextPageToken: string; - /** ListTimeSeriesResponse executionErrors. */ - public executionErrors: google.rpc.IStatus[]; - /** - * Creates a new ListTimeSeriesResponse instance using the specified properties. + * Creates a new ListMetricDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListTimeSeriesResponse instance + * @returns ListMetricDescriptorsResponse instance */ - public static create(properties?: google.monitoring.v3.IListTimeSeriesResponse): google.monitoring.v3.ListTimeSeriesResponse; + public static create(properties?: google.monitoring.v3.IListMetricDescriptorsResponse): google.monitoring.v3.ListMetricDescriptorsResponse; /** - * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. - * @param message ListTimeSeriesResponse message or plain object to encode + * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @param message ListMetricDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. - * @param message ListTimeSeriesResponse message or plain object to encode + * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @param message ListMetricDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTimeSeriesResponse + * @returns ListMetricDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsResponse; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTimeSeriesResponse + * @returns ListMetricDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsResponse; /** - * Verifies a ListTimeSeriesResponse message. + * Verifies a ListMetricDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTimeSeriesResponse + * @returns ListMetricDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsResponse; /** - * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. - * @param message ListTimeSeriesResponse + * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMetricDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListTimeSeriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListMetricDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTimeSeriesResponse to JSON. + * Converts this ListMetricDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTimeSeriesRequest. */ - interface ICreateTimeSeriesRequest { + /** Properties of a GetMetricDescriptorRequest. */ + interface IGetMetricDescriptorRequest { - /** CreateTimeSeriesRequest name */ + /** GetMetricDescriptorRequest name */ name?: (string|null); - - /** CreateTimeSeriesRequest timeSeries */ - timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); } - /** Represents a CreateTimeSeriesRequest. */ - class CreateTimeSeriesRequest implements ICreateTimeSeriesRequest { + /** Represents a GetMetricDescriptorRequest. */ + class GetMetricDescriptorRequest implements IGetMetricDescriptorRequest { /** - * Constructs a new CreateTimeSeriesRequest. + * Constructs a new GetMetricDescriptorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateTimeSeriesRequest); + constructor(properties?: google.monitoring.v3.IGetMetricDescriptorRequest); - /** CreateTimeSeriesRequest name. */ + /** GetMetricDescriptorRequest name. */ public name: string; - /** CreateTimeSeriesRequest timeSeries. */ - public timeSeries: google.monitoring.v3.ITimeSeries[]; - /** - * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * Creates a new GetMetricDescriptorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTimeSeriesRequest instance + * @returns GetMetricDescriptorRequest instance */ - public static create(properties?: google.monitoring.v3.ICreateTimeSeriesRequest): google.monitoring.v3.CreateTimeSeriesRequest; + public static create(properties?: google.monitoring.v3.IGetMetricDescriptorRequest): google.monitoring.v3.GetMetricDescriptorRequest; /** - * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. - * @param message CreateTimeSeriesRequest message or plain object to encode + * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @param message GetMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. - * @param message CreateTimeSeriesRequest message or plain object to encode + * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @param message GetMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTimeSeriesRequest + * @returns GetMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMetricDescriptorRequest; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTimeSeriesRequest + * @returns GetMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMetricDescriptorRequest; /** - * Verifies a CreateTimeSeriesRequest message. + * Verifies a GetMetricDescriptorRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTimeSeriesRequest + * @returns GetMetricDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMetricDescriptorRequest; /** - * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. - * @param message CreateTimeSeriesRequest + * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message GetMetricDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTimeSeriesRequest to JSON. + * Converts this GetMetricDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTimeSeriesError. */ - interface ICreateTimeSeriesError { + /** Properties of a CreateMetricDescriptorRequest. */ + interface ICreateMetricDescriptorRequest { - /** CreateTimeSeriesError timeSeries */ - timeSeries?: (google.monitoring.v3.ITimeSeries|null); + /** CreateMetricDescriptorRequest name */ + name?: (string|null); - /** CreateTimeSeriesError status */ - status?: (google.rpc.IStatus|null); + /** CreateMetricDescriptorRequest metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); } - /** Represents a CreateTimeSeriesError. */ - class CreateTimeSeriesError implements ICreateTimeSeriesError { + /** Represents a CreateMetricDescriptorRequest. */ + class CreateMetricDescriptorRequest implements ICreateMetricDescriptorRequest { /** - * Constructs a new CreateTimeSeriesError. + * Constructs a new CreateMetricDescriptorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateTimeSeriesError); + constructor(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest); - /** CreateTimeSeriesError timeSeries. */ - public timeSeries?: (google.monitoring.v3.ITimeSeries|null); + /** CreateMetricDescriptorRequest name. */ + public name: string; - /** CreateTimeSeriesError status. */ - public status?: (google.rpc.IStatus|null); + /** CreateMetricDescriptorRequest metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); /** - * Creates a new CreateTimeSeriesError instance using the specified properties. + * Creates a new CreateMetricDescriptorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTimeSeriesError instance + * @returns CreateMetricDescriptorRequest instance */ - public static create(properties?: google.monitoring.v3.ICreateTimeSeriesError): google.monitoring.v3.CreateTimeSeriesError; + public static create(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. - * @param message CreateTimeSeriesError message or plain object to encode + * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @param message CreateMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. - * @param message CreateTimeSeriesError message or plain object to encode + * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @param message CreateMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTimeSeriesError + * @returns CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTimeSeriesError + * @returns CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Verifies a CreateTimeSeriesError message. + * Verifies a CreateMetricDescriptorRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTimeSeriesError + * @returns CreateMetricDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesError; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. - * @param message CreateTimeSeriesError + * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message CreateMetricDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTimeSeriesError to JSON. + * Converts this CreateMetricDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTimeSeriesSummary. */ - interface ICreateTimeSeriesSummary { - - /** CreateTimeSeriesSummary totalPointCount */ - totalPointCount?: (number|null); - - /** CreateTimeSeriesSummary successPointCount */ - successPointCount?: (number|null); + /** Properties of a DeleteMetricDescriptorRequest. */ + interface IDeleteMetricDescriptorRequest { - /** CreateTimeSeriesSummary errors */ - errors?: (google.monitoring.v3.CreateTimeSeriesSummary.IError[]|null); + /** DeleteMetricDescriptorRequest name */ + name?: (string|null); } - /** Represents a CreateTimeSeriesSummary. */ - class CreateTimeSeriesSummary implements ICreateTimeSeriesSummary { + /** Represents a DeleteMetricDescriptorRequest. */ + class DeleteMetricDescriptorRequest implements IDeleteMetricDescriptorRequest { /** - * Constructs a new CreateTimeSeriesSummary. + * Constructs a new DeleteMetricDescriptorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateTimeSeriesSummary); - - /** CreateTimeSeriesSummary totalPointCount. */ - public totalPointCount: number; - - /** CreateTimeSeriesSummary successPointCount. */ - public successPointCount: number; + constructor(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest); - /** CreateTimeSeriesSummary errors. */ - public errors: google.monitoring.v3.CreateTimeSeriesSummary.IError[]; + /** DeleteMetricDescriptorRequest name. */ + public name: string; /** - * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTimeSeriesSummary instance + * @returns DeleteMetricDescriptorRequest instance */ - public static create(properties?: google.monitoring.v3.ICreateTimeSeriesSummary): google.monitoring.v3.CreateTimeSeriesSummary; + public static create(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. - * @param message CreateTimeSeriesSummary message or plain object to encode + * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @param message DeleteMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. - * @param message CreateTimeSeriesSummary message or plain object to encode + * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @param message DeleteMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTimeSeriesSummary + * @returns DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTimeSeriesSummary + * @returns DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Verifies a CreateTimeSeriesSummary message. + * Verifies a DeleteMetricDescriptorRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTimeSeriesSummary + * @returns DeleteMetricDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. - * @param message CreateTimeSeriesSummary + * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message DeleteMetricDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.DeleteMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTimeSeriesSummary to JSON. + * Converts this DeleteMetricDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CreateTimeSeriesSummary { - - /** Properties of an Error. */ - interface IError { - - /** Error status */ - status?: (google.rpc.IStatus|null); - - /** Error pointCount */ - pointCount?: (number|null); - } - - /** Represents an Error. */ - class Error implements IError { - - /** - * Constructs a new Error. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError); + /** Properties of a ListTimeSeriesRequest. */ + interface IListTimeSeriesRequest { - /** Error status. */ - public status?: (google.rpc.IStatus|null); + /** ListTimeSeriesRequest name */ + name?: (string|null); - /** Error pointCount. */ - public pointCount: number; + /** ListTimeSeriesRequest filter */ + filter?: (string|null); - /** - * Creates a new Error instance using the specified properties. - * @param [properties] Properties to set - * @returns Error instance - */ - public static create(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError): google.monitoring.v3.CreateTimeSeriesSummary.Error; + /** ListTimeSeriesRequest interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); - /** - * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListTimeSeriesRequest aggregation */ + aggregation?: (google.monitoring.v3.IAggregation|null); - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListTimeSeriesRequest orderBy */ + orderBy?: (string|null); - /** - * Decodes an Error message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary.Error; + /** ListTimeSeriesRequest view */ + view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary.Error; + /** ListTimeSeriesRequest pageSize */ + pageSize?: (number|null); - /** - * Verifies an Error message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListTimeSeriesRequest pageToken */ + pageToken?: (string|null); + } - /** - * Creates an Error message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Error - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary.Error; + /** Represents a ListTimeSeriesRequest. */ + class ListTimeSeriesRequest implements IListTimeSeriesRequest { - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @param message Error - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListTimeSeriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListTimeSeriesRequest); - /** - * Converts this Error to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ListTimeSeriesRequest name. */ + public name: string; - /** Properties of a Point. */ - interface IPoint { + /** ListTimeSeriesRequest filter. */ + public filter: string; - /** Point interval */ - interval?: (google.monitoring.v3.ITimeInterval|null); + /** ListTimeSeriesRequest interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); - /** Point value */ - value?: (google.monitoring.v3.ITypedValue|null); - } + /** ListTimeSeriesRequest aggregation. */ + public aggregation?: (google.monitoring.v3.IAggregation|null); - /** Represents a Point. */ - class Point implements IPoint { + /** ListTimeSeriesRequest orderBy. */ + public orderBy: string; - /** - * Constructs a new Point. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IPoint); + /** ListTimeSeriesRequest view. */ + public view: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView); - /** Point interval. */ - public interval?: (google.monitoring.v3.ITimeInterval|null); + /** ListTimeSeriesRequest pageSize. */ + public pageSize: number; - /** Point value. */ - public value?: (google.monitoring.v3.ITypedValue|null); + /** ListTimeSeriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new Point instance using the specified properties. + * Creates a new ListTimeSeriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Point instance + * @returns ListTimeSeriesRequest instance */ - public static create(properties?: google.monitoring.v3.IPoint): google.monitoring.v3.Point; + public static create(properties?: google.monitoring.v3.IListTimeSeriesRequest): google.monitoring.v3.ListTimeSeriesRequest; /** - * Encodes the specified Point message. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. - * @param message Point message or plain object to encode + * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @param message ListTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. - * @param message Point message or plain object to encode + * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @param message ListTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Point message from the specified reader or buffer. + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Point + * @returns ListTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Point; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesRequest; /** - * Decodes a Point message from the specified reader or buffer, length delimited. + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Point + * @returns ListTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Point; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesRequest; /** - * Verifies a Point message. + * Verifies a ListTimeSeriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. + * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Point + * @returns ListTimeSeriesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Point; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesRequest; /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @param message Point + * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. + * @param message ListTimeSeriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Point to JSON. + * Converts this ListTimeSeriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeSeries. */ - interface ITimeSeries { - - /** TimeSeries metric */ - metric?: (google.api.IMetric|null); + namespace ListTimeSeriesRequest { - /** TimeSeries resource */ - resource?: (google.api.IMonitoredResource|null); + /** TimeSeriesView enum. */ + enum TimeSeriesView { + FULL = 0, + HEADERS = 1 + } + } - /** TimeSeries metadata */ - metadata?: (google.api.IMonitoredResourceMetadata|null); + /** Properties of a ListTimeSeriesResponse. */ + interface IListTimeSeriesResponse { - /** TimeSeries metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + /** ListTimeSeriesResponse timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); - /** TimeSeries valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + /** ListTimeSeriesResponse nextPageToken */ + nextPageToken?: (string|null); - /** TimeSeries points */ - points?: (google.monitoring.v3.IPoint[]|null); + /** ListTimeSeriesResponse executionErrors */ + executionErrors?: (google.rpc.IStatus[]|null); } - /** Represents a TimeSeries. */ - class TimeSeries implements ITimeSeries { + /** Represents a ListTimeSeriesResponse. */ + class ListTimeSeriesResponse implements IListTimeSeriesResponse { /** - * Constructs a new TimeSeries. + * Constructs a new ListTimeSeriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ITimeSeries); - - /** TimeSeries metric. */ - public metric?: (google.api.IMetric|null); - - /** TimeSeries resource. */ - public resource?: (google.api.IMonitoredResource|null); - - /** TimeSeries metadata. */ - public metadata?: (google.api.IMonitoredResourceMetadata|null); + constructor(properties?: google.monitoring.v3.IListTimeSeriesResponse); - /** TimeSeries metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + /** ListTimeSeriesResponse timeSeries. */ + public timeSeries: google.monitoring.v3.ITimeSeries[]; - /** TimeSeries valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + /** ListTimeSeriesResponse nextPageToken. */ + public nextPageToken: string; - /** TimeSeries points. */ - public points: google.monitoring.v3.IPoint[]; + /** ListTimeSeriesResponse executionErrors. */ + public executionErrors: google.rpc.IStatus[]; /** - * Creates a new TimeSeries instance using the specified properties. + * Creates a new ListTimeSeriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSeries instance + * @returns ListTimeSeriesResponse instance */ - public static create(properties?: google.monitoring.v3.ITimeSeries): google.monitoring.v3.TimeSeries; + public static create(properties?: google.monitoring.v3.IListTimeSeriesResponse): google.monitoring.v3.ListTimeSeriesResponse; /** - * Encodes the specified TimeSeries message. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. - * @param message TimeSeries message or plain object to encode + * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @param message ListTimeSeriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. - * @param message TimeSeries message or plain object to encode + * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @param message ListTimeSeriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSeries message from the specified reader or buffer. + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSeries + * @returns ListTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeries; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesResponse; /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSeries + * @returns ListTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeries; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesResponse; /** - * Verifies a TimeSeries message. + * Verifies a ListTimeSeriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSeries + * @returns ListTimeSeriesResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeries; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesResponse; /** - * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. - * @param message TimeSeries + * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * @param message ListTimeSeriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListTimeSeriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSeries to JSON. + * Converts this ListTimeSeriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a NotificationChannelService */ - class NotificationChannelService extends $protobuf.rpc.Service { + /** Properties of a CreateTimeSeriesRequest. */ + interface ICreateTimeSeriesRequest { - /** - * Constructs a new NotificationChannelService 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); + /** CreateTimeSeriesRequest name */ + name?: (string|null); - /** - * Creates new NotificationChannelService 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): NotificationChannelService; + /** CreateTimeSeriesRequest timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + } + + /** Represents a CreateTimeSeriesRequest. */ + class CreateTimeSeriesRequest implements ICreateTimeSeriesRequest { /** - * Calls ListNotificationChannelDescriptors. - * @param request ListNotificationChannelDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNotificationChannelDescriptorsResponse + * Constructs a new CreateTimeSeriesRequest. + * @param [properties] Properties to set */ - public listNotificationChannelDescriptors(request: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, callback: google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptorsCallback): void; + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesRequest); + + /** CreateTimeSeriesRequest name. */ + public name: string; + + /** CreateTimeSeriesRequest timeSeries. */ + public timeSeries: google.monitoring.v3.ITimeSeries[]; /** - * Calls ListNotificationChannelDescriptors. - * @param request ListNotificationChannelDescriptorsRequest message or plain object - * @returns Promise + * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTimeSeriesRequest instance */ - public listNotificationChannelDescriptors(request: google.monitoring.v3.IListNotificationChannelDescriptorsRequest): Promise; + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesRequest): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Calls GetNotificationChannelDescriptor. - * @param request GetNotificationChannelDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationChannelDescriptor + * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @param message CreateTimeSeriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getNotificationChannelDescriptor(request: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptorCallback): void; + public static encode(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetNotificationChannelDescriptor. - * @param request GetNotificationChannelDescriptorRequest message or plain object - * @returns Promise + * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @param message CreateTimeSeriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getNotificationChannelDescriptor(request: google.monitoring.v3.IGetNotificationChannelDescriptorRequest): Promise; + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListNotificationChannels. - * @param request ListNotificationChannelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListNotificationChannelsResponse + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listNotificationChannels(request: google.monitoring.v3.IListNotificationChannelsRequest, callback: google.monitoring.v3.NotificationChannelService.ListNotificationChannelsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Calls ListNotificationChannels. - * @param request ListNotificationChannelsRequest message or plain object - * @returns Promise + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listNotificationChannels(request: google.monitoring.v3.IListNotificationChannelsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Calls GetNotificationChannel. - * @param request GetNotificationChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationChannel + * Verifies a CreateTimeSeriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getNotificationChannel(request: google.monitoring.v3.IGetNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetNotificationChannel. - * @param request GetNotificationChannelRequest message or plain object - * @returns Promise + * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTimeSeriesRequest */ - public getNotificationChannel(request: google.monitoring.v3.IGetNotificationChannelRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Calls CreateNotificationChannel. - * @param request CreateNotificationChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationChannel + * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * @param message CreateTimeSeriesRequest + * @param [options] Conversion options + * @returns Plain object */ - public createNotificationChannel(request: google.monitoring.v3.ICreateNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.CreateNotificationChannelCallback): void; + public static toObject(message: google.monitoring.v3.CreateTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CreateNotificationChannel. - * @param request CreateNotificationChannelRequest message or plain object - * @returns Promise + * Converts this CreateTimeSeriesRequest to JSON. + * @returns JSON object */ - public createNotificationChannel(request: google.monitoring.v3.ICreateNotificationChannelRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateTimeSeriesError. */ + interface ICreateTimeSeriesError { + + /** CreateTimeSeriesError timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries|null); + + /** CreateTimeSeriesError status */ + status?: (google.rpc.IStatus|null); + } + + /** Represents a CreateTimeSeriesError. */ + class CreateTimeSeriesError implements ICreateTimeSeriesError { /** - * Calls UpdateNotificationChannel. - * @param request UpdateNotificationChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationChannel + * Constructs a new CreateTimeSeriesError. + * @param [properties] Properties to set */ - public updateNotificationChannel(request: google.monitoring.v3.IUpdateNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.UpdateNotificationChannelCallback): void; + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesError); + + /** CreateTimeSeriesError timeSeries. */ + public timeSeries?: (google.monitoring.v3.ITimeSeries|null); + + /** CreateTimeSeriesError status. */ + public status?: (google.rpc.IStatus|null); /** - * Calls UpdateNotificationChannel. - * @param request UpdateNotificationChannelRequest message or plain object - * @returns Promise + * Creates a new CreateTimeSeriesError instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTimeSeriesError instance */ - public updateNotificationChannel(request: google.monitoring.v3.IUpdateNotificationChannelRequest): Promise; + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesError): google.monitoring.v3.CreateTimeSeriesError; /** - * Calls DeleteNotificationChannel. - * @param request DeleteNotificationChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @param message CreateTimeSeriesError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteNotificationChannel(request: google.monitoring.v3.IDeleteNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.DeleteNotificationChannelCallback): void; + public static encode(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteNotificationChannel. - * @param request DeleteNotificationChannelRequest message or plain object - * @returns Promise + * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @param message CreateTimeSeriesError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteNotificationChannel(request: google.monitoring.v3.IDeleteNotificationChannelRequest): Promise; + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls SendNotificationChannelVerificationCode. - * @param request SendNotificationChannelVerificationCodeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public sendNotificationChannelVerificationCode(request: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, callback: google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCodeCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesError; /** - * Calls SendNotificationChannelVerificationCode. - * @param request SendNotificationChannelVerificationCodeRequest message or plain object - * @returns Promise + * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public sendNotificationChannelVerificationCode(request: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesError; /** - * Calls GetNotificationChannelVerificationCode. - * @param request GetNotificationChannelVerificationCodeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetNotificationChannelVerificationCodeResponse + * Verifies a CreateTimeSeriesError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getNotificationChannelVerificationCode(request: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCodeCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetNotificationChannelVerificationCode. - * @param request GetNotificationChannelVerificationCodeRequest message or plain object - * @returns Promise + * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTimeSeriesError */ - public getNotificationChannelVerificationCode(request: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesError; /** - * Calls VerifyNotificationChannel. - * @param request VerifyNotificationChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NotificationChannel + * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * @param message CreateTimeSeriesError + * @param [options] Conversion options + * @returns Plain object */ - public verifyNotificationChannel(request: google.monitoring.v3.IVerifyNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.VerifyNotificationChannelCallback): void; + public static toObject(message: google.monitoring.v3.CreateTimeSeriesError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls VerifyNotificationChannel. - * @param request VerifyNotificationChannelRequest message or plain object - * @returns Promise + * Converts this CreateTimeSeriesError to JSON. + * @returns JSON object */ - public verifyNotificationChannel(request: google.monitoring.v3.IVerifyNotificationChannelRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace NotificationChannelService { + /** Properties of a CreateTimeSeriesSummary. */ + interface ICreateTimeSeriesSummary { + + /** CreateTimeSeriesSummary totalPointCount */ + totalPointCount?: (number|null); + + /** CreateTimeSeriesSummary successPointCount */ + successPointCount?: (number|null); + + /** CreateTimeSeriesSummary errors */ + errors?: (google.monitoring.v3.CreateTimeSeriesSummary.IError[]|null); + } + + /** Represents a CreateTimeSeriesSummary. */ + class CreateTimeSeriesSummary implements ICreateTimeSeriesSummary { /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. - * @param error Error, if any - * @param [response] ListNotificationChannelDescriptorsResponse + * Constructs a new CreateTimeSeriesSummary. + * @param [properties] Properties to set */ - type ListNotificationChannelDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelDescriptorsResponse) => void; + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesSummary); + + /** CreateTimeSeriesSummary totalPointCount. */ + public totalPointCount: number; + + /** CreateTimeSeriesSummary successPointCount. */ + public successPointCount: number; + + /** CreateTimeSeriesSummary errors. */ + public errors: google.monitoring.v3.CreateTimeSeriesSummary.IError[]; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. - * @param error Error, if any - * @param [response] NotificationChannelDescriptor + * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTimeSeriesSummary instance */ - type GetNotificationChannelDescriptorCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannelDescriptor) => void; + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesSummary): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. - * @param error Error, if any - * @param [response] ListNotificationChannelsResponse + * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @param message CreateTimeSeriesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListNotificationChannelsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelsResponse) => void; + public static encode(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. - * @param error Error, if any - * @param [response] NotificationChannel + * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @param message CreateTimeSeriesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. - * @param error Error, if any - * @param [response] NotificationChannel + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#updateNotificationChannel}. - * @param error Error, if any - * @param [response] NotificationChannel + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type UpdateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. - * @param error Error, if any - * @param [response] Empty + * Verifies a CreateTimeSeriesSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteNotificationChannelCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. - * @param error Error, if any - * @param [response] Empty + * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTimeSeriesSummary */ - type SendNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. - * @param error Error, if any - * @param [response] GetNotificationChannelVerificationCodeResponse + * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * @param message CreateTimeSeriesSummary + * @param [options] Conversion options + * @returns Plain object */ - type GetNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) => void; + public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. - * @param error Error, if any - * @param [response] NotificationChannel + * Converts this CreateTimeSeriesSummary to JSON. + * @returns JSON object */ - type VerifyNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a ListNotificationChannelDescriptorsRequest. */ - interface IListNotificationChannelDescriptorsRequest { + namespace CreateTimeSeriesSummary { - /** ListNotificationChannelDescriptorsRequest name */ + /** Properties of an Error. */ + interface IError { + + /** Error status */ + status?: (google.rpc.IStatus|null); + + /** Error pointCount */ + pointCount?: (number|null); + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError); + + /** Error status. */ + public status?: (google.rpc.IStatus|null); + + /** Error pointCount. */ + public pointCount: number; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Verifies an Error message. + * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a NotificationChannelDescriptor. */ + interface INotificationChannelDescriptor { + + /** NotificationChannelDescriptor name */ name?: (string|null); - /** ListNotificationChannelDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** NotificationChannelDescriptor type */ + type?: (string|null); + + /** NotificationChannelDescriptor displayName */ + displayName?: (string|null); + + /** NotificationChannelDescriptor description */ + description?: (string|null); + + /** NotificationChannelDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); - /** ListNotificationChannelDescriptorsRequest pageToken */ - pageToken?: (string|null); + /** NotificationChannelDescriptor supportedTiers */ + supportedTiers?: (google.monitoring.v3.ServiceTier[]|null); + + /** NotificationChannelDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); } - /** Represents a ListNotificationChannelDescriptorsRequest. */ - class ListNotificationChannelDescriptorsRequest implements IListNotificationChannelDescriptorsRequest { + /** Represents a NotificationChannelDescriptor. */ + class NotificationChannelDescriptor implements INotificationChannelDescriptor { /** - * Constructs a new ListNotificationChannelDescriptorsRequest. + * Constructs a new NotificationChannelDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsRequest); + constructor(properties?: google.monitoring.v3.INotificationChannelDescriptor); - /** ListNotificationChannelDescriptorsRequest name. */ + /** NotificationChannelDescriptor name. */ public name: string; - /** ListNotificationChannelDescriptorsRequest pageSize. */ - public pageSize: number; + /** NotificationChannelDescriptor type. */ + public type: string; - /** ListNotificationChannelDescriptorsRequest pageToken. */ - public pageToken: string; + /** NotificationChannelDescriptor displayName. */ + public displayName: string; + + /** NotificationChannelDescriptor description. */ + public description: string; + + /** NotificationChannelDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** NotificationChannelDescriptor supportedTiers. */ + public supportedTiers: google.monitoring.v3.ServiceTier[]; + + /** NotificationChannelDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); /** - * Creates a new ListNotificationChannelDescriptorsRequest instance using the specified properties. + * Creates a new NotificationChannelDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotificationChannelDescriptorsRequest instance + * @returns NotificationChannelDescriptor instance */ - public static create(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsRequest): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + public static create(properties?: google.monitoring.v3.INotificationChannelDescriptor): google.monitoring.v3.NotificationChannelDescriptor; /** - * Encodes the specified ListNotificationChannelDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. - * @param message ListNotificationChannelDescriptorsRequest message or plain object to encode + * Encodes the specified NotificationChannelDescriptor message. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * @param message NotificationChannelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.INotificationChannelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNotificationChannelDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. - * @param message ListNotificationChannelDescriptorsRequest message or plain object to encode + * Encodes the specified NotificationChannelDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * @param message NotificationChannelDescriptor message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.INotificationChannelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer. + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNotificationChannelDescriptorsRequest + * @returns NotificationChannelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.NotificationChannelDescriptor; /** - * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNotificationChannelDescriptorsRequest + * @returns NotificationChannelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.NotificationChannelDescriptor; /** - * Verifies a ListNotificationChannelDescriptorsRequest message. + * Verifies a NotificationChannelDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListNotificationChannelDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationChannelDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNotificationChannelDescriptorsRequest + * @returns NotificationChannelDescriptor */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.NotificationChannelDescriptor; /** - * Creates a plain object from a ListNotificationChannelDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListNotificationChannelDescriptorsRequest + * Creates a plain object from a NotificationChannelDescriptor message. Also converts values to other types if specified. + * @param message NotificationChannelDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListNotificationChannelDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.NotificationChannelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotificationChannelDescriptorsRequest to JSON. + * Converts this NotificationChannelDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListNotificationChannelDescriptorsResponse. */ - interface IListNotificationChannelDescriptorsResponse { - - /** ListNotificationChannelDescriptorsResponse channelDescriptors */ - channelDescriptors?: (google.monitoring.v3.INotificationChannelDescriptor[]|null); - - /** ListNotificationChannelDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Properties of a NotificationChannel. */ + interface INotificationChannel { - /** Represents a ListNotificationChannelDescriptorsResponse. */ - class ListNotificationChannelDescriptorsResponse implements IListNotificationChannelDescriptorsResponse { + /** NotificationChannel type */ + type?: (string|null); - /** - * Constructs a new ListNotificationChannelDescriptorsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsResponse); + /** NotificationChannel name */ + name?: (string|null); - /** ListNotificationChannelDescriptorsResponse channelDescriptors. */ - public channelDescriptors: google.monitoring.v3.INotificationChannelDescriptor[]; + /** NotificationChannel displayName */ + displayName?: (string|null); - /** ListNotificationChannelDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** NotificationChannel description */ + description?: (string|null); - /** - * Creates a new ListNotificationChannelDescriptorsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNotificationChannelDescriptorsResponse instance - */ - public static create(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsResponse): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + /** NotificationChannel labels */ + labels?: ({ [k: string]: string }|null); - /** - * Encodes the specified ListNotificationChannelDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. - * @param message ListNotificationChannelDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListNotificationChannelDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** NotificationChannel userLabels */ + userLabels?: ({ [k: string]: string }|null); - /** - * Encodes the specified ListNotificationChannelDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. - * @param message ListNotificationChannelDescriptorsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** NotificationChannel verificationStatus */ + verificationStatus?: (google.monitoring.v3.NotificationChannel.VerificationStatus|keyof typeof google.monitoring.v3.NotificationChannel.VerificationStatus|null); - /** - * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNotificationChannelDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + /** NotificationChannel enabled */ + enabled?: (google.protobuf.IBoolValue|null); + } - /** - * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNotificationChannelDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + /** Represents a NotificationChannel. */ + class NotificationChannel implements INotificationChannel { /** - * Verifies a ListNotificationChannelDescriptorsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new NotificationChannel. + * @param [properties] Properties to set */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(properties?: google.monitoring.v3.INotificationChannel); - /** - * Creates a ListNotificationChannelDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNotificationChannelDescriptorsResponse - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; + /** NotificationChannel type. */ + public type: string; - /** - * Creates a plain object from a ListNotificationChannelDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListNotificationChannelDescriptorsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListNotificationChannelDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** NotificationChannel name. */ + public name: string; - /** - * Converts this ListNotificationChannelDescriptorsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** NotificationChannel displayName. */ + public displayName: string; - /** Properties of a GetNotificationChannelDescriptorRequest. */ - interface IGetNotificationChannelDescriptorRequest { + /** NotificationChannel description. */ + public description: string; - /** GetNotificationChannelDescriptorRequest name */ - name?: (string|null); - } + /** NotificationChannel labels. */ + public labels: { [k: string]: string }; - /** Represents a GetNotificationChannelDescriptorRequest. */ - class GetNotificationChannelDescriptorRequest implements IGetNotificationChannelDescriptorRequest { + /** NotificationChannel userLabels. */ + public userLabels: { [k: string]: string }; - /** - * Constructs a new GetNotificationChannelDescriptorRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IGetNotificationChannelDescriptorRequest); + /** NotificationChannel verificationStatus. */ + public verificationStatus: (google.monitoring.v3.NotificationChannel.VerificationStatus|keyof typeof google.monitoring.v3.NotificationChannel.VerificationStatus); - /** GetNotificationChannelDescriptorRequest name. */ - public name: string; + /** NotificationChannel enabled. */ + public enabled?: (google.protobuf.IBoolValue|null); /** - * Creates a new GetNotificationChannelDescriptorRequest instance using the specified properties. + * Creates a new NotificationChannel instance using the specified properties. * @param [properties] Properties to set - * @returns GetNotificationChannelDescriptorRequest instance + * @returns NotificationChannel instance */ - public static create(properties?: google.monitoring.v3.IGetNotificationChannelDescriptorRequest): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + public static create(properties?: google.monitoring.v3.INotificationChannel): google.monitoring.v3.NotificationChannel; /** - * Encodes the specified GetNotificationChannelDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. - * @param message GetNotificationChannelDescriptorRequest message or plain object to encode + * Encodes the specified NotificationChannel message. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * @param message NotificationChannel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.INotificationChannel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNotificationChannelDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. - * @param message GetNotificationChannelDescriptorRequest message or plain object to encode + * Encodes the specified NotificationChannel message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * @param message NotificationChannel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.INotificationChannel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer. + * Decodes a NotificationChannel message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNotificationChannelDescriptorRequest + * @returns NotificationChannel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.NotificationChannel; /** - * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a NotificationChannel message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNotificationChannelDescriptorRequest + * @returns NotificationChannel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.NotificationChannel; /** - * Verifies a GetNotificationChannelDescriptorRequest message. + * Verifies a NotificationChannel message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetNotificationChannelDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationChannel message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNotificationChannelDescriptorRequest + * @returns NotificationChannel */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.NotificationChannel; /** - * Creates a plain object from a GetNotificationChannelDescriptorRequest message. Also converts values to other types if specified. - * @param message GetNotificationChannelDescriptorRequest + * Creates a plain object from a NotificationChannel message. Also converts values to other types if specified. + * @param message NotificationChannel * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetNotificationChannelDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.NotificationChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNotificationChannelDescriptorRequest to JSON. + * Converts this NotificationChannel to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateNotificationChannelRequest. */ - interface ICreateNotificationChannelRequest { - - /** CreateNotificationChannelRequest name */ - name?: (string|null); + namespace NotificationChannel { - /** CreateNotificationChannelRequest notificationChannel */ - notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + /** VerificationStatus enum. */ + enum VerificationStatus { + VERIFICATION_STATUS_UNSPECIFIED = 0, + UNVERIFIED = 1, + VERIFIED = 2 + } } - /** Represents a CreateNotificationChannelRequest. */ - class CreateNotificationChannelRequest implements ICreateNotificationChannelRequest { + /** Represents a NotificationChannelService */ + class NotificationChannelService extends $protobuf.rpc.Service { /** - * Constructs a new CreateNotificationChannelRequest. - * @param [properties] Properties to set + * Constructs a new NotificationChannelService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.monitoring.v3.ICreateNotificationChannelRequest); - - /** CreateNotificationChannelRequest name. */ - public name: string; - - /** CreateNotificationChannelRequest notificationChannel. */ - public notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new CreateNotificationChannelRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateNotificationChannelRequest instance + * Creates new NotificationChannelService 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.monitoring.v3.ICreateNotificationChannelRequest): google.monitoring.v3.CreateNotificationChannelRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): NotificationChannelService; /** - * Encodes the specified CreateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. - * @param message CreateNotificationChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListNotificationChannelDescriptors. + * @param request ListNotificationChannelDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotificationChannelDescriptorsResponse */ - public static encode(message: google.monitoring.v3.ICreateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listNotificationChannelDescriptors(request: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, callback: google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptorsCallback): void; /** - * Encodes the specified CreateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. - * @param message CreateNotificationChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListNotificationChannelDescriptors. + * @param request ListNotificationChannelDescriptorsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.monitoring.v3.ICreateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listNotificationChannelDescriptors(request: google.monitoring.v3.IListNotificationChannelDescriptorsRequest): Promise; /** - * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateNotificationChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetNotificationChannelDescriptor. + * @param request GetNotificationChannelDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannelDescriptor */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateNotificationChannelRequest; + public getNotificationChannelDescriptor(request: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptorCallback): void; /** - * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateNotificationChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetNotificationChannelDescriptor. + * @param request GetNotificationChannelDescriptorRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateNotificationChannelRequest; + public getNotificationChannelDescriptor(request: google.monitoring.v3.IGetNotificationChannelDescriptorRequest): Promise; /** - * Verifies a CreateNotificationChannelRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListNotificationChannels. + * @param request ListNotificationChannelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListNotificationChannelsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listNotificationChannels(request: google.monitoring.v3.IListNotificationChannelsRequest, callback: google.monitoring.v3.NotificationChannelService.ListNotificationChannelsCallback): void; /** - * Creates a CreateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateNotificationChannelRequest + * Calls ListNotificationChannels. + * @param request ListNotificationChannelsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateNotificationChannelRequest; + public listNotificationChannels(request: google.monitoring.v3.IListNotificationChannelsRequest): Promise; /** - * Creates a plain object from a CreateNotificationChannelRequest message. Also converts values to other types if specified. - * @param message CreateNotificationChannelRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetNotificationChannel. + * @param request GetNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel */ - public static toObject(message: google.monitoring.v3.CreateNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getNotificationChannel(request: google.monitoring.v3.IGetNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelCallback): void; /** - * Converts this CreateNotificationChannelRequest to JSON. - * @returns JSON object + * Calls GetNotificationChannel. + * @param request GetNotificationChannelRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } + public getNotificationChannel(request: google.monitoring.v3.IGetNotificationChannelRequest): Promise; - /** Properties of a ListNotificationChannelsRequest. */ - interface IListNotificationChannelsRequest { + /** + * Calls CreateNotificationChannel. + * @param request CreateNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public createNotificationChannel(request: google.monitoring.v3.ICreateNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.CreateNotificationChannelCallback): void; - /** ListNotificationChannelsRequest name */ - name?: (string|null); + /** + * Calls CreateNotificationChannel. + * @param request CreateNotificationChannelRequest message or plain object + * @returns Promise + */ + public createNotificationChannel(request: google.monitoring.v3.ICreateNotificationChannelRequest): Promise; - /** ListNotificationChannelsRequest filter */ - filter?: (string|null); + /** + * Calls UpdateNotificationChannel. + * @param request UpdateNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public updateNotificationChannel(request: google.monitoring.v3.IUpdateNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.UpdateNotificationChannelCallback): void; - /** ListNotificationChannelsRequest orderBy */ - orderBy?: (string|null); + /** + * Calls UpdateNotificationChannel. + * @param request UpdateNotificationChannelRequest message or plain object + * @returns Promise + */ + public updateNotificationChannel(request: google.monitoring.v3.IUpdateNotificationChannelRequest): Promise; - /** ListNotificationChannelsRequest pageSize */ - pageSize?: (number|null); + /** + * Calls DeleteNotificationChannel. + * @param request DeleteNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteNotificationChannel(request: google.monitoring.v3.IDeleteNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.DeleteNotificationChannelCallback): void; - /** ListNotificationChannelsRequest pageToken */ - pageToken?: (string|null); - } + /** + * Calls DeleteNotificationChannel. + * @param request DeleteNotificationChannelRequest message or plain object + * @returns Promise + */ + public deleteNotificationChannel(request: google.monitoring.v3.IDeleteNotificationChannelRequest): Promise; - /** Represents a ListNotificationChannelsRequest. */ - class ListNotificationChannelsRequest implements IListNotificationChannelsRequest { + /** + * Calls SendNotificationChannelVerificationCode. + * @param request SendNotificationChannelVerificationCodeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public sendNotificationChannelVerificationCode(request: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, callback: google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCodeCallback): void; /** - * Constructs a new ListNotificationChannelsRequest. - * @param [properties] Properties to set + * Calls SendNotificationChannelVerificationCode. + * @param request SendNotificationChannelVerificationCodeRequest message or plain object + * @returns Promise */ - constructor(properties?: google.monitoring.v3.IListNotificationChannelsRequest); + public sendNotificationChannelVerificationCode(request: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest): Promise; - /** ListNotificationChannelsRequest name. */ - public name: string; + /** + * Calls GetNotificationChannelVerificationCode. + * @param request GetNotificationChannelVerificationCodeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetNotificationChannelVerificationCodeResponse + */ + public getNotificationChannelVerificationCode(request: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, callback: google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCodeCallback): void; - /** ListNotificationChannelsRequest filter. */ - public filter: string; + /** + * Calls GetNotificationChannelVerificationCode. + * @param request GetNotificationChannelVerificationCodeRequest message or plain object + * @returns Promise + */ + public getNotificationChannelVerificationCode(request: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest): Promise; - /** ListNotificationChannelsRequest orderBy. */ - public orderBy: string; + /** + * Calls VerifyNotificationChannel. + * @param request VerifyNotificationChannelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NotificationChannel + */ + public verifyNotificationChannel(request: google.monitoring.v3.IVerifyNotificationChannelRequest, callback: google.monitoring.v3.NotificationChannelService.VerifyNotificationChannelCallback): void; - /** ListNotificationChannelsRequest pageSize. */ - public pageSize: number; + /** + * Calls VerifyNotificationChannel. + * @param request VerifyNotificationChannelRequest message or plain object + * @returns Promise + */ + public verifyNotificationChannel(request: google.monitoring.v3.IVerifyNotificationChannelRequest): Promise; + } - /** ListNotificationChannelsRequest pageToken. */ - public pageToken: string; + namespace NotificationChannelService { /** - * Creates a new ListNotificationChannelsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNotificationChannelsRequest instance + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. + * @param error Error, if any + * @param [response] ListNotificationChannelDescriptorsResponse */ - public static create(properties?: google.monitoring.v3.IListNotificationChannelsRequest): google.monitoring.v3.ListNotificationChannelsRequest; + type ListNotificationChannelDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelDescriptorsResponse) => void; /** - * Encodes the specified ListNotificationChannelsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. - * @param message ListNotificationChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. + * @param error Error, if any + * @param [response] NotificationChannelDescriptor */ - public static encode(message: google.monitoring.v3.IListNotificationChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type GetNotificationChannelDescriptorCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannelDescriptor) => void; /** - * Encodes the specified ListNotificationChannelsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. - * @param message ListNotificationChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. + * @param error Error, if any + * @param [response] ListNotificationChannelsResponse */ - public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type ListNotificationChannelsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelsResponse) => void; /** - * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListNotificationChannelsRequest - * @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.monitoring.v3.NotificationChannelService#getNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel + */ + type GetNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelsRequest; + type CreateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; /** - * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNotificationChannelsRequest - * @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.monitoring.v3.NotificationChannelService#updateNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelsRequest; + type UpdateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; /** - * Verifies a ListNotificationChannelsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. + * @param error Error, if any + * @param [response] Empty */ - public static verify(message: { [k: string]: any }): (string|null); + type DeleteNotificationChannelCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a ListNotificationChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListNotificationChannelsRequest + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. + * @param error Error, if any + * @param [response] Empty */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelsRequest; + type SendNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Creates a plain object from a ListNotificationChannelsRequest message. Also converts values to other types if specified. - * @param message ListNotificationChannelsRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. + * @param error Error, if any + * @param [response] GetNotificationChannelVerificationCodeResponse */ - public static toObject(message: google.monitoring.v3.ListNotificationChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) => void; /** - * Converts this ListNotificationChannelsRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. + * @param error Error, if any + * @param [response] NotificationChannel */ - public toJSON(): { [k: string]: any }; + type VerifyNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; } - /** Properties of a ListNotificationChannelsResponse. */ - interface IListNotificationChannelsResponse { + /** Properties of a ListNotificationChannelDescriptorsRequest. */ + interface IListNotificationChannelDescriptorsRequest { - /** ListNotificationChannelsResponse notificationChannels */ - notificationChannels?: (google.monitoring.v3.INotificationChannel[]|null); + /** ListNotificationChannelDescriptorsRequest name */ + name?: (string|null); - /** ListNotificationChannelsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ListNotificationChannelDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListNotificationChannelDescriptorsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ListNotificationChannelsResponse. */ - class ListNotificationChannelsResponse implements IListNotificationChannelsResponse { + /** Represents a ListNotificationChannelDescriptorsRequest. */ + class ListNotificationChannelDescriptorsRequest implements IListNotificationChannelDescriptorsRequest { /** - * Constructs a new ListNotificationChannelsResponse. + * Constructs a new ListNotificationChannelDescriptorsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListNotificationChannelsResponse); + constructor(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsRequest); - /** ListNotificationChannelsResponse notificationChannels. */ - public notificationChannels: google.monitoring.v3.INotificationChannel[]; + /** ListNotificationChannelDescriptorsRequest name. */ + public name: string; - /** ListNotificationChannelsResponse nextPageToken. */ - public nextPageToken: string; + /** ListNotificationChannelDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListNotificationChannelDescriptorsRequest pageToken. */ + public pageToken: string; /** - * Creates a new ListNotificationChannelsResponse instance using the specified properties. + * Creates a new ListNotificationChannelDescriptorsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListNotificationChannelsResponse instance + * @returns ListNotificationChannelDescriptorsRequest instance */ - public static create(properties?: google.monitoring.v3.IListNotificationChannelsResponse): google.monitoring.v3.ListNotificationChannelsResponse; + public static create(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsRequest): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; /** - * Encodes the specified ListNotificationChannelsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. - * @param message ListNotificationChannelsResponse message or plain object to encode + * Encodes the specified ListNotificationChannelDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListNotificationChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListNotificationChannelsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. - * @param message ListNotificationChannelsResponse message or plain object to encode + * Encodes the specified ListNotificationChannelDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer. + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListNotificationChannelsResponse + * @returns ListNotificationChannelDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; /** - * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListNotificationChannelsResponse + * @returns ListNotificationChannelDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; /** - * Verifies a ListNotificationChannelsResponse message. + * Verifies a ListNotificationChannelDescriptorsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListNotificationChannelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListNotificationChannelsResponse + * @returns ListNotificationChannelDescriptorsRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelsResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelDescriptorsRequest; /** - * Creates a plain object from a ListNotificationChannelsResponse message. Also converts values to other types if specified. - * @param message ListNotificationChannelsResponse + * Creates a plain object from a ListNotificationChannelDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListNotificationChannelDescriptorsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListNotificationChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListNotificationChannelDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListNotificationChannelsResponse to JSON. + * Converts this ListNotificationChannelDescriptorsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetNotificationChannelRequest. */ - interface IGetNotificationChannelRequest { + /** Properties of a ListNotificationChannelDescriptorsResponse. */ + interface IListNotificationChannelDescriptorsResponse { - /** GetNotificationChannelRequest name */ - name?: (string|null); + /** ListNotificationChannelDescriptorsResponse channelDescriptors */ + channelDescriptors?: (google.monitoring.v3.INotificationChannelDescriptor[]|null); + + /** ListNotificationChannelDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetNotificationChannelRequest. */ - class GetNotificationChannelRequest implements IGetNotificationChannelRequest { + /** Represents a ListNotificationChannelDescriptorsResponse. */ + class ListNotificationChannelDescriptorsResponse implements IListNotificationChannelDescriptorsResponse { /** - * Constructs a new GetNotificationChannelRequest. + * Constructs a new ListNotificationChannelDescriptorsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetNotificationChannelRequest); + constructor(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsResponse); - /** GetNotificationChannelRequest name. */ - public name: string; + /** ListNotificationChannelDescriptorsResponse channelDescriptors. */ + public channelDescriptors: google.monitoring.v3.INotificationChannelDescriptor[]; + + /** ListNotificationChannelDescriptorsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetNotificationChannelRequest instance using the specified properties. + * Creates a new ListNotificationChannelDescriptorsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetNotificationChannelRequest instance + * @returns ListNotificationChannelDescriptorsResponse instance */ - public static create(properties?: google.monitoring.v3.IGetNotificationChannelRequest): google.monitoring.v3.GetNotificationChannelRequest; + public static create(properties?: google.monitoring.v3.IListNotificationChannelDescriptorsResponse): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; /** - * Encodes the specified GetNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. - * @param message GetNotificationChannelRequest message or plain object to encode + * Encodes the specified ListNotificationChannelDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListNotificationChannelDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. - * @param message GetNotificationChannelRequest message or plain object to encode + * Encodes the specified ListNotificationChannelDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * @param message ListNotificationChannelDescriptorsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNotificationChannelRequest message from the specified reader or buffer. + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNotificationChannelRequest + * @returns ListNotificationChannelDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; /** - * Decodes a GetNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNotificationChannelRequest + * @returns ListNotificationChannelDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; /** - * Verifies a GetNotificationChannelRequest message. + * Verifies a ListNotificationChannelDescriptorsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNotificationChannelRequest + * @returns ListNotificationChannelDescriptorsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelDescriptorsResponse; /** - * Creates a plain object from a GetNotificationChannelRequest message. Also converts values to other types if specified. - * @param message GetNotificationChannelRequest + * Creates a plain object from a ListNotificationChannelDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListNotificationChannelDescriptorsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListNotificationChannelDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNotificationChannelRequest to JSON. + * Converts this ListNotificationChannelDescriptorsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateNotificationChannelRequest. */ - interface IUpdateNotificationChannelRequest { - - /** UpdateNotificationChannelRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a GetNotificationChannelDescriptorRequest. */ + interface IGetNotificationChannelDescriptorRequest { - /** UpdateNotificationChannelRequest notificationChannel */ - notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + /** GetNotificationChannelDescriptorRequest name */ + name?: (string|null); } - /** Represents an UpdateNotificationChannelRequest. */ - class UpdateNotificationChannelRequest implements IUpdateNotificationChannelRequest { + /** Represents a GetNotificationChannelDescriptorRequest. */ + class GetNotificationChannelDescriptorRequest implements IGetNotificationChannelDescriptorRequest { /** - * Constructs a new UpdateNotificationChannelRequest. + * Constructs a new GetNotificationChannelDescriptorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IUpdateNotificationChannelRequest); - - /** UpdateNotificationChannelRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.monitoring.v3.IGetNotificationChannelDescriptorRequest); - /** UpdateNotificationChannelRequest notificationChannel. */ - public notificationChannel?: (google.monitoring.v3.INotificationChannel|null); + /** GetNotificationChannelDescriptorRequest name. */ + public name: string; /** - * Creates a new UpdateNotificationChannelRequest instance using the specified properties. + * Creates a new GetNotificationChannelDescriptorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateNotificationChannelRequest instance + * @returns GetNotificationChannelDescriptorRequest instance */ - public static create(properties?: google.monitoring.v3.IUpdateNotificationChannelRequest): google.monitoring.v3.UpdateNotificationChannelRequest; + public static create(properties?: google.monitoring.v3.IGetNotificationChannelDescriptorRequest): google.monitoring.v3.GetNotificationChannelDescriptorRequest; /** - * Encodes the specified UpdateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. - * @param message UpdateNotificationChannelRequest message or plain object to encode + * Encodes the specified GetNotificationChannelDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * @param message GetNotificationChannelDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IUpdateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. - * @param message UpdateNotificationChannelRequest message or plain object to encode + * Encodes the specified GetNotificationChannelDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * @param message GetNotificationChannelDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IUpdateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer. + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateNotificationChannelRequest + * @returns GetNotificationChannelDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateNotificationChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelDescriptorRequest; /** - * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateNotificationChannelRequest + * @returns GetNotificationChannelDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateNotificationChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelDescriptorRequest; /** - * Verifies an UpdateNotificationChannelRequest message. + * Verifies a GetNotificationChannelDescriptorRequest message. * @param message Plain 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 UpdateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationChannelDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateNotificationChannelRequest + * @returns GetNotificationChannelDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateNotificationChannelRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelDescriptorRequest; /** - * Creates a plain object from an UpdateNotificationChannelRequest message. Also converts values to other types if specified. - * @param message UpdateNotificationChannelRequest + * Creates a plain object from a GetNotificationChannelDescriptorRequest message. Also converts values to other types if specified. + * @param message GetNotificationChannelDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.UpdateNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetNotificationChannelDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateNotificationChannelRequest to JSON. + * Converts this GetNotificationChannelDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteNotificationChannelRequest. */ - interface IDeleteNotificationChannelRequest { + /** Properties of a CreateNotificationChannelRequest. */ + interface ICreateNotificationChannelRequest { - /** DeleteNotificationChannelRequest name */ + /** CreateNotificationChannelRequest name */ name?: (string|null); - /** DeleteNotificationChannelRequest force */ - force?: (boolean|null); + /** CreateNotificationChannelRequest notificationChannel */ + notificationChannel?: (google.monitoring.v3.INotificationChannel|null); } - /** Represents a DeleteNotificationChannelRequest. */ - class DeleteNotificationChannelRequest implements IDeleteNotificationChannelRequest { + /** Represents a CreateNotificationChannelRequest. */ + class CreateNotificationChannelRequest implements ICreateNotificationChannelRequest { /** - * Constructs a new DeleteNotificationChannelRequest. + * Constructs a new CreateNotificationChannelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDeleteNotificationChannelRequest); + constructor(properties?: google.monitoring.v3.ICreateNotificationChannelRequest); - /** DeleteNotificationChannelRequest name. */ + /** CreateNotificationChannelRequest name. */ public name: string; - /** DeleteNotificationChannelRequest force. */ - public force: boolean; + /** CreateNotificationChannelRequest notificationChannel. */ + public notificationChannel?: (google.monitoring.v3.INotificationChannel|null); /** - * Creates a new DeleteNotificationChannelRequest instance using the specified properties. + * Creates a new CreateNotificationChannelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteNotificationChannelRequest instance + * @returns CreateNotificationChannelRequest instance */ - public static create(properties?: google.monitoring.v3.IDeleteNotificationChannelRequest): google.monitoring.v3.DeleteNotificationChannelRequest; + public static create(properties?: google.monitoring.v3.ICreateNotificationChannelRequest): google.monitoring.v3.CreateNotificationChannelRequest; /** - * Encodes the specified DeleteNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. - * @param message DeleteNotificationChannelRequest message or plain object to encode + * Encodes the specified CreateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * @param message CreateNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDeleteNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. - * @param message DeleteNotificationChannelRequest message or plain object to encode + * Encodes the specified CreateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * @param message CreateNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer. + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteNotificationChannelRequest + * @returns CreateNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteNotificationChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateNotificationChannelRequest; /** - * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteNotificationChannelRequest + * @returns CreateNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteNotificationChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateNotificationChannelRequest; /** - * Verifies a DeleteNotificationChannelRequest message. + * Verifies a CreateNotificationChannelRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteNotificationChannelRequest + * @returns CreateNotificationChannelRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteNotificationChannelRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateNotificationChannelRequest; /** - * Creates a plain object from a DeleteNotificationChannelRequest message. Also converts values to other types if specified. - * @param message DeleteNotificationChannelRequest + * Creates a plain object from a CreateNotificationChannelRequest message. Also converts values to other types if specified. + * @param message CreateNotificationChannelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DeleteNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteNotificationChannelRequest to JSON. + * Converts this CreateNotificationChannelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SendNotificationChannelVerificationCodeRequest. */ - interface ISendNotificationChannelVerificationCodeRequest { + /** Properties of a ListNotificationChannelsRequest. */ + interface IListNotificationChannelsRequest { - /** SendNotificationChannelVerificationCodeRequest name */ + /** ListNotificationChannelsRequest name */ name?: (string|null); + + /** ListNotificationChannelsRequest filter */ + filter?: (string|null); + + /** ListNotificationChannelsRequest orderBy */ + orderBy?: (string|null); + + /** ListNotificationChannelsRequest pageSize */ + pageSize?: (number|null); + + /** ListNotificationChannelsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a SendNotificationChannelVerificationCodeRequest. */ - class SendNotificationChannelVerificationCodeRequest implements ISendNotificationChannelVerificationCodeRequest { + /** Represents a ListNotificationChannelsRequest. */ + class ListNotificationChannelsRequest implements IListNotificationChannelsRequest { /** - * Constructs a new SendNotificationChannelVerificationCodeRequest. + * Constructs a new ListNotificationChannelsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest); + constructor(properties?: google.monitoring.v3.IListNotificationChannelsRequest); - /** SendNotificationChannelVerificationCodeRequest name. */ + /** ListNotificationChannelsRequest name. */ public name: string; + /** ListNotificationChannelsRequest filter. */ + public filter: string; + + /** ListNotificationChannelsRequest orderBy. */ + public orderBy: string; + + /** ListNotificationChannelsRequest pageSize. */ + public pageSize: number; + + /** ListNotificationChannelsRequest pageToken. */ + public pageToken: string; + /** - * Creates a new SendNotificationChannelVerificationCodeRequest instance using the specified properties. + * Creates a new ListNotificationChannelsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SendNotificationChannelVerificationCodeRequest instance + * @returns ListNotificationChannelsRequest instance */ - public static create(properties?: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + public static create(properties?: google.monitoring.v3.IListNotificationChannelsRequest): google.monitoring.v3.ListNotificationChannelsRequest; /** - * Encodes the specified SendNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. - * @param message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * Encodes the specified ListNotificationChannelsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * @param message ListNotificationChannelsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListNotificationChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SendNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. - * @param message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * Encodes the specified ListNotificationChannelsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * @param message ListNotificationChannelsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SendNotificationChannelVerificationCodeRequest + * @returns ListNotificationChannelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelsRequest; /** - * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SendNotificationChannelVerificationCodeRequest + * @returns ListNotificationChannelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelsRequest; /** - * Verifies a SendNotificationChannelVerificationCodeRequest message. + * Verifies a ListNotificationChannelsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SendNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SendNotificationChannelVerificationCodeRequest + * @returns ListNotificationChannelsRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelsRequest; /** - * Creates a plain object from a SendNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. - * @param message SendNotificationChannelVerificationCodeRequest + * Creates a plain object from a ListNotificationChannelsRequest message. Also converts values to other types if specified. + * @param message ListNotificationChannelsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.SendNotificationChannelVerificationCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListNotificationChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SendNotificationChannelVerificationCodeRequest to JSON. + * Converts this ListNotificationChannelsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetNotificationChannelVerificationCodeRequest. */ - interface IGetNotificationChannelVerificationCodeRequest { + /** Properties of a ListNotificationChannelsResponse. */ + interface IListNotificationChannelsResponse { - /** GetNotificationChannelVerificationCodeRequest name */ - name?: (string|null); + /** ListNotificationChannelsResponse notificationChannels */ + notificationChannels?: (google.monitoring.v3.INotificationChannel[]|null); - /** GetNotificationChannelVerificationCodeRequest expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** ListNotificationChannelsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetNotificationChannelVerificationCodeRequest. */ - class GetNotificationChannelVerificationCodeRequest implements IGetNotificationChannelVerificationCodeRequest { + /** Represents a ListNotificationChannelsResponse. */ + class ListNotificationChannelsResponse implements IListNotificationChannelsResponse { /** - * Constructs a new GetNotificationChannelVerificationCodeRequest. + * Constructs a new ListNotificationChannelsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest); + constructor(properties?: google.monitoring.v3.IListNotificationChannelsResponse); - /** GetNotificationChannelVerificationCodeRequest name. */ - public name: string; + /** ListNotificationChannelsResponse notificationChannels. */ + public notificationChannels: google.monitoring.v3.INotificationChannel[]; - /** GetNotificationChannelVerificationCodeRequest expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** ListNotificationChannelsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetNotificationChannelVerificationCodeRequest instance using the specified properties. + * Creates a new ListNotificationChannelsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetNotificationChannelVerificationCodeRequest instance + * @returns ListNotificationChannelsResponse instance */ - public static create(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + public static create(properties?: google.monitoring.v3.IListNotificationChannelsResponse): google.monitoring.v3.ListNotificationChannelsResponse; /** - * Encodes the specified GetNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. - * @param message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * Encodes the specified ListNotificationChannelsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * @param message ListNotificationChannelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListNotificationChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. - * @param message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * Encodes the specified ListNotificationChannelsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * @param message ListNotificationChannelsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListNotificationChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNotificationChannelVerificationCodeRequest + * @returns ListNotificationChannelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListNotificationChannelsResponse; /** - * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNotificationChannelVerificationCodeRequest + * @returns ListNotificationChannelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListNotificationChannelsResponse; /** - * Verifies a GetNotificationChannelVerificationCodeRequest message. + * Verifies a ListNotificationChannelsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNotificationChannelVerificationCodeRequest + * @returns ListNotificationChannelsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListNotificationChannelsResponse; /** - * Creates a plain object from a GetNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. - * @param message GetNotificationChannelVerificationCodeRequest + * Creates a plain object from a ListNotificationChannelsResponse message. Also converts values to other types if specified. + * @param message ListNotificationChannelsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetNotificationChannelVerificationCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListNotificationChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNotificationChannelVerificationCodeRequest to JSON. + * Converts this ListNotificationChannelsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetNotificationChannelVerificationCodeResponse. */ - interface IGetNotificationChannelVerificationCodeResponse { - - /** GetNotificationChannelVerificationCodeResponse code */ - code?: (string|null); + /** Properties of a GetNotificationChannelRequest. */ + interface IGetNotificationChannelRequest { - /** GetNotificationChannelVerificationCodeResponse expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** GetNotificationChannelRequest name */ + name?: (string|null); } - /** Represents a GetNotificationChannelVerificationCodeResponse. */ - class GetNotificationChannelVerificationCodeResponse implements IGetNotificationChannelVerificationCodeResponse { + /** Represents a GetNotificationChannelRequest. */ + class GetNotificationChannelRequest implements IGetNotificationChannelRequest { /** - * Constructs a new GetNotificationChannelVerificationCodeResponse. + * Constructs a new GetNotificationChannelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse); - - /** GetNotificationChannelVerificationCodeResponse code. */ - public code: string; + constructor(properties?: google.monitoring.v3.IGetNotificationChannelRequest); - /** GetNotificationChannelVerificationCodeResponse expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** GetNotificationChannelRequest name. */ + public name: string; /** - * Creates a new GetNotificationChannelVerificationCodeResponse instance using the specified properties. + * Creates a new GetNotificationChannelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetNotificationChannelVerificationCodeResponse instance + * @returns GetNotificationChannelRequest instance */ - public static create(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + public static create(properties?: google.monitoring.v3.IGetNotificationChannelRequest): google.monitoring.v3.GetNotificationChannelRequest; /** - * Encodes the specified GetNotificationChannelVerificationCodeResponse message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. - * @param message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * Encodes the specified GetNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. + * @param message GetNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetNotificationChannelVerificationCodeResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. - * @param message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * Encodes the specified GetNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. + * @param message GetNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer. + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetNotificationChannelVerificationCodeResponse + * @returns GetNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelRequest; /** - * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetNotificationChannelVerificationCodeResponse + * @returns GetNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelRequest; /** - * Verifies a GetNotificationChannelVerificationCodeResponse message. + * Verifies a GetNotificationChannelRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetNotificationChannelVerificationCodeResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetNotificationChannelVerificationCodeResponse + * @returns GetNotificationChannelRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelRequest; /** - * Creates a plain object from a GetNotificationChannelVerificationCodeResponse message. Also converts values to other types if specified. - * @param message GetNotificationChannelVerificationCodeResponse + * Creates a plain object from a GetNotificationChannelRequest message. Also converts values to other types if specified. + * @param message GetNotificationChannelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetNotificationChannelVerificationCodeResponse to JSON. + * Converts this GetNotificationChannelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VerifyNotificationChannelRequest. */ - interface IVerifyNotificationChannelRequest { + /** Properties of an UpdateNotificationChannelRequest. */ + interface IUpdateNotificationChannelRequest { - /** VerifyNotificationChannelRequest name */ - name?: (string|null); + /** UpdateNotificationChannelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** VerifyNotificationChannelRequest code */ - code?: (string|null); + /** UpdateNotificationChannelRequest notificationChannel */ + notificationChannel?: (google.monitoring.v3.INotificationChannel|null); } - /** Represents a VerifyNotificationChannelRequest. */ - class VerifyNotificationChannelRequest implements IVerifyNotificationChannelRequest { + /** Represents an UpdateNotificationChannelRequest. */ + class UpdateNotificationChannelRequest implements IUpdateNotificationChannelRequest { /** - * Constructs a new VerifyNotificationChannelRequest. + * Constructs a new UpdateNotificationChannelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IVerifyNotificationChannelRequest); + constructor(properties?: google.monitoring.v3.IUpdateNotificationChannelRequest); - /** VerifyNotificationChannelRequest name. */ - public name: string; + /** UpdateNotificationChannelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** VerifyNotificationChannelRequest code. */ - public code: string; + /** UpdateNotificationChannelRequest notificationChannel. */ + public notificationChannel?: (google.monitoring.v3.INotificationChannel|null); /** - * Creates a new VerifyNotificationChannelRequest instance using the specified properties. + * Creates a new UpdateNotificationChannelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VerifyNotificationChannelRequest instance + * @returns UpdateNotificationChannelRequest instance */ - public static create(properties?: google.monitoring.v3.IVerifyNotificationChannelRequest): google.monitoring.v3.VerifyNotificationChannelRequest; + public static create(properties?: google.monitoring.v3.IUpdateNotificationChannelRequest): google.monitoring.v3.UpdateNotificationChannelRequest; /** - * Encodes the specified VerifyNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. - * @param message VerifyNotificationChannelRequest message or plain object to encode + * Encodes the specified UpdateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @param message UpdateNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IVerifyNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IUpdateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VerifyNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. - * @param message VerifyNotificationChannelRequest message or plain object to encode + * Encodes the specified UpdateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @param message UpdateNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IVerifyNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IUpdateNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer. + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VerifyNotificationChannelRequest + * @returns UpdateNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.VerifyNotificationChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateNotificationChannelRequest; /** - * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VerifyNotificationChannelRequest + * @returns UpdateNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.VerifyNotificationChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateNotificationChannelRequest; /** - * Verifies a VerifyNotificationChannelRequest message. + * Verifies an UpdateNotificationChannelRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VerifyNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VerifyNotificationChannelRequest + * @returns UpdateNotificationChannelRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.VerifyNotificationChannelRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateNotificationChannelRequest; /** - * Creates a plain object from a VerifyNotificationChannelRequest message. Also converts values to other types if specified. - * @param message VerifyNotificationChannelRequest + * Creates a plain object from an UpdateNotificationChannelRequest message. Also converts values to other types if specified. + * @param message UpdateNotificationChannelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.VerifyNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.UpdateNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VerifyNotificationChannelRequest to JSON. + * Converts this UpdateNotificationChannelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NotificationChannelDescriptor. */ - interface INotificationChannelDescriptor { + /** Properties of a DeleteNotificationChannelRequest. */ + interface IDeleteNotificationChannelRequest { - /** NotificationChannelDescriptor name */ + /** DeleteNotificationChannelRequest name */ name?: (string|null); - /** NotificationChannelDescriptor type */ - type?: (string|null); - - /** NotificationChannelDescriptor displayName */ - displayName?: (string|null); - - /** NotificationChannelDescriptor description */ - description?: (string|null); - - /** NotificationChannelDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** NotificationChannelDescriptor supportedTiers */ - supportedTiers?: (google.monitoring.v3.ServiceTier[]|null); + /** DeleteNotificationChannelRequest force */ + force?: (boolean|null); } - /** Represents a NotificationChannelDescriptor. */ - class NotificationChannelDescriptor implements INotificationChannelDescriptor { + /** Represents a DeleteNotificationChannelRequest. */ + class DeleteNotificationChannelRequest implements IDeleteNotificationChannelRequest { /** - * Constructs a new NotificationChannelDescriptor. + * Constructs a new DeleteNotificationChannelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.INotificationChannelDescriptor); + constructor(properties?: google.monitoring.v3.IDeleteNotificationChannelRequest); - /** NotificationChannelDescriptor name. */ + /** DeleteNotificationChannelRequest name. */ public name: string; - /** NotificationChannelDescriptor type. */ - public type: string; - - /** NotificationChannelDescriptor displayName. */ - public displayName: string; - - /** NotificationChannelDescriptor description. */ - public description: string; - - /** NotificationChannelDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** NotificationChannelDescriptor supportedTiers. */ - public supportedTiers: google.monitoring.v3.ServiceTier[]; + /** DeleteNotificationChannelRequest force. */ + public force: boolean; /** - * Creates a new NotificationChannelDescriptor instance using the specified properties. + * Creates a new DeleteNotificationChannelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationChannelDescriptor instance + * @returns DeleteNotificationChannelRequest instance */ - public static create(properties?: google.monitoring.v3.INotificationChannelDescriptor): google.monitoring.v3.NotificationChannelDescriptor; + public static create(properties?: google.monitoring.v3.IDeleteNotificationChannelRequest): google.monitoring.v3.DeleteNotificationChannelRequest; /** - * Encodes the specified NotificationChannelDescriptor message. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. - * @param message NotificationChannelDescriptor message or plain object to encode + * Encodes the specified DeleteNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * @param message DeleteNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.INotificationChannelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDeleteNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationChannelDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. - * @param message NotificationChannelDescriptor message or plain object to encode + * Encodes the specified DeleteNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * @param message DeleteNotificationChannelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.INotificationChannelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDeleteNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationChannelDescriptor message from the specified reader or buffer. + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationChannelDescriptor + * @returns DeleteNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.NotificationChannelDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteNotificationChannelRequest; /** - * Decodes a NotificationChannelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationChannelDescriptor + * @returns DeleteNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.NotificationChannelDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteNotificationChannelRequest; /** - * Verifies a NotificationChannelDescriptor message. + * Verifies a DeleteNotificationChannelRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NotificationChannelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationChannelDescriptor + * @returns DeleteNotificationChannelRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.NotificationChannelDescriptor; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteNotificationChannelRequest; /** - * Creates a plain object from a NotificationChannelDescriptor message. Also converts values to other types if specified. - * @param message NotificationChannelDescriptor + * Creates a plain object from a DeleteNotificationChannelRequest message. Also converts values to other types if specified. + * @param message DeleteNotificationChannelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.NotificationChannelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotificationChannelDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NotificationChannel. */ - interface INotificationChannel { - - /** NotificationChannel type */ - type?: (string|null); - - /** NotificationChannel name */ - name?: (string|null); - - /** NotificationChannel displayName */ - displayName?: (string|null); - - /** NotificationChannel description */ - description?: (string|null); - - /** NotificationChannel labels */ - labels?: ({ [k: string]: string }|null); + public static toObject(message: google.monitoring.v3.DeleteNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** NotificationChannel userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** + * Converts this DeleteNotificationChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** NotificationChannel verificationStatus */ - verificationStatus?: (google.monitoring.v3.NotificationChannel.VerificationStatus|keyof typeof google.monitoring.v3.NotificationChannel.VerificationStatus|null); + /** Properties of a SendNotificationChannelVerificationCodeRequest. */ + interface ISendNotificationChannelVerificationCodeRequest { - /** NotificationChannel enabled */ - enabled?: (google.protobuf.IBoolValue|null); + /** SendNotificationChannelVerificationCodeRequest name */ + name?: (string|null); } - /** Represents a NotificationChannel. */ - class NotificationChannel implements INotificationChannel { + /** Represents a SendNotificationChannelVerificationCodeRequest. */ + class SendNotificationChannelVerificationCodeRequest implements ISendNotificationChannelVerificationCodeRequest { /** - * Constructs a new NotificationChannel. + * Constructs a new SendNotificationChannelVerificationCodeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.INotificationChannel); - - /** NotificationChannel type. */ - public type: string; + constructor(properties?: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest); - /** NotificationChannel name. */ + /** SendNotificationChannelVerificationCodeRequest name. */ public name: string; - /** NotificationChannel displayName. */ - public displayName: string; - - /** NotificationChannel description. */ - public description: string; - - /** NotificationChannel labels. */ - public labels: { [k: string]: string }; - - /** NotificationChannel userLabels. */ - public userLabels: { [k: string]: string }; - - /** NotificationChannel verificationStatus. */ - public verificationStatus: (google.monitoring.v3.NotificationChannel.VerificationStatus|keyof typeof google.monitoring.v3.NotificationChannel.VerificationStatus); - - /** NotificationChannel enabled. */ - public enabled?: (google.protobuf.IBoolValue|null); - /** - * Creates a new NotificationChannel instance using the specified properties. + * Creates a new SendNotificationChannelVerificationCodeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationChannel instance + * @returns SendNotificationChannelVerificationCodeRequest instance */ - public static create(properties?: google.monitoring.v3.INotificationChannel): google.monitoring.v3.NotificationChannel; + public static create(properties?: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; /** - * Encodes the specified NotificationChannel message. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. - * @param message NotificationChannel message or plain object to encode + * Encodes the specified SendNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message SendNotificationChannelVerificationCodeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.INotificationChannel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationChannel message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. - * @param message NotificationChannel message or plain object to encode + * Encodes the specified SendNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message SendNotificationChannelVerificationCodeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.INotificationChannel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationChannel message from the specified reader or buffer. + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationChannel + * @returns SendNotificationChannelVerificationCodeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.NotificationChannel; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; /** - * Decodes a NotificationChannel message from the specified reader or buffer, length delimited. + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationChannel + * @returns SendNotificationChannelVerificationCodeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.NotificationChannel; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; /** - * Verifies a NotificationChannel message. + * Verifies a SendNotificationChannelVerificationCodeRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NotificationChannel message from a plain object. Also converts values to their respective internal types. + * Creates a SendNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationChannel + * @returns SendNotificationChannelVerificationCodeRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.NotificationChannel; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.SendNotificationChannelVerificationCodeRequest; /** - * Creates a plain object from a NotificationChannel message. Also converts values to other types if specified. - * @param message NotificationChannel + * Creates a plain object from a SendNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * @param message SendNotificationChannelVerificationCodeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.NotificationChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.SendNotificationChannelVerificationCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationChannel to JSON. + * Converts this SendNotificationChannelVerificationCodeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace NotificationChannel { + /** Properties of a GetNotificationChannelVerificationCodeRequest. */ + interface IGetNotificationChannelVerificationCodeRequest { - /** VerificationStatus enum. */ - enum VerificationStatus { - VERIFICATION_STATUS_UNSPECIFIED = 0, - UNVERIFIED = 1, - VERIFIED = 2 - } + /** GetNotificationChannelVerificationCodeRequest name */ + name?: (string|null); + + /** GetNotificationChannelVerificationCodeRequest expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ServiceMonitoringService */ - class ServiceMonitoringService extends $protobuf.rpc.Service { + /** Represents a GetNotificationChannelVerificationCodeRequest. */ + class GetNotificationChannelVerificationCodeRequest implements IGetNotificationChannelVerificationCodeRequest { /** - * Constructs a new ServiceMonitoringService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new GetNotificationChannelVerificationCodeRequest. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest); - /** - * Creates new ServiceMonitoringService 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): ServiceMonitoringService; + /** GetNotificationChannelVerificationCodeRequest name. */ + public name: string; - /** - * Calls CreateService. - * @param request CreateServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Service - */ - public createService(request: google.monitoring.v3.ICreateServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.CreateServiceCallback): void; + /** GetNotificationChannelVerificationCodeRequest expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); /** - * Calls CreateService. - * @param request CreateServiceRequest message or plain object - * @returns Promise + * Creates a new GetNotificationChannelVerificationCodeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationChannelVerificationCodeRequest instance */ - public createService(request: google.monitoring.v3.ICreateServiceRequest): Promise; + public static create(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; /** - * Calls GetService. - * @param request GetServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Service + * Encodes the specified GetNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getService(request: google.monitoring.v3.IGetServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.GetServiceCallback): void; + public static encode(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetService. - * @param request GetServiceRequest message or plain object - * @returns Promise + * Encodes the specified GetNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getService(request: google.monitoring.v3.IGetServiceRequest): Promise; + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListServices. - * @param request ListServicesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListServicesResponse + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listServices(request: google.monitoring.v3.IListServicesRequest, callback: google.monitoring.v3.ServiceMonitoringService.ListServicesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; /** - * Calls ListServices. - * @param request ListServicesRequest message or plain object - * @returns Promise + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationChannelVerificationCodeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listServices(request: google.monitoring.v3.IListServicesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; /** - * Calls UpdateService. - * @param request UpdateServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Service + * Verifies a GetNotificationChannelVerificationCodeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateService(request: google.monitoring.v3.IUpdateServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.UpdateServiceCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateService. - * @param request UpdateServiceRequest message or plain object - * @returns Promise + * Creates a GetNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationChannelVerificationCodeRequest */ - public updateService(request: google.monitoring.v3.IUpdateServiceRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelVerificationCodeRequest; /** - * Calls DeleteService. - * @param request DeleteServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a GetNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * @param message GetNotificationChannelVerificationCodeRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteService(request: google.monitoring.v3.IDeleteServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.DeleteServiceCallback): void; + public static toObject(message: google.monitoring.v3.GetNotificationChannelVerificationCodeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteService. - * @param request DeleteServiceRequest message or plain object - * @returns Promise + * Converts this GetNotificationChannelVerificationCodeRequest to JSON. + * @returns JSON object */ - public deleteService(request: google.monitoring.v3.IDeleteServiceRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetNotificationChannelVerificationCodeResponse. */ + interface IGetNotificationChannelVerificationCodeResponse { + + /** GetNotificationChannelVerificationCodeResponse code */ + code?: (string|null); + + /** GetNotificationChannelVerificationCodeResponse expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a GetNotificationChannelVerificationCodeResponse. */ + class GetNotificationChannelVerificationCodeResponse implements IGetNotificationChannelVerificationCodeResponse { /** - * Calls CreateServiceLevelObjective. - * @param request CreateServiceLevelObjectiveRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + * Constructs a new GetNotificationChannelVerificationCodeResponse. + * @param [properties] Properties to set */ - public createServiceLevelObjective(request: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.CreateServiceLevelObjectiveCallback): void; + constructor(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse); + + /** GetNotificationChannelVerificationCodeResponse code. */ + public code: string; + + /** GetNotificationChannelVerificationCodeResponse expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); /** - * Calls CreateServiceLevelObjective. - * @param request CreateServiceLevelObjectiveRequest message or plain object - * @returns Promise + * Creates a new GetNotificationChannelVerificationCodeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNotificationChannelVerificationCodeResponse instance */ - public createServiceLevelObjective(request: google.monitoring.v3.ICreateServiceLevelObjectiveRequest): Promise; + public static create(properties?: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; /** - * Calls GetServiceLevelObjective. - * @param request GetServiceLevelObjectiveRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + * Encodes the specified GetNotificationChannelVerificationCodeResponse message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getServiceLevelObjective(request: google.monitoring.v3.IGetServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjectiveCallback): void; + public static encode(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetServiceLevelObjective. - * @param request GetServiceLevelObjectiveRequest message or plain object - * @returns Promise + * Encodes the specified GetNotificationChannelVerificationCodeResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * @param message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getServiceLevelObjective(request: google.monitoring.v3.IGetServiceLevelObjectiveRequest): Promise; + public static encodeDelimited(message: google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListServiceLevelObjectives. - * @param request ListServiceLevelObjectivesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListServiceLevelObjectivesResponse + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNotificationChannelVerificationCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listServiceLevelObjectives(request: google.monitoring.v3.IListServiceLevelObjectivesRequest, callback: google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectivesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; /** - * Calls ListServiceLevelObjectives. - * @param request ListServiceLevelObjectivesRequest message or plain object - * @returns Promise + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNotificationChannelVerificationCodeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listServiceLevelObjectives(request: google.monitoring.v3.IListServiceLevelObjectivesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; /** - * Calls UpdateServiceLevelObjective. - * @param request UpdateServiceLevelObjectiveRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + * Verifies a GetNotificationChannelVerificationCodeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateServiceLevelObjective(request: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.UpdateServiceLevelObjectiveCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateServiceLevelObjective. - * @param request UpdateServiceLevelObjectiveRequest message or plain object - * @returns Promise + * Creates a GetNotificationChannelVerificationCodeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNotificationChannelVerificationCodeResponse */ - public updateServiceLevelObjective(request: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetNotificationChannelVerificationCodeResponse; /** - * Calls DeleteServiceLevelObjective. - * @param request DeleteServiceLevelObjectiveRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a plain object from a GetNotificationChannelVerificationCodeResponse message. Also converts values to other types if specified. + * @param message GetNotificationChannelVerificationCodeResponse + * @param [options] Conversion options + * @returns Plain object */ - public deleteServiceLevelObjective(request: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.DeleteServiceLevelObjectiveCallback): void; + public static toObject(message: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteServiceLevelObjective. - * @param request DeleteServiceLevelObjectiveRequest message or plain object - * @returns Promise + * Converts this GetNotificationChannelVerificationCodeResponse to JSON. + * @returns JSON object */ - public deleteServiceLevelObjective(request: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace ServiceMonitoringService { + /** Properties of a VerifyNotificationChannelRequest. */ + interface IVerifyNotificationChannelRequest { + + /** VerifyNotificationChannelRequest name */ + name?: (string|null); + + /** VerifyNotificationChannelRequest code */ + code?: (string|null); + } + + /** Represents a VerifyNotificationChannelRequest. */ + class VerifyNotificationChannelRequest implements IVerifyNotificationChannelRequest { /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. - * @param error Error, if any - * @param [response] Service + * Constructs a new VerifyNotificationChannelRequest. + * @param [properties] Properties to set */ - type CreateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; + constructor(properties?: google.monitoring.v3.IVerifyNotificationChannelRequest); + + /** VerifyNotificationChannelRequest name. */ + public name: string; + + /** VerifyNotificationChannelRequest code. */ + public code: string; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. - * @param error Error, if any - * @param [response] Service + * Creates a new VerifyNotificationChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyNotificationChannelRequest instance */ - type GetServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; + public static create(properties?: google.monitoring.v3.IVerifyNotificationChannelRequest): google.monitoring.v3.VerifyNotificationChannelRequest; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. - * @param error Error, if any - * @param [response] ListServicesResponse + * Encodes the specified VerifyNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * @param message VerifyNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListServicesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServicesResponse) => void; + public static encode(message: google.monitoring.v3.IVerifyNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. - * @param error Error, if any - * @param [response] Service + * Encodes the specified VerifyNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * @param message VerifyNotificationChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; + public static encodeDelimited(message: google.monitoring.v3.IVerifyNotificationChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. - * @param error Error, if any - * @param [response] Empty + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteServiceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.VerifyNotificationChannelRequest; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. - * @param error Error, if any - * @param [response] ServiceLevelObjective + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.VerifyNotificationChannelRequest; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. - * @param error Error, if any - * @param [response] ServiceLevelObjective + * Verifies a VerifyNotificationChannelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. - * @param error Error, if any - * @param [response] ListServiceLevelObjectivesResponse + * Creates a VerifyNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyNotificationChannelRequest */ - type ListServiceLevelObjectivesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServiceLevelObjectivesResponse) => void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.VerifyNotificationChannelRequest; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. - * @param error Error, if any - * @param [response] ServiceLevelObjective + * Creates a plain object from a VerifyNotificationChannelRequest message. Also converts values to other types if specified. + * @param message VerifyNotificationChannelRequest + * @param [options] Conversion options + * @returns Plain object */ - type UpdateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; + public static toObject(message: google.monitoring.v3.VerifyNotificationChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. - * @param error Error, if any - * @param [response] Empty + * Converts this VerifyNotificationChannelRequest to JSON. + * @returns JSON object */ - type DeleteServiceLevelObjectiveCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a CreateServiceRequest. */ - interface ICreateServiceRequest { + /** Properties of a Service. */ + interface IService { - /** CreateServiceRequest parent */ - parent?: (string|null); + /** Service name */ + name?: (string|null); - /** CreateServiceRequest serviceId */ - serviceId?: (string|null); + /** Service displayName */ + displayName?: (string|null); - /** CreateServiceRequest service */ - service?: (google.monitoring.v3.IService|null); + /** Service custom */ + custom?: (google.monitoring.v3.Service.ICustom|null); + + /** Service appEngine */ + appEngine?: (google.monitoring.v3.Service.IAppEngine|null); + + /** Service cloudEndpoints */ + cloudEndpoints?: (google.monitoring.v3.Service.ICloudEndpoints|null); + + /** Service clusterIstio */ + clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + + /** Service telemetry */ + telemetry?: (google.monitoring.v3.Service.ITelemetry|null); } - /** Represents a CreateServiceRequest. */ - class CreateServiceRequest implements ICreateServiceRequest { + /** Represents a Service. */ + class Service implements IService { /** - * Constructs a new CreateServiceRequest. + * Constructs a new Service. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateServiceRequest); + constructor(properties?: google.monitoring.v3.IService); - /** CreateServiceRequest parent. */ - public parent: string; + /** Service name. */ + public name: string; - /** CreateServiceRequest serviceId. */ - public serviceId: string; + /** Service displayName. */ + public displayName: string; - /** CreateServiceRequest service. */ - public service?: (google.monitoring.v3.IService|null); + /** Service custom. */ + public custom?: (google.monitoring.v3.Service.ICustom|null); + + /** Service appEngine. */ + public appEngine?: (google.monitoring.v3.Service.IAppEngine|null); + + /** Service cloudEndpoints. */ + public cloudEndpoints?: (google.monitoring.v3.Service.ICloudEndpoints|null); + + /** Service clusterIstio. */ + public clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + + /** Service telemetry. */ + public telemetry?: (google.monitoring.v3.Service.ITelemetry|null); + + /** Service identifier. */ + public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"); /** - * Creates a new CreateServiceRequest instance using the specified properties. + * Creates a new Service instance using the specified properties. * @param [properties] Properties to set - * @returns CreateServiceRequest instance + * @returns Service instance */ - public static create(properties?: google.monitoring.v3.ICreateServiceRequest): google.monitoring.v3.CreateServiceRequest; + public static create(properties?: google.monitoring.v3.IService): google.monitoring.v3.Service; /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified Service message. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * @param message Service message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IService, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. - * @param message CreateServiceRequest message or plain object to encode + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * @param message Service message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IService, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateServiceRequest + * @returns Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a Service message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateServiceRequest + * @returns Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service; /** - * Verifies a CreateServiceRequest message. + * Verifies a Service message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Service message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateServiceRequest + * @returns Service */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. - * @param message CreateServiceRequest + * Creates a plain object from a Service message. Also converts values to other types if specified. + * @param message Service * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this Service to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetServiceRequest. */ - interface IGetServiceRequest { + namespace Service { - /** GetServiceRequest name */ - name?: (string|null); - } + /** Properties of a Custom. */ + interface ICustom { + } - /** Represents a GetServiceRequest. */ - class GetServiceRequest implements IGetServiceRequest { + /** Represents a Custom. */ + class Custom implements ICustom { - /** - * Constructs a new GetServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IGetServiceRequest); + /** + * Constructs a new Custom. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.ICustom); - /** GetServiceRequest name. */ - public name: string; + /** + * Creates a new Custom instance using the specified properties. + * @param [properties] Properties to set + * @returns Custom instance + */ + public static create(properties?: google.monitoring.v3.Service.ICustom): google.monitoring.v3.Service.Custom; - /** - * Creates a new GetServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServiceRequest instance - */ - public static create(properties?: google.monitoring.v3.IGetServiceRequest): google.monitoring.v3.GetServiceRequest; + /** + * Encodes the specified Custom message. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @param message Custom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.ICustom, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Custom message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @param message Custom message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.ICustom, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Custom message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.Custom; + + /** + * Decodes a Custom message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.Custom; + + /** + * Verifies a Custom message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Custom message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Custom + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.Custom; + + /** + * Creates a plain object from a Custom message. Also converts values to other types if specified. + * @param message Custom + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.Custom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Custom to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppEngine. */ + interface IAppEngine { + + /** AppEngine moduleId */ + moduleId?: (string|null); + } + + /** Represents an AppEngine. */ + class AppEngine implements IAppEngine { + + /** + * Constructs a new AppEngine. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.IAppEngine); + + /** AppEngine moduleId. */ + public moduleId: string; + + /** + * Creates a new AppEngine instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngine instance + */ + public static create(properties?: google.monitoring.v3.Service.IAppEngine): google.monitoring.v3.Service.AppEngine; + + /** + * Encodes the specified AppEngine message. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @param message AppEngine message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.IAppEngine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngine message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @param message AppEngine message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.IAppEngine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngine message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.AppEngine; + + /** + * Decodes an AppEngine message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.AppEngine; + + /** + * Verifies an AppEngine message. + * @param message Plain 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 AppEngine message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngine + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.AppEngine; + + /** + * Creates a plain object from an AppEngine message. Also converts values to other types if specified. + * @param message AppEngine + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.AppEngine, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngine to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CloudEndpoints. */ + interface ICloudEndpoints { + + /** CloudEndpoints service */ + service?: (string|null); + } + + /** Represents a CloudEndpoints. */ + class CloudEndpoints implements ICloudEndpoints { + + /** + * Constructs a new CloudEndpoints. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.ICloudEndpoints); + + /** CloudEndpoints service. */ + public service: string; + + /** + * Creates a new CloudEndpoints instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudEndpoints instance + */ + public static create(properties?: google.monitoring.v3.Service.ICloudEndpoints): google.monitoring.v3.Service.CloudEndpoints; + + /** + * Encodes the specified CloudEndpoints message. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @param message CloudEndpoints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.ICloudEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudEndpoints message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @param message CloudEndpoints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.ICloudEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. - * @param message GetServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a CloudEndpoints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.CloudEndpoints; - /** - * Decodes a GetServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetServiceRequest; + /** + * Decodes a CloudEndpoints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.CloudEndpoints; - /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetServiceRequest; + /** + * Verifies a CloudEndpoints message. + * @param message 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 GetServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a CloudEndpoints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudEndpoints + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.CloudEndpoints; - /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetServiceRequest; + /** + * Creates a plain object from a CloudEndpoints message. Also converts values to other types if specified. + * @param message CloudEndpoints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.CloudEndpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. - * @param message GetServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this CloudEndpoints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this GetServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a ClusterIstio. */ + interface IClusterIstio { - /** Properties of a ListServicesRequest. */ - interface IListServicesRequest { + /** ClusterIstio location */ + location?: (string|null); - /** ListServicesRequest parent */ - parent?: (string|null); + /** ClusterIstio clusterName */ + clusterName?: (string|null); - /** ListServicesRequest filter */ - filter?: (string|null); + /** ClusterIstio serviceNamespace */ + serviceNamespace?: (string|null); - /** ListServicesRequest pageSize */ - pageSize?: (number|null); + /** ClusterIstio serviceName */ + serviceName?: (string|null); + } - /** ListServicesRequest pageToken */ - pageToken?: (string|null); - } + /** Represents a ClusterIstio. */ + class ClusterIstio implements IClusterIstio { - /** Represents a ListServicesRequest. */ - class ListServicesRequest implements IListServicesRequest { + /** + * Constructs a new ClusterIstio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.IClusterIstio); - /** - * Constructs a new ListServicesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListServicesRequest); + /** ClusterIstio location. */ + public location: string; - /** ListServicesRequest parent. */ - public parent: string; + /** ClusterIstio clusterName. */ + public clusterName: string; - /** ListServicesRequest filter. */ - public filter: string; + /** ClusterIstio serviceNamespace. */ + public serviceNamespace: string; - /** ListServicesRequest pageSize. */ - public pageSize: number; + /** ClusterIstio serviceName. */ + public serviceName: string; - /** ListServicesRequest pageToken. */ - public pageToken: string; + /** + * Creates a new ClusterIstio instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterIstio instance + */ + public static create(properties?: google.monitoring.v3.Service.IClusterIstio): google.monitoring.v3.Service.ClusterIstio; - /** - * Creates a new ListServicesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListServicesRequest instance - */ - public static create(properties?: google.monitoring.v3.IListServicesRequest): google.monitoring.v3.ListServicesRequest; + /** + * Encodes the specified ClusterIstio message. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @param message ClusterIstio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.IClusterIstio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ClusterIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @param message ClusterIstio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.IClusterIstio, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. - * @param message ListServicesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ClusterIstio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.ClusterIstio; - /** - * Decodes a ListServicesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListServicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServicesRequest; + /** + * Decodes a ClusterIstio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.ClusterIstio; - /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListServicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServicesRequest; + /** + * Verifies a ClusterIstio message. + * @param message 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 ListServicesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a ClusterIstio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterIstio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.ClusterIstio; - /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListServicesRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServicesRequest; + /** + * Creates a plain object from a ClusterIstio message. Also converts values to other types if specified. + * @param message ClusterIstio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.ClusterIstio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterIstio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. - * @param message ListServicesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a Telemetry. */ + interface ITelemetry { - /** - * Converts this ListServicesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Telemetry resourceName */ + resourceName?: (string|null); + } - /** Properties of a ListServicesResponse. */ - interface IListServicesResponse { + /** Represents a Telemetry. */ + class Telemetry implements ITelemetry { - /** ListServicesResponse services */ - services?: (google.monitoring.v3.IService[]|null); + /** + * Constructs a new Telemetry. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.ITelemetry); - /** ListServicesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Telemetry resourceName. */ + public resourceName: string; - /** Represents a ListServicesResponse. */ - class ListServicesResponse implements IListServicesResponse { + /** + * Creates a new Telemetry instance using the specified properties. + * @param [properties] Properties to set + * @returns Telemetry instance + */ + public static create(properties?: google.monitoring.v3.Service.ITelemetry): google.monitoring.v3.Service.Telemetry; - /** - * Constructs a new ListServicesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListServicesResponse); + /** + * Encodes the specified Telemetry message. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @param message Telemetry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.ITelemetry, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListServicesResponse services. */ - public services: google.monitoring.v3.IService[]; + /** + * Encodes the specified Telemetry message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @param message Telemetry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.ITelemetry, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListServicesResponse nextPageToken. */ - public nextPageToken: string; + /** + * Decodes a Telemetry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.Telemetry; - /** - * Creates a new ListServicesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListServicesResponse instance - */ - public static create(properties?: google.monitoring.v3.IListServicesResponse): google.monitoring.v3.ListServicesResponse; + /** + * Decodes a Telemetry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.Telemetry; - /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a Telemetry message. + * @param message 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 ListServicesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. - * @param message ListServicesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a Telemetry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Telemetry + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.Telemetry; - /** - * Decodes a ListServicesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListServicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServicesResponse; + /** + * Creates a plain object from a Telemetry message. Also converts values to other types if specified. + * @param message Telemetry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.Telemetry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListServicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServicesResponse; + /** + * Converts this Telemetry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Verifies a ListServicesResponse message. - * @param message 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 ServiceLevelObjective. */ + interface IServiceLevelObjective { - /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListServicesResponse - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServicesResponse; + /** ServiceLevelObjective name */ + name?: (string|null); - /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. - * @param message ListServicesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ServiceLevelObjective displayName */ + displayName?: (string|null); - /** - * Converts this ListServicesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ServiceLevelObjective serviceLevelIndicator */ + serviceLevelIndicator?: (google.monitoring.v3.IServiceLevelIndicator|null); - /** Properties of an UpdateServiceRequest. */ - interface IUpdateServiceRequest { + /** ServiceLevelObjective goal */ + goal?: (number|null); - /** UpdateServiceRequest service */ - service?: (google.monitoring.v3.IService|null); + /** ServiceLevelObjective rollingPeriod */ + rollingPeriod?: (google.protobuf.IDuration|null); - /** UpdateServiceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ServiceLevelObjective calendarPeriod */ + calendarPeriod?: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod|null); } - /** Represents an UpdateServiceRequest. */ - class UpdateServiceRequest implements IUpdateServiceRequest { + /** Represents a ServiceLevelObjective. */ + class ServiceLevelObjective implements IServiceLevelObjective { /** - * Constructs a new UpdateServiceRequest. + * Constructs a new ServiceLevelObjective. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IUpdateServiceRequest); + constructor(properties?: google.monitoring.v3.IServiceLevelObjective); - /** UpdateServiceRequest service. */ - public service?: (google.monitoring.v3.IService|null); + /** ServiceLevelObjective name. */ + public name: string; - /** UpdateServiceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ServiceLevelObjective displayName. */ + public displayName: string; + + /** ServiceLevelObjective serviceLevelIndicator. */ + public serviceLevelIndicator?: (google.monitoring.v3.IServiceLevelIndicator|null); + + /** ServiceLevelObjective goal. */ + public goal: number; + + /** ServiceLevelObjective rollingPeriod. */ + public rollingPeriod?: (google.protobuf.IDuration|null); + + /** ServiceLevelObjective calendarPeriod. */ + public calendarPeriod: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod); + + /** ServiceLevelObjective period. */ + public period?: ("rollingPeriod"|"calendarPeriod"); /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new ServiceLevelObjective instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateServiceRequest instance + * @returns ServiceLevelObjective instance */ - public static create(properties?: google.monitoring.v3.IUpdateServiceRequest): google.monitoring.v3.UpdateServiceRequest; + public static create(properties?: google.monitoring.v3.IServiceLevelObjective): google.monitoring.v3.ServiceLevelObjective; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified ServiceLevelObjective message. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * @param message ServiceLevelObjective message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IServiceLevelObjective, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. - * @param message UpdateServiceRequest message or plain object to encode + * Encodes the specified ServiceLevelObjective message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * @param message ServiceLevelObjective message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IServiceLevelObjective, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes a ServiceLevelObjective message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateServiceRequest + * @returns ServiceLevelObjective * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ServiceLevelObjective; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ServiceLevelObjective message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateServiceRequest + * @returns ServiceLevelObjective * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ServiceLevelObjective; /** - * Verifies an UpdateServiceRequest message. + * Verifies a ServiceLevelObjective message. * @param message Plain 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 UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceLevelObjective message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateServiceRequest + * @returns ServiceLevelObjective */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateServiceRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ServiceLevelObjective; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. - * @param message UpdateServiceRequest + * Creates a plain object from a ServiceLevelObjective message. Also converts values to other types if specified. + * @param message ServiceLevelObjective * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ServiceLevelObjective, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this ServiceLevelObjective to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteServiceRequest. */ - interface IDeleteServiceRequest { + namespace ServiceLevelObjective { - /** DeleteServiceRequest name */ - name?: (string|null); + /** View enum. */ + enum View { + VIEW_UNSPECIFIED = 0, + FULL = 2, + EXPLICIT = 1 + } } - /** Represents a DeleteServiceRequest. */ - class DeleteServiceRequest implements IDeleteServiceRequest { + /** Properties of a ServiceLevelIndicator. */ + interface IServiceLevelIndicator { + + /** ServiceLevelIndicator basicSli */ + basicSli?: (google.monitoring.v3.IBasicSli|null); + + /** ServiceLevelIndicator requestBased */ + requestBased?: (google.monitoring.v3.IRequestBasedSli|null); + + /** ServiceLevelIndicator windowsBased */ + windowsBased?: (google.monitoring.v3.IWindowsBasedSli|null); + } + + /** Represents a ServiceLevelIndicator. */ + class ServiceLevelIndicator implements IServiceLevelIndicator { /** - * Constructs a new DeleteServiceRequest. + * Constructs a new ServiceLevelIndicator. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDeleteServiceRequest); + constructor(properties?: google.monitoring.v3.IServiceLevelIndicator); - /** DeleteServiceRequest name. */ - public name: string; + /** ServiceLevelIndicator basicSli. */ + public basicSli?: (google.monitoring.v3.IBasicSli|null); + + /** ServiceLevelIndicator requestBased. */ + public requestBased?: (google.monitoring.v3.IRequestBasedSli|null); + + /** ServiceLevelIndicator windowsBased. */ + public windowsBased?: (google.monitoring.v3.IWindowsBasedSli|null); + + /** ServiceLevelIndicator type. */ + public type?: ("basicSli"|"requestBased"|"windowsBased"); /** - * Creates a new DeleteServiceRequest instance using the specified properties. + * Creates a new ServiceLevelIndicator instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteServiceRequest instance + * @returns ServiceLevelIndicator instance */ - public static create(properties?: google.monitoring.v3.IDeleteServiceRequest): google.monitoring.v3.DeleteServiceRequest; + public static create(properties?: google.monitoring.v3.IServiceLevelIndicator): google.monitoring.v3.ServiceLevelIndicator; /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified ServiceLevelIndicator message. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * @param message ServiceLevelIndicator message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IServiceLevelIndicator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. - * @param message DeleteServiceRequest message or plain object to encode + * Encodes the specified ServiceLevelIndicator message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * @param message ServiceLevelIndicator message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IServiceLevelIndicator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * Decodes a ServiceLevelIndicator message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteServiceRequest + * @returns ServiceLevelIndicator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteServiceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ServiceLevelIndicator; /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a ServiceLevelIndicator message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteServiceRequest + * @returns ServiceLevelIndicator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteServiceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ServiceLevelIndicator; /** - * Verifies a DeleteServiceRequest message. + * Verifies a ServiceLevelIndicator message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceLevelIndicator message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteServiceRequest + * @returns ServiceLevelIndicator */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteServiceRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ServiceLevelIndicator; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. - * @param message DeleteServiceRequest + * Creates a plain object from a ServiceLevelIndicator message. Also converts values to other types if specified. + * @param message ServiceLevelIndicator * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ServiceLevelIndicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteServiceRequest to JSON. + * Converts this ServiceLevelIndicator to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateServiceLevelObjectiveRequest. */ - interface ICreateServiceLevelObjectiveRequest { + /** Properties of a BasicSli. */ + interface IBasicSli { - /** CreateServiceLevelObjectiveRequest parent */ - parent?: (string|null); + /** BasicSli method */ + method?: (string[]|null); - /** CreateServiceLevelObjectiveRequest serviceLevelObjectiveId */ - serviceLevelObjectiveId?: (string|null); + /** BasicSli location */ + location?: (string[]|null); - /** CreateServiceLevelObjectiveRequest serviceLevelObjective */ - serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + /** BasicSli version */ + version?: (string[]|null); + + /** BasicSli availability */ + availability?: (google.monitoring.v3.BasicSli.IAvailabilityCriteria|null); + + /** BasicSli latency */ + latency?: (google.monitoring.v3.BasicSli.ILatencyCriteria|null); } - /** Represents a CreateServiceLevelObjectiveRequest. */ - class CreateServiceLevelObjectiveRequest implements ICreateServiceLevelObjectiveRequest { + /** Represents a BasicSli. */ + class BasicSli implements IBasicSli { /** - * Constructs a new CreateServiceLevelObjectiveRequest. + * Constructs a new BasicSli. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateServiceLevelObjectiveRequest); + constructor(properties?: google.monitoring.v3.IBasicSli); - /** CreateServiceLevelObjectiveRequest parent. */ - public parent: string; + /** BasicSli method. */ + public method: string[]; - /** CreateServiceLevelObjectiveRequest serviceLevelObjectiveId. */ - public serviceLevelObjectiveId: string; + /** BasicSli location. */ + public location: string[]; - /** CreateServiceLevelObjectiveRequest serviceLevelObjective. */ - public serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + /** BasicSli version. */ + public version: string[]; + + /** BasicSli availability. */ + public availability?: (google.monitoring.v3.BasicSli.IAvailabilityCriteria|null); + + /** BasicSli latency. */ + public latency?: (google.monitoring.v3.BasicSli.ILatencyCriteria|null); + + /** BasicSli sliCriteria. */ + public sliCriteria?: ("availability"|"latency"); /** - * Creates a new CreateServiceLevelObjectiveRequest instance using the specified properties. + * Creates a new BasicSli instance using the specified properties. * @param [properties] Properties to set - * @returns CreateServiceLevelObjectiveRequest instance + * @returns BasicSli instance */ - public static create(properties?: google.monitoring.v3.ICreateServiceLevelObjectiveRequest): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + public static create(properties?: google.monitoring.v3.IBasicSli): google.monitoring.v3.BasicSli; /** - * Encodes the specified CreateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. - * @param message CreateServiceLevelObjectiveRequest message or plain object to encode + * Encodes the specified BasicSli message. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @param message BasicSli message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IBasicSli, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. - * @param message CreateServiceLevelObjectiveRequest message or plain object to encode + * Encodes the specified BasicSli message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @param message BasicSli message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IBasicSli, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer. + * Decodes a BasicSli message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateServiceLevelObjectiveRequest + * @returns BasicSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli; /** - * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * Decodes a BasicSli message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateServiceLevelObjectiveRequest + * @returns BasicSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli; /** - * Verifies a CreateServiceLevelObjectiveRequest message. + * Verifies a BasicSli message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BasicSli message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateServiceLevelObjectiveRequest + * @returns BasicSli */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateServiceLevelObjectiveRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli; /** - * Creates a plain object from a CreateServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @param message CreateServiceLevelObjectiveRequest + * Creates a plain object from a BasicSli message. Also converts values to other types if specified. + * @param message BasicSli * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.BasicSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateServiceLevelObjectiveRequest to JSON. + * Converts this BasicSli to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetServiceLevelObjectiveRequest. */ - interface IGetServiceLevelObjectiveRequest { + namespace BasicSli { + + /** Properties of an AvailabilityCriteria. */ + interface IAvailabilityCriteria { + } + + /** Represents an AvailabilityCriteria. */ + class AvailabilityCriteria implements IAvailabilityCriteria { + + /** + * Constructs a new AvailabilityCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.BasicSli.IAvailabilityCriteria); + + /** + * Creates a new AvailabilityCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns AvailabilityCriteria instance + */ + public static create(properties?: google.monitoring.v3.BasicSli.IAvailabilityCriteria): google.monitoring.v3.BasicSli.AvailabilityCriteria; + + /** + * Encodes the specified AvailabilityCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @param message AvailabilityCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.BasicSli.IAvailabilityCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AvailabilityCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @param message AvailabilityCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.BasicSli.IAvailabilityCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AvailabilityCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AvailabilityCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli.AvailabilityCriteria; + + /** + * Decodes an AvailabilityCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AvailabilityCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli.AvailabilityCriteria; - /** GetServiceLevelObjectiveRequest name */ - name?: (string|null); + /** + * Verifies an AvailabilityCriteria message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** GetServiceLevelObjectiveRequest view */ - view?: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View|null); - } + /** + * Creates an AvailabilityCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AvailabilityCriteria + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli.AvailabilityCriteria; - /** Represents a GetServiceLevelObjectiveRequest. */ - class GetServiceLevelObjectiveRequest implements IGetServiceLevelObjectiveRequest { + /** + * Creates a plain object from an AvailabilityCriteria message. Also converts values to other types if specified. + * @param message AvailabilityCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.BasicSli.AvailabilityCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new GetServiceLevelObjectiveRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IGetServiceLevelObjectiveRequest); + /** + * Converts this AvailabilityCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** GetServiceLevelObjectiveRequest name. */ - public name: string; + /** Properties of a LatencyCriteria. */ + interface ILatencyCriteria { - /** GetServiceLevelObjectiveRequest view. */ - public view: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View); + /** LatencyCriteria threshold */ + threshold?: (google.protobuf.IDuration|null); + } - /** - * Creates a new GetServiceLevelObjectiveRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetServiceLevelObjectiveRequest instance - */ - public static create(properties?: google.monitoring.v3.IGetServiceLevelObjectiveRequest): google.monitoring.v3.GetServiceLevelObjectiveRequest; + /** Represents a LatencyCriteria. */ + class LatencyCriteria implements ILatencyCriteria { - /** - * Encodes the specified GetServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. - * @param message GetServiceLevelObjectiveRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IGetServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new LatencyCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.BasicSli.ILatencyCriteria); - /** - * Encodes the specified GetServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. - * @param message GetServiceLevelObjectiveRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IGetServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** LatencyCriteria threshold. */ + public threshold?: (google.protobuf.IDuration|null); - /** - * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetServiceLevelObjectiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetServiceLevelObjectiveRequest; + /** + * Creates a new LatencyCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyCriteria instance + */ + public static create(properties?: google.monitoring.v3.BasicSli.ILatencyCriteria): google.monitoring.v3.BasicSli.LatencyCriteria; - /** - * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetServiceLevelObjectiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetServiceLevelObjectiveRequest; + /** + * Encodes the specified LatencyCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * @param message LatencyCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.BasicSli.ILatencyCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a GetServiceLevelObjectiveRequest message. - * @param message 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 LatencyCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * @param message LatencyCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.BasicSli.ILatencyCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a GetServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetServiceLevelObjectiveRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetServiceLevelObjectiveRequest; + /** + * Decodes a LatencyCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli.LatencyCriteria; - /** - * Creates a plain object from a GetServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @param message GetServiceLevelObjectiveRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.GetServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a LatencyCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli.LatencyCriteria; - /** - * Converts this GetServiceLevelObjectiveRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a LatencyCriteria message. + * @param message 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 ListServiceLevelObjectivesRequest. */ - interface IListServiceLevelObjectivesRequest { + /** + * Creates a LatencyCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyCriteria + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli.LatencyCriteria; - /** ListServiceLevelObjectivesRequest parent */ - parent?: (string|null); + /** + * Creates a plain object from a LatencyCriteria message. Also converts values to other types if specified. + * @param message LatencyCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.BasicSli.LatencyCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListServiceLevelObjectivesRequest filter */ - filter?: (string|null); + /** + * Converts this LatencyCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** ListServiceLevelObjectivesRequest pageSize */ - pageSize?: (number|null); + /** Properties of a Range. */ + interface IRange { - /** ListServiceLevelObjectivesRequest pageToken */ - pageToken?: (string|null); + /** Range min */ + min?: (number|null); - /** ListServiceLevelObjectivesRequest view */ - view?: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View|null); + /** Range max */ + max?: (number|null); } - /** Represents a ListServiceLevelObjectivesRequest. */ - class ListServiceLevelObjectivesRequest implements IListServiceLevelObjectivesRequest { + /** Represents a Range. */ + class Range implements IRange { /** - * Constructs a new ListServiceLevelObjectivesRequest. + * Constructs a new Range. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListServiceLevelObjectivesRequest); - - /** ListServiceLevelObjectivesRequest parent. */ - public parent: string; - - /** ListServiceLevelObjectivesRequest filter. */ - public filter: string; - - /** ListServiceLevelObjectivesRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.monitoring.v3.IRange); - /** ListServiceLevelObjectivesRequest pageToken. */ - public pageToken: string; + /** Range min. */ + public min: number; - /** ListServiceLevelObjectivesRequest view. */ - public view: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View); + /** Range max. */ + public max: number; /** - * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. + * Creates a new Range instance using the specified properties. * @param [properties] Properties to set - * @returns ListServiceLevelObjectivesRequest instance + * @returns Range instance */ - public static create(properties?: google.monitoring.v3.IListServiceLevelObjectivesRequest): google.monitoring.v3.ListServiceLevelObjectivesRequest; + public static create(properties?: google.monitoring.v3.IRange): google.monitoring.v3.Range; /** - * Encodes the specified ListServiceLevelObjectivesRequest message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. - * @param message ListServiceLevelObjectivesRequest message or plain object to encode + * Encodes the specified Range message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IListServiceLevelObjectivesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServiceLevelObjectivesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. - * @param message ListServiceLevelObjectivesRequest message or plain object to encode + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IListServiceLevelObjectivesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServiceLevelObjectivesRequest 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 ListServiceLevelObjectivesRequest + * @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.monitoring.v3.ListServiceLevelObjectivesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Range; /** - * Decodes a ListServiceLevelObjectivesRequest 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 ListServiceLevelObjectivesRequest + * @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.monitoring.v3.ListServiceLevelObjectivesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Range; /** - * Verifies a ListServiceLevelObjectivesRequest 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 ListServiceLevelObjectivesRequest 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 ListServiceLevelObjectivesRequest + * @returns Range */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServiceLevelObjectivesRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Range; /** - * Creates a plain object from a ListServiceLevelObjectivesRequest message. Also converts values to other types if specified. - * @param message ListServiceLevelObjectivesRequest + * 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.monitoring.v3.ListServiceLevelObjectivesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServiceLevelObjectivesRequest to JSON. + * Converts this Range to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListServiceLevelObjectivesResponse. */ - interface IListServiceLevelObjectivesResponse { + /** Properties of a RequestBasedSli. */ + interface IRequestBasedSli { - /** ListServiceLevelObjectivesResponse serviceLevelObjectives */ - serviceLevelObjectives?: (google.monitoring.v3.IServiceLevelObjective[]|null); + /** RequestBasedSli goodTotalRatio */ + goodTotalRatio?: (google.monitoring.v3.ITimeSeriesRatio|null); - /** ListServiceLevelObjectivesResponse nextPageToken */ - nextPageToken?: (string|null); + /** RequestBasedSli distributionCut */ + distributionCut?: (google.monitoring.v3.IDistributionCut|null); } - /** Represents a ListServiceLevelObjectivesResponse. */ - class ListServiceLevelObjectivesResponse implements IListServiceLevelObjectivesResponse { + /** Represents a RequestBasedSli. */ + class RequestBasedSli implements IRequestBasedSli { /** - * Constructs a new ListServiceLevelObjectivesResponse. + * Constructs a new RequestBasedSli. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListServiceLevelObjectivesResponse); + constructor(properties?: google.monitoring.v3.IRequestBasedSli); - /** ListServiceLevelObjectivesResponse serviceLevelObjectives. */ - public serviceLevelObjectives: google.monitoring.v3.IServiceLevelObjective[]; + /** RequestBasedSli goodTotalRatio. */ + public goodTotalRatio?: (google.monitoring.v3.ITimeSeriesRatio|null); - /** ListServiceLevelObjectivesResponse nextPageToken. */ - public nextPageToken: string; + /** RequestBasedSli distributionCut. */ + public distributionCut?: (google.monitoring.v3.IDistributionCut|null); + + /** RequestBasedSli method. */ + public method?: ("goodTotalRatio"|"distributionCut"); /** - * Creates a new ListServiceLevelObjectivesResponse instance using the specified properties. + * Creates a new RequestBasedSli instance using the specified properties. * @param [properties] Properties to set - * @returns ListServiceLevelObjectivesResponse instance + * @returns RequestBasedSli instance */ - public static create(properties?: google.monitoring.v3.IListServiceLevelObjectivesResponse): google.monitoring.v3.ListServiceLevelObjectivesResponse; + public static create(properties?: google.monitoring.v3.IRequestBasedSli): google.monitoring.v3.RequestBasedSli; /** - * Encodes the specified ListServiceLevelObjectivesResponse message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. - * @param message ListServiceLevelObjectivesResponse message or plain object to encode + * Encodes the specified RequestBasedSli message. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * @param message RequestBasedSli message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListServiceLevelObjectivesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IRequestBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListServiceLevelObjectivesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. - * @param message ListServiceLevelObjectivesResponse message or plain object to encode + * Encodes the specified RequestBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * @param message RequestBasedSli message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListServiceLevelObjectivesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IRequestBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer. + * Decodes a RequestBasedSli message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListServiceLevelObjectivesResponse + * @returns RequestBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServiceLevelObjectivesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.RequestBasedSli; /** - * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer, length delimited. + * Decodes a RequestBasedSli message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListServiceLevelObjectivesResponse + * @returns RequestBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServiceLevelObjectivesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.RequestBasedSli; /** - * Verifies a ListServiceLevelObjectivesResponse message. + * Verifies a RequestBasedSli message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListServiceLevelObjectivesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RequestBasedSli message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListServiceLevelObjectivesResponse + * @returns RequestBasedSli */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServiceLevelObjectivesResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.RequestBasedSli; /** - * Creates a plain object from a ListServiceLevelObjectivesResponse message. Also converts values to other types if specified. - * @param message ListServiceLevelObjectivesResponse + * Creates a plain object from a RequestBasedSli message. Also converts values to other types if specified. + * @param message RequestBasedSli * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListServiceLevelObjectivesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.RequestBasedSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListServiceLevelObjectivesResponse to JSON. + * Converts this RequestBasedSli to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateServiceLevelObjectiveRequest. */ - interface IUpdateServiceLevelObjectiveRequest { + /** Properties of a TimeSeriesRatio. */ + interface ITimeSeriesRatio { - /** UpdateServiceLevelObjectiveRequest serviceLevelObjective */ - serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + /** TimeSeriesRatio goodServiceFilter */ + goodServiceFilter?: (string|null); - /** UpdateServiceLevelObjectiveRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** TimeSeriesRatio badServiceFilter */ + badServiceFilter?: (string|null); + + /** TimeSeriesRatio totalServiceFilter */ + totalServiceFilter?: (string|null); } - /** Represents an UpdateServiceLevelObjectiveRequest. */ - class UpdateServiceLevelObjectiveRequest implements IUpdateServiceLevelObjectiveRequest { + /** Represents a TimeSeriesRatio. */ + class TimeSeriesRatio implements ITimeSeriesRatio { /** - * Constructs a new UpdateServiceLevelObjectiveRequest. + * Constructs a new TimeSeriesRatio. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest); + constructor(properties?: google.monitoring.v3.ITimeSeriesRatio); - /** UpdateServiceLevelObjectiveRequest serviceLevelObjective. */ - public serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + /** TimeSeriesRatio goodServiceFilter. */ + public goodServiceFilter: string; - /** UpdateServiceLevelObjectiveRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** TimeSeriesRatio badServiceFilter. */ + public badServiceFilter: string; + + /** TimeSeriesRatio totalServiceFilter. */ + public totalServiceFilter: string; /** - * Creates a new UpdateServiceLevelObjectiveRequest instance using the specified properties. + * Creates a new TimeSeriesRatio instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateServiceLevelObjectiveRequest instance + * @returns TimeSeriesRatio instance */ - public static create(properties?: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + public static create(properties?: google.monitoring.v3.ITimeSeriesRatio): google.monitoring.v3.TimeSeriesRatio; /** - * Encodes the specified UpdateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. - * @param message UpdateServiceLevelObjectiveRequest message or plain object to encode + * Encodes the specified TimeSeriesRatio message. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * @param message TimeSeriesRatio message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ITimeSeriesRatio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. - * @param message UpdateServiceLevelObjectiveRequest message or plain object to encode + * Encodes the specified TimeSeriesRatio message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * @param message TimeSeriesRatio message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ITimeSeriesRatio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer. + * Decodes a TimeSeriesRatio message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateServiceLevelObjectiveRequest + * @returns TimeSeriesRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesRatio; /** - * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesRatio message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateServiceLevelObjectiveRequest + * @returns TimeSeriesRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesRatio; /** - * Verifies an UpdateServiceLevelObjectiveRequest message. + * Verifies a TimeSeriesRatio message. * @param message Plain 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 UpdateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesRatio message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateServiceLevelObjectiveRequest + * @returns TimeSeriesRatio */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesRatio; /** - * Creates a plain object from an UpdateServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @param message UpdateServiceLevelObjectiveRequest + * Creates a plain object from a TimeSeriesRatio message. Also converts values to other types if specified. + * @param message TimeSeriesRatio * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.UpdateServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.TimeSeriesRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateServiceLevelObjectiveRequest to JSON. + * Converts this TimeSeriesRatio to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteServiceLevelObjectiveRequest. */ - interface IDeleteServiceLevelObjectiveRequest { + /** Properties of a DistributionCut. */ + interface IDistributionCut { - /** DeleteServiceLevelObjectiveRequest name */ - name?: (string|null); + /** DistributionCut distributionFilter */ + distributionFilter?: (string|null); + + /** DistributionCut range */ + range?: (google.monitoring.v3.IRange|null); } - /** Represents a DeleteServiceLevelObjectiveRequest. */ - class DeleteServiceLevelObjectiveRequest implements IDeleteServiceLevelObjectiveRequest { + /** Represents a DistributionCut. */ + class DistributionCut implements IDistributionCut { /** - * Constructs a new DeleteServiceLevelObjectiveRequest. + * Constructs a new DistributionCut. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest); + constructor(properties?: google.monitoring.v3.IDistributionCut); - /** DeleteServiceLevelObjectiveRequest name. */ - public name: string; + /** DistributionCut distributionFilter. */ + public distributionFilter: string; + + /** DistributionCut range. */ + public range?: (google.monitoring.v3.IRange|null); /** - * Creates a new DeleteServiceLevelObjectiveRequest instance using the specified properties. + * Creates a new DistributionCut instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteServiceLevelObjectiveRequest instance + * @returns DistributionCut instance */ - public static create(properties?: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + public static create(properties?: google.monitoring.v3.IDistributionCut): google.monitoring.v3.DistributionCut; /** - * Encodes the specified DeleteServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. - * @param message DeleteServiceLevelObjectiveRequest message or plain object to encode + * Encodes the specified DistributionCut message. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @param message DistributionCut message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDistributionCut, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. - * @param message DeleteServiceLevelObjectiveRequest message or plain object to encode + * Encodes the specified DistributionCut message, length delimited. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @param message DistributionCut message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDistributionCut, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer. + * Decodes a DistributionCut message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteServiceLevelObjectiveRequest + * @returns DistributionCut * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DistributionCut; /** - * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * Decodes a DistributionCut message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteServiceLevelObjectiveRequest + * @returns DistributionCut * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DistributionCut; /** - * Verifies a DeleteServiceLevelObjectiveRequest message. + * Verifies a DistributionCut message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DistributionCut message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteServiceLevelObjectiveRequest + * @returns DistributionCut */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DistributionCut; /** - * Creates a plain object from a DeleteServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @param message DeleteServiceLevelObjectiveRequest + * Creates a plain object from a DistributionCut message. Also converts values to other types if specified. + * @param message DistributionCut * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DeleteServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.DistributionCut, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteServiceLevelObjectiveRequest to JSON. + * Converts this DistributionCut to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Service. */ - interface IService { - - /** Service name */ - name?: (string|null); - - /** Service displayName */ - displayName?: (string|null); + /** Properties of a WindowsBasedSli. */ + interface IWindowsBasedSli { - /** Service custom */ - custom?: (google.monitoring.v3.Service.ICustom|null); + /** WindowsBasedSli goodBadMetricFilter */ + goodBadMetricFilter?: (string|null); - /** Service appEngine */ - appEngine?: (google.monitoring.v3.Service.IAppEngine|null); + /** WindowsBasedSli goodTotalRatioThreshold */ + goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); - /** Service cloudEndpoints */ - cloudEndpoints?: (google.monitoring.v3.Service.ICloudEndpoints|null); + /** WindowsBasedSli metricMeanInRange */ + metricMeanInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); - /** Service clusterIstio */ - clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + /** WindowsBasedSli metricSumInRange */ + metricSumInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); - /** Service telemetry */ - telemetry?: (google.monitoring.v3.Service.ITelemetry|null); + /** WindowsBasedSli windowPeriod */ + windowPeriod?: (google.protobuf.IDuration|null); } - /** Represents a Service. */ - class Service implements IService { + /** Represents a WindowsBasedSli. */ + class WindowsBasedSli implements IWindowsBasedSli { /** - * Constructs a new Service. + * Constructs a new WindowsBasedSli. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IService); - - /** Service name. */ - public name: string; - - /** Service displayName. */ - public displayName: string; + constructor(properties?: google.monitoring.v3.IWindowsBasedSli); - /** Service custom. */ - public custom?: (google.monitoring.v3.Service.ICustom|null); + /** WindowsBasedSli goodBadMetricFilter. */ + public goodBadMetricFilter: string; - /** Service appEngine. */ - public appEngine?: (google.monitoring.v3.Service.IAppEngine|null); + /** WindowsBasedSli goodTotalRatioThreshold. */ + public goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); - /** Service cloudEndpoints. */ - public cloudEndpoints?: (google.monitoring.v3.Service.ICloudEndpoints|null); + /** WindowsBasedSli metricMeanInRange. */ + public metricMeanInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); - /** Service clusterIstio. */ - public clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + /** WindowsBasedSli metricSumInRange. */ + public metricSumInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); - /** Service telemetry. */ - public telemetry?: (google.monitoring.v3.Service.ITelemetry|null); + /** WindowsBasedSli windowPeriod. */ + public windowPeriod?: (google.protobuf.IDuration|null); - /** Service identifier. */ - public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"); + /** WindowsBasedSli windowCriterion. */ + public windowCriterion?: ("goodBadMetricFilter"|"goodTotalRatioThreshold"|"metricMeanInRange"|"metricSumInRange"); /** - * Creates a new Service instance using the specified properties. + * Creates a new WindowsBasedSli instance using the specified properties. * @param [properties] Properties to set - * @returns Service instance + * @returns WindowsBasedSli instance */ - public static create(properties?: google.monitoring.v3.IService): google.monitoring.v3.Service; + public static create(properties?: google.monitoring.v3.IWindowsBasedSli): google.monitoring.v3.WindowsBasedSli; /** - * Encodes the specified Service message. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified WindowsBasedSli message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * @param message WindowsBasedSli message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IWindowsBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. - * @param message Service message or plain object to encode + * Encodes the specified WindowsBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * @param message WindowsBasedSli message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IWindowsBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a WindowsBasedSli message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Service + * @returns WindowsBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a WindowsBasedSli message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Service + * @returns WindowsBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli; /** - * Verifies a Service message. + * Verifies a WindowsBasedSli message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsBasedSli message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Service + * @returns WindowsBasedSli */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli; /** - * Creates a plain object from a Service message. Also converts values to other types if specified. - * @param message Service + * Creates a plain object from a WindowsBasedSli message. Also converts values to other types if specified. + * @param message WindowsBasedSli * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Service, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.WindowsBasedSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Service to JSON. + * Converts this WindowsBasedSli to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Service { - - /** Properties of a Custom. */ - interface ICustom { - } - - /** Represents a Custom. */ - class Custom implements ICustom { - - /** - * Constructs a new Custom. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.Service.ICustom); - - /** - * Creates a new Custom instance using the specified properties. - * @param [properties] Properties to set - * @returns Custom instance - */ - public static create(properties?: google.monitoring.v3.Service.ICustom): google.monitoring.v3.Service.Custom; - - /** - * Encodes the specified Custom message. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. - * @param message Custom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.Service.ICustom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Custom message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. - * @param message Custom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.Service.ICustom, writer?: $protobuf.Writer): $protobuf.Writer; + namespace WindowsBasedSli { - /** - * Decodes a Custom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Custom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.Custom; + /** Properties of a PerformanceThreshold. */ + interface IPerformanceThreshold { - /** - * Decodes a Custom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Custom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.Custom; + /** PerformanceThreshold performance */ + performance?: (google.monitoring.v3.IRequestBasedSli|null); - /** - * Verifies a Custom message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** PerformanceThreshold basicSliPerformance */ + basicSliPerformance?: (google.monitoring.v3.IBasicSli|null); - /** - * Creates a Custom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Custom - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.Custom; + /** PerformanceThreshold threshold */ + threshold?: (number|null); + } - /** - * Creates a plain object from a Custom message. Also converts values to other types if specified. - * @param message Custom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.Service.Custom, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a PerformanceThreshold. */ + class PerformanceThreshold implements IPerformanceThreshold { /** - * Converts this Custom to JSON. - * @returns JSON object + * Constructs a new PerformanceThreshold. + * @param [properties] Properties to set */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppEngine. */ - interface IAppEngine { + constructor(properties?: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold); - /** AppEngine moduleId */ - moduleId?: (string|null); - } + /** PerformanceThreshold performance. */ + public performance?: (google.monitoring.v3.IRequestBasedSli|null); - /** Represents an AppEngine. */ - class AppEngine implements IAppEngine { + /** PerformanceThreshold basicSliPerformance. */ + public basicSliPerformance?: (google.monitoring.v3.IBasicSli|null); - /** - * Constructs a new AppEngine. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.Service.IAppEngine); + /** PerformanceThreshold threshold. */ + public threshold: number; - /** AppEngine moduleId. */ - public moduleId: string; + /** PerformanceThreshold type. */ + public type?: ("performance"|"basicSliPerformance"); /** - * Creates a new AppEngine instance using the specified properties. + * Creates a new PerformanceThreshold instance using the specified properties. * @param [properties] Properties to set - * @returns AppEngine instance + * @returns PerformanceThreshold instance */ - public static create(properties?: google.monitoring.v3.Service.IAppEngine): google.monitoring.v3.Service.AppEngine; + public static create(properties?: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; /** - * Encodes the specified AppEngine message. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. - * @param message AppEngine message or plain object to encode + * Encodes the specified PerformanceThreshold message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. + * @param message PerformanceThreshold message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.Service.IAppEngine, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AppEngine message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. - * @param message AppEngine message or plain object to encode + * Encodes the specified PerformanceThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. + * @param message PerformanceThreshold message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.Service.IAppEngine, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AppEngine message from the specified reader or buffer. + * Decodes a PerformanceThreshold message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AppEngine + * @returns PerformanceThreshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.AppEngine; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; /** - * Decodes an AppEngine message from the specified reader or buffer, length delimited. + * Decodes a PerformanceThreshold message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AppEngine + * @returns PerformanceThreshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.AppEngine; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; /** - * Verifies an AppEngine message. + * Verifies a PerformanceThreshold message. * @param message Plain 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 AppEngine message from a plain object. Also converts values to their respective internal types. + * Creates a PerformanceThreshold message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AppEngine + * @returns PerformanceThreshold */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.AppEngine; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; /** - * Creates a plain object from an AppEngine message. Also converts values to other types if specified. - * @param message AppEngine + * Creates a plain object from a PerformanceThreshold message. Also converts values to other types if specified. + * @param message PerformanceThreshold * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Service.AppEngine, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.WindowsBasedSli.PerformanceThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AppEngine to JSON. + * Converts this PerformanceThreshold to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CloudEndpoints. */ - interface ICloudEndpoints { + /** Properties of a MetricRange. */ + interface IMetricRange { - /** CloudEndpoints service */ - service?: (string|null); + /** MetricRange timeSeries */ + timeSeries?: (string|null); + + /** MetricRange range */ + range?: (google.monitoring.v3.IRange|null); } - /** Represents a CloudEndpoints. */ - class CloudEndpoints implements ICloudEndpoints { + /** Represents a MetricRange. */ + class MetricRange implements IMetricRange { /** - * Constructs a new CloudEndpoints. + * Constructs a new MetricRange. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.Service.ICloudEndpoints); + constructor(properties?: google.monitoring.v3.WindowsBasedSli.IMetricRange); - /** CloudEndpoints service. */ - public service: string; + /** MetricRange timeSeries. */ + public timeSeries: string; + + /** MetricRange range. */ + public range?: (google.monitoring.v3.IRange|null); /** - * Creates a new CloudEndpoints instance using the specified properties. + * Creates a new MetricRange instance using the specified properties. * @param [properties] Properties to set - * @returns CloudEndpoints instance + * @returns MetricRange instance */ - public static create(properties?: google.monitoring.v3.Service.ICloudEndpoints): google.monitoring.v3.Service.CloudEndpoints; + public static create(properties?: google.monitoring.v3.WindowsBasedSli.IMetricRange): google.monitoring.v3.WindowsBasedSli.MetricRange; /** - * Encodes the specified CloudEndpoints message. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. - * @param message CloudEndpoints message or plain object to encode + * Encodes the specified MetricRange message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. + * @param message MetricRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.Service.ICloudEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.WindowsBasedSli.IMetricRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudEndpoints message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. - * @param message CloudEndpoints message or plain object to encode + * Encodes the specified MetricRange message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. + * @param message MetricRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.Service.ICloudEndpoints, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.WindowsBasedSli.IMetricRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudEndpoints message from the specified reader or buffer. + * Decodes a MetricRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudEndpoints + * @returns MetricRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.CloudEndpoints; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli.MetricRange; /** - * Decodes a CloudEndpoints message from the specified reader or buffer, length delimited. + * Decodes a MetricRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudEndpoints + * @returns MetricRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.CloudEndpoints; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli.MetricRange; /** - * Verifies a CloudEndpoints message. + * Verifies a MetricRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CloudEndpoints message from a plain object. Also converts values to their respective internal types. + * Creates a MetricRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudEndpoints + * @returns MetricRange */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.CloudEndpoints; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli.MetricRange; /** - * Creates a plain object from a CloudEndpoints message. Also converts values to other types if specified. - * @param message CloudEndpoints + * Creates a plain object from a MetricRange message. Also converts values to other types if specified. + * @param message MetricRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Service.CloudEndpoints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.WindowsBasedSli.MetricRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudEndpoints to JSON. + * Converts this MetricRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of a ClusterIstio. */ - interface IClusterIstio { + /** Represents a ServiceMonitoringService */ + class ServiceMonitoringService extends $protobuf.rpc.Service { - /** ClusterIstio location */ - location?: (string|null); + /** + * Constructs a new ServiceMonitoringService 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); - /** ClusterIstio clusterName */ - clusterName?: (string|null); + /** + * Creates new ServiceMonitoringService 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): ServiceMonitoringService; - /** ClusterIstio serviceNamespace */ - serviceNamespace?: (string|null); + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public createService(request: google.monitoring.v3.ICreateServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.CreateServiceCallback): void; - /** ClusterIstio serviceName */ - serviceName?: (string|null); - } + /** + * Calls CreateService. + * @param request CreateServiceRequest message or plain object + * @returns Promise + */ + public createService(request: google.monitoring.v3.ICreateServiceRequest): Promise; - /** Represents a ClusterIstio. */ - class ClusterIstio implements IClusterIstio { + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public getService(request: google.monitoring.v3.IGetServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.GetServiceCallback): void; - /** - * Constructs a new ClusterIstio. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.Service.IClusterIstio); + /** + * Calls GetService. + * @param request GetServiceRequest message or plain object + * @returns Promise + */ + public getService(request: google.monitoring.v3.IGetServiceRequest): Promise; - /** ClusterIstio location. */ - public location: string; + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServicesResponse + */ + public listServices(request: google.monitoring.v3.IListServicesRequest, callback: google.monitoring.v3.ServiceMonitoringService.ListServicesCallback): void; - /** ClusterIstio clusterName. */ - public clusterName: string; + /** + * Calls ListServices. + * @param request ListServicesRequest message or plain object + * @returns Promise + */ + public listServices(request: google.monitoring.v3.IListServicesRequest): Promise; - /** ClusterIstio serviceNamespace. */ - public serviceNamespace: string; + /** + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Service + */ + public updateService(request: google.monitoring.v3.IUpdateServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.UpdateServiceCallback): void; - /** ClusterIstio serviceName. */ - public serviceName: string; + /** + * Calls UpdateService. + * @param request UpdateServiceRequest message or plain object + * @returns Promise + */ + public updateService(request: google.monitoring.v3.IUpdateServiceRequest): Promise; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteService(request: google.monitoring.v3.IDeleteServiceRequest, callback: google.monitoring.v3.ServiceMonitoringService.DeleteServiceCallback): void; + + /** + * Calls DeleteService. + * @param request DeleteServiceRequest message or plain object + * @returns Promise + */ + public deleteService(request: google.monitoring.v3.IDeleteServiceRequest): Promise; + + /** + * Calls CreateServiceLevelObjective. + * @param request CreateServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + */ + public createServiceLevelObjective(request: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.CreateServiceLevelObjectiveCallback): void; + + /** + * Calls CreateServiceLevelObjective. + * @param request CreateServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public createServiceLevelObjective(request: google.monitoring.v3.ICreateServiceLevelObjectiveRequest): Promise; + + /** + * Calls GetServiceLevelObjective. + * @param request GetServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + */ + public getServiceLevelObjective(request: google.monitoring.v3.IGetServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjectiveCallback): void; + + /** + * Calls GetServiceLevelObjective. + * @param request GetServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public getServiceLevelObjective(request: google.monitoring.v3.IGetServiceLevelObjectiveRequest): Promise; + + /** + * Calls ListServiceLevelObjectives. + * @param request ListServiceLevelObjectivesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListServiceLevelObjectivesResponse + */ + public listServiceLevelObjectives(request: google.monitoring.v3.IListServiceLevelObjectivesRequest, callback: google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectivesCallback): void; + + /** + * Calls ListServiceLevelObjectives. + * @param request ListServiceLevelObjectivesRequest message or plain object + * @returns Promise + */ + public listServiceLevelObjectives(request: google.monitoring.v3.IListServiceLevelObjectivesRequest): Promise; + + /** + * Calls UpdateServiceLevelObjective. + * @param request UpdateServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ServiceLevelObjective + */ + public updateServiceLevelObjective(request: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.UpdateServiceLevelObjectiveCallback): void; + + /** + * Calls UpdateServiceLevelObjective. + * @param request UpdateServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public updateServiceLevelObjective(request: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest): Promise; + + /** + * Calls DeleteServiceLevelObjective. + * @param request DeleteServiceLevelObjectiveRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteServiceLevelObjective(request: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, callback: google.monitoring.v3.ServiceMonitoringService.DeleteServiceLevelObjectiveCallback): void; + + /** + * Calls DeleteServiceLevelObjective. + * @param request DeleteServiceLevelObjectiveRequest message or plain object + * @returns Promise + */ + public deleteServiceLevelObjective(request: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest): Promise; + } - /** - * Creates a new ClusterIstio instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterIstio instance - */ - public static create(properties?: google.monitoring.v3.Service.IClusterIstio): google.monitoring.v3.Service.ClusterIstio; + namespace ServiceMonitoringService { - /** - * Encodes the specified ClusterIstio message. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. - * @param message ClusterIstio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.Service.IClusterIstio, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. + * @param error Error, if any + * @param [response] Service + */ + type CreateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; - /** - * Encodes the specified ClusterIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. - * @param message ClusterIstio message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.Service.IClusterIstio, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. + * @param error Error, if any + * @param [response] Service + */ + type GetServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; - /** - * Decodes a ClusterIstio message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterIstio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.ClusterIstio; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. + * @param error Error, if any + * @param [response] ListServicesResponse + */ + type ListServicesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServicesResponse) => void; - /** - * Decodes a ClusterIstio message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterIstio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.ClusterIstio; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. + * @param error Error, if any + * @param [response] Service + */ + type UpdateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; - /** - * Verifies a ClusterIstio message. - * @param message 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.monitoring.v3.ServiceMonitoringService#deleteService}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteServiceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** - * Creates a ClusterIstio message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterIstio - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.ClusterIstio; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. + * @param error Error, if any + * @param [response] ServiceLevelObjective + */ + type CreateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; - /** - * Creates a plain object from a ClusterIstio message. Also converts values to other types if specified. - * @param message ClusterIstio - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.Service.ClusterIstio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. + * @param error Error, if any + * @param [response] ServiceLevelObjective + */ + type GetServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; - /** - * Converts this ClusterIstio to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. + * @param error Error, if any + * @param [response] ListServiceLevelObjectivesResponse + */ + type ListServiceLevelObjectivesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServiceLevelObjectivesResponse) => void; - /** Properties of a Telemetry. */ - interface ITelemetry { + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. + * @param error Error, if any + * @param [response] ServiceLevelObjective + */ + type UpdateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; - /** Telemetry resourceName */ - resourceName?: (string|null); - } + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteServiceLevelObjectiveCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** Represents a Telemetry. */ - class Telemetry implements ITelemetry { + /** Properties of a CreateServiceRequest. */ + interface ICreateServiceRequest { - /** - * Constructs a new Telemetry. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.Service.ITelemetry); + /** CreateServiceRequest parent */ + parent?: (string|null); - /** Telemetry resourceName. */ - public resourceName: string; + /** CreateServiceRequest serviceId */ + serviceId?: (string|null); - /** - * Creates a new Telemetry instance using the specified properties. - * @param [properties] Properties to set - * @returns Telemetry instance - */ - public static create(properties?: google.monitoring.v3.Service.ITelemetry): google.monitoring.v3.Service.Telemetry; + /** CreateServiceRequest service */ + service?: (google.monitoring.v3.IService|null); + } - /** - * Encodes the specified Telemetry message. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. - * @param message Telemetry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.Service.ITelemetry, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a CreateServiceRequest. */ + class CreateServiceRequest implements ICreateServiceRequest { - /** - * Encodes the specified Telemetry message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. - * @param message Telemetry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.Service.ITelemetry, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new CreateServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateServiceRequest); - /** - * Decodes a Telemetry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Telemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.Telemetry; + /** CreateServiceRequest parent. */ + public parent: string; - /** - * Decodes a Telemetry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Telemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.Telemetry; + /** CreateServiceRequest serviceId. */ + public serviceId: string; - /** - * Verifies a Telemetry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** CreateServiceRequest service. */ + public service?: (google.monitoring.v3.IService|null); - /** - * Creates a Telemetry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Telemetry - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.Telemetry; + /** + * Creates a new CreateServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateServiceRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateServiceRequest): google.monitoring.v3.CreateServiceRequest; - /** - * Creates a plain object from a Telemetry message. Also converts values to other types if specified. - * @param message Telemetry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.Service.Telemetry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Telemetry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * @param message CreateServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ServiceLevelObjective. */ - interface IServiceLevelObjective { + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateServiceRequest; - /** ServiceLevelObjective name */ - name?: (string|null); + /** + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateServiceRequest; - /** ServiceLevelObjective displayName */ - displayName?: (string|null); + /** + * Verifies a CreateServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ServiceLevelObjective serviceLevelIndicator */ - serviceLevelIndicator?: (google.monitoring.v3.IServiceLevelIndicator|null); + /** + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateServiceRequest; - /** ServiceLevelObjective goal */ - goal?: (number|null); + /** + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * @param message CreateServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceLevelObjective rollingPeriod */ - rollingPeriod?: (google.protobuf.IDuration|null); + /** + * Converts this CreateServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ServiceLevelObjective calendarPeriod */ - calendarPeriod?: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod|null); + /** Properties of a GetServiceRequest. */ + interface IGetServiceRequest { + + /** GetServiceRequest name */ + name?: (string|null); } - /** Represents a ServiceLevelObjective. */ - class ServiceLevelObjective implements IServiceLevelObjective { + /** Represents a GetServiceRequest. */ + class GetServiceRequest implements IGetServiceRequest { /** - * Constructs a new ServiceLevelObjective. + * Constructs a new GetServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IServiceLevelObjective); + constructor(properties?: google.monitoring.v3.IGetServiceRequest); - /** ServiceLevelObjective name. */ + /** GetServiceRequest name. */ public name: string; - /** ServiceLevelObjective displayName. */ - public displayName: string; - - /** ServiceLevelObjective serviceLevelIndicator. */ - public serviceLevelIndicator?: (google.monitoring.v3.IServiceLevelIndicator|null); - - /** ServiceLevelObjective goal. */ - public goal: number; - - /** ServiceLevelObjective rollingPeriod. */ - public rollingPeriod?: (google.protobuf.IDuration|null); - - /** ServiceLevelObjective calendarPeriod. */ - public calendarPeriod: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod); - - /** ServiceLevelObjective period. */ - public period?: ("rollingPeriod"|"calendarPeriod"); - /** - * Creates a new ServiceLevelObjective instance using the specified properties. + * Creates a new GetServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceLevelObjective instance + * @returns GetServiceRequest instance */ - public static create(properties?: google.monitoring.v3.IServiceLevelObjective): google.monitoring.v3.ServiceLevelObjective; + public static create(properties?: google.monitoring.v3.IGetServiceRequest): google.monitoring.v3.GetServiceRequest; /** - * Encodes the specified ServiceLevelObjective message. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. - * @param message ServiceLevelObjective message or plain object to encode + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IServiceLevelObjective, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ServiceLevelObjective message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. - * @param message ServiceLevelObjective message or plain object to encode + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * @param message GetServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IServiceLevelObjective, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceLevelObjective message from the specified reader or buffer. + * Decodes a GetServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceLevelObjective + * @returns GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ServiceLevelObjective; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetServiceRequest; /** - * Decodes a ServiceLevelObjective message from the specified reader or buffer, length delimited. + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceLevelObjective + * @returns GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ServiceLevelObjective; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetServiceRequest; /** - * Verifies a ServiceLevelObjective message. + * Verifies a GetServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ServiceLevelObjective message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceLevelObjective + * @returns GetServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ServiceLevelObjective; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetServiceRequest; /** - * Creates a plain object from a ServiceLevelObjective message. Also converts values to other types if specified. - * @param message ServiceLevelObjective + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * @param message GetServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ServiceLevelObjective, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceLevelObjective to JSON. + * Converts this GetServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ServiceLevelObjective { - - /** View enum. */ - enum View { - VIEW_UNSPECIFIED = 0, - FULL = 2, - EXPLICIT = 1 - } - } + /** Properties of a ListServicesRequest. */ + interface IListServicesRequest { - /** Properties of a ServiceLevelIndicator. */ - interface IServiceLevelIndicator { + /** ListServicesRequest parent */ + parent?: (string|null); - /** ServiceLevelIndicator basicSli */ - basicSli?: (google.monitoring.v3.IBasicSli|null); + /** ListServicesRequest filter */ + filter?: (string|null); - /** ServiceLevelIndicator requestBased */ - requestBased?: (google.monitoring.v3.IRequestBasedSli|null); + /** ListServicesRequest pageSize */ + pageSize?: (number|null); - /** ServiceLevelIndicator windowsBased */ - windowsBased?: (google.monitoring.v3.IWindowsBasedSli|null); + /** ListServicesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a ServiceLevelIndicator. */ - class ServiceLevelIndicator implements IServiceLevelIndicator { + /** Represents a ListServicesRequest. */ + class ListServicesRequest implements IListServicesRequest { /** - * Constructs a new ServiceLevelIndicator. + * Constructs a new ListServicesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IServiceLevelIndicator); + constructor(properties?: google.monitoring.v3.IListServicesRequest); - /** ServiceLevelIndicator basicSli. */ - public basicSli?: (google.monitoring.v3.IBasicSli|null); + /** ListServicesRequest parent. */ + public parent: string; - /** ServiceLevelIndicator requestBased. */ - public requestBased?: (google.monitoring.v3.IRequestBasedSli|null); + /** ListServicesRequest filter. */ + public filter: string; - /** ServiceLevelIndicator windowsBased. */ - public windowsBased?: (google.monitoring.v3.IWindowsBasedSli|null); + /** ListServicesRequest pageSize. */ + public pageSize: number; - /** ServiceLevelIndicator type. */ - public type?: ("basicSli"|"requestBased"|"windowsBased"); + /** ListServicesRequest pageToken. */ + public pageToken: string; /** - * Creates a new ServiceLevelIndicator instance using the specified properties. + * Creates a new ListServicesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceLevelIndicator instance + * @returns ListServicesRequest instance */ - public static create(properties?: google.monitoring.v3.IServiceLevelIndicator): google.monitoring.v3.ServiceLevelIndicator; + public static create(properties?: google.monitoring.v3.IListServicesRequest): google.monitoring.v3.ListServicesRequest; /** - * Encodes the specified ServiceLevelIndicator message. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. - * @param message ServiceLevelIndicator message or plain object to encode + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IServiceLevelIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ServiceLevelIndicator message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. - * @param message ServiceLevelIndicator message or plain object to encode + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * @param message ListServicesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IServiceLevelIndicator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceLevelIndicator message from the specified reader or buffer. + * Decodes a ListServicesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceLevelIndicator + * @returns ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ServiceLevelIndicator; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServicesRequest; /** - * Decodes a ServiceLevelIndicator message from the specified reader or buffer, length delimited. + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceLevelIndicator + * @returns ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ServiceLevelIndicator; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServicesRequest; /** - * Verifies a ServiceLevelIndicator message. + * Verifies a ListServicesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ServiceLevelIndicator message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceLevelIndicator + * @returns ListServicesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ServiceLevelIndicator; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServicesRequest; /** - * Creates a plain object from a ServiceLevelIndicator message. Also converts values to other types if specified. - * @param message ServiceLevelIndicator + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * @param message ListServicesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ServiceLevelIndicator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceLevelIndicator to JSON. + * Converts this ListServicesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BasicSli. */ - interface IBasicSli { - - /** BasicSli method */ - method?: (string[]|null); - - /** BasicSli location */ - location?: (string[]|null); - - /** BasicSli version */ - version?: (string[]|null); - - /** BasicSli availability */ - availability?: (google.monitoring.v3.BasicSli.IAvailabilityCriteria|null); - - /** BasicSli latency */ - latency?: (google.monitoring.v3.BasicSli.ILatencyCriteria|null); - } - - /** Represents a BasicSli. */ - class BasicSli implements IBasicSli { - - /** - * Constructs a new BasicSli. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IBasicSli); + /** Properties of a ListServicesResponse. */ + interface IListServicesResponse { - /** BasicSli method. */ - public method: string[]; + /** ListServicesResponse services */ + services?: (google.monitoring.v3.IService[]|null); - /** BasicSli location. */ - public location: string[]; + /** ListServicesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** BasicSli version. */ - public version: string[]; + /** Represents a ListServicesResponse. */ + class ListServicesResponse implements IListServicesResponse { - /** BasicSli availability. */ - public availability?: (google.monitoring.v3.BasicSli.IAvailabilityCriteria|null); + /** + * Constructs a new ListServicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListServicesResponse); - /** BasicSli latency. */ - public latency?: (google.monitoring.v3.BasicSli.ILatencyCriteria|null); + /** ListServicesResponse services. */ + public services: google.monitoring.v3.IService[]; - /** BasicSli sliCriteria. */ - public sliCriteria?: ("availability"|"latency"); + /** ListServicesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new BasicSli instance using the specified properties. + * Creates a new ListServicesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BasicSli instance + * @returns ListServicesResponse instance */ - public static create(properties?: google.monitoring.v3.IBasicSli): google.monitoring.v3.BasicSli; + public static create(properties?: google.monitoring.v3.IListServicesResponse): google.monitoring.v3.ListServicesResponse; /** - * Encodes the specified BasicSli message. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. - * @param message BasicSli message or plain object to encode + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IBasicSli, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BasicSli message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. - * @param message BasicSli message or plain object to encode + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @param message ListServicesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IBasicSli, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BasicSli message from the specified reader or buffer. + * Decodes a ListServicesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BasicSli + * @returns ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServicesResponse; /** - * Decodes a BasicSli message from the specified reader or buffer, length delimited. + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BasicSli + * @returns ListServicesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServicesResponse; /** - * Verifies a BasicSli message. + * Verifies a ListServicesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BasicSli message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BasicSli + * @returns ListServicesResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServicesResponse; /** - * Creates a plain object from a BasicSli message. Also converts values to other types if specified. - * @param message BasicSli + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @param message ListServicesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.BasicSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BasicSli to JSON. + * Converts this ListServicesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BasicSli { - - /** Properties of an AvailabilityCriteria. */ - interface IAvailabilityCriteria { - } - - /** Represents an AvailabilityCriteria. */ - class AvailabilityCriteria implements IAvailabilityCriteria { - - /** - * Constructs a new AvailabilityCriteria. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.BasicSli.IAvailabilityCriteria); - - /** - * Creates a new AvailabilityCriteria instance using the specified properties. - * @param [properties] Properties to set - * @returns AvailabilityCriteria instance - */ - public static create(properties?: google.monitoring.v3.BasicSli.IAvailabilityCriteria): google.monitoring.v3.BasicSli.AvailabilityCriteria; - - /** - * Encodes the specified AvailabilityCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. - * @param message AvailabilityCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.BasicSli.IAvailabilityCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvailabilityCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. - * @param message AvailabilityCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.BasicSli.IAvailabilityCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvailabilityCriteria message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvailabilityCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli.AvailabilityCriteria; - - /** - * Decodes an AvailabilityCriteria message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvailabilityCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli.AvailabilityCriteria; - - /** - * Verifies an AvailabilityCriteria message. - * @param message Plain 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 AvailabilityCriteria message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvailabilityCriteria - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli.AvailabilityCriteria; - - /** - * Creates a plain object from an AvailabilityCriteria message. Also converts values to other types if specified. - * @param message AvailabilityCriteria - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.BasicSli.AvailabilityCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvailabilityCriteria to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LatencyCriteria. */ - interface ILatencyCriteria { - - /** LatencyCriteria threshold */ - threshold?: (google.protobuf.IDuration|null); - } - - /** Represents a LatencyCriteria. */ - class LatencyCriteria implements ILatencyCriteria { - - /** - * Constructs a new LatencyCriteria. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.BasicSli.ILatencyCriteria); - - /** LatencyCriteria threshold. */ - public threshold?: (google.protobuf.IDuration|null); - - /** - * Creates a new LatencyCriteria instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyCriteria instance - */ - public static create(properties?: google.monitoring.v3.BasicSli.ILatencyCriteria): google.monitoring.v3.BasicSli.LatencyCriteria; - - /** - * Encodes the specified LatencyCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. - * @param message LatencyCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.BasicSli.ILatencyCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. - * @param message LatencyCriteria message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.BasicSli.ILatencyCriteria, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyCriteria message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.BasicSli.LatencyCriteria; - - /** - * Decodes a LatencyCriteria message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyCriteria - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.BasicSli.LatencyCriteria; - - /** - * Verifies a LatencyCriteria message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyCriteria message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyCriteria - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.BasicSli.LatencyCriteria; - - /** - * Creates a plain object from a LatencyCriteria message. Also converts values to other types if specified. - * @param message LatencyCriteria - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.BasicSli.LatencyCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyCriteria to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a Range. */ - interface IRange { - - /** Range min */ - min?: (number|null); + /** Properties of an UpdateServiceRequest. */ + interface IUpdateServiceRequest { - /** Range max */ - max?: (number|null); + /** UpdateServiceRequest service */ + service?: (google.monitoring.v3.IService|null); + + /** UpdateServiceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Range. */ - class Range implements IRange { + /** Represents an UpdateServiceRequest. */ + class UpdateServiceRequest implements IUpdateServiceRequest { /** - * Constructs a new Range. + * Constructs a new UpdateServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IRange); + constructor(properties?: google.monitoring.v3.IUpdateServiceRequest); - /** Range min. */ - public min: number; + /** UpdateServiceRequest service. */ + public service?: (google.monitoring.v3.IService|null); - /** Range max. */ - public max: number; + /** UpdateServiceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Range instance using the specified properties. + * Creates a new UpdateServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Range instance + * @returns UpdateServiceRequest instance */ - public static create(properties?: google.monitoring.v3.IRange): google.monitoring.v3.Range; + public static create(properties?: google.monitoring.v3.IUpdateServiceRequest): google.monitoring.v3.UpdateServiceRequest; /** - * Encodes the specified Range message. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. - * @param message Range message or plain object to encode + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * @param message UpdateServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IUpdateServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes an UpdateServiceRequest 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 UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Range; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateServiceRequest; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Range + * @returns UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Range; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateServiceRequest; /** - * Verifies a Range message. + * Verifies an UpdateServiceRequest message. * @param message Plain object 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 UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Range + * @returns UpdateServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Range; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateServiceRequest; /** - * 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 UpdateServiceRequest message. Also converts values to other types if specified. + * @param message UpdateServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.UpdateServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Range to JSON. + * Converts this UpdateServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RequestBasedSli. */ - interface IRequestBasedSli { - - /** RequestBasedSli goodTotalRatio */ - goodTotalRatio?: (google.monitoring.v3.ITimeSeriesRatio|null); + /** Properties of a DeleteServiceRequest. */ + interface IDeleteServiceRequest { - /** RequestBasedSli distributionCut */ - distributionCut?: (google.monitoring.v3.IDistributionCut|null); + /** DeleteServiceRequest name */ + name?: (string|null); } - /** Represents a RequestBasedSli. */ - class RequestBasedSli implements IRequestBasedSli { + /** Represents a DeleteServiceRequest. */ + class DeleteServiceRequest implements IDeleteServiceRequest { /** - * Constructs a new RequestBasedSli. + * Constructs a new DeleteServiceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IRequestBasedSli); - - /** RequestBasedSli goodTotalRatio. */ - public goodTotalRatio?: (google.monitoring.v3.ITimeSeriesRatio|null); - - /** RequestBasedSli distributionCut. */ - public distributionCut?: (google.monitoring.v3.IDistributionCut|null); + constructor(properties?: google.monitoring.v3.IDeleteServiceRequest); - /** RequestBasedSli method. */ - public method?: ("goodTotalRatio"|"distributionCut"); + /** DeleteServiceRequest name. */ + public name: string; /** - * Creates a new RequestBasedSli instance using the specified properties. + * Creates a new DeleteServiceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RequestBasedSli instance + * @returns DeleteServiceRequest instance */ - public static create(properties?: google.monitoring.v3.IRequestBasedSli): google.monitoring.v3.RequestBasedSli; + public static create(properties?: google.monitoring.v3.IDeleteServiceRequest): google.monitoring.v3.DeleteServiceRequest; /** - * Encodes the specified RequestBasedSli message. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. - * @param message RequestBasedSli message or plain object to encode + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IRequestBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. - * @param message RequestBasedSli message or plain object to encode + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @param message DeleteServiceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IRequestBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDeleteServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestBasedSli message from the specified reader or buffer. + * Decodes a DeleteServiceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RequestBasedSli + * @returns DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.RequestBasedSli; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteServiceRequest; /** - * Decodes a RequestBasedSli message from the specified reader or buffer, length delimited. + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestBasedSli + * @returns DeleteServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.RequestBasedSli; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteServiceRequest; /** - * Verifies a RequestBasedSli message. + * Verifies a DeleteServiceRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RequestBasedSli message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RequestBasedSli + * @returns DeleteServiceRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.RequestBasedSli; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteServiceRequest; /** - * Creates a plain object from a RequestBasedSli message. Also converts values to other types if specified. - * @param message RequestBasedSli + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @param message DeleteServiceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.RequestBasedSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.DeleteServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RequestBasedSli to JSON. + * Converts this DeleteServiceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeSeriesRatio. */ - interface ITimeSeriesRatio { + /** Properties of a CreateServiceLevelObjectiveRequest. */ + interface ICreateServiceLevelObjectiveRequest { - /** TimeSeriesRatio goodServiceFilter */ - goodServiceFilter?: (string|null); + /** CreateServiceLevelObjectiveRequest parent */ + parent?: (string|null); - /** TimeSeriesRatio badServiceFilter */ - badServiceFilter?: (string|null); + /** CreateServiceLevelObjectiveRequest serviceLevelObjectiveId */ + serviceLevelObjectiveId?: (string|null); - /** TimeSeriesRatio totalServiceFilter */ - totalServiceFilter?: (string|null); + /** CreateServiceLevelObjectiveRequest serviceLevelObjective */ + serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); } - /** Represents a TimeSeriesRatio. */ - class TimeSeriesRatio implements ITimeSeriesRatio { + /** Represents a CreateServiceLevelObjectiveRequest. */ + class CreateServiceLevelObjectiveRequest implements ICreateServiceLevelObjectiveRequest { /** - * Constructs a new TimeSeriesRatio. + * Constructs a new CreateServiceLevelObjectiveRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ITimeSeriesRatio); + constructor(properties?: google.monitoring.v3.ICreateServiceLevelObjectiveRequest); - /** TimeSeriesRatio goodServiceFilter. */ - public goodServiceFilter: string; + /** CreateServiceLevelObjectiveRequest parent. */ + public parent: string; - /** TimeSeriesRatio badServiceFilter. */ - public badServiceFilter: string; + /** CreateServiceLevelObjectiveRequest serviceLevelObjectiveId. */ + public serviceLevelObjectiveId: string; - /** TimeSeriesRatio totalServiceFilter. */ - public totalServiceFilter: string; + /** CreateServiceLevelObjectiveRequest serviceLevelObjective. */ + public serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); /** - * Creates a new TimeSeriesRatio instance using the specified properties. + * Creates a new CreateServiceLevelObjectiveRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSeriesRatio instance + * @returns CreateServiceLevelObjectiveRequest instance */ - public static create(properties?: google.monitoring.v3.ITimeSeriesRatio): google.monitoring.v3.TimeSeriesRatio; + public static create(properties?: google.monitoring.v3.ICreateServiceLevelObjectiveRequest): google.monitoring.v3.CreateServiceLevelObjectiveRequest; /** - * Encodes the specified TimeSeriesRatio message. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. - * @param message TimeSeriesRatio message or plain object to encode + * Encodes the specified CreateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message CreateServiceLevelObjectiveRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ITimeSeriesRatio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSeriesRatio message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. - * @param message TimeSeriesRatio message or plain object to encode + * Encodes the specified CreateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message CreateServiceLevelObjectiveRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ITimeSeriesRatio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSeriesRatio message from the specified reader or buffer. + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSeriesRatio + * @returns CreateServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesRatio; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateServiceLevelObjectiveRequest; /** - * Decodes a TimeSeriesRatio message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSeriesRatio + * @returns CreateServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesRatio; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateServiceLevelObjectiveRequest; /** - * Verifies a TimeSeriesRatio message. + * Verifies a CreateServiceLevelObjectiveRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeSeriesRatio message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSeriesRatio + * @returns CreateServiceLevelObjectiveRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesRatio; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateServiceLevelObjectiveRequest; /** - * Creates a plain object from a TimeSeriesRatio message. Also converts values to other types if specified. - * @param message TimeSeriesRatio + * Creates a plain object from a CreateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message CreateServiceLevelObjectiveRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.TimeSeriesRatio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSeriesRatio to JSON. + * Converts this CreateServiceLevelObjectiveRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DistributionCut. */ - interface IDistributionCut { + /** Properties of a GetServiceLevelObjectiveRequest. */ + interface IGetServiceLevelObjectiveRequest { - /** DistributionCut distributionFilter */ - distributionFilter?: (string|null); + /** GetServiceLevelObjectiveRequest name */ + name?: (string|null); - /** DistributionCut range */ - range?: (google.monitoring.v3.IRange|null); + /** GetServiceLevelObjectiveRequest view */ + view?: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View|null); } - /** Represents a DistributionCut. */ - class DistributionCut implements IDistributionCut { + /** Represents a GetServiceLevelObjectiveRequest. */ + class GetServiceLevelObjectiveRequest implements IGetServiceLevelObjectiveRequest { /** - * Constructs a new DistributionCut. + * Constructs a new GetServiceLevelObjectiveRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDistributionCut); + constructor(properties?: google.monitoring.v3.IGetServiceLevelObjectiveRequest); - /** DistributionCut distributionFilter. */ - public distributionFilter: string; + /** GetServiceLevelObjectiveRequest name. */ + public name: string; - /** DistributionCut range. */ - public range?: (google.monitoring.v3.IRange|null); + /** GetServiceLevelObjectiveRequest view. */ + public view: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View); /** - * Creates a new DistributionCut instance using the specified properties. + * Creates a new GetServiceLevelObjectiveRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DistributionCut instance + * @returns GetServiceLevelObjectiveRequest instance */ - public static create(properties?: google.monitoring.v3.IDistributionCut): google.monitoring.v3.DistributionCut; + public static create(properties?: google.monitoring.v3.IGetServiceLevelObjectiveRequest): google.monitoring.v3.GetServiceLevelObjectiveRequest; /** - * Encodes the specified DistributionCut message. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. - * @param message DistributionCut message or plain object to encode + * Encodes the specified GetServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. + * @param message GetServiceLevelObjectiveRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDistributionCut, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IGetServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DistributionCut message, length delimited. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. - * @param message DistributionCut message or plain object to encode + * Encodes the specified GetServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. + * @param message GetServiceLevelObjectiveRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDistributionCut, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IGetServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DistributionCut message from the specified reader or buffer. + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DistributionCut + * @returns GetServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DistributionCut; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetServiceLevelObjectiveRequest; /** - * Decodes a DistributionCut message from the specified reader or buffer, length delimited. + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DistributionCut + * @returns GetServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DistributionCut; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetServiceLevelObjectiveRequest; /** - * Verifies a DistributionCut message. + * Verifies a GetServiceLevelObjectiveRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DistributionCut message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DistributionCut + * @returns GetServiceLevelObjectiveRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DistributionCut; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetServiceLevelObjectiveRequest; /** - * Creates a plain object from a DistributionCut message. Also converts values to other types if specified. - * @param message DistributionCut + * Creates a plain object from a GetServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message GetServiceLevelObjectiveRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DistributionCut, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.GetServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DistributionCut to JSON. + * Converts this GetServiceLevelObjectiveRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a WindowsBasedSli. */ - interface IWindowsBasedSli { + /** Properties of a ListServiceLevelObjectivesRequest. */ + interface IListServiceLevelObjectivesRequest { - /** WindowsBasedSli goodBadMetricFilter */ - goodBadMetricFilter?: (string|null); + /** ListServiceLevelObjectivesRequest parent */ + parent?: (string|null); - /** WindowsBasedSli goodTotalRatioThreshold */ - goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); + /** ListServiceLevelObjectivesRequest filter */ + filter?: (string|null); - /** WindowsBasedSli metricMeanInRange */ - metricMeanInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + /** ListServiceLevelObjectivesRequest pageSize */ + pageSize?: (number|null); - /** WindowsBasedSli metricSumInRange */ - metricSumInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + /** ListServiceLevelObjectivesRequest pageToken */ + pageToken?: (string|null); - /** WindowsBasedSli windowPeriod */ - windowPeriod?: (google.protobuf.IDuration|null); + /** ListServiceLevelObjectivesRequest view */ + view?: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View|null); } - /** Represents a WindowsBasedSli. */ - class WindowsBasedSli implements IWindowsBasedSli { + /** Represents a ListServiceLevelObjectivesRequest. */ + class ListServiceLevelObjectivesRequest implements IListServiceLevelObjectivesRequest { /** - * Constructs a new WindowsBasedSli. + * Constructs a new ListServiceLevelObjectivesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IWindowsBasedSli); - - /** WindowsBasedSli goodBadMetricFilter. */ - public goodBadMetricFilter: string; + constructor(properties?: google.monitoring.v3.IListServiceLevelObjectivesRequest); - /** WindowsBasedSli goodTotalRatioThreshold. */ - public goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); + /** ListServiceLevelObjectivesRequest parent. */ + public parent: string; - /** WindowsBasedSli metricMeanInRange. */ - public metricMeanInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + /** ListServiceLevelObjectivesRequest filter. */ + public filter: string; - /** WindowsBasedSli metricSumInRange. */ - public metricSumInRange?: (google.monitoring.v3.WindowsBasedSli.IMetricRange|null); + /** ListServiceLevelObjectivesRequest pageSize. */ + public pageSize: number; - /** WindowsBasedSli windowPeriod. */ - public windowPeriod?: (google.protobuf.IDuration|null); + /** ListServiceLevelObjectivesRequest pageToken. */ + public pageToken: string; - /** WindowsBasedSli windowCriterion. */ - public windowCriterion?: ("goodBadMetricFilter"|"goodTotalRatioThreshold"|"metricMeanInRange"|"metricSumInRange"); + /** ListServiceLevelObjectivesRequest view. */ + public view: (google.monitoring.v3.ServiceLevelObjective.View|keyof typeof google.monitoring.v3.ServiceLevelObjective.View); /** - * Creates a new WindowsBasedSli instance using the specified properties. + * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns WindowsBasedSli instance + * @returns ListServiceLevelObjectivesRequest instance */ - public static create(properties?: google.monitoring.v3.IWindowsBasedSli): google.monitoring.v3.WindowsBasedSli; + public static create(properties?: google.monitoring.v3.IListServiceLevelObjectivesRequest): google.monitoring.v3.ListServiceLevelObjectivesRequest; /** - * Encodes the specified WindowsBasedSli message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. - * @param message WindowsBasedSli message or plain object to encode + * Encodes the specified ListServiceLevelObjectivesRequest message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. + * @param message ListServiceLevelObjectivesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IWindowsBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListServiceLevelObjectivesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WindowsBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. - * @param message WindowsBasedSli message or plain object to encode + * Encodes the specified ListServiceLevelObjectivesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. + * @param message ListServiceLevelObjectivesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IWindowsBasedSli, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListServiceLevelObjectivesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WindowsBasedSli message from the specified reader or buffer. + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WindowsBasedSli + * @returns ListServiceLevelObjectivesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServiceLevelObjectivesRequest; /** - * Decodes a WindowsBasedSli message from the specified reader or buffer, length delimited. + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WindowsBasedSli + * @returns ListServiceLevelObjectivesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServiceLevelObjectivesRequest; /** - * Verifies a WindowsBasedSli message. + * Verifies a ListServiceLevelObjectivesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WindowsBasedSli message from a plain object. Also converts values to their respective internal types. + * Creates a ListServiceLevelObjectivesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WindowsBasedSli + * @returns ListServiceLevelObjectivesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServiceLevelObjectivesRequest; /** - * Creates a plain object from a WindowsBasedSli message. Also converts values to other types if specified. - * @param message WindowsBasedSli + * Creates a plain object from a ListServiceLevelObjectivesRequest message. Also converts values to other types if specified. + * @param message ListServiceLevelObjectivesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.WindowsBasedSli, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListServiceLevelObjectivesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WindowsBasedSli to JSON. + * Converts this ListServiceLevelObjectivesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace WindowsBasedSli { - - /** Properties of a PerformanceThreshold. */ - interface IPerformanceThreshold { - - /** PerformanceThreshold performance */ - performance?: (google.monitoring.v3.IRequestBasedSli|null); - - /** PerformanceThreshold basicSliPerformance */ - basicSliPerformance?: (google.monitoring.v3.IBasicSli|null); - - /** PerformanceThreshold threshold */ - threshold?: (number|null); - } - - /** Represents a PerformanceThreshold. */ - class PerformanceThreshold implements IPerformanceThreshold { - - /** - * Constructs a new PerformanceThreshold. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold); - - /** PerformanceThreshold performance. */ - public performance?: (google.monitoring.v3.IRequestBasedSli|null); - - /** PerformanceThreshold basicSliPerformance. */ - public basicSliPerformance?: (google.monitoring.v3.IBasicSli|null); - - /** PerformanceThreshold threshold. */ - public threshold: number; - - /** PerformanceThreshold type. */ - public type?: ("performance"|"basicSliPerformance"); - - /** - * Creates a new PerformanceThreshold instance using the specified properties. - * @param [properties] Properties to set - * @returns PerformanceThreshold instance - */ - public static create(properties?: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; - - /** - * Encodes the specified PerformanceThreshold message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. - * @param message PerformanceThreshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PerformanceThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. - * @param message PerformanceThreshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PerformanceThreshold message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PerformanceThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; - - /** - * Decodes a PerformanceThreshold message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PerformanceThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; + /** Properties of a ListServiceLevelObjectivesResponse. */ + interface IListServiceLevelObjectivesResponse { - /** - * Verifies a PerformanceThreshold message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ListServiceLevelObjectivesResponse serviceLevelObjectives */ + serviceLevelObjectives?: (google.monitoring.v3.IServiceLevelObjective[]|null); - /** - * Creates a PerformanceThreshold message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PerformanceThreshold - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli.PerformanceThreshold; + /** ListServiceLevelObjectivesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Creates a plain object from a PerformanceThreshold message. Also converts values to other types if specified. - * @param message PerformanceThreshold - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.WindowsBasedSli.PerformanceThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a ListServiceLevelObjectivesResponse. */ + class ListServiceLevelObjectivesResponse implements IListServiceLevelObjectivesResponse { - /** - * Converts this PerformanceThreshold to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ListServiceLevelObjectivesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListServiceLevelObjectivesResponse); - /** Properties of a MetricRange. */ - interface IMetricRange { + /** ListServiceLevelObjectivesResponse serviceLevelObjectives. */ + public serviceLevelObjectives: google.monitoring.v3.IServiceLevelObjective[]; - /** MetricRange timeSeries */ - timeSeries?: (string|null); + /** ListServiceLevelObjectivesResponse nextPageToken. */ + public nextPageToken: string; - /** MetricRange range */ - range?: (google.monitoring.v3.IRange|null); - } + /** + * Creates a new ListServiceLevelObjectivesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListServiceLevelObjectivesResponse instance + */ + public static create(properties?: google.monitoring.v3.IListServiceLevelObjectivesResponse): google.monitoring.v3.ListServiceLevelObjectivesResponse; - /** Represents a MetricRange. */ - class MetricRange implements IMetricRange { + /** + * Encodes the specified ListServiceLevelObjectivesResponse message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. + * @param message ListServiceLevelObjectivesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListServiceLevelObjectivesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new MetricRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.WindowsBasedSli.IMetricRange); + /** + * Encodes the specified ListServiceLevelObjectivesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. + * @param message ListServiceLevelObjectivesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListServiceLevelObjectivesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** MetricRange timeSeries. */ - public timeSeries: string; + /** + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListServiceLevelObjectivesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListServiceLevelObjectivesResponse; - /** MetricRange range. */ - public range?: (google.monitoring.v3.IRange|null); + /** + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListServiceLevelObjectivesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListServiceLevelObjectivesResponse; - /** - * Creates a new MetricRange instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricRange instance - */ - public static create(properties?: google.monitoring.v3.WindowsBasedSli.IMetricRange): google.monitoring.v3.WindowsBasedSli.MetricRange; + /** + * Verifies a ListServiceLevelObjectivesResponse message. + * @param message 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 MetricRange message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. - * @param message MetricRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.WindowsBasedSli.IMetricRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ListServiceLevelObjectivesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListServiceLevelObjectivesResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListServiceLevelObjectivesResponse; - /** - * Encodes the specified MetricRange message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. - * @param message MetricRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.WindowsBasedSli.IMetricRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ListServiceLevelObjectivesResponse message. Also converts values to other types if specified. + * @param message ListServiceLevelObjectivesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListServiceLevelObjectivesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a MetricRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.WindowsBasedSli.MetricRange; + /** + * Converts this ListServiceLevelObjectivesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a MetricRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.WindowsBasedSli.MetricRange; + /** Properties of an UpdateServiceLevelObjectiveRequest. */ + interface IUpdateServiceLevelObjectiveRequest { - /** - * Verifies a MetricRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** UpdateServiceLevelObjectiveRequest serviceLevelObjective */ + serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); - /** - * Creates a MetricRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricRange - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.WindowsBasedSli.MetricRange; + /** UpdateServiceLevelObjectiveRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** - * Creates a plain object from a MetricRange message. Also converts values to other types if specified. - * @param message MetricRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.WindowsBasedSli.MetricRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an UpdateServiceLevelObjectiveRequest. */ + class UpdateServiceLevelObjectiveRequest implements IUpdateServiceLevelObjectiveRequest { - /** - * Converts this MetricRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Constructs a new UpdateServiceLevelObjectiveRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest); - /** Represents an UptimeCheckService */ - class UptimeCheckService extends $protobuf.rpc.Service { + /** UpdateServiceLevelObjectiveRequest serviceLevelObjective. */ + public serviceLevelObjective?: (google.monitoring.v3.IServiceLevelObjective|null); + + /** UpdateServiceLevelObjectiveRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Constructs a new UptimeCheckService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Creates a new UpdateServiceLevelObjectiveRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateServiceLevelObjectiveRequest instance */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static create(properties?: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; /** - * Creates new UptimeCheckService 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. + * Encodes the specified UpdateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message UpdateServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): UptimeCheckService; + public static encode(message: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListUptimeCheckConfigs. - * @param request ListUptimeCheckConfigsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUptimeCheckConfigsResponse + * Encodes the specified UpdateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. + * @param message UpdateServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listUptimeCheckConfigs(request: google.monitoring.v3.IListUptimeCheckConfigsRequest, callback: google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigsCallback): void; + public static encodeDelimited(message: google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListUptimeCheckConfigs. - * @param request ListUptimeCheckConfigsRequest message or plain object - * @returns Promise + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listUptimeCheckConfigs(request: google.monitoring.v3.IListUptimeCheckConfigsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; /** - * Calls GetUptimeCheckConfig. - * @param request GetUptimeCheckConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getUptimeCheckConfig(request: google.monitoring.v3.IGetUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfigCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; /** - * Calls GetUptimeCheckConfig. - * @param request GetUptimeCheckConfigRequest message or plain object - * @returns Promise + * Verifies an UpdateServiceLevelObjectiveRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getUptimeCheckConfig(request: google.monitoring.v3.IGetUptimeCheckConfigRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateUptimeCheckConfig. - * @param request CreateUptimeCheckConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + * Creates an UpdateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateServiceLevelObjectiveRequest */ - public createUptimeCheckConfig(request: google.monitoring.v3.ICreateUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfigCallback): void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateServiceLevelObjectiveRequest; /** - * Calls CreateUptimeCheckConfig. - * @param request CreateUptimeCheckConfigRequest message or plain object - * @returns Promise + * Creates a plain object from an UpdateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message UpdateServiceLevelObjectiveRequest + * @param [options] Conversion options + * @returns Plain object */ - public createUptimeCheckConfig(request: google.monitoring.v3.ICreateUptimeCheckConfigRequest): Promise; + public static toObject(message: google.monitoring.v3.UpdateServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateUptimeCheckConfig. - * @param request UpdateUptimeCheckConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + * Converts this UpdateServiceLevelObjectiveRequest to JSON. + * @returns JSON object */ - public updateUptimeCheckConfig(request: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfigCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteServiceLevelObjectiveRequest. */ + interface IDeleteServiceLevelObjectiveRequest { + + /** DeleteServiceLevelObjectiveRequest name */ + name?: (string|null); + } - /** - * Calls UpdateUptimeCheckConfig. - * @param request UpdateUptimeCheckConfigRequest message or plain object - * @returns Promise - */ - public updateUptimeCheckConfig(request: google.monitoring.v3.IUpdateUptimeCheckConfigRequest): Promise; + /** Represents a DeleteServiceLevelObjectiveRequest. */ + class DeleteServiceLevelObjectiveRequest implements IDeleteServiceLevelObjectiveRequest { /** - * Calls DeleteUptimeCheckConfig. - * @param request DeleteUptimeCheckConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Constructs a new DeleteServiceLevelObjectiveRequest. + * @param [properties] Properties to set */ - public deleteUptimeCheckConfig(request: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfigCallback): void; + constructor(properties?: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest); + + /** DeleteServiceLevelObjectiveRequest name. */ + public name: string; /** - * Calls DeleteUptimeCheckConfig. - * @param request DeleteUptimeCheckConfigRequest message or plain object - * @returns Promise + * Creates a new DeleteServiceLevelObjectiveRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteServiceLevelObjectiveRequest instance */ - public deleteUptimeCheckConfig(request: google.monitoring.v3.IDeleteUptimeCheckConfigRequest): Promise; + public static create(properties?: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; /** - * Calls ListUptimeCheckIps. - * @param request ListUptimeCheckIpsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUptimeCheckIpsResponse + * Encodes the specified DeleteServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * @param message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listUptimeCheckIps(request: google.monitoring.v3.IListUptimeCheckIpsRequest, callback: google.monitoring.v3.UptimeCheckService.ListUptimeCheckIpsCallback): void; + public static encode(message: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListUptimeCheckIps. - * @param request ListUptimeCheckIpsRequest message or plain object - * @returns Promise + * Encodes the specified DeleteServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * @param message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listUptimeCheckIps(request: google.monitoring.v3.IListUptimeCheckIpsRequest): Promise; - } - - namespace UptimeCheckService { + public static encodeDelimited(message: google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. - * @param error Error, if any - * @param [response] ListUptimeCheckConfigsResponse + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListUptimeCheckConfigsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckConfigsResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. - * @param error Error, if any - * @param [response] UptimeCheckConfig + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteServiceLevelObjectiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. - * @param error Error, if any - * @param [response] UptimeCheckConfig + * Verifies a DeleteServiceLevelObjectiveRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. - * @param error Error, if any - * @param [response] UptimeCheckConfig + * Creates a DeleteServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteServiceLevelObjectiveRequest */ - type UpdateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteServiceLevelObjectiveRequest; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a DeleteServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * @param message DeleteServiceLevelObjectiveRequest + * @param [options] Conversion options + * @returns Plain object */ - type DeleteUptimeCheckConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.monitoring.v3.DeleteServiceLevelObjectiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. - * @param error Error, if any - * @param [response] ListUptimeCheckIpsResponse + * Converts this DeleteServiceLevelObjectiveRequest to JSON. + * @returns JSON object */ - type ListUptimeCheckIpsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckIpsResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a ListUptimeCheckConfigsRequest. */ - interface IListUptimeCheckConfigsRequest { - - /** ListUptimeCheckConfigsRequest parent */ - parent?: (string|null); - - /** ListUptimeCheckConfigsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a SpanContext. */ + interface ISpanContext { - /** ListUptimeCheckConfigsRequest pageToken */ - pageToken?: (string|null); + /** SpanContext spanName */ + spanName?: (string|null); } - /** Represents a ListUptimeCheckConfigsRequest. */ - class ListUptimeCheckConfigsRequest implements IListUptimeCheckConfigsRequest { + /** Represents a SpanContext. */ + class SpanContext implements ISpanContext { /** - * Constructs a new ListUptimeCheckConfigsRequest. + * Constructs a new SpanContext. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListUptimeCheckConfigsRequest); - - /** ListUptimeCheckConfigsRequest parent. */ - public parent: string; + constructor(properties?: google.monitoring.v3.ISpanContext); - /** ListUptimeCheckConfigsRequest pageSize. */ - public pageSize: number; - - /** ListUptimeCheckConfigsRequest pageToken. */ - public pageToken: string; + /** SpanContext spanName. */ + public spanName: string; /** - * Creates a new ListUptimeCheckConfigsRequest instance using the specified properties. + * Creates a new SpanContext instance using the specified properties. * @param [properties] Properties to set - * @returns ListUptimeCheckConfigsRequest instance + * @returns SpanContext instance */ - public static create(properties?: google.monitoring.v3.IListUptimeCheckConfigsRequest): google.monitoring.v3.ListUptimeCheckConfigsRequest; + public static create(properties?: google.monitoring.v3.ISpanContext): google.monitoring.v3.SpanContext; /** - * Encodes the specified ListUptimeCheckConfigsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. - * @param message ListUptimeCheckConfigsRequest message or plain object to encode + * Encodes the specified SpanContext message. Does not implicitly {@link google.monitoring.v3.SpanContext.verify|verify} messages. + * @param message SpanContext message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListUptimeCheckConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ISpanContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListUptimeCheckConfigsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. - * @param message ListUptimeCheckConfigsRequest message or plain object to encode + * Encodes the specified SpanContext message, length delimited. Does not implicitly {@link google.monitoring.v3.SpanContext.verify|verify} messages. + * @param message SpanContext message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ISpanContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer. + * Decodes a SpanContext message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListUptimeCheckConfigsRequest + * @returns SpanContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckConfigsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.SpanContext; /** - * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer, length delimited. + * Decodes a SpanContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListUptimeCheckConfigsRequest + * @returns SpanContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckConfigsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.SpanContext; /** - * Verifies a ListUptimeCheckConfigsRequest message. + * Verifies a SpanContext message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListUptimeCheckConfigsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SpanContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListUptimeCheckConfigsRequest + * @returns SpanContext */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckConfigsRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.SpanContext; /** - * Creates a plain object from a ListUptimeCheckConfigsRequest message. Also converts values to other types if specified. - * @param message ListUptimeCheckConfigsRequest + * Creates a plain object from a SpanContext message. Also converts values to other types if specified. + * @param message SpanContext * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListUptimeCheckConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.SpanContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListUptimeCheckConfigsRequest to JSON. + * Converts this SpanContext to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListUptimeCheckConfigsResponse. */ - interface IListUptimeCheckConfigsResponse { + /** UptimeCheckRegion enum. */ + enum UptimeCheckRegion { + REGION_UNSPECIFIED = 0, + USA = 1, + EUROPE = 2, + SOUTH_AMERICA = 3, + ASIA_PACIFIC = 4 + } - /** ListUptimeCheckConfigsResponse uptimeCheckConfigs */ - uptimeCheckConfigs?: (google.monitoring.v3.IUptimeCheckConfig[]|null); + /** Properties of an InternalChecker. */ + interface IInternalChecker { - /** ListUptimeCheckConfigsResponse nextPageToken */ - nextPageToken?: (string|null); + /** InternalChecker name */ + name?: (string|null); - /** ListUptimeCheckConfigsResponse totalSize */ - totalSize?: (number|null); + /** InternalChecker displayName */ + displayName?: (string|null); + + /** InternalChecker network */ + network?: (string|null); + + /** InternalChecker gcpZone */ + gcpZone?: (string|null); + + /** InternalChecker peerProjectId */ + peerProjectId?: (string|null); + + /** InternalChecker state */ + state?: (google.monitoring.v3.InternalChecker.State|keyof typeof google.monitoring.v3.InternalChecker.State|null); } - /** Represents a ListUptimeCheckConfigsResponse. */ - class ListUptimeCheckConfigsResponse implements IListUptimeCheckConfigsResponse { + /** Represents an InternalChecker. */ + class InternalChecker implements IInternalChecker { /** - * Constructs a new ListUptimeCheckConfigsResponse. + * Constructs a new InternalChecker. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListUptimeCheckConfigsResponse); + constructor(properties?: google.monitoring.v3.IInternalChecker); - /** ListUptimeCheckConfigsResponse uptimeCheckConfigs. */ - public uptimeCheckConfigs: google.monitoring.v3.IUptimeCheckConfig[]; + /** InternalChecker name. */ + public name: string; - /** ListUptimeCheckConfigsResponse nextPageToken. */ - public nextPageToken: string; + /** InternalChecker displayName. */ + public displayName: string; - /** ListUptimeCheckConfigsResponse totalSize. */ - public totalSize: number; + /** InternalChecker network. */ + public network: string; + + /** InternalChecker gcpZone. */ + public gcpZone: string; + + /** InternalChecker peerProjectId. */ + public peerProjectId: string; + + /** InternalChecker state. */ + public state: (google.monitoring.v3.InternalChecker.State|keyof typeof google.monitoring.v3.InternalChecker.State); /** - * Creates a new ListUptimeCheckConfigsResponse instance using the specified properties. + * Creates a new InternalChecker instance using the specified properties. * @param [properties] Properties to set - * @returns ListUptimeCheckConfigsResponse instance + * @returns InternalChecker instance */ - public static create(properties?: google.monitoring.v3.IListUptimeCheckConfigsResponse): google.monitoring.v3.ListUptimeCheckConfigsResponse; + public static create(properties?: google.monitoring.v3.IInternalChecker): google.monitoring.v3.InternalChecker; /** - * Encodes the specified ListUptimeCheckConfigsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. - * @param message ListUptimeCheckConfigsResponse message or plain object to encode + * Encodes the specified InternalChecker message. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. + * @param message InternalChecker message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListUptimeCheckConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IInternalChecker, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListUptimeCheckConfigsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. - * @param message ListUptimeCheckConfigsResponse message or plain object to encode + * Encodes the specified InternalChecker message, length delimited. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. + * @param message InternalChecker message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IInternalChecker, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer. + * Decodes an InternalChecker message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListUptimeCheckConfigsResponse + * @returns InternalChecker * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckConfigsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.InternalChecker; /** - * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer, length delimited. + * Decodes an InternalChecker message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListUptimeCheckConfigsResponse + * @returns InternalChecker * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckConfigsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.InternalChecker; /** - * Verifies a ListUptimeCheckConfigsResponse message. + * Verifies an InternalChecker message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListUptimeCheckConfigsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InternalChecker message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListUptimeCheckConfigsResponse + * @returns InternalChecker */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckConfigsResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.InternalChecker; /** - * Creates a plain object from a ListUptimeCheckConfigsResponse message. Also converts values to other types if specified. - * @param message ListUptimeCheckConfigsResponse + * Creates a plain object from an InternalChecker message. Also converts values to other types if specified. + * @param message InternalChecker * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListUptimeCheckConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.InternalChecker, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListUptimeCheckConfigsResponse to JSON. + * Converts this InternalChecker to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetUptimeCheckConfigRequest. */ - interface IGetUptimeCheckConfigRequest { + namespace InternalChecker { - /** GetUptimeCheckConfigRequest name */ + /** State enum. */ + enum State { + UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2 + } + } + + /** Properties of an UptimeCheckConfig. */ + interface IUptimeCheckConfig { + + /** UptimeCheckConfig name */ name?: (string|null); + + /** UptimeCheckConfig displayName */ + displayName?: (string|null); + + /** UptimeCheckConfig monitoredResource */ + monitoredResource?: (google.api.IMonitoredResource|null); + + /** UptimeCheckConfig resourceGroup */ + resourceGroup?: (google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null); + + /** UptimeCheckConfig httpCheck */ + httpCheck?: (google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null); + + /** UptimeCheckConfig tcpCheck */ + tcpCheck?: (google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null); + + /** UptimeCheckConfig period */ + period?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig timeout */ + timeout?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig contentMatchers */ + contentMatchers?: (google.monitoring.v3.UptimeCheckConfig.IContentMatcher[]|null); + + /** UptimeCheckConfig selectedRegions */ + selectedRegions?: (google.monitoring.v3.UptimeCheckRegion[]|null); + + /** UptimeCheckConfig isInternal */ + isInternal?: (boolean|null); + + /** UptimeCheckConfig internalCheckers */ + internalCheckers?: (google.monitoring.v3.IInternalChecker[]|null); } - /** Represents a GetUptimeCheckConfigRequest. */ - class GetUptimeCheckConfigRequest implements IGetUptimeCheckConfigRequest { + /** Represents an UptimeCheckConfig. */ + class UptimeCheckConfig implements IUptimeCheckConfig { /** - * Constructs a new GetUptimeCheckConfigRequest. + * Constructs a new UptimeCheckConfig. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetUptimeCheckConfigRequest); + constructor(properties?: google.monitoring.v3.IUptimeCheckConfig); - /** GetUptimeCheckConfigRequest name. */ + /** UptimeCheckConfig name. */ public name: string; + /** UptimeCheckConfig displayName. */ + public displayName: string; + + /** UptimeCheckConfig monitoredResource. */ + public monitoredResource?: (google.api.IMonitoredResource|null); + + /** UptimeCheckConfig resourceGroup. */ + public resourceGroup?: (google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null); + + /** UptimeCheckConfig httpCheck. */ + public httpCheck?: (google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null); + + /** UptimeCheckConfig tcpCheck. */ + public tcpCheck?: (google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null); + + /** UptimeCheckConfig period. */ + public period?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** UptimeCheckConfig contentMatchers. */ + public contentMatchers: google.monitoring.v3.UptimeCheckConfig.IContentMatcher[]; + + /** UptimeCheckConfig selectedRegions. */ + public selectedRegions: google.monitoring.v3.UptimeCheckRegion[]; + + /** UptimeCheckConfig isInternal. */ + public isInternal: boolean; + + /** UptimeCheckConfig internalCheckers. */ + public internalCheckers: google.monitoring.v3.IInternalChecker[]; + + /** UptimeCheckConfig resource. */ + public resource?: ("monitoredResource"|"resourceGroup"); + + /** UptimeCheckConfig checkRequestType. */ + public checkRequestType?: ("httpCheck"|"tcpCheck"); + /** - * Creates a new GetUptimeCheckConfigRequest instance using the specified properties. + * Creates a new UptimeCheckConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetUptimeCheckConfigRequest instance + * @returns UptimeCheckConfig instance */ - public static create(properties?: google.monitoring.v3.IGetUptimeCheckConfigRequest): google.monitoring.v3.GetUptimeCheckConfigRequest; + public static create(properties?: google.monitoring.v3.IUptimeCheckConfig): google.monitoring.v3.UptimeCheckConfig; /** - * Encodes the specified GetUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. - * @param message GetUptimeCheckConfigRequest message or plain object to encode + * Encodes the specified UptimeCheckConfig message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. + * @param message UptimeCheckConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IUptimeCheckConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. - * @param message GetUptimeCheckConfigRequest message or plain object to encode + * Encodes the specified UptimeCheckConfig message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. + * @param message UptimeCheckConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IUptimeCheckConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer. + * Decodes an UptimeCheckConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetUptimeCheckConfigRequest + * @returns UptimeCheckConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetUptimeCheckConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig; /** - * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * Decodes an UptimeCheckConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetUptimeCheckConfigRequest + * @returns UptimeCheckConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetUptimeCheckConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig; /** - * Verifies a GetUptimeCheckConfigRequest message. + * Verifies an UptimeCheckConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UptimeCheckConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetUptimeCheckConfigRequest + * @returns UptimeCheckConfig */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetUptimeCheckConfigRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig; /** - * Creates a plain object from a GetUptimeCheckConfigRequest message. Also converts values to other types if specified. - * @param message GetUptimeCheckConfigRequest + * Creates a plain object from an UptimeCheckConfig message. Also converts values to other types if specified. + * @param message UptimeCheckConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.UptimeCheckConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetUptimeCheckConfigRequest to JSON. + * Converts this UptimeCheckConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateUptimeCheckConfigRequest. */ - interface ICreateUptimeCheckConfigRequest { + namespace UptimeCheckConfig { - /** CreateUptimeCheckConfigRequest parent */ - parent?: (string|null); + /** Properties of a ResourceGroup. */ + interface IResourceGroup { - /** CreateUptimeCheckConfigRequest uptimeCheckConfig */ - uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); - } + /** ResourceGroup groupId */ + groupId?: (string|null); - /** Represents a CreateUptimeCheckConfigRequest. */ - class CreateUptimeCheckConfigRequest implements ICreateUptimeCheckConfigRequest { + /** ResourceGroup resourceType */ + resourceType?: (google.monitoring.v3.GroupResourceType|keyof typeof google.monitoring.v3.GroupResourceType|null); + } - /** - * Constructs a new CreateUptimeCheckConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.ICreateUptimeCheckConfigRequest); + /** Represents a ResourceGroup. */ + class ResourceGroup implements IResourceGroup { - /** CreateUptimeCheckConfigRequest parent. */ - public parent: string; + /** + * Constructs a new ResourceGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IResourceGroup); - /** CreateUptimeCheckConfigRequest uptimeCheckConfig. */ - public uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + /** ResourceGroup groupId. */ + public groupId: string; - /** - * Creates a new CreateUptimeCheckConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUptimeCheckConfigRequest instance - */ - public static create(properties?: google.monitoring.v3.ICreateUptimeCheckConfigRequest): google.monitoring.v3.CreateUptimeCheckConfigRequest; + /** ResourceGroup resourceType. */ + public resourceType: (google.monitoring.v3.GroupResourceType|keyof typeof google.monitoring.v3.GroupResourceType); - /** - * Encodes the specified CreateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. - * @param message CreateUptimeCheckConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.ICreateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ResourceGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceGroup instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IResourceGroup): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; - /** - * Encodes the specified CreateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. - * @param message CreateUptimeCheckConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.ICreateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ResourceGroup message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. + * @param message ResourceGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + + /** + * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + + /** + * Verifies a ResourceGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceGroup + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; - /** - * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUptimeCheckConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateUptimeCheckConfigRequest; + /** + * Creates a plain object from a ResourceGroup message. Also converts values to other types if specified. + * @param message ResourceGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUptimeCheckConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateUptimeCheckConfigRequest; + /** + * Converts this ResourceGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies a CreateUptimeCheckConfigRequest message. - * @param message 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 HttpCheck. */ + interface IHttpCheck { - /** - * Creates a CreateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUptimeCheckConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateUptimeCheckConfigRequest; + /** HttpCheck useSsl */ + useSsl?: (boolean|null); - /** - * Creates a plain object from a CreateUptimeCheckConfigRequest message. Also converts values to other types if specified. - * @param message CreateUptimeCheckConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.CreateUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpCheck path */ + path?: (string|null); - /** - * Converts this CreateUptimeCheckConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpCheck port */ + port?: (number|null); - /** Properties of an UpdateUptimeCheckConfigRequest. */ - interface IUpdateUptimeCheckConfigRequest { + /** HttpCheck authInfo */ + authInfo?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null); - /** UpdateUptimeCheckConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** HttpCheck maskHeaders */ + maskHeaders?: (boolean|null); - /** UpdateUptimeCheckConfigRequest uptimeCheckConfig */ - uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); - } + /** HttpCheck headers */ + headers?: ({ [k: string]: string }|null); - /** Represents an UpdateUptimeCheckConfigRequest. */ - class UpdateUptimeCheckConfigRequest implements IUpdateUptimeCheckConfigRequest { + /** HttpCheck validateSsl */ + validateSsl?: (boolean|null); + } - /** - * Constructs a new UpdateUptimeCheckConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IUpdateUptimeCheckConfigRequest); + /** Represents a HttpCheck. */ + class HttpCheck implements IHttpCheck { - /** UpdateUptimeCheckConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Constructs a new HttpCheck. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck); - /** UpdateUptimeCheckConfigRequest uptimeCheckConfig. */ - public uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + /** HttpCheck useSsl. */ + public useSsl: boolean; - /** - * Creates a new UpdateUptimeCheckConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUptimeCheckConfigRequest instance - */ - public static create(properties?: google.monitoring.v3.IUpdateUptimeCheckConfigRequest): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + /** HttpCheck path. */ + public path: string; - /** - * Encodes the specified UpdateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. - * @param message UpdateUptimeCheckConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpCheck port. */ + public port: number; - /** - * Encodes the specified UpdateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. - * @param message UpdateUptimeCheckConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpCheck authInfo. */ + public authInfo?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null); - /** - * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUptimeCheckConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + /** HttpCheck maskHeaders. */ + public maskHeaders: boolean; - /** - * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUptimeCheckConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + /** HttpCheck headers. */ + public headers: { [k: string]: string }; - /** - * Verifies an UpdateUptimeCheckConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** HttpCheck validateSsl. */ + public validateSsl: boolean; - /** - * Creates an UpdateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUptimeCheckConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateUptimeCheckConfigRequest; + /** + * Creates a new HttpCheck instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpCheck instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck): google.monitoring.v3.UptimeCheckConfig.HttpCheck; - /** - * Creates a plain object from an UpdateUptimeCheckConfigRequest message. Also converts values to other types if specified. - * @param message UpdateUptimeCheckConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UpdateUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified HttpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. + * @param message HttpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.IHttpCheck, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this UpdateUptimeCheckConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified HttpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. + * @param message HttpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IHttpCheck, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a DeleteUptimeCheckConfigRequest. */ - interface IDeleteUptimeCheckConfigRequest { + /** + * Decodes a HttpCheck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.HttpCheck; - /** DeleteUptimeCheckConfigRequest name */ - name?: (string|null); - } + /** + * Decodes a HttpCheck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.HttpCheck; - /** Represents a DeleteUptimeCheckConfigRequest. */ - class DeleteUptimeCheckConfigRequest implements IDeleteUptimeCheckConfigRequest { + /** + * Verifies a HttpCheck message. + * @param message 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 DeleteUptimeCheckConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IDeleteUptimeCheckConfigRequest); + /** + * Creates a HttpCheck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpCheck + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.HttpCheck; - /** DeleteUptimeCheckConfigRequest name. */ - public name: string; + /** + * Creates a plain object from a HttpCheck message. Also converts values to other types if specified. + * @param message HttpCheck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new DeleteUptimeCheckConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUptimeCheckConfigRequest instance - */ - public static create(properties?: google.monitoring.v3.IDeleteUptimeCheckConfigRequest): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + /** + * Converts this HttpCheck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HttpCheck { - /** - * Encodes the specified DeleteUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. - * @param message DeleteUptimeCheckConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a BasicAuthentication. */ + interface IBasicAuthentication { - /** - * Encodes the specified DeleteUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. - * @param message DeleteUptimeCheckConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** BasicAuthentication username */ + username?: (string|null); - /** - * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUptimeCheckConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + /** BasicAuthentication password */ + password?: (string|null); + } - /** - * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUptimeCheckConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + /** Represents a BasicAuthentication. */ + class BasicAuthentication implements IBasicAuthentication { - /** - * Verifies a DeleteUptimeCheckConfigRequest message. - * @param message 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 BasicAuthentication. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication); - /** - * Creates a DeleteUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUptimeCheckConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteUptimeCheckConfigRequest; + /** BasicAuthentication username. */ + public username: string; - /** - * Creates a plain object from a DeleteUptimeCheckConfigRequest message. Also converts values to other types if specified. - * @param message DeleteUptimeCheckConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.DeleteUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** BasicAuthentication password. */ + public password: string; - /** - * Converts this DeleteUptimeCheckConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new BasicAuthentication instance using the specified properties. + * @param [properties] Properties to set + * @returns BasicAuthentication instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; - /** Properties of a ListUptimeCheckIpsRequest. */ - interface IListUptimeCheckIpsRequest { + /** + * Encodes the specified BasicAuthentication message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. + * @param message BasicAuthentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListUptimeCheckIpsRequest pageSize */ - pageSize?: (number|null); + /** + * Encodes the specified BasicAuthentication message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. + * @param message BasicAuthentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListUptimeCheckIpsRequest pageToken */ - pageToken?: (string|null); - } + /** + * Decodes a BasicAuthentication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BasicAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; - /** Represents a ListUptimeCheckIpsRequest. */ - class ListUptimeCheckIpsRequest implements IListUptimeCheckIpsRequest { + /** + * Decodes a BasicAuthentication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BasicAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; - /** - * Constructs a new ListUptimeCheckIpsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListUptimeCheckIpsRequest); + /** + * Verifies a BasicAuthentication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListUptimeCheckIpsRequest pageSize. */ - public pageSize: number; + /** + * Creates a BasicAuthentication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BasicAuthentication + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; - /** ListUptimeCheckIpsRequest pageToken. */ - public pageToken: string; + /** + * Creates a plain object from a BasicAuthentication message. Also converts values to other types if specified. + * @param message BasicAuthentication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new ListUptimeCheckIpsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUptimeCheckIpsRequest instance - */ - public static create(properties?: google.monitoring.v3.IListUptimeCheckIpsRequest): google.monitoring.v3.ListUptimeCheckIpsRequest; + /** + * Converts this BasicAuthentication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Encodes the specified ListUptimeCheckIpsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. - * @param message ListUptimeCheckIpsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListUptimeCheckIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a TcpCheck. */ + interface ITcpCheck { - /** - * Encodes the specified ListUptimeCheckIpsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. - * @param message ListUptimeCheckIpsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** TcpCheck port */ + port?: (number|null); + } - /** - * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUptimeCheckIpsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckIpsRequest; + /** Represents a TcpCheck. */ + class TcpCheck implements ITcpCheck { - /** - * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUptimeCheckIpsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckIpsRequest; + /** + * Constructs a new TcpCheck. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.ITcpCheck); - /** - * Verifies a ListUptimeCheckIpsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** TcpCheck port. */ + public port: number; - /** - * Creates a ListUptimeCheckIpsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUptimeCheckIpsRequest - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckIpsRequest; + /** + * Creates a new TcpCheck instance using the specified properties. + * @param [properties] Properties to set + * @returns TcpCheck instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.ITcpCheck): google.monitoring.v3.UptimeCheckConfig.TcpCheck; - /** - * Creates a plain object from a ListUptimeCheckIpsRequest message. Also converts values to other types if specified. - * @param message ListUptimeCheckIpsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListUptimeCheckIpsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified TcpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. + * @param message TcpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.ITcpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TcpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. + * @param message TcpCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.ITcpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TcpCheck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TcpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.TcpCheck; - /** - * Converts this ListUptimeCheckIpsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a TcpCheck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TcpCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.TcpCheck; - /** Properties of a ListUptimeCheckIpsResponse. */ - interface IListUptimeCheckIpsResponse { + /** + * Verifies a TcpCheck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ListUptimeCheckIpsResponse uptimeCheckIps */ - uptimeCheckIps?: (google.monitoring.v3.IUptimeCheckIp[]|null); + /** + * Creates a TcpCheck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TcpCheck + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.TcpCheck; - /** ListUptimeCheckIpsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Creates a plain object from a TcpCheck message. Also converts values to other types if specified. + * @param message TcpCheck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.TcpCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a ListUptimeCheckIpsResponse. */ - class ListUptimeCheckIpsResponse implements IListUptimeCheckIpsResponse { + /** + * Converts this TcpCheck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new ListUptimeCheckIpsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListUptimeCheckIpsResponse); + /** Properties of a ContentMatcher. */ + interface IContentMatcher { - /** ListUptimeCheckIpsResponse uptimeCheckIps. */ - public uptimeCheckIps: google.monitoring.v3.IUptimeCheckIp[]; + /** ContentMatcher content */ + content?: (string|null); - /** ListUptimeCheckIpsResponse nextPageToken. */ - public nextPageToken: string; + /** ContentMatcher matcher */ + matcher?: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|keyof typeof google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|null); + } - /** - * Creates a new ListUptimeCheckIpsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUptimeCheckIpsResponse instance - */ - public static create(properties?: google.monitoring.v3.IListUptimeCheckIpsResponse): google.monitoring.v3.ListUptimeCheckIpsResponse; + /** Represents a ContentMatcher. */ + class ContentMatcher implements IContentMatcher { - /** - * Encodes the specified ListUptimeCheckIpsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. - * @param message ListUptimeCheckIpsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.IListUptimeCheckIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ContentMatcher. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IContentMatcher); - /** - * Encodes the specified ListUptimeCheckIpsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. - * @param message ListUptimeCheckIpsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** ContentMatcher content. */ + public content: string; - /** - * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUptimeCheckIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckIpsResponse; + /** ContentMatcher matcher. */ + public matcher: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|keyof typeof google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption); - /** - * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUptimeCheckIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckIpsResponse; + /** + * Creates a new ContentMatcher instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentMatcher instance + */ + public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IContentMatcher): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; - /** - * Verifies a ListUptimeCheckIpsResponse message. - * @param message 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 ContentMatcher message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. + * @param message ContentMatcher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.UptimeCheckConfig.IContentMatcher, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ListUptimeCheckIpsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUptimeCheckIpsResponse - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckIpsResponse; + /** + * Encodes the specified ContentMatcher message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. + * @param message ContentMatcher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IContentMatcher, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ListUptimeCheckIpsResponse message. Also converts values to other types if specified. - * @param message ListUptimeCheckIpsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.ListUptimeCheckIpsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ContentMatcher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; - /** - * Converts this ListUptimeCheckIpsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a ContentMatcher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; - /** Properties of an InternalChecker. */ - interface IInternalChecker { + /** + * Verifies a ContentMatcher message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** InternalChecker name */ - name?: (string|null); + /** + * Creates a ContentMatcher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentMatcher + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; - /** InternalChecker displayName */ - displayName?: (string|null); + /** + * Creates a plain object from a ContentMatcher message. Also converts values to other types if specified. + * @param message ContentMatcher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UptimeCheckConfig.ContentMatcher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** InternalChecker network */ - network?: (string|null); + /** + * Converts this ContentMatcher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** InternalChecker gcpZone */ - gcpZone?: (string|null); + namespace ContentMatcher { - /** InternalChecker peerProjectId */ - peerProjectId?: (string|null); + /** ContentMatcherOption enum. */ + enum ContentMatcherOption { + CONTENT_MATCHER_OPTION_UNSPECIFIED = 0, + CONTAINS_STRING = 1, + NOT_CONTAINS_STRING = 2, + MATCHES_REGEX = 3, + NOT_MATCHES_REGEX = 4 + } + } + } - /** InternalChecker state */ - state?: (google.monitoring.v3.InternalChecker.State|keyof typeof google.monitoring.v3.InternalChecker.State|null); + /** GroupResourceType enum. */ + enum GroupResourceType { + RESOURCE_TYPE_UNSPECIFIED = 0, + INSTANCE = 1, + AWS_ELB_LOAD_BALANCER = 2 } - /** Represents an InternalChecker. */ - class InternalChecker implements IInternalChecker { + /** Properties of an UptimeCheckIp. */ + interface IUptimeCheckIp { - /** - * Constructs a new InternalChecker. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IInternalChecker); + /** UptimeCheckIp region */ + region?: (google.monitoring.v3.UptimeCheckRegion|keyof typeof google.monitoring.v3.UptimeCheckRegion|null); - /** InternalChecker name. */ - public name: string; + /** UptimeCheckIp location */ + location?: (string|null); - /** InternalChecker displayName. */ - public displayName: string; + /** UptimeCheckIp ipAddress */ + ipAddress?: (string|null); + } - /** InternalChecker network. */ - public network: string; + /** Represents an UptimeCheckIp. */ + class UptimeCheckIp implements IUptimeCheckIp { + + /** + * Constructs a new UptimeCheckIp. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUptimeCheckIp); - /** InternalChecker gcpZone. */ - public gcpZone: string; + /** UptimeCheckIp region. */ + public region: (google.monitoring.v3.UptimeCheckRegion|keyof typeof google.monitoring.v3.UptimeCheckRegion); - /** InternalChecker peerProjectId. */ - public peerProjectId: string; + /** UptimeCheckIp location. */ + public location: string; - /** InternalChecker state. */ - public state: (google.monitoring.v3.InternalChecker.State|keyof typeof google.monitoring.v3.InternalChecker.State); + /** UptimeCheckIp ipAddress. */ + public ipAddress: string; /** - * Creates a new InternalChecker instance using the specified properties. + * Creates a new UptimeCheckIp instance using the specified properties. * @param [properties] Properties to set - * @returns InternalChecker instance + * @returns UptimeCheckIp instance */ - public static create(properties?: google.monitoring.v3.IInternalChecker): google.monitoring.v3.InternalChecker; + public static create(properties?: google.monitoring.v3.IUptimeCheckIp): google.monitoring.v3.UptimeCheckIp; /** - * Encodes the specified InternalChecker message. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. - * @param message InternalChecker message or plain object to encode + * Encodes the specified UptimeCheckIp message. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. + * @param message UptimeCheckIp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IInternalChecker, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IUptimeCheckIp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InternalChecker message, length delimited. Does not implicitly {@link google.monitoring.v3.InternalChecker.verify|verify} messages. - * @param message InternalChecker message or plain object to encode + * Encodes the specified UptimeCheckIp message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. + * @param message UptimeCheckIp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IInternalChecker, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IUptimeCheckIp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InternalChecker message from the specified reader or buffer. + * Decodes an UptimeCheckIp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InternalChecker + * @returns UptimeCheckIp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.InternalChecker; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckIp; /** - * Decodes an InternalChecker message from the specified reader or buffer, length delimited. + * Decodes an UptimeCheckIp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InternalChecker + * @returns UptimeCheckIp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.InternalChecker; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckIp; /** - * Verifies an InternalChecker message. + * Verifies an UptimeCheckIp message. * @param message Plain 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 InternalChecker message from a plain object. Also converts values to their respective internal types. + * Creates an UptimeCheckIp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InternalChecker + * @returns UptimeCheckIp */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.InternalChecker; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckIp; /** - * Creates a plain object from an InternalChecker message. Also converts values to other types if specified. - * @param message InternalChecker + * Creates a plain object from an UptimeCheckIp message. Also converts values to other types if specified. + * @param message UptimeCheckIp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.InternalChecker, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.UptimeCheckIp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InternalChecker to JSON. + * Converts this UptimeCheckIp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace InternalChecker { + /** Represents an UptimeCheckService */ + class UptimeCheckService extends $protobuf.rpc.Service { - /** State enum. */ - enum State { - UNSPECIFIED = 0, - CREATING = 1, - RUNNING = 2 - } - } + /** + * Constructs a new UptimeCheckService 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 UptimeCheckConfig. */ - interface IUptimeCheckConfig { + /** + * Creates new UptimeCheckService 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): UptimeCheckService; - /** UptimeCheckConfig name */ - name?: (string|null); + /** + * Calls ListUptimeCheckConfigs. + * @param request ListUptimeCheckConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUptimeCheckConfigsResponse + */ + public listUptimeCheckConfigs(request: google.monitoring.v3.IListUptimeCheckConfigsRequest, callback: google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigsCallback): void; - /** UptimeCheckConfig displayName */ - displayName?: (string|null); + /** + * Calls ListUptimeCheckConfigs. + * @param request ListUptimeCheckConfigsRequest message or plain object + * @returns Promise + */ + public listUptimeCheckConfigs(request: google.monitoring.v3.IListUptimeCheckConfigsRequest): Promise; - /** UptimeCheckConfig monitoredResource */ - monitoredResource?: (google.api.IMonitoredResource|null); + /** + * Calls GetUptimeCheckConfig. + * @param request GetUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + */ + public getUptimeCheckConfig(request: google.monitoring.v3.IGetUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfigCallback): void; - /** UptimeCheckConfig resourceGroup */ - resourceGroup?: (google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null); + /** + * Calls GetUptimeCheckConfig. + * @param request GetUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public getUptimeCheckConfig(request: google.monitoring.v3.IGetUptimeCheckConfigRequest): Promise; - /** UptimeCheckConfig httpCheck */ - httpCheck?: (google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null); + /** + * Calls CreateUptimeCheckConfig. + * @param request CreateUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + */ + public createUptimeCheckConfig(request: google.monitoring.v3.ICreateUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfigCallback): void; - /** UptimeCheckConfig tcpCheck */ - tcpCheck?: (google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null); + /** + * Calls CreateUptimeCheckConfig. + * @param request CreateUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public createUptimeCheckConfig(request: google.monitoring.v3.ICreateUptimeCheckConfigRequest): Promise; - /** UptimeCheckConfig period */ - period?: (google.protobuf.IDuration|null); + /** + * Calls UpdateUptimeCheckConfig. + * @param request UpdateUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UptimeCheckConfig + */ + public updateUptimeCheckConfig(request: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfigCallback): void; - /** UptimeCheckConfig timeout */ - timeout?: (google.protobuf.IDuration|null); + /** + * Calls UpdateUptimeCheckConfig. + * @param request UpdateUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public updateUptimeCheckConfig(request: google.monitoring.v3.IUpdateUptimeCheckConfigRequest): Promise; - /** UptimeCheckConfig contentMatchers */ - contentMatchers?: (google.monitoring.v3.UptimeCheckConfig.IContentMatcher[]|null); + /** + * Calls DeleteUptimeCheckConfig. + * @param request DeleteUptimeCheckConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUptimeCheckConfig(request: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, callback: google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfigCallback): void; - /** UptimeCheckConfig selectedRegions */ - selectedRegions?: (google.monitoring.v3.UptimeCheckRegion[]|null); + /** + * Calls DeleteUptimeCheckConfig. + * @param request DeleteUptimeCheckConfigRequest message or plain object + * @returns Promise + */ + public deleteUptimeCheckConfig(request: google.monitoring.v3.IDeleteUptimeCheckConfigRequest): Promise; - /** UptimeCheckConfig isInternal */ - isInternal?: (boolean|null); + /** + * Calls ListUptimeCheckIps. + * @param request ListUptimeCheckIpsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUptimeCheckIpsResponse + */ + public listUptimeCheckIps(request: google.monitoring.v3.IListUptimeCheckIpsRequest, callback: google.monitoring.v3.UptimeCheckService.ListUptimeCheckIpsCallback): void; - /** UptimeCheckConfig internalCheckers */ - internalCheckers?: (google.monitoring.v3.IInternalChecker[]|null); + /** + * Calls ListUptimeCheckIps. + * @param request ListUptimeCheckIpsRequest message or plain object + * @returns Promise + */ + public listUptimeCheckIps(request: google.monitoring.v3.IListUptimeCheckIpsRequest): Promise; } - /** Represents an UptimeCheckConfig. */ - class UptimeCheckConfig implements IUptimeCheckConfig { + namespace UptimeCheckService { /** - * Constructs a new UptimeCheckConfig. - * @param [properties] Properties to set + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. + * @param error Error, if any + * @param [response] ListUptimeCheckConfigsResponse */ - constructor(properties?: google.monitoring.v3.IUptimeCheckConfig); + type ListUptimeCheckConfigsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckConfigsResponse) => void; - /** UptimeCheckConfig name. */ - public name: string; + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. + * @param error Error, if any + * @param [response] UptimeCheckConfig + */ + type GetUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; - /** UptimeCheckConfig displayName. */ - public displayName: string; + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. + * @param error Error, if any + * @param [response] UptimeCheckConfig + */ + type CreateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; - /** UptimeCheckConfig monitoredResource. */ - public monitoredResource?: (google.api.IMonitoredResource|null); + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. + * @param error Error, if any + * @param [response] UptimeCheckConfig + */ + type UpdateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; - /** UptimeCheckConfig resourceGroup. */ - public resourceGroup?: (google.monitoring.v3.UptimeCheckConfig.IResourceGroup|null); + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUptimeCheckConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** UptimeCheckConfig httpCheck. */ - public httpCheck?: (google.monitoring.v3.UptimeCheckConfig.IHttpCheck|null); + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. + * @param error Error, if any + * @param [response] ListUptimeCheckIpsResponse + */ + type ListUptimeCheckIpsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckIpsResponse) => void; + } - /** UptimeCheckConfig tcpCheck. */ - public tcpCheck?: (google.monitoring.v3.UptimeCheckConfig.ITcpCheck|null); + /** Properties of a ListUptimeCheckConfigsRequest. */ + interface IListUptimeCheckConfigsRequest { - /** UptimeCheckConfig period. */ - public period?: (google.protobuf.IDuration|null); + /** ListUptimeCheckConfigsRequest parent */ + parent?: (string|null); - /** UptimeCheckConfig timeout. */ - public timeout?: (google.protobuf.IDuration|null); + /** ListUptimeCheckConfigsRequest pageSize */ + pageSize?: (number|null); - /** UptimeCheckConfig contentMatchers. */ - public contentMatchers: google.monitoring.v3.UptimeCheckConfig.IContentMatcher[]; + /** ListUptimeCheckConfigsRequest pageToken */ + pageToken?: (string|null); + } - /** UptimeCheckConfig selectedRegions. */ - public selectedRegions: google.monitoring.v3.UptimeCheckRegion[]; + /** Represents a ListUptimeCheckConfigsRequest. */ + class ListUptimeCheckConfigsRequest implements IListUptimeCheckConfigsRequest { - /** UptimeCheckConfig isInternal. */ - public isInternal: boolean; + /** + * Constructs a new ListUptimeCheckConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckConfigsRequest); - /** UptimeCheckConfig internalCheckers. */ - public internalCheckers: google.monitoring.v3.IInternalChecker[]; + /** ListUptimeCheckConfigsRequest parent. */ + public parent: string; - /** UptimeCheckConfig resource. */ - public resource?: ("monitoredResource"|"resourceGroup"); + /** ListUptimeCheckConfigsRequest pageSize. */ + public pageSize: number; - /** UptimeCheckConfig checkRequestType. */ - public checkRequestType?: ("httpCheck"|"tcpCheck"); + /** ListUptimeCheckConfigsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UptimeCheckConfig instance using the specified properties. + * Creates a new ListUptimeCheckConfigsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UptimeCheckConfig instance + * @returns ListUptimeCheckConfigsRequest instance */ - public static create(properties?: google.monitoring.v3.IUptimeCheckConfig): google.monitoring.v3.UptimeCheckConfig; + public static create(properties?: google.monitoring.v3.IListUptimeCheckConfigsRequest): google.monitoring.v3.ListUptimeCheckConfigsRequest; /** - * Encodes the specified UptimeCheckConfig message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. - * @param message UptimeCheckConfig message or plain object to encode + * Encodes the specified ListUptimeCheckConfigsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @param message ListUptimeCheckConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IUptimeCheckConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListUptimeCheckConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UptimeCheckConfig message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.verify|verify} messages. - * @param message UptimeCheckConfig message or plain object to encode + * Encodes the specified ListUptimeCheckConfigsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @param message ListUptimeCheckConfigsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IUptimeCheckConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UptimeCheckConfig message from the specified reader or buffer. + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UptimeCheckConfig + * @returns ListUptimeCheckConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckConfigsRequest; /** - * Decodes an UptimeCheckConfig message from the specified reader or buffer, length delimited. + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UptimeCheckConfig + * @returns ListUptimeCheckConfigsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckConfigsRequest; /** - * Verifies an UptimeCheckConfig message. + * Verifies a ListUptimeCheckConfigsRequest message. * @param message Plain 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 UptimeCheckConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListUptimeCheckConfigsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UptimeCheckConfig + * @returns ListUptimeCheckConfigsRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckConfigsRequest; /** - * Creates a plain object from an UptimeCheckConfig message. Also converts values to other types if specified. - * @param message UptimeCheckConfig + * Creates a plain object from a ListUptimeCheckConfigsRequest message. Also converts values to other types if specified. + * @param message ListUptimeCheckConfigsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.UptimeCheckConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListUptimeCheckConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UptimeCheckConfig to JSON. + * Converts this ListUptimeCheckConfigsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace UptimeCheckConfig { + /** Properties of a ListUptimeCheckConfigsResponse. */ + interface IListUptimeCheckConfigsResponse { - /** Properties of a ResourceGroup. */ - interface IResourceGroup { + /** ListUptimeCheckConfigsResponse uptimeCheckConfigs */ + uptimeCheckConfigs?: (google.monitoring.v3.IUptimeCheckConfig[]|null); - /** ResourceGroup groupId */ - groupId?: (string|null); + /** ListUptimeCheckConfigsResponse nextPageToken */ + nextPageToken?: (string|null); - /** ResourceGroup resourceType */ - resourceType?: (google.monitoring.v3.GroupResourceType|keyof typeof google.monitoring.v3.GroupResourceType|null); - } + /** ListUptimeCheckConfigsResponse totalSize */ + totalSize?: (number|null); + } - /** Represents a ResourceGroup. */ - class ResourceGroup implements IResourceGroup { + /** Represents a ListUptimeCheckConfigsResponse. */ + class ListUptimeCheckConfigsResponse implements IListUptimeCheckConfigsResponse { - /** - * Constructs a new ResourceGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IResourceGroup); + /** + * Constructs a new ListUptimeCheckConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckConfigsResponse); - /** ResourceGroup groupId. */ - public groupId: string; + /** ListUptimeCheckConfigsResponse uptimeCheckConfigs. */ + public uptimeCheckConfigs: google.monitoring.v3.IUptimeCheckConfig[]; - /** ResourceGroup resourceType. */ - public resourceType: (google.monitoring.v3.GroupResourceType|keyof typeof google.monitoring.v3.GroupResourceType); + /** ListUptimeCheckConfigsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Creates a new ResourceGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceGroup instance - */ - public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IResourceGroup): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + /** ListUptimeCheckConfigsResponse totalSize. */ + public totalSize: number; - /** - * Encodes the specified ResourceGroup message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. - * @param message ResourceGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.UptimeCheckConfig.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ListUptimeCheckConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUptimeCheckConfigsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListUptimeCheckConfigsResponse): google.monitoring.v3.ListUptimeCheckConfigsResponse; - /** - * Encodes the specified ResourceGroup message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ResourceGroup.verify|verify} messages. - * @param message ResourceGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IResourceGroup, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListUptimeCheckConfigsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @param message ListUptimeCheckConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListUptimeCheckConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ResourceGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + /** + * Encodes the specified ListUptimeCheckConfigsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @param message ListUptimeCheckConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ResourceGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckConfigsResponse; - /** - * Verifies a ResourceGroup message. - * @param message 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 ListUptimeCheckConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckConfigsResponse; - /** - * Creates a ResourceGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceGroup - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.ResourceGroup; + /** + * Verifies a ListUptimeCheckConfigsResponse message. + * @param message Plain object 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 ResourceGroup message. Also converts values to other types if specified. - * @param message ResourceGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UptimeCheckConfig.ResourceGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a ListUptimeCheckConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUptimeCheckConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckConfigsResponse; - /** - * Converts this ResourceGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a ListUptimeCheckConfigsResponse message. Also converts values to other types if specified. + * @param message ListUptimeCheckConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListUptimeCheckConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a HttpCheck. */ - interface IHttpCheck { + /** + * Converts this ListUptimeCheckConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpCheck useSsl */ - useSsl?: (boolean|null); + /** Properties of a GetUptimeCheckConfigRequest. */ + interface IGetUptimeCheckConfigRequest { - /** HttpCheck path */ - path?: (string|null); + /** GetUptimeCheckConfigRequest name */ + name?: (string|null); + } - /** HttpCheck port */ - port?: (number|null); + /** Represents a GetUptimeCheckConfigRequest. */ + class GetUptimeCheckConfigRequest implements IGetUptimeCheckConfigRequest { - /** HttpCheck authInfo */ - authInfo?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null); + /** + * Constructs a new GetUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetUptimeCheckConfigRequest); + + /** GetUptimeCheckConfigRequest name. */ + public name: string; - /** HttpCheck maskHeaders */ - maskHeaders?: (boolean|null); + /** + * Creates a new GetUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetUptimeCheckConfigRequest): google.monitoring.v3.GetUptimeCheckConfigRequest; - /** HttpCheck headers */ - headers?: ({ [k: string]: string }|null); + /** + * Encodes the specified GetUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @param message GetUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpCheck validateSsl */ - validateSsl?: (boolean|null); - } + /** + * Encodes the specified GetUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @param message GetUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a HttpCheck. */ - class HttpCheck implements IHttpCheck { + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetUptimeCheckConfigRequest; - /** - * Constructs a new HttpCheck. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck); + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetUptimeCheckConfigRequest; - /** HttpCheck useSsl. */ - public useSsl: boolean; + /** + * Verifies a GetUptimeCheckConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpCheck path. */ - public path: string; + /** + * Creates a GetUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetUptimeCheckConfigRequest; - /** HttpCheck port. */ - public port: number; + /** + * Creates a plain object from a GetUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message GetUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpCheck authInfo. */ - public authInfo?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null); + /** + * Converts this GetUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HttpCheck maskHeaders. */ - public maskHeaders: boolean; + /** Properties of a CreateUptimeCheckConfigRequest. */ + interface ICreateUptimeCheckConfigRequest { - /** HttpCheck headers. */ - public headers: { [k: string]: string }; + /** CreateUptimeCheckConfigRequest parent */ + parent?: (string|null); - /** HttpCheck validateSsl. */ - public validateSsl: boolean; + /** CreateUptimeCheckConfigRequest uptimeCheckConfig */ + uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + } - /** - * Creates a new HttpCheck instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpCheck instance - */ - public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + /** Represents a CreateUptimeCheckConfigRequest. */ + class CreateUptimeCheckConfigRequest implements ICreateUptimeCheckConfigRequest { - /** - * Encodes the specified HttpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. - * @param message HttpCheck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.UptimeCheckConfig.IHttpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new CreateUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.ICreateUptimeCheckConfigRequest); - /** - * Encodes the specified HttpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.verify|verify} messages. - * @param message HttpCheck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IHttpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateUptimeCheckConfigRequest parent. */ + public parent: string; - /** - * Decodes a HttpCheck message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpCheck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + /** CreateUptimeCheckConfigRequest uptimeCheckConfig. */ + public uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); - /** - * Decodes a HttpCheck message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpCheck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + /** + * Creates a new CreateUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateUptimeCheckConfigRequest): google.monitoring.v3.CreateUptimeCheckConfigRequest; - /** - * Verifies a HttpCheck message. - * @param message 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 CreateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @param message CreateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.ICreateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a HttpCheck message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpCheck - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.HttpCheck; + /** + * Encodes the specified CreateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @param message CreateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.ICreateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a HttpCheck message. Also converts values to other types if specified. - * @param message HttpCheck - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateUptimeCheckConfigRequest; - /** - * Converts this HttpCheck to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateUptimeCheckConfigRequest; - namespace HttpCheck { + /** + * Verifies a CreateUptimeCheckConfigRequest message. + * @param message 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 BasicAuthentication. */ - interface IBasicAuthentication { + /** + * Creates a CreateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateUptimeCheckConfigRequest; - /** BasicAuthentication username */ - username?: (string|null); + /** + * Creates a plain object from a CreateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message CreateUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** BasicAuthentication password */ - password?: (string|null); - } + /** + * Converts this CreateUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a BasicAuthentication. */ - class BasicAuthentication implements IBasicAuthentication { + /** Properties of an UpdateUptimeCheckConfigRequest. */ + interface IUpdateUptimeCheckConfigRequest { - /** - * Constructs a new BasicAuthentication. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication); + /** UpdateUptimeCheckConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** BasicAuthentication username. */ - public username: string; + /** UpdateUptimeCheckConfigRequest uptimeCheckConfig */ + uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); + } - /** BasicAuthentication password. */ - public password: string; + /** Represents an UpdateUptimeCheckConfigRequest. */ + class UpdateUptimeCheckConfigRequest implements IUpdateUptimeCheckConfigRequest { - /** - * Creates a new BasicAuthentication instance using the specified properties. - * @param [properties] Properties to set - * @returns BasicAuthentication instance - */ - public static create(properties?: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + /** + * Constructs a new UpdateUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IUpdateUptimeCheckConfigRequest); - /** - * Encodes the specified BasicAuthentication message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. - * @param message BasicAuthentication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateUptimeCheckConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Encodes the specified BasicAuthentication message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.verify|verify} messages. - * @param message BasicAuthentication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateUptimeCheckConfigRequest uptimeCheckConfig. */ + public uptimeCheckConfig?: (google.monitoring.v3.IUptimeCheckConfig|null); - /** - * Decodes a BasicAuthentication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BasicAuthentication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + /** + * Creates a new UpdateUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.IUpdateUptimeCheckConfigRequest): google.monitoring.v3.UpdateUptimeCheckConfigRequest; - /** - * Decodes a BasicAuthentication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BasicAuthentication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @param message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a BasicAuthentication message. - * @param message 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 UpdateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @param message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IUpdateUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a BasicAuthentication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BasicAuthentication - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication; + /** + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UpdateUptimeCheckConfigRequest; - /** - * Creates a plain object from a BasicAuthentication message. Also converts values to other types if specified. - * @param message BasicAuthentication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UpdateUptimeCheckConfigRequest; - /** - * Converts this BasicAuthentication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Verifies an UpdateUptimeCheckConfigRequest message. + * @param message 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 TcpCheck. */ - interface ITcpCheck { + /** + * Creates an UpdateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UpdateUptimeCheckConfigRequest; - /** TcpCheck port */ - port?: (number|null); - } + /** + * Creates a plain object from an UpdateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message UpdateUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.UpdateUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a TcpCheck. */ - class TcpCheck implements ITcpCheck { + /** + * Converts this UpdateUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new TcpCheck. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.UptimeCheckConfig.ITcpCheck); + /** Properties of a DeleteUptimeCheckConfigRequest. */ + interface IDeleteUptimeCheckConfigRequest { - /** TcpCheck port. */ - public port: number; + /** DeleteUptimeCheckConfigRequest name */ + name?: (string|null); + } - /** - * Creates a new TcpCheck instance using the specified properties. - * @param [properties] Properties to set - * @returns TcpCheck instance - */ - public static create(properties?: google.monitoring.v3.UptimeCheckConfig.ITcpCheck): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + /** Represents a DeleteUptimeCheckConfigRequest. */ + class DeleteUptimeCheckConfigRequest implements IDeleteUptimeCheckConfigRequest { - /** - * Encodes the specified TcpCheck message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. - * @param message TcpCheck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.UptimeCheckConfig.ITcpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new DeleteUptimeCheckConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IDeleteUptimeCheckConfigRequest); - /** - * Encodes the specified TcpCheck message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.TcpCheck.verify|verify} messages. - * @param message TcpCheck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.ITcpCheck, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteUptimeCheckConfigRequest name. */ + public name: string; - /** - * Decodes a TcpCheck message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TcpCheck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + /** + * Creates a new DeleteUptimeCheckConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUptimeCheckConfigRequest instance + */ + public static create(properties?: google.monitoring.v3.IDeleteUptimeCheckConfigRequest): google.monitoring.v3.DeleteUptimeCheckConfigRequest; - /** - * Decodes a TcpCheck message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TcpCheck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + /** + * Encodes the specified DeleteUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @param message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a TcpCheck message. - * @param message 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 DeleteUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @param message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IDeleteUptimeCheckConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a TcpCheck message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TcpCheck - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.TcpCheck; + /** + * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteUptimeCheckConfigRequest; - /** - * Creates a plain object from a TcpCheck message. Also converts values to other types if specified. - * @param message TcpCheck - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UptimeCheckConfig.TcpCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteUptimeCheckConfigRequest; - /** - * Converts this TcpCheck to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a DeleteUptimeCheckConfigRequest message. + * @param message 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 ContentMatcher. */ - interface IContentMatcher { + /** + * Creates a DeleteUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUptimeCheckConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteUptimeCheckConfigRequest; - /** ContentMatcher content */ - content?: (string|null); + /** + * Creates a plain object from a DeleteUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @param message DeleteUptimeCheckConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.DeleteUptimeCheckConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ContentMatcher matcher */ - matcher?: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|keyof typeof google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|null); - } + /** + * Converts this DeleteUptimeCheckConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a ContentMatcher. */ - class ContentMatcher implements IContentMatcher { + /** Properties of a ListUptimeCheckIpsRequest. */ + interface IListUptimeCheckIpsRequest { - /** - * Constructs a new ContentMatcher. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IContentMatcher); + /** ListUptimeCheckIpsRequest pageSize */ + pageSize?: (number|null); - /** ContentMatcher content. */ - public content: string; + /** ListUptimeCheckIpsRequest pageToken */ + pageToken?: (string|null); + } - /** ContentMatcher matcher. */ - public matcher: (google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption|keyof typeof google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption); + /** Represents a ListUptimeCheckIpsRequest. */ + class ListUptimeCheckIpsRequest implements IListUptimeCheckIpsRequest { - /** - * Creates a new ContentMatcher instance using the specified properties. - * @param [properties] Properties to set - * @returns ContentMatcher instance - */ - public static create(properties?: google.monitoring.v3.UptimeCheckConfig.IContentMatcher): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + /** + * Constructs a new ListUptimeCheckIpsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListUptimeCheckIpsRequest); - /** - * Encodes the specified ContentMatcher message. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. - * @param message ContentMatcher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.UptimeCheckConfig.IContentMatcher, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListUptimeCheckIpsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified ContentMatcher message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckConfig.ContentMatcher.verify|verify} messages. - * @param message ContentMatcher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.UptimeCheckConfig.IContentMatcher, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListUptimeCheckIpsRequest pageToken. */ + public pageToken: string; - /** - * Decodes a ContentMatcher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContentMatcher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + /** + * Creates a new ListUptimeCheckIpsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUptimeCheckIpsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListUptimeCheckIpsRequest): google.monitoring.v3.ListUptimeCheckIpsRequest; - /** - * Decodes a ContentMatcher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContentMatcher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + /** + * Encodes the specified ListUptimeCheckIpsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * @param message ListUptimeCheckIpsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListUptimeCheckIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ContentMatcher message. - * @param message 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 ListUptimeCheckIpsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * @param message ListUptimeCheckIpsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ContentMatcher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContentMatcher - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckConfig.ContentMatcher; + /** + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUptimeCheckIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckIpsRequest; - /** - * Creates a plain object from a ContentMatcher message. Also converts values to other types if specified. - * @param message ContentMatcher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.UptimeCheckConfig.ContentMatcher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUptimeCheckIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckIpsRequest; - /** - * Converts this ContentMatcher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a ListUptimeCheckIpsRequest message. + * @param message 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 ContentMatcher { + /** + * Creates a ListUptimeCheckIpsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUptimeCheckIpsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckIpsRequest; - /** ContentMatcherOption enum. */ - enum ContentMatcherOption { - CONTENT_MATCHER_OPTION_UNSPECIFIED = 0, - CONTAINS_STRING = 1, - NOT_CONTAINS_STRING = 2, - MATCHES_REGEX = 3, - NOT_MATCHES_REGEX = 4 - } - } - } + /** + * Creates a plain object from a ListUptimeCheckIpsRequest message. Also converts values to other types if specified. + * @param message ListUptimeCheckIpsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListUptimeCheckIpsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** UptimeCheckRegion enum. */ - enum UptimeCheckRegion { - REGION_UNSPECIFIED = 0, - USA = 1, - EUROPE = 2, - SOUTH_AMERICA = 3, - ASIA_PACIFIC = 4 + /** + * Converts this ListUptimeCheckIpsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of an UptimeCheckIp. */ - interface IUptimeCheckIp { - - /** UptimeCheckIp region */ - region?: (google.monitoring.v3.UptimeCheckRegion|keyof typeof google.monitoring.v3.UptimeCheckRegion|null); + /** Properties of a ListUptimeCheckIpsResponse. */ + interface IListUptimeCheckIpsResponse { - /** UptimeCheckIp location */ - location?: (string|null); + /** ListUptimeCheckIpsResponse uptimeCheckIps */ + uptimeCheckIps?: (google.monitoring.v3.IUptimeCheckIp[]|null); - /** UptimeCheckIp ipAddress */ - ipAddress?: (string|null); + /** ListUptimeCheckIpsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UptimeCheckIp. */ - class UptimeCheckIp implements IUptimeCheckIp { + /** Represents a ListUptimeCheckIpsResponse. */ + class ListUptimeCheckIpsResponse implements IListUptimeCheckIpsResponse { /** - * Constructs a new UptimeCheckIp. + * Constructs a new ListUptimeCheckIpsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IUptimeCheckIp); - - /** UptimeCheckIp region. */ - public region: (google.monitoring.v3.UptimeCheckRegion|keyof typeof google.monitoring.v3.UptimeCheckRegion); + constructor(properties?: google.monitoring.v3.IListUptimeCheckIpsResponse); - /** UptimeCheckIp location. */ - public location: string; + /** ListUptimeCheckIpsResponse uptimeCheckIps. */ + public uptimeCheckIps: google.monitoring.v3.IUptimeCheckIp[]; - /** UptimeCheckIp ipAddress. */ - public ipAddress: string; + /** ListUptimeCheckIpsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UptimeCheckIp instance using the specified properties. + * Creates a new ListUptimeCheckIpsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UptimeCheckIp instance + * @returns ListUptimeCheckIpsResponse instance */ - public static create(properties?: google.monitoring.v3.IUptimeCheckIp): google.monitoring.v3.UptimeCheckIp; + public static create(properties?: google.monitoring.v3.IListUptimeCheckIpsResponse): google.monitoring.v3.ListUptimeCheckIpsResponse; /** - * Encodes the specified UptimeCheckIp message. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. - * @param message UptimeCheckIp message or plain object to encode + * Encodes the specified ListUptimeCheckIpsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @param message ListUptimeCheckIpsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IUptimeCheckIp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListUptimeCheckIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UptimeCheckIp message, length delimited. Does not implicitly {@link google.monitoring.v3.UptimeCheckIp.verify|verify} messages. - * @param message UptimeCheckIp message or plain object to encode + * Encodes the specified ListUptimeCheckIpsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @param message ListUptimeCheckIpsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IUptimeCheckIp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListUptimeCheckIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UptimeCheckIp message from the specified reader or buffer. + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UptimeCheckIp + * @returns ListUptimeCheckIpsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.UptimeCheckIp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListUptimeCheckIpsResponse; /** - * Decodes an UptimeCheckIp message from the specified reader or buffer, length delimited. + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UptimeCheckIp + * @returns ListUptimeCheckIpsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.UptimeCheckIp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListUptimeCheckIpsResponse; /** - * Verifies an UptimeCheckIp message. + * Verifies a ListUptimeCheckIpsResponse message. * @param message Plain 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 UptimeCheckIp message from a plain object. Also converts values to their respective internal types. + * Creates a ListUptimeCheckIpsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UptimeCheckIp + * @returns ListUptimeCheckIpsResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.UptimeCheckIp; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListUptimeCheckIpsResponse; /** - * Creates a plain object from an UptimeCheckIp message. Also converts values to other types if specified. - * @param message UptimeCheckIp + * Creates a plain object from a ListUptimeCheckIpsResponse message. Also converts values to other types if specified. + * @param message ListUptimeCheckIpsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.UptimeCheckIp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListUptimeCheckIpsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UptimeCheckIp to JSON. + * Converts this ListUptimeCheckIpsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - - /** GroupResourceType enum. */ - enum GroupResourceType { - RESOURCE_TYPE_UNSPECIFIED = 0, - INSTANCE = 1, - AWS_ELB_LOAD_BALANCER = 2 - } } } /** Namespace api. */ namespace api { - /** Properties of a Http. */ - interface IHttp { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|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 Http. */ - class Http implements IHttp { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new Http. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.IResourceDescriptor); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** ResourceDescriptor type. */ + public type: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** 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 Http instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * 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 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.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 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.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http 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 Http + * @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.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a Http 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 Http + * @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.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a Http 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 Http 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 Http + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * 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 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.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this ResourceDescriptor 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 ResourceDescriptor { - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } - /** HttpRule body */ - body?: (string|null); + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** HttpRule responseBody */ - responseBody?: (string|null); + /** ResourceReference type */ + type?: (string|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new HttpRule. + * Constructs a new ResourceReference. * @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.IResourceReference); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** ResourceReference type. */ + public type: string; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns ResourceReference instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * 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 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.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, 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 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.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule 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 HttpRule + * @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.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a HttpRule 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 HttpRule + * @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.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a HttpRule 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 HttpRule 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 HttpRule + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * 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 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.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a Distribution. */ + interface IDistribution { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** Distribution count */ + count?: (number|Long|string|null); - /** CustomHttpPattern path */ - path?: (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 CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a Distribution. */ + class Distribution implements IDistribution { /** - * Constructs a new CustomHttpPattern. + * Constructs a new Distribution. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IDistribution); - /** CustomHttpPattern kind. */ - public kind: string; + /** Distribution count. */ + public count: (number|Long|string); - /** CustomHttpPattern path. */ - public path: 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 CustomHttpPattern instance using the specified properties. + * Creates a new Distribution instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns Distribution instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IDistribution): google.api.Distribution; /** - * 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 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IDistribution, 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 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern 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 CustomHttpPattern + * @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.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution; /** - * Decodes a CustomHttpPattern 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 CustomHttpPattern + * @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.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution; /** - * Verifies a CustomHttpPattern 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 CustomHttpPattern 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 CustomHttpPattern + * @returns Distribution */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.Distribution; /** - * 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 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.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Distribution to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 - } + namespace Distribution { - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** Properties of a Range. */ + interface IRange { - /** ResourceDescriptor type */ - type?: (string|null); + /** Range min */ + min?: (number|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** Range max */ + max?: (number|null); + } - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** Represents a Range. */ + class Range implements IRange { - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IRange); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** Range min. */ + public min: number; - /** ResourceDescriptor singular */ - singular?: (string|null); - } + /** Range max. */ + public max: number; - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** + * 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; - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** + * 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; - /** ResourceDescriptor type. */ - public type: string; + /** + * 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; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** + * 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; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** + * 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; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** + * 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); - /** ResourceDescriptor plural. */ - public plural: 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; - /** ResourceDescriptor singular. */ - public singular: 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 }; - /** - * 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 Range 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 BucketOptions. */ + interface IBucketOptions { - /** - * 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; + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|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; + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|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; + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|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); + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { - /** - * 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; + /** + * Constructs a new BucketOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IBucketOptions); - /** - * 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 }; + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - namespace ResourceDescriptor { + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** + * 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; - /** ResourceReference type */ - type?: (string|null); + /** + * 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; - /** ResourceReference childType */ - childType?: (string|null); - } + /** + * 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; - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** + * 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; - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** + * 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; - /** ResourceReference type. */ - public type: string; + /** + * 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); - /** ResourceReference childType. */ - public childType: string; + /** + * 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 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; + /** + * 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 }; - /** - * 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; + /** + * Converts this BucketOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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; + namespace BucketOptions { - /** - * 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; + /** Properties of a Linear. */ + interface ILinear { - /** - * 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; + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|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); + /** Linear width */ + width?: (number|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; + /** Linear offset */ + offset?: (number|null); + } - /** - * 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 }; + /** Represents a Linear. */ + class Linear implements ILinear { - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - /** Properties of a Distribution. */ - interface IDistribution { + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; - /** Distribution count */ - count?: (number|Long|string|null); + /** Linear width. */ + public width: number; - /** Distribution mean */ - mean?: (number|null); + /** Linear offset. */ + public offset: number; - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|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; - /** Distribution range */ - range?: (google.api.Distribution.IRange|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; - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|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; - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|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; - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|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; - /** Represents a Distribution. */ - class Distribution implements IDistribution { + /** + * 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); - /** - * Constructs a new Distribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDistribution); + /** + * 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; - /** Distribution count. */ - public count: (number|Long|string); + /** + * 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 }; - /** Distribution mean. */ - public mean: number; + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; + /** Properties of an Exponential. */ + interface IExponential { - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + /** Exponential growthFactor */ + growthFactor?: (number|null); - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; + /** Exponential scale */ + scale?: (number|null); + } - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; + /** Represents an Exponential. */ + class Exponential implements IExponential { - /** - * 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; + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); - /** - * 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; + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; - /** - * 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; + /** Exponential growthFactor. */ + public growthFactor: number; - /** - * 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; + /** Exponential scale. */ + public scale: number; - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * 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 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 }; + /** + * 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; - /** - * Converts this Distribution to JSON. - * @returns JSON object - */ - public toJSON(): { [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; - namespace Distribution { + /** + * 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 Range. */ - interface IRange { + /** + * 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; - /** Range min */ - min?: (number|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 }; - /** Range max */ - max?: (number|null); - } + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a Range. */ - class Range implements IRange { + /** Properties of an Explicit. */ + interface IExplicit { - /** - * Constructs a new Range. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IRange); + /** Explicit bounds */ + bounds?: (number[]|null); + } - /** Range min. */ - public min: number; + /** Represents an Explicit. */ + class Explicit implements IExplicit { - /** Range max. */ - public max: number; + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); - /** - * 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; + /** Explicit bounds. */ + public bounds: number[]; - /** - * 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; + /** + * 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 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; + /** + * 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 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; + /** + * 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 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; + /** + * 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 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); + /** + * 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 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; + /** + * 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 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 }; + /** + * 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 Range 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 }; + + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of a BucketOptions. */ - interface IBucketOptions { + /** Properties of an Exemplar. */ + interface IExemplar { - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + /** Exemplar value */ + value?: (number|null); - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); } - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { /** - * Constructs a new BucketOptions. + * Constructs a new Exemplar. * @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.Distribution.IExemplar); - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + /** Exemplar value. */ + public value: number; - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; /** - * Creates a new BucketOptions instance using the specified properties. + * Creates a new Exemplar instance using the specified properties. * @param [properties] Properties to set - * @returns BucketOptions instance + * @returns Exemplar instance */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; /** - * 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 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.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.Distribution.IExemplar, 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 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.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BucketOptions 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 BucketOptions + * @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.BucketOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Distribution.Exemplar; /** - * Decodes a BucketOptions 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 BucketOptions + * @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.BucketOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Distribution.Exemplar; /** - * Verifies a BucketOptions 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 BucketOptions 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 BucketOptions + * @returns Exemplar */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; /** - * 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 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.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BucketOptions to JSON. + * Converts this Exemplar 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); + /** Properties of a Http. */ + interface IHttp { - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** Linear width. */ - public width: number; + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** Linear offset. */ - public offset: number; + /** Represents a Http. */ + class Http implements IHttp { - /** - * 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; + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** - * 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; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** - * 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; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; - /** - * 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; + /** + * 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; - /** - * 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; + /** + * 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; - /** - * 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 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 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; + /** + * 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; - /** - * 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 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; - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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); - /** Properties of an Exponential. */ - interface IExponential { + /** + * 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; - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); + /** + * 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 }; - /** Exponential growthFactor */ - growthFactor?: (number|null); + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Exponential scale */ - scale?: (number|null); - } + /** Properties of a HttpRule. */ + interface IHttpRule { - /** Represents an Exponential. */ - class Exponential implements IExponential { + /** HttpRule selector */ + selector?: (string|null); - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + /** HttpRule get */ + get?: (string|null); - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; + /** HttpRule put */ + put?: (string|null); - /** Exponential growthFactor. */ - public growthFactor: number; + /** HttpRule post */ + post?: (string|null); - /** Exponential scale. */ - public scale: number; + /** HttpRule delete */ + "delete"?: (string|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; + /** HttpRule patch */ + patch?: (string|null); - /** - * 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; + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|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; + /** HttpRule body */ + body?: (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; + /** HttpRule responseBody */ + responseBody?: (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; + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** - * 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); + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** - * 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; + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** - * 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 }; + /** HttpRule selector. */ + public selector: string; - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule get. */ + public get: string; - /** Properties of an Explicit. */ - interface IExplicit { + /** HttpRule put. */ + public put: string; - /** Explicit bounds */ - bounds?: (number[]|null); - } + /** HttpRule post. */ + public post: string; - /** Represents an Explicit. */ - class Explicit implements IExplicit { + /** HttpRule delete. */ + public delete: string; - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + /** HttpRule patch. */ + public patch: string; - /** Explicit bounds. */ - public bounds: number[]; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** - * 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; + /** HttpRule body. */ + public body: 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; + /** HttpRule responseBody. */ + public responseBody: string; - /** - * 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; + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** - * 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; + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - /** - * 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 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; - /** - * 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); + /** + * 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 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; + /** + * 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 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 }; + /** + * 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; - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [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; - /** Properties of an Exemplar. */ - interface IExemplar { + /** + * 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); - /** Exemplar value */ - value?: (number|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; - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|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 }; - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); - } + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** - * Constructs a new Exemplar. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IExemplar); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** Exemplar value. */ - public value: number; + /** CustomHttpPattern path */ + path?: (string|null); + } - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); - /** - * 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; + /** CustomHttpPattern kind. */ + public kind: 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; + /** CustomHttpPattern path. */ + public path: 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 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 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 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 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 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 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 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 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 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 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 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 Exemplar to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 } /** Properties of a MonitoredResourceDescriptor. */ @@ -15639,11 +15825,11 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** FieldOptions .google.api.resourceReference */ ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); } /** Represents a FieldOptions. */ @@ -17885,293 +18071,119 @@ export namespace google { public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue 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. + * Verifies a StringValue message. * @param message Plain 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 StringValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns StringValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; /** - * 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 StringValue message. Also converts values to other types if specified. + * @param message StringValue * @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.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this StringValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FieldMask. */ - interface IFieldMask { + /** Properties of a BytesValue. */ + interface IBytesValue { - /** FieldMask paths */ - paths?: (string[]|null); + /** BytesValue value */ + value?: (Uint8Array|string|null); } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { /** - * Constructs a new FieldMask. + * Constructs a new BytesValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldMask); + constructor(properties?: google.protobuf.IBytesValue); - /** FieldMask paths. */ - public paths: string[]; + /** BytesValue value. */ + public value: (Uint8Array|string); /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new BytesValue instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns BytesValue instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; /** - * 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 BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue 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.IBytesValue, 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 BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue 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.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a BytesValue 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 BytesValue * @throws {Error} If the payload is not a 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.BytesValue; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a BytesValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns BytesValue * @throws {Error} If the payload is 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.BytesValue; /** - * Verifies a FieldMask message. + * Verifies a BytesValue message. * @param message Plain object 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 BytesValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns BytesValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; /** - * 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 BytesValue message. Also converts values to other types if specified. + * @param message BytesValue * @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.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this BytesValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -18484,6 +18496,180 @@ export namespace google { */ 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 rpc. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index dd1631e7ea7..315b349c3ed 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -57,314 +57,255 @@ */ var v3 = {}; - v3.AlertPolicyService = (function() { + v3.AlertPolicy = (function() { /** - * Constructs a new AlertPolicyService service. + * Properties of an AlertPolicy. * @memberof google.monitoring.v3 - * @classdesc Represents an AlertPolicyService - * @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 AlertPolicyService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AlertPolicyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlertPolicyService; - - /** - * Creates new AlertPolicyService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.AlertPolicyService - * @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 {AlertPolicyService} RPC service. Useful where requests and/or responses are streamed. - */ - AlertPolicyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. - * @memberof google.monitoring.v3.AlertPolicyService - * @typedef ListAlertPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListAlertPoliciesResponse} [response] ListAlertPoliciesResponse + * @interface IAlertPolicy + * @property {string|null} [name] AlertPolicy name + * @property {string|null} [displayName] AlertPolicy displayName + * @property {google.monitoring.v3.AlertPolicy.IDocumentation|null} [documentation] AlertPolicy documentation + * @property {Object.|null} [userLabels] AlertPolicy userLabels + * @property {Array.|null} [conditions] AlertPolicy conditions + * @property {google.monitoring.v3.AlertPolicy.ConditionCombinerType|null} [combiner] AlertPolicy combiner + * @property {google.protobuf.IBoolValue|null} [enabled] AlertPolicy enabled + * @property {google.rpc.IStatus|null} [validity] AlertPolicy validity + * @property {Array.|null} [notificationChannels] AlertPolicy notificationChannels + * @property {google.monitoring.v3.IMutationRecord|null} [creationRecord] AlertPolicy creationRecord + * @property {google.monitoring.v3.IMutationRecord|null} [mutationRecord] AlertPolicy mutationRecord */ /** - * Calls ListAlertPolicies. - * @function listAlertPolicies - * @memberof google.monitoring.v3.AlertPolicyService - * @instance - * @param {google.monitoring.v3.IListAlertPoliciesRequest} request ListAlertPoliciesRequest message or plain object - * @param {google.monitoring.v3.AlertPolicyService.ListAlertPoliciesCallback} callback Node-style callback called with the error, if any, and ListAlertPoliciesResponse - * @returns {undefined} - * @variation 1 + * Constructs a new AlertPolicy. + * @memberof google.monitoring.v3 + * @classdesc Represents an AlertPolicy. + * @implements IAlertPolicy + * @constructor + * @param {google.monitoring.v3.IAlertPolicy=} [properties] Properties to set */ - Object.defineProperty(AlertPolicyService.prototype.listAlertPolicies = function listAlertPolicies(request, callback) { - return this.rpcCall(listAlertPolicies, $root.google.monitoring.v3.ListAlertPoliciesRequest, $root.google.monitoring.v3.ListAlertPoliciesResponse, request, callback); - }, "name", { value: "ListAlertPolicies" }); + function AlertPolicy(properties) { + this.userLabels = {}; + this.conditions = []; + this.notificationChannels = []; + if (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 ListAlertPolicies. - * @function listAlertPolicies - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy name. + * @member {string} name + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IListAlertPoliciesRequest} request ListAlertPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. - * @memberof google.monitoring.v3.AlertPolicyService - * @typedef GetAlertPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy */ + AlertPolicy.prototype.name = ""; /** - * Calls GetAlertPolicy. - * @function getAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IGetAlertPolicyRequest} request GetAlertPolicyRequest message or plain object - * @param {google.monitoring.v3.AlertPolicyService.GetAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AlertPolicyService.prototype.getAlertPolicy = function getAlertPolicy(request, callback) { - return this.rpcCall(getAlertPolicy, $root.google.monitoring.v3.GetAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); - }, "name", { value: "GetAlertPolicy" }); + AlertPolicy.prototype.displayName = ""; /** - * Calls GetAlertPolicy. - * @function getAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy documentation. + * @member {google.monitoring.v3.AlertPolicy.IDocumentation|null|undefined} documentation + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IGetAlertPolicyRequest} request GetAlertPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. - * @memberof google.monitoring.v3.AlertPolicyService - * @typedef CreateAlertPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy */ + AlertPolicy.prototype.documentation = null; /** - * Calls CreateAlertPolicy. - * @function createAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy userLabels. + * @member {Object.} userLabels + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.ICreateAlertPolicyRequest} request CreateAlertPolicyRequest message or plain object - * @param {google.monitoring.v3.AlertPolicyService.CreateAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AlertPolicyService.prototype.createAlertPolicy = function createAlertPolicy(request, callback) { - return this.rpcCall(createAlertPolicy, $root.google.monitoring.v3.CreateAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); - }, "name", { value: "CreateAlertPolicy" }); + AlertPolicy.prototype.userLabels = $util.emptyObject; /** - * Calls CreateAlertPolicy. - * @function createAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy conditions. + * @member {Array.} conditions + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.ICreateAlertPolicyRequest} request CreateAlertPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. - * @memberof google.monitoring.v3.AlertPolicyService - * @typedef DeleteAlertPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty */ + AlertPolicy.prototype.conditions = $util.emptyArray; /** - * Calls DeleteAlertPolicy. - * @function deleteAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy combiner. + * @member {google.monitoring.v3.AlertPolicy.ConditionCombinerType} combiner + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} request DeleteAlertPolicyRequest message or plain object - * @param {google.monitoring.v3.AlertPolicyService.DeleteAlertPolicyCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AlertPolicyService.prototype.deleteAlertPolicy = function deleteAlertPolicy(request, callback) { - return this.rpcCall(deleteAlertPolicy, $root.google.monitoring.v3.DeleteAlertPolicyRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteAlertPolicy" }); + AlertPolicy.prototype.combiner = 0; /** - * Calls DeleteAlertPolicy. - * @function deleteAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy enabled. + * @member {google.protobuf.IBoolValue|null|undefined} enabled + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} request DeleteAlertPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. - * @memberof google.monitoring.v3.AlertPolicyService - * @typedef UpdateAlertPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy */ + AlertPolicy.prototype.enabled = null; /** - * Calls UpdateAlertPolicy. - * @function updateAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy validity. + * @member {google.rpc.IStatus|null|undefined} validity + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} request UpdateAlertPolicyRequest message or plain object - * @param {google.monitoring.v3.AlertPolicyService.UpdateAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AlertPolicyService.prototype.updateAlertPolicy = function updateAlertPolicy(request, callback) { - return this.rpcCall(updateAlertPolicy, $root.google.monitoring.v3.UpdateAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); - }, "name", { value: "UpdateAlertPolicy" }); + AlertPolicy.prototype.validity = null; /** - * Calls UpdateAlertPolicy. - * @function updateAlertPolicy - * @memberof google.monitoring.v3.AlertPolicyService + * AlertPolicy notificationChannels. + * @member {Array.} notificationChannels + * @memberof google.monitoring.v3.AlertPolicy * @instance - * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} request UpdateAlertPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return AlertPolicyService; - })(); - - v3.CreateAlertPolicyRequest = (function() { - - /** - * Properties of a CreateAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @interface ICreateAlertPolicyRequest - * @property {string|null} [name] CreateAlertPolicyRequest name - * @property {google.monitoring.v3.IAlertPolicy|null} [alertPolicy] CreateAlertPolicyRequest alertPolicy - */ - - /** - * Constructs a new CreateAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a CreateAlertPolicyRequest. - * @implements ICreateAlertPolicyRequest - * @constructor - * @param {google.monitoring.v3.ICreateAlertPolicyRequest=} [properties] Properties to set */ - function CreateAlertPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + AlertPolicy.prototype.notificationChannels = $util.emptyArray; /** - * CreateAlertPolicyRequest name. - * @member {string} name - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * AlertPolicy creationRecord. + * @member {google.monitoring.v3.IMutationRecord|null|undefined} creationRecord + * @memberof google.monitoring.v3.AlertPolicy * @instance */ - CreateAlertPolicyRequest.prototype.name = ""; + AlertPolicy.prototype.creationRecord = null; /** - * CreateAlertPolicyRequest alertPolicy. - * @member {google.monitoring.v3.IAlertPolicy|null|undefined} alertPolicy - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * AlertPolicy mutationRecord. + * @member {google.monitoring.v3.IMutationRecord|null|undefined} mutationRecord + * @memberof google.monitoring.v3.AlertPolicy * @instance */ - CreateAlertPolicyRequest.prototype.alertPolicy = null; + AlertPolicy.prototype.mutationRecord = null; /** - * Creates a new CreateAlertPolicyRequest instance using the specified properties. + * Creates a new AlertPolicy instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static - * @param {google.monitoring.v3.ICreateAlertPolicyRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest instance + * @param {google.monitoring.v3.IAlertPolicy=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy instance */ - CreateAlertPolicyRequest.create = function create(properties) { - return new CreateAlertPolicyRequest(properties); + AlertPolicy.create = function create(properties) { + return new AlertPolicy(properties); }; /** - * Encodes the specified CreateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * Encodes the specified AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static - * @param {google.monitoring.v3.ICreateAlertPolicyRequest} message CreateAlertPolicyRequest message or plain object to encode + * @param {google.monitoring.v3.IAlertPolicy} message AlertPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAlertPolicyRequest.encode = function encode(message, writer) { + AlertPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) - $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.combiner != null && message.hasOwnProperty("combiner")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.combiner); + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) + $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecord, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.monitoring.v3.AlertPolicy.Condition.encode(message.conditions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.documentation != null && message.hasOwnProperty("documentation")) + $root.google.monitoring.v3.AlertPolicy.Documentation.encode(message.documentation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.notificationChannels != null && message.notificationChannels.length) + for (var i = 0; i < message.notificationChannels.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.notificationChannels[i]); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.enabled != null && message.hasOwnProperty("enabled")) + $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.validity != null && message.hasOwnProperty("validity")) + $root.google.rpc.Status.encode(message.validity, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static - * @param {google.monitoring.v3.ICreateAlertPolicyRequest} message CreateAlertPolicyRequest message or plain object to encode + * @param {google.monitoring.v3.IAlertPolicy} message AlertPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + AlertPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer. + * Decodes an AlertPolicy message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAlertPolicyRequest.decode = function decode(reader, length) { + AlertPolicy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateAlertPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: + case 1: message.name = reader.string(); break; case 2: - message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + case 13: + message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.decode(reader, reader.uint32()); + break; + case 16: + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); + break; + case 12: + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.monitoring.v3.AlertPolicy.Condition.decode(reader, reader.uint32())); + break; + case 6: + message.combiner = reader.int32(); + break; + case 17: + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + case 18: + message.validity = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 14: + if (!(message.notificationChannels && message.notificationChannels.length)) + message.notificationChannels = []; + message.notificationChannels.push(reader.string()); + break; + case 10: + message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; + case 11: + message.mutationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -375,3357 +316,3586 @@ }; /** - * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes an AlertPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + AlertPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAlertPolicyRequest message. + * Verifies an AlertPolicy message. * @function verify - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAlertPolicyRequest.verify = function verify(message) { + AlertPolicy.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.alertPolicy != null && message.hasOwnProperty("alertPolicy")) { - var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicy); + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.documentation != null && message.hasOwnProperty("documentation")) { + var error = $root.google.monitoring.v3.AlertPolicy.Documentation.verify(message.documentation); if (error) - return "alertPolicy." + error; + return "documentation." + 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.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.verify(message.conditions[i]); + if (error) + return "conditions." + error; + } + } + if (message.combiner != null && message.hasOwnProperty("combiner")) + switch (message.combiner) { + default: + return "combiner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.enabled); + if (error) + return "enabled." + error; + } + if (message.validity != null && message.hasOwnProperty("validity")) { + var error = $root.google.rpc.Status.verify(message.validity); + if (error) + return "validity." + error; + } + if (message.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { + if (!Array.isArray(message.notificationChannels)) + return "notificationChannels: array expected"; + for (var i = 0; i < message.notificationChannels.length; ++i) + if (!$util.isString(message.notificationChannels[i])) + return "notificationChannels: string[] expected"; + } + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) { + var error = $root.google.monitoring.v3.MutationRecord.verify(message.creationRecord); + if (error) + return "creationRecord." + error; + } + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) { + var error = $root.google.monitoring.v3.MutationRecord.verify(message.mutationRecord); + if (error) + return "mutationRecord." + error; } return null; }; /** - * Creates a CreateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AlertPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy */ - CreateAlertPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateAlertPolicyRequest) + AlertPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy) return object; - var message = new $root.google.monitoring.v3.CreateAlertPolicyRequest(); + var message = new $root.google.monitoring.v3.AlertPolicy(); if (object.name != null) message.name = String(object.name); - if (object.alertPolicy != null) { - if (typeof object.alertPolicy !== "object") - throw TypeError(".google.monitoring.v3.CreateAlertPolicyRequest.alertPolicy: object expected"); - message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicy); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.documentation != null) { + if (typeof object.documentation !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.documentation: object expected"); + message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.fromObject(object.documentation); } - return message; - }; - - /** - * Creates a plain object from a CreateAlertPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.CreateAlertPolicyRequest - * @static - * @param {google.monitoring.v3.CreateAlertPolicyRequest} message CreateAlertPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAlertPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.alertPolicy = null; - object.name = ""; + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.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 (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) - object.alertPolicy = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicy, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this CreateAlertPolicyRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.CreateAlertPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAlertPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateAlertPolicyRequest; - })(); - - v3.GetAlertPolicyRequest = (function() { - - /** - * Properties of a GetAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @interface IGetAlertPolicyRequest - * @property {string|null} [name] GetAlertPolicyRequest name - */ - - /** - * Constructs a new GetAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a GetAlertPolicyRequest. - * @implements IGetAlertPolicyRequest - * @constructor - * @param {google.monitoring.v3.IGetAlertPolicyRequest=} [properties] Properties to set - */ - function GetAlertPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetAlertPolicyRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @instance - */ - GetAlertPolicyRequest.prototype.name = ""; - - /** - * Creates a new GetAlertPolicyRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IGetAlertPolicyRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest instance - */ - GetAlertPolicyRequest.create = function create(properties) { - return new GetAlertPolicyRequest(properties); - }; - - /** - * Encodes the specified GetAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IGetAlertPolicyRequest} message GetAlertPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAlertPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IGetAlertPolicyRequest} message GetAlertPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetAlertPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAlertPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetAlertPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.monitoring.v3.AlertPolicy.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.conditions: object expected"); + message.conditions[i] = $root.google.monitoring.v3.AlertPolicy.Condition.fromObject(object.conditions[i]); } } + switch (object.combiner) { + case "COMBINE_UNSPECIFIED": + case 0: + message.combiner = 0; + break; + case "AND": + case 1: + message.combiner = 1; + break; + case "OR": + case 2: + message.combiner = 2; + break; + case "AND_WITH_MATCHING_RESOURCE": + case 3: + message.combiner = 3; + break; + } + if (object.enabled != null) { + if (typeof object.enabled !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.enabled: object expected"); + message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); + } + if (object.validity != null) { + if (typeof object.validity !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.validity: object expected"); + message.validity = $root.google.rpc.Status.fromObject(object.validity); + } + if (object.notificationChannels) { + if (!Array.isArray(object.notificationChannels)) + throw TypeError(".google.monitoring.v3.AlertPolicy.notificationChannels: array expected"); + message.notificationChannels = []; + for (var i = 0; i < object.notificationChannels.length; ++i) + message.notificationChannels[i] = String(object.notificationChannels[i]); + } + if (object.creationRecord != null) { + if (typeof object.creationRecord !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.creationRecord: object expected"); + message.creationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.creationRecord); + } + if (object.mutationRecord != null) { + if (typeof object.mutationRecord !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.mutationRecord: object expected"); + message.mutationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.mutationRecord); + } return message; }; /** - * Decodes a GetAlertPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetAlertPolicyRequest message. - * @function verify - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetAlertPolicyRequest.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 GetAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.GetAlertPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest - */ - GetAlertPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetAlertPolicyRequest) - return object; - var message = new $root.google.monitoring.v3.GetAlertPolicyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetAlertPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from an AlertPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @static - * @param {google.monitoring.v3.GetAlertPolicyRequest} message GetAlertPolicyRequest + * @param {google.monitoring.v3.AlertPolicy} message AlertPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAlertPolicyRequest.toObject = function toObject(message, options) { + AlertPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) { + object.conditions = []; + object.notificationChannels = []; + } + if (options.objects || options.defaults) + object.userLabels = {}; + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.combiner = options.enums === String ? "COMBINE_UNSPECIFIED" : 0; + object.creationRecord = null; + object.mutationRecord = null; + object.documentation = null; + object.enabled = null; + object.validity = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.combiner != null && message.hasOwnProperty("combiner")) + object.combiner = options.enums === String ? $root.google.monitoring.v3.AlertPolicy.ConditionCombinerType[message.combiner] : message.combiner; + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + object.creationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.creationRecord, options); + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) + object.mutationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.mutationRecord, options); + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.monitoring.v3.AlertPolicy.Condition.toObject(message.conditions[j], options); + } + if (message.documentation != null && message.hasOwnProperty("documentation")) + object.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.toObject(message.documentation, options); + if (message.notificationChannels && message.notificationChannels.length) { + object.notificationChannels = []; + for (var j = 0; j < message.notificationChannels.length; ++j) + object.notificationChannels[j] = message.notificationChannels[j]; + } + 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.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); + if (message.validity != null && message.hasOwnProperty("validity")) + object.validity = $root.google.rpc.Status.toObject(message.validity, options); return object; }; /** - * Converts this GetAlertPolicyRequest to JSON. + * Converts this AlertPolicy to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @memberof google.monitoring.v3.AlertPolicy * @instance * @returns {Object.} JSON object */ - GetAlertPolicyRequest.prototype.toJSON = function toJSON() { + AlertPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetAlertPolicyRequest; - })(); + AlertPolicy.Documentation = (function() { - v3.ListAlertPoliciesRequest = (function() { + /** + * Properties of a Documentation. + * @memberof google.monitoring.v3.AlertPolicy + * @interface IDocumentation + * @property {string|null} [content] Documentation content + * @property {string|null} [mimeType] Documentation mimeType + */ - /** - * Properties of a ListAlertPoliciesRequest. - * @memberof google.monitoring.v3 - * @interface IListAlertPoliciesRequest - * @property {string|null} [name] ListAlertPoliciesRequest name - * @property {string|null} [filter] ListAlertPoliciesRequest filter - * @property {string|null} [orderBy] ListAlertPoliciesRequest orderBy - * @property {number|null} [pageSize] ListAlertPoliciesRequest pageSize - * @property {string|null} [pageToken] ListAlertPoliciesRequest pageToken - */ + /** + * Constructs a new Documentation. + * @memberof google.monitoring.v3.AlertPolicy + * @classdesc Represents a Documentation. + * @implements IDocumentation + * @constructor + * @param {google.monitoring.v3.AlertPolicy.IDocumentation=} [properties] Properties to set + */ + function Documentation(properties) { + if (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 ListAlertPoliciesRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListAlertPoliciesRequest. - * @implements IListAlertPoliciesRequest - * @constructor - * @param {google.monitoring.v3.IListAlertPoliciesRequest=} [properties] Properties to set - */ - function ListAlertPoliciesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Documentation content. + * @member {string} content + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @instance + */ + Documentation.prototype.content = ""; - /** - * ListAlertPoliciesRequest name. - * @member {string} name - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @instance - */ - ListAlertPoliciesRequest.prototype.name = ""; + /** + * Documentation mimeType. + * @member {string} mimeType + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @instance + */ + Documentation.prototype.mimeType = ""; - /** - * ListAlertPoliciesRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @instance - */ - ListAlertPoliciesRequest.prototype.filter = ""; + /** + * Creates a new Documentation instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.IDocumentation=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation instance + */ + Documentation.create = function create(properties) { + return new Documentation(properties); + }; - /** - * ListAlertPoliciesRequest orderBy. - * @member {string} orderBy - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @instance - */ - ListAlertPoliciesRequest.prototype.orderBy = ""; + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && message.hasOwnProperty("content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); + return writer; + }; - /** - * ListAlertPoliciesRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @instance - */ - ListAlertPoliciesRequest.prototype.pageSize = 0; + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ListAlertPoliciesRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @instance - */ - ListAlertPoliciesRequest.prototype.pageToken = ""; + /** + * Decodes a Documentation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Documentation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = reader.string(); + break; + case 2: + message.mimeType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new ListAlertPoliciesRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {google.monitoring.v3.IListAlertPoliciesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest instance - */ - ListAlertPoliciesRequest.create = function create(properties) { - return new ListAlertPoliciesRequest(properties); - }; + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListAlertPoliciesRequest message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {google.monitoring.v3.IListAlertPoliciesRequest} message ListAlertPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAlertPoliciesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 4, wireType 2 =*/34).string(message.name); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - return writer; - }; + /** + * Verifies a Documentation message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Documentation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + return null; + }; - /** - * Encodes the specified ListAlertPoliciesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {google.monitoring.v3.IListAlertPoliciesRequest} message ListAlertPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAlertPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation + */ + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Documentation) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Documentation(); + if (object.content != null) + message.content = String(object.content); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + return message; + }; - /** - * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAlertPoliciesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListAlertPoliciesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.orderBy = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {google.monitoring.v3.AlertPolicy.Documentation} message Documentation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Documentation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.mimeType = ""; } - } - return message; - }; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + return object; + }; - /** - * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAlertPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this Documentation to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @instance + * @returns {Object.} JSON object + */ + Documentation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a ListAlertPoliciesRequest message. - * @function verify - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAlertPoliciesRequest.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.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; - }; + return Documentation; + })(); - /** - * Creates a ListAlertPoliciesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest - */ - ListAlertPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListAlertPoliciesRequest) - return object; - var message = new $root.google.monitoring.v3.ListAlertPoliciesRequest(); - if (object.name != null) - message.name = String(object.name); - 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; - }; + AlertPolicy.Condition = (function() { - /** - * Creates a plain object from a ListAlertPoliciesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @static - * @param {google.monitoring.v3.ListAlertPoliciesRequest} message ListAlertPoliciesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAlertPoliciesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - object.filter = ""; - object.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.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; + /** + * Properties of a Condition. + * @memberof google.monitoring.v3.AlertPolicy + * @interface ICondition + * @property {string|null} [name] Condition name + * @property {string|null} [displayName] Condition displayName + * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null} [conditionThreshold] Condition conditionThreshold + * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null} [conditionAbsent] Condition conditionAbsent + */ - /** - * Converts this ListAlertPoliciesRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListAlertPoliciesRequest - * @instance - * @returns {Object.} JSON object - */ - ListAlertPoliciesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new Condition. + * @memberof google.monitoring.v3.AlertPolicy + * @classdesc Represents a Condition. + * @implements ICondition + * @constructor + * @param {google.monitoring.v3.AlertPolicy.ICondition=} [properties] Properties to set + */ + function Condition(properties) { + if (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 ListAlertPoliciesRequest; - })(); + /** + * Condition name. + * @member {string} name + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.name = ""; - v3.ListAlertPoliciesResponse = (function() { + /** + * Condition displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.displayName = ""; - /** - * Properties of a ListAlertPoliciesResponse. - * @memberof google.monitoring.v3 - * @interface IListAlertPoliciesResponse - * @property {Array.|null} [alertPolicies] ListAlertPoliciesResponse alertPolicies - * @property {string|null} [nextPageToken] ListAlertPoliciesResponse nextPageToken - */ + /** + * Condition conditionThreshold. + * @member {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null|undefined} conditionThreshold + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.conditionThreshold = null; - /** - * Constructs a new ListAlertPoliciesResponse. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListAlertPoliciesResponse. - * @implements IListAlertPoliciesResponse - * @constructor - * @param {google.monitoring.v3.IListAlertPoliciesResponse=} [properties] Properties to set - */ - function ListAlertPoliciesResponse(properties) { - this.alertPolicies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Condition conditionAbsent. + * @member {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null|undefined} conditionAbsent + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.conditionAbsent = null; - /** - * ListAlertPoliciesResponse alertPolicies. - * @member {Array.} alertPolicies - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @instance - */ - ListAlertPoliciesResponse.prototype.alertPolicies = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * ListAlertPoliciesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @instance - */ - ListAlertPoliciesResponse.prototype.nextPageToken = ""; + /** + * Condition condition. + * @member {"conditionThreshold"|"conditionAbsent"|undefined} condition + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Object.defineProperty(Condition.prototype, "condition", { + get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new ListAlertPoliciesResponse instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {google.monitoring.v3.IListAlertPoliciesResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse instance - */ - ListAlertPoliciesResponse.create = function create(properties) { - return new ListAlertPoliciesResponse(properties); - }; + /** + * Creates a new Condition instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.ICondition=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition instance + */ + Condition.create = function create(properties) { + return new Condition(properties); + }; - /** - * Encodes the specified ListAlertPoliciesResponse message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {google.monitoring.v3.IListAlertPoliciesResponse} message ListAlertPoliciesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAlertPoliciesResponse.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.alertPolicies != null && message.alertPolicies.length) - for (var i = 0; i < message.alertPolicies.length; ++i) - $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) + $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.encode(message.conditionThreshold, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) + $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.encode(message.conditionAbsent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); + return writer; + }; - /** - * Encodes the specified ListAlertPoliciesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {google.monitoring.v3.IListAlertPoliciesResponse} message ListAlertPoliciesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAlertPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAlertPoliciesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListAlertPoliciesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (!(message.alertPolicies && message.alertPolicies.length)) - message.alertPolicies = []; - message.alertPolicies.push($root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Condition message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 12: + message.name = reader.string(); + break; + case 6: + message.displayName = reader.string(); + break; + case 1: + message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.decode(reader, reader.uint32()); + break; + case 2: + message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAlertPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListAlertPoliciesResponse message. - * @function verify - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAlertPoliciesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.alertPolicies != null && message.hasOwnProperty("alertPolicies")) { - if (!Array.isArray(message.alertPolicies)) - return "alertPolicies: array expected"; - for (var i = 0; i < message.alertPolicies.length; ++i) { - var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicies[i]); - if (error) - return "alertPolicies." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Verifies a Condition message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Condition.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) { + properties.condition = 1; + { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify(message.conditionThreshold); + if (error) + return "conditionThreshold." + error; + } + } + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) { + if (properties.condition === 1) + return "condition: multiple values"; + properties.condition = 1; + { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify(message.conditionAbsent); + if (error) + return "conditionAbsent." + error; + } + } + return null; + }; - /** - * Creates a ListAlertPoliciesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse - */ - ListAlertPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListAlertPoliciesResponse) - return object; - var message = new $root.google.monitoring.v3.ListAlertPoliciesResponse(); - if (object.alertPolicies) { - if (!Array.isArray(object.alertPolicies)) - throw TypeError(".google.monitoring.v3.ListAlertPoliciesResponse.alertPolicies: array expected"); - message.alertPolicies = []; - for (var i = 0; i < object.alertPolicies.length; ++i) { - if (typeof object.alertPolicies[i] !== "object") - throw TypeError(".google.monitoring.v3.ListAlertPoliciesResponse.alertPolicies: object expected"); - message.alertPolicies[i] = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicies[i]); + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition + */ + Condition.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.conditionThreshold != null) { + if (typeof object.conditionThreshold !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionThreshold: object expected"); + message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.fromObject(object.conditionThreshold); } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + if (object.conditionAbsent != null) { + if (typeof object.conditionAbsent !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionAbsent: object expected"); + message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.fromObject(object.conditionAbsent); + } + return message; + }; - /** - * Creates a plain object from a ListAlertPoliciesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @static - * @param {google.monitoring.v3.ListAlertPoliciesResponse} message ListAlertPoliciesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAlertPoliciesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.alertPolicies = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.alertPolicies && message.alertPolicies.length) { - object.alertPolicies = []; - for (var j = 0; j < message.alertPolicies.length; ++j) - object.alertPolicies[j] = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicies[j], options); - } - return object; - }; + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition} message Condition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Condition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.name = ""; + } + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) { + object.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.toObject(message.conditionThreshold, options); + if (options.oneofs) + object.condition = "conditionThreshold"; + } + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) { + object.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.toObject(message.conditionAbsent, options); + if (options.oneofs) + object.condition = "conditionAbsent"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Converts this ListAlertPoliciesResponse to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListAlertPoliciesResponse - * @instance - * @returns {Object.} JSON object - */ - ListAlertPoliciesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Condition to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + * @returns {Object.} JSON object + */ + Condition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListAlertPoliciesResponse; - })(); + Condition.Trigger = (function() { - v3.UpdateAlertPolicyRequest = (function() { + /** + * Properties of a Trigger. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface ITrigger + * @property {number|null} [count] Trigger count + * @property {number|null} [percent] Trigger percent + */ - /** - * Properties of an UpdateAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @interface IUpdateAlertPolicyRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAlertPolicyRequest updateMask - * @property {google.monitoring.v3.IAlertPolicy|null} [alertPolicy] UpdateAlertPolicyRequest alertPolicy - */ + /** + * Constructs a new Trigger. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a Trigger. + * @implements ITrigger + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger=} [properties] Properties to set + */ + function Trigger(properties) { + if (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 UpdateAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents an UpdateAlertPolicyRequest. - * @implements IUpdateAlertPolicyRequest - * @constructor - * @param {google.monitoring.v3.IUpdateAlertPolicyRequest=} [properties] Properties to set - */ - function UpdateAlertPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Trigger count. + * @member {number} count + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + */ + Trigger.prototype.count = 0; - /** - * UpdateAlertPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @instance - */ - UpdateAlertPolicyRequest.prototype.updateMask = null; + /** + * Trigger percent. + * @member {number} percent + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + */ + Trigger.prototype.percent = 0; - /** - * UpdateAlertPolicyRequest alertPolicy. - * @member {google.monitoring.v3.IAlertPolicy|null|undefined} alertPolicy - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @instance - */ - UpdateAlertPolicyRequest.prototype.alertPolicy = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new UpdateAlertPolicyRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IUpdateAlertPolicyRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest instance - */ - UpdateAlertPolicyRequest.create = function create(properties) { - return new UpdateAlertPolicyRequest(properties); - }; + /** + * Trigger type. + * @member {"count"|"percent"|undefined} type + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + */ + Object.defineProperty(Trigger.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["count", "percent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified UpdateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} message UpdateAlertPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAlertPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) - $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Creates a new Trigger instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger instance + */ + Trigger.create = function create(properties) { + return new Trigger(properties); + }; - /** - * Encodes the specified UpdateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} message UpdateAlertPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && message.hasOwnProperty("count")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); + if (message.percent != null && message.hasOwnProperty("percent")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.percent); + return writer; + }; - /** - * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAlertPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateAlertPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Trigger message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.Trigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.count = reader.int32(); + break; + case 2: + message.percent = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an UpdateAlertPolicyRequest message. - * @function verify - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateAlertPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) { - var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicy); - if (error) - return "alertPolicy." + error; - } - return null; - }; + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an UpdateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest - */ - UpdateAlertPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.UpdateAlertPolicyRequest) - return object; - var message = new $root.google.monitoring.v3.UpdateAlertPolicyRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.monitoring.v3.UpdateAlertPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.alertPolicy != null) { - if (typeof object.alertPolicy !== "object") - throw TypeError(".google.monitoring.v3.UpdateAlertPolicyRequest.alertPolicy: object expected"); - message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicy); - } - return message; - }; + /** + * Verifies a Trigger message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.count != null && message.hasOwnProperty("count")) { + properties.type = 1; + if (!$util.isInteger(message.count)) + return "count: integer expected"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (typeof message.percent !== "number") + return "percent: number expected"; + } + return null; + }; - /** - * Creates a plain object from an UpdateAlertPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @static - * @param {google.monitoring.v3.UpdateAlertPolicyRequest} message UpdateAlertPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateAlertPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.alertPolicy = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) - object.alertPolicy = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicy, options); - return object; - }; - - /** - * Converts this UpdateAlertPolicyRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.UpdateAlertPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateAlertPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateAlertPolicyRequest; - })(); - - v3.DeleteAlertPolicyRequest = (function() { - - /** - * Properties of a DeleteAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @interface IDeleteAlertPolicyRequest - * @property {string|null} [name] DeleteAlertPolicyRequest name - */ + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger + */ + Trigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.Trigger) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.Trigger(); + if (object.count != null) + message.count = object.count | 0; + if (object.percent != null) + message.percent = Number(object.percent); + return message; + }; - /** - * Constructs a new DeleteAlertPolicyRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteAlertPolicyRequest. - * @implements IDeleteAlertPolicyRequest - * @constructor - * @param {google.monitoring.v3.IDeleteAlertPolicyRequest=} [properties] Properties to set - */ - function DeleteAlertPolicyRequest(properties) { - if (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 Trigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.Trigger} message Trigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.count != null && message.hasOwnProperty("count")) { + object.count = message.count; + if (options.oneofs) + object.type = "count"; + } + if (message.percent != null && message.hasOwnProperty("percent")) { + object.percent = options.json && !isFinite(message.percent) ? String(message.percent) : message.percent; + if (options.oneofs) + object.type = "percent"; + } + return object; + }; - /** - * DeleteAlertPolicyRequest name. - * @member {string} name - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @instance - */ - DeleteAlertPolicyRequest.prototype.name = ""; + /** + * Converts this Trigger to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @instance + * @returns {Object.} JSON object + */ + Trigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new DeleteAlertPolicyRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IDeleteAlertPolicyRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest instance - */ - DeleteAlertPolicyRequest.create = function create(properties) { - return new DeleteAlertPolicyRequest(properties); - }; + return Trigger; + })(); - /** - * Encodes the specified DeleteAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} message DeleteAlertPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAlertPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; + Condition.MetricThreshold = (function() { - /** - * Encodes the specified DeleteAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} message DeleteAlertPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a MetricThreshold. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface IMetricThreshold + * @property {string|null} [filter] MetricThreshold filter + * @property {Array.|null} [aggregations] MetricThreshold aggregations + * @property {string|null} [denominatorFilter] MetricThreshold denominatorFilter + * @property {Array.|null} [denominatorAggregations] MetricThreshold denominatorAggregations + * @property {google.monitoring.v3.ComparisonType|null} [comparison] MetricThreshold comparison + * @property {number|null} [thresholdValue] MetricThreshold thresholdValue + * @property {google.protobuf.IDuration|null} [duration] MetricThreshold duration + * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MetricThreshold trigger + */ - /** - * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAlertPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteAlertPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new MetricThreshold. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a MetricThreshold. + * @implements IMetricThreshold + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold=} [properties] Properties to set + */ + function MetricThreshold(properties) { + this.aggregations = []; + this.denominatorAggregations = []; + if (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 DeleteAlertPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MetricThreshold filter. + * @member {string} filter + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.filter = ""; - /** - * Verifies a DeleteAlertPolicyRequest message. - * @function verify - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteAlertPolicyRequest.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; - }; + /** + * MetricThreshold aggregations. + * @member {Array.} aggregations + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.aggregations = $util.emptyArray; - /** - * Creates a DeleteAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest - */ - DeleteAlertPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteAlertPolicyRequest) - return object; - var message = new $root.google.monitoring.v3.DeleteAlertPolicyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * MetricThreshold denominatorFilter. + * @member {string} denominatorFilter + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.denominatorFilter = ""; - /** - * Creates a plain object from a DeleteAlertPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @static - * @param {google.monitoring.v3.DeleteAlertPolicyRequest} message DeleteAlertPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAlertPolicyRequest.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; - }; + /** + * MetricThreshold denominatorAggregations. + * @member {Array.} denominatorAggregations + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.denominatorAggregations = $util.emptyArray; - /** - * Converts this DeleteAlertPolicyRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.DeleteAlertPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAlertPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * MetricThreshold comparison. + * @member {google.monitoring.v3.ComparisonType} comparison + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.comparison = 0; - return DeleteAlertPolicyRequest; - })(); + /** + * MetricThreshold thresholdValue. + * @member {number} thresholdValue + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.thresholdValue = 0; - v3.AlertPolicy = (function() { + /** + * MetricThreshold duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.duration = null; - /** - * Properties of an AlertPolicy. - * @memberof google.monitoring.v3 - * @interface IAlertPolicy - * @property {string|null} [name] AlertPolicy name - * @property {string|null} [displayName] AlertPolicy displayName - * @property {google.monitoring.v3.AlertPolicy.IDocumentation|null} [documentation] AlertPolicy documentation - * @property {Object.|null} [userLabels] AlertPolicy userLabels - * @property {Array.|null} [conditions] AlertPolicy conditions - * @property {google.monitoring.v3.AlertPolicy.ConditionCombinerType|null} [combiner] AlertPolicy combiner - * @property {google.protobuf.IBoolValue|null} [enabled] AlertPolicy enabled - * @property {google.rpc.IStatus|null} [validity] AlertPolicy validity - * @property {Array.|null} [notificationChannels] AlertPolicy notificationChannels - * @property {google.monitoring.v3.IMutationRecord|null} [creationRecord] AlertPolicy creationRecord - * @property {google.monitoring.v3.IMutationRecord|null} [mutationRecord] AlertPolicy mutationRecord - */ + /** + * MetricThreshold trigger. + * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + */ + MetricThreshold.prototype.trigger = null; - /** - * Constructs a new AlertPolicy. - * @memberof google.monitoring.v3 - * @classdesc Represents an AlertPolicy. - * @implements IAlertPolicy - * @constructor - * @param {google.monitoring.v3.IAlertPolicy=} [properties] Properties to set - */ - function AlertPolicy(properties) { - this.userLabels = {}; - this.conditions = []; - this.notificationChannels = []; - if (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 MetricThreshold instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold instance + */ + MetricThreshold.create = function create(properties) { + return new MetricThreshold(properties); + }; - /** - * AlertPolicy name. - * @member {string} name - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.name = ""; + /** + * Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold} message MetricThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricThreshold.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.comparison != null && message.hasOwnProperty("comparison")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.comparison); + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.thresholdValue); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trigger != null && message.hasOwnProperty("trigger")) + $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.aggregations != null && message.aggregations.length) + for (var i = 0; i < message.aggregations.length; ++i) + $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.denominatorFilter); + if (message.denominatorAggregations != null && message.denominatorAggregations.length) + for (var i = 0; i < message.denominatorAggregations.length; ++i) + $root.google.monitoring.v3.Aggregation.encode(message.denominatorAggregations[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * AlertPolicy displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.displayName = ""; + /** + * Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold} message MetricThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricThreshold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * AlertPolicy documentation. - * @member {google.monitoring.v3.AlertPolicy.IDocumentation|null|undefined} documentation - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.documentation = null; + /** + * Decodes a MetricThreshold message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricThreshold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.filter = reader.string(); + break; + case 8: + if (!(message.aggregations && message.aggregations.length)) + message.aggregations = []; + message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + case 9: + message.denominatorFilter = reader.string(); + break; + case 10: + if (!(message.denominatorAggregations && message.denominatorAggregations.length)) + message.denominatorAggregations = []; + message.denominatorAggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + case 4: + message.comparison = reader.int32(); + break; + case 5: + message.thresholdValue = reader.double(); + break; + case 6: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 7: + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * AlertPolicy userLabels. - * @member {Object.} userLabels - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.userLabels = $util.emptyObject; + /** + * Decodes a MetricThreshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricThreshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * AlertPolicy conditions. - * @member {Array.} conditions - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.conditions = $util.emptyArray; + /** + * Verifies a MetricThreshold message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricThreshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregations != null && message.hasOwnProperty("aggregations")) { + if (!Array.isArray(message.aggregations)) + return "aggregations: array expected"; + for (var i = 0; i < message.aggregations.length; ++i) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregations[i]); + if (error) + return "aggregations." + error; + } + } + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + if (!$util.isString(message.denominatorFilter)) + return "denominatorFilter: string expected"; + if (message.denominatorAggregations != null && message.hasOwnProperty("denominatorAggregations")) { + if (!Array.isArray(message.denominatorAggregations)) + return "denominatorAggregations: array expected"; + for (var i = 0; i < message.denominatorAggregations.length; ++i) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.denominatorAggregations[i]); + if (error) + return "denominatorAggregations." + error; + } + } + if (message.comparison != null && message.hasOwnProperty("comparison")) + switch (message.comparison) { + default: + return "comparison: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + if (typeof message.thresholdValue !== "number") + return "thresholdValue: number expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; - /** - * AlertPolicy combiner. - * @member {google.monitoring.v3.AlertPolicy.ConditionCombinerType} combiner - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.combiner = 0; + /** + * Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold + */ + MetricThreshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregations) { + if (!Array.isArray(object.aggregations)) + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.aggregations: array expected"); + message.aggregations = []; + for (var i = 0; i < object.aggregations.length; ++i) { + if (typeof object.aggregations[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.aggregations: object expected"); + message.aggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregations[i]); + } + } + if (object.denominatorFilter != null) + message.denominatorFilter = String(object.denominatorFilter); + if (object.denominatorAggregations) { + if (!Array.isArray(object.denominatorAggregations)) + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.denominatorAggregations: array expected"); + message.denominatorAggregations = []; + for (var i = 0; i < object.denominatorAggregations.length; ++i) { + if (typeof object.denominatorAggregations[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.denominatorAggregations: object expected"); + message.denominatorAggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.denominatorAggregations[i]); + } + } + switch (object.comparison) { + case "COMPARISON_UNSPECIFIED": + case 0: + message.comparison = 0; + break; + case "COMPARISON_GT": + case 1: + message.comparison = 1; + break; + case "COMPARISON_GE": + case 2: + message.comparison = 2; + break; + case "COMPARISON_LT": + case 3: + message.comparison = 3; + break; + case "COMPARISON_LE": + case 4: + message.comparison = 4; + break; + case "COMPARISON_EQ": + case 5: + message.comparison = 5; + break; + case "COMPARISON_NE": + case 6: + message.comparison = 6; + break; + } + if (object.thresholdValue != null) + message.thresholdValue = Number(object.thresholdValue); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.trigger: object expected"); + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); + } + return message; + }; - /** - * AlertPolicy enabled. - * @member {google.protobuf.IBoolValue|null|undefined} enabled - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.enabled = null; + /** + * Creates a plain object from a MetricThreshold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} message MetricThreshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricThreshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.aggregations = []; + object.denominatorAggregations = []; + } + if (options.defaults) { + object.filter = ""; + object.comparison = options.enums === String ? "COMPARISON_UNSPECIFIED" : 0; + object.thresholdValue = 0; + object.duration = null; + object.trigger = null; + object.denominatorFilter = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.comparison != null && message.hasOwnProperty("comparison")) + object.comparison = options.enums === String ? $root.google.monitoring.v3.ComparisonType[message.comparison] : message.comparison; + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + object.thresholdValue = options.json && !isFinite(message.thresholdValue) ? String(message.thresholdValue) : message.thresholdValue; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); + if (message.aggregations && message.aggregations.length) { + object.aggregations = []; + for (var j = 0; j < message.aggregations.length; ++j) + object.aggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.aggregations[j], options); + } + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + object.denominatorFilter = message.denominatorFilter; + if (message.denominatorAggregations && message.denominatorAggregations.length) { + object.denominatorAggregations = []; + for (var j = 0; j < message.denominatorAggregations.length; ++j) + object.denominatorAggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.denominatorAggregations[j], options); + } + return object; + }; - /** - * AlertPolicy validity. - * @member {google.rpc.IStatus|null|undefined} validity - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.validity = null; + /** + * Converts this MetricThreshold to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @instance + * @returns {Object.} JSON object + */ + MetricThreshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * AlertPolicy notificationChannels. - * @member {Array.} notificationChannels - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.notificationChannels = $util.emptyArray; + return MetricThreshold; + })(); - /** - * AlertPolicy creationRecord. - * @member {google.monitoring.v3.IMutationRecord|null|undefined} creationRecord - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.creationRecord = null; + Condition.MetricAbsence = (function() { - /** - * AlertPolicy mutationRecord. - * @member {google.monitoring.v3.IMutationRecord|null|undefined} mutationRecord - * @memberof google.monitoring.v3.AlertPolicy - * @instance - */ - AlertPolicy.prototype.mutationRecord = null; + /** + * Properties of a MetricAbsence. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface IMetricAbsence + * @property {string|null} [filter] MetricAbsence filter + * @property {Array.|null} [aggregations] MetricAbsence aggregations + * @property {google.protobuf.IDuration|null} [duration] MetricAbsence duration + * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MetricAbsence trigger + */ - /** - * Creates a new AlertPolicy instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy - * @static - * @param {google.monitoring.v3.IAlertPolicy=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy instance - */ - AlertPolicy.create = function create(properties) { - return new AlertPolicy(properties); - }; + /** + * Constructs a new MetricAbsence. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a MetricAbsence. + * @implements IMetricAbsence + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence=} [properties] Properties to set + */ + function MetricAbsence(properties) { + this.aggregations = []; + if (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 AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy - * @static - * @param {google.monitoring.v3.IAlertPolicy} message AlertPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AlertPolicy.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.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.combiner != null && message.hasOwnProperty("combiner")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.combiner); - if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) - $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) - $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecord, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.conditions != null && message.conditions.length) - for (var i = 0; i < message.conditions.length; ++i) - $root.google.monitoring.v3.AlertPolicy.Condition.encode(message.conditions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.documentation != null && message.hasOwnProperty("documentation")) - $root.google.monitoring.v3.AlertPolicy.Documentation.encode(message.documentation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.notificationChannels != null && message.notificationChannels.length) - for (var i = 0; i < message.notificationChannels.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.notificationChannels[i]); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.enabled != null && message.hasOwnProperty("enabled")) - $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.validity != null && message.hasOwnProperty("validity")) - $root.google.rpc.Status.encode(message.validity, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - return writer; - }; + /** + * MetricAbsence filter. + * @member {string} filter + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.filter = ""; - /** - * Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy - * @static - * @param {google.monitoring.v3.IAlertPolicy} message AlertPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AlertPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MetricAbsence aggregations. + * @member {Array.} aggregations + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.aggregations = $util.emptyArray; - /** - * Decodes an AlertPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AlertPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy(), key; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 13: - message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.decode(reader, reader.uint32()); - break; - case 16: - reader.skip().pos++; - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); - break; - case 12: - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.google.monitoring.v3.AlertPolicy.Condition.decode(reader, reader.uint32())); - break; - case 6: - message.combiner = reader.int32(); - break; - case 17: - message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - case 18: - message.validity = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 14: - if (!(message.notificationChannels && message.notificationChannels.length)) - message.notificationChannels = []; - message.notificationChannels.push(reader.string()); - break; - case 10: - message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); - break; - case 11: - message.mutationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MetricAbsence duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.duration = null; - /** - * Decodes an AlertPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AlertPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MetricAbsence trigger. + * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + */ + MetricAbsence.prototype.trigger = null; - /** - * Verifies an AlertPolicy message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AlertPolicy.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.documentation != null && message.hasOwnProperty("documentation")) { - var error = $root.google.monitoring.v3.AlertPolicy.Documentation.verify(message.documentation); - if (error) - return "documentation." + 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.conditions != null && message.hasOwnProperty("conditions")) { - if (!Array.isArray(message.conditions)) - return "conditions: array expected"; - for (var i = 0; i < message.conditions.length; ++i) { - var error = $root.google.monitoring.v3.AlertPolicy.Condition.verify(message.conditions[i]); - if (error) - return "conditions." + error; - } - } - if (message.combiner != null && message.hasOwnProperty("combiner")) - switch (message.combiner) { - default: - return "combiner: enum value expected"; - case 0: - case 1: - case 2: - case 3: + /** + * Creates a new MetricAbsence instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence instance + */ + MetricAbsence.create = function create(properties) { + return new MetricAbsence(properties); + }; + + /** + * Encodes the specified MetricAbsence message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence} message MetricAbsence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricAbsence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.duration != null && message.hasOwnProperty("duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.trigger != null && message.hasOwnProperty("trigger")) + $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.aggregations != null && message.aggregations.length) + for (var i = 0; i < message.aggregations.length; ++i) + $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetricAbsence message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence} message MetricAbsence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricAbsence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricAbsence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filter = reader.string(); + break; + case 5: + if (!(message.aggregations && message.aggregations.length)) + message.aggregations = []; + message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + case 2: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricAbsence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricAbsence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricAbsence message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricAbsence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.aggregations != null && message.hasOwnProperty("aggregations")) { + if (!Array.isArray(message.aggregations)) + return "aggregations: array expected"; + for (var i = 0; i < message.aggregations.length; ++i) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregations[i]); + if (error) + return "aggregations." + error; + } + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; + + /** + * Creates a MetricAbsence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence + */ + MetricAbsence.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.aggregations) { + if (!Array.isArray(object.aggregations)) + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.aggregations: array expected"); + message.aggregations = []; + for (var i = 0; i < object.aggregations.length; ++i) { + if (typeof object.aggregations[i] !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.aggregations: object expected"); + message.aggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregations[i]); + } + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.trigger: object expected"); + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from a MetricAbsence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} message MetricAbsence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricAbsence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aggregations = []; + if (options.defaults) { + object.filter = ""; + object.duration = null; + object.trigger = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); + if (message.aggregations && message.aggregations.length) { + object.aggregations = []; + for (var j = 0; j < message.aggregations.length; ++j) + object.aggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.aggregations[j], options); + } + return object; + }; + + /** + * Converts this MetricAbsence to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @instance + * @returns {Object.} JSON object + */ + MetricAbsence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MetricAbsence; + })(); + + return Condition; + })(); + + /** + * ConditionCombinerType enum. + * @name google.monitoring.v3.AlertPolicy.ConditionCombinerType + * @enum {string} + * @property {number} COMBINE_UNSPECIFIED=0 COMBINE_UNSPECIFIED value + * @property {number} AND=1 AND value + * @property {number} OR=2 OR value + * @property {number} AND_WITH_MATCHING_RESOURCE=3 AND_WITH_MATCHING_RESOURCE value + */ + AlertPolicy.ConditionCombinerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMBINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AND"] = 1; + values[valuesById[2] = "OR"] = 2; + values[valuesById[3] = "AND_WITH_MATCHING_RESOURCE"] = 3; + return values; + })(); + + return AlertPolicy; + })(); + + v3.TypedValue = (function() { + + /** + * Properties of a TypedValue. + * @memberof google.monitoring.v3 + * @interface ITypedValue + * @property {boolean|null} [boolValue] TypedValue boolValue + * @property {number|Long|null} [int64Value] TypedValue int64Value + * @property {number|null} [doubleValue] TypedValue doubleValue + * @property {string|null} [stringValue] TypedValue stringValue + * @property {google.api.IDistribution|null} [distributionValue] TypedValue distributionValue + */ + + /** + * Constructs a new TypedValue. + * @memberof google.monitoring.v3 + * @classdesc Represents a TypedValue. + * @implements ITypedValue + * @constructor + * @param {google.monitoring.v3.ITypedValue=} [properties] Properties to set + */ + function TypedValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TypedValue boolValue. + * @member {boolean} boolValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.boolValue = false; + + /** + * TypedValue int64Value. + * @member {number|Long} int64Value + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TypedValue doubleValue. + * @member {number} doubleValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.doubleValue = 0; + + /** + * TypedValue stringValue. + * @member {string} stringValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.stringValue = ""; + + /** + * TypedValue distributionValue. + * @member {google.api.IDistribution|null|undefined} distributionValue + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + TypedValue.prototype.distributionValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TypedValue value. + * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value + * @memberof google.monitoring.v3.TypedValue + * @instance + */ + Object.defineProperty(TypedValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TypedValue instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.ITypedValue=} [properties] Properties to set + * @returns {google.monitoring.v3.TypedValue} TypedValue instance + */ + TypedValue.create = function create(properties) { + return new TypedValue(properties); + }; + + /** + * Encodes the specified TypedValue message. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.ITypedValue} message TypedValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypedValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); + if (message.int64Value != null && message.hasOwnProperty("int64Value")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) + $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {google.monitoring.v3.ITypedValue} message TypedValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypedValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TypedValue} TypedValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypedValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TypedValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.boolValue = reader.bool(); + break; + case 2: + message.int64Value = reader.int64(); + break; + case 3: + message.doubleValue = reader.double(); + break; + case 4: + message.stringValue = reader.string(); + break; + case 5: + message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); break; } - if (message.enabled != null && message.hasOwnProperty("enabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.enabled); - if (error) - return "enabled." + error; } - if (message.validity != null && message.hasOwnProperty("validity")) { - var error = $root.google.rpc.Status.verify(message.validity); - if (error) - return "validity." + error; + return message; + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TypedValue} TypedValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypedValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypedValue message. + * @function verify + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypedValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; } - if (message.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { - if (!Array.isArray(message.notificationChannels)) - return "notificationChannels: array expected"; - for (var i = 0; i < message.notificationChannels.length; ++i) - if (!$util.isString(message.notificationChannels[i])) - return "notificationChannels: string[] expected"; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; } - if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) { - var error = $root.google.monitoring.v3.MutationRecord.verify(message.creationRecord); - if (error) - return "creationRecord." + error; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; } - if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) { - var error = $root.google.monitoring.v3.MutationRecord.verify(message.mutationRecord); - if (error) - return "mutationRecord." + error; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.api.Distribution.verify(message.distributionValue); + if (error) + return "distributionValue." + error; + } } return null; }; /** - * Creates an AlertPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy + * @memberof google.monitoring.v3.TypedValue * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy} AlertPolicy + * @returns {google.monitoring.v3.TypedValue} TypedValue */ - AlertPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy) + TypedValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TypedValue) return object; - var message = new $root.google.monitoring.v3.AlertPolicy(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.documentation != null) { - if (typeof object.documentation !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.documentation: object expected"); - message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.fromObject(object.documentation); - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.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.conditions) { - if (!Array.isArray(object.conditions)) - throw TypeError(".google.monitoring.v3.AlertPolicy.conditions: array expected"); - message.conditions = []; - for (var i = 0; i < object.conditions.length; ++i) { - if (typeof object.conditions[i] !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.conditions: object expected"); - message.conditions[i] = $root.google.monitoring.v3.AlertPolicy.Condition.fromObject(object.conditions[i]); - } - } - switch (object.combiner) { - case "COMBINE_UNSPECIFIED": - case 0: - message.combiner = 0; - break; - case "AND": - case 1: - message.combiner = 1; - break; - case "OR": - case 2: - message.combiner = 2; - break; - case "AND_WITH_MATCHING_RESOURCE": - case 3: - message.combiner = 3; - break; - } - if (object.enabled != null) { - if (typeof object.enabled !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.enabled: object expected"); - message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); - } - if (object.validity != null) { - if (typeof object.validity !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.validity: object expected"); - message.validity = $root.google.rpc.Status.fromObject(object.validity); - } - if (object.notificationChannels) { - if (!Array.isArray(object.notificationChannels)) - throw TypeError(".google.monitoring.v3.AlertPolicy.notificationChannels: array expected"); - message.notificationChannels = []; - for (var i = 0; i < object.notificationChannels.length; ++i) - message.notificationChannels[i] = String(object.notificationChannels[i]); - } - if (object.creationRecord != null) { - if (typeof object.creationRecord !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.creationRecord: object expected"); - message.creationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.creationRecord); - } - if (object.mutationRecord != null) { - if (typeof object.mutationRecord !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.mutationRecord: object expected"); - message.mutationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.mutationRecord); + var message = new $root.google.monitoring.v3.TypedValue(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.distributionValue != null) { + if (typeof object.distributionValue !== "object") + throw TypeError(".google.monitoring.v3.TypedValue.distributionValue: object expected"); + message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); } return message; }; /** - * Creates a plain object from an AlertPolicy message. Also converts values to other types if specified. + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.AlertPolicy + * @memberof google.monitoring.v3.TypedValue * @static - * @param {google.monitoring.v3.AlertPolicy} message AlertPolicy + * @param {google.monitoring.v3.TypedValue} message TypedValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AlertPolicy.toObject = function toObject(message, options) { + TypedValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.conditions = []; - object.notificationChannels = []; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; } - if (options.objects || options.defaults) - object.userLabels = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.combiner = options.enums === String ? "COMBINE_UNSPECIFIED" : 0; - object.creationRecord = null; - object.mutationRecord = null; - object.documentation = null; - object.enabled = null; - object.validity = null; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.value = "int64Value"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.combiner != null && message.hasOwnProperty("combiner")) - object.combiner = options.enums === String ? $root.google.monitoring.v3.AlertPolicy.ConditionCombinerType[message.combiner] : message.combiner; - if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) - object.creationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.creationRecord, options); - if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) - object.mutationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.mutationRecord, options); - if (message.conditions && message.conditions.length) { - object.conditions = []; - for (var j = 0; j < message.conditions.length; ++j) - object.conditions[j] = $root.google.monitoring.v3.AlertPolicy.Condition.toObject(message.conditions[j], options); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; } - if (message.documentation != null && message.hasOwnProperty("documentation")) - object.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.toObject(message.documentation, options); - if (message.notificationChannels && message.notificationChannels.length) { - object.notificationChannels = []; - for (var j = 0; j < message.notificationChannels.length; ++j) - object.notificationChannels[j] = message.notificationChannels[j]; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; } - 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.distributionValue != null && message.hasOwnProperty("distributionValue")) { + object.distributionValue = $root.google.api.Distribution.toObject(message.distributionValue, options); + if (options.oneofs) + object.value = "distributionValue"; } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); - if (message.validity != null && message.hasOwnProperty("validity")) - object.validity = $root.google.rpc.Status.toObject(message.validity, options); return object; }; /** - * Converts this AlertPolicy to JSON. + * Converts this TypedValue to JSON. * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy + * @memberof google.monitoring.v3.TypedValue * @instance * @returns {Object.} JSON object */ - AlertPolicy.prototype.toJSON = function toJSON() { + TypedValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - AlertPolicy.Documentation = (function() { + return TypedValue; + })(); - /** - * Properties of a Documentation. - * @memberof google.monitoring.v3.AlertPolicy - * @interface IDocumentation - * @property {string|null} [content] Documentation content - * @property {string|null} [mimeType] Documentation mimeType - */ + v3.TimeInterval = (function() { - /** - * Constructs a new Documentation. - * @memberof google.monitoring.v3.AlertPolicy - * @classdesc Represents a Documentation. - * @implements IDocumentation - * @constructor - * @param {google.monitoring.v3.AlertPolicy.IDocumentation=} [properties] Properties to set - */ - function Documentation(properties) { - if (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 TimeInterval. + * @memberof google.monitoring.v3 + * @interface ITimeInterval + * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime + * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime + */ - /** - * Documentation content. - * @member {string} content - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @instance - */ - Documentation.prototype.content = ""; + /** + * Constructs a new TimeInterval. + * @memberof google.monitoring.v3 + * @classdesc Represents a TimeInterval. + * @implements ITimeInterval + * @constructor + * @param {google.monitoring.v3.ITimeInterval=} [properties] Properties to set + */ + function TimeInterval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Documentation mimeType. - * @member {string} mimeType - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @instance - */ - Documentation.prototype.mimeType = ""; + /** + * TimeInterval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.monitoring.v3.TimeInterval + * @instance + */ + TimeInterval.prototype.endTime = null; - /** - * Creates a new Documentation instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {google.monitoring.v3.AlertPolicy.IDocumentation=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation instance - */ - Documentation.create = function create(properties) { - return new Documentation(properties); - }; + /** + * TimeInterval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.monitoring.v3.TimeInterval + * @instance + */ + TimeInterval.prototype.startTime = null; - /** - * Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {google.monitoring.v3.AlertPolicy.IDocumentation} message Documentation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Documentation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); - return writer; - }; + /** + * Creates a new TimeInterval instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.ITimeInterval=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeInterval} TimeInterval instance + */ + TimeInterval.create = function create(properties) { + return new TimeInterval(properties); + }; - /** - * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {google.monitoring.v3.AlertPolicy.IDocumentation} message Documentation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Documentation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeInterval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes a Documentation message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Documentation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Documentation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.mimeType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Documentation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Documentation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeInterval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeInterval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 1: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a Documentation message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Documentation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - return null; - }; + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeInterval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Documentation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy.Documentation} Documentation - */ - Documentation.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy.Documentation) - return object; - var message = new $root.google.monitoring.v3.AlertPolicy.Documentation(); - if (object.content != null) - message.content = String(object.content); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - return message; - }; + /** + * Verifies a TimeInterval message. + * @function verify + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeInterval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + return null; + }; - /** - * Creates a plain object from a Documentation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @static - * @param {google.monitoring.v3.AlertPolicy.Documentation} message Documentation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Documentation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.content = ""; - object.mimeType = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; + /** + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeInterval} TimeInterval + */ + TimeInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeInterval) return object; - }; - - /** - * Converts this Documentation to JSON. - * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy.Documentation - * @instance - * @returns {Object.} JSON object - */ - Documentation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.monitoring.v3.TimeInterval(); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.monitoring.v3.TimeInterval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.monitoring.v3.TimeInterval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + return message; + }; - return Documentation; - })(); + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {google.monitoring.v3.TimeInterval} message TimeInterval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeInterval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + 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); + return object; + }; - AlertPolicy.Condition = (function() { + /** + * Converts this TimeInterval to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeInterval + * @instance + * @returns {Object.} JSON object + */ + TimeInterval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Condition. - * @memberof google.monitoring.v3.AlertPolicy - * @interface ICondition - * @property {string|null} [name] Condition name - * @property {string|null} [displayName] Condition displayName - * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null} [conditionThreshold] Condition conditionThreshold - * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null} [conditionAbsent] Condition conditionAbsent - */ + return TimeInterval; + })(); - /** - * Constructs a new Condition. - * @memberof google.monitoring.v3.AlertPolicy - * @classdesc Represents a Condition. - * @implements ICondition - * @constructor - * @param {google.monitoring.v3.AlertPolicy.ICondition=} [properties] Properties to set - */ - function Condition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3.Aggregation = (function() { - /** - * Condition name. - * @member {string} name - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - */ - Condition.prototype.name = ""; + /** + * Properties of an Aggregation. + * @memberof google.monitoring.v3 + * @interface IAggregation + * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod + * @property {google.monitoring.v3.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner + * @property {google.monitoring.v3.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer + * @property {Array.|null} [groupByFields] Aggregation groupByFields + */ - /** - * Condition displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - */ - Condition.prototype.displayName = ""; + /** + * Constructs a new Aggregation. + * @memberof google.monitoring.v3 + * @classdesc Represents an Aggregation. + * @implements IAggregation + * @constructor + * @param {google.monitoring.v3.IAggregation=} [properties] Properties to set + */ + function Aggregation(properties) { + this.groupByFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Condition conditionThreshold. - * @member {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null|undefined} conditionThreshold - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - */ - Condition.prototype.conditionThreshold = null; + /** + * Aggregation alignmentPeriod. + * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.alignmentPeriod = null; - /** - * Condition conditionAbsent. - * @member {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null|undefined} conditionAbsent - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - */ - Condition.prototype.conditionAbsent = null; + /** + * Aggregation perSeriesAligner. + * @member {google.monitoring.v3.Aggregation.Aligner} perSeriesAligner + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.perSeriesAligner = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Aggregation crossSeriesReducer. + * @member {google.monitoring.v3.Aggregation.Reducer} crossSeriesReducer + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.crossSeriesReducer = 0; - /** - * Condition condition. - * @member {"conditionThreshold"|"conditionAbsent"|undefined} condition - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - */ - Object.defineProperty(Condition.prototype, "condition", { - get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Aggregation groupByFields. + * @member {Array.} groupByFields + * @memberof google.monitoring.v3.Aggregation + * @instance + */ + Aggregation.prototype.groupByFields = $util.emptyArray; - /** - * Creates a new Condition instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {google.monitoring.v3.AlertPolicy.ICondition=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition instance - */ - Condition.create = function create(properties) { - return new Condition(properties); - }; + /** + * Creates a new Aggregation instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.IAggregation=} [properties] Properties to set + * @returns {google.monitoring.v3.Aggregation} Aggregation instance + */ + Aggregation.create = function create(properties) { + return new Aggregation(properties); + }; - /** - * Encodes the specified Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {google.monitoring.v3.AlertPolicy.ICondition} message Condition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Condition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) - $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.encode(message.conditionThreshold, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) - $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.encode(message.conditionAbsent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); - return writer; - }; + /** + * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); + if (message.groupByFields != null && message.groupByFields.length) + for (var i = 0; i < message.groupByFields.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + return writer; + }; - /** - * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {google.monitoring.v3.AlertPolicy.ICondition} message Condition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Condition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.IAggregation} message Aggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Condition message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Condition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 12: - message.name = reader.string(); - break; - case 6: - message.displayName = reader.string(); - break; - case 1: - message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.decode(reader, reader.uint32()); - break; - case 2: - message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an Aggregation message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Aggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.perSeriesAligner = reader.int32(); + break; + case 4: + message.crossSeriesReducer = reader.int32(); + break; + case 5: + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Condition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Condition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Condition message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Condition.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) { - properties.condition = 1; - { - var error = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify(message.conditionThreshold); - if (error) - return "conditionThreshold." + error; - } - } - if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) { - if (properties.condition === 1) - return "condition: multiple values"; - properties.condition = 1; - { - var error = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify(message.conditionAbsent); - if (error) - return "conditionAbsent." + error; - } - } - return null; - }; + /** + * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Aggregation} Aggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Aggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Condition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy.Condition} Condition - */ - Condition.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition) - return object; - var message = new $root.google.monitoring.v3.AlertPolicy.Condition(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.conditionThreshold != null) { - if (typeof object.conditionThreshold !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionThreshold: object expected"); - message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.fromObject(object.conditionThreshold); + /** + * Verifies an Aggregation message. + * @function verify + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Aggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); + if (error) + return "alignmentPeriod." + error; + } + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + switch (message.perSeriesAligner) { + default: + return "perSeriesAligner: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 24: + case 17: + case 18: + case 19: + case 20: + case 21: + case 23: + break; } - if (object.conditionAbsent != null) { - if (typeof object.conditionAbsent !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionAbsent: object expected"); - message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.fromObject(object.conditionAbsent); + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + switch (message.crossSeriesReducer) { + default: + return "crossSeriesReducer: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 15: + case 8: + case 9: + case 10: + case 11: + case 12: + break; } - return message; - }; + if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { + if (!Array.isArray(message.groupByFields)) + return "groupByFields: array expected"; + for (var i = 0; i < message.groupByFields.length; ++i) + if (!$util.isString(message.groupByFields[i])) + return "groupByFields: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a Condition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition} message Condition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Condition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.name = ""; - } - if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) { - object.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.toObject(message.conditionThreshold, options); - if (options.oneofs) - object.condition = "conditionThreshold"; - } - if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) { - object.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.toObject(message.conditionAbsent, options); - if (options.oneofs) - object.condition = "conditionAbsent"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Aggregation} Aggregation + */ + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Aggregation) return object; - }; + var message = new $root.google.monitoring.v3.Aggregation(); + if (object.alignmentPeriod != null) { + if (typeof object.alignmentPeriod !== "object") + throw TypeError(".google.monitoring.v3.Aggregation.alignmentPeriod: object expected"); + message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); + } + switch (object.perSeriesAligner) { + case "ALIGN_NONE": + case 0: + message.perSeriesAligner = 0; + break; + case "ALIGN_DELTA": + case 1: + message.perSeriesAligner = 1; + break; + case "ALIGN_RATE": + case 2: + message.perSeriesAligner = 2; + break; + case "ALIGN_INTERPOLATE": + case 3: + message.perSeriesAligner = 3; + break; + case "ALIGN_NEXT_OLDER": + case 4: + message.perSeriesAligner = 4; + break; + case "ALIGN_MIN": + case 10: + message.perSeriesAligner = 10; + break; + case "ALIGN_MAX": + case 11: + message.perSeriesAligner = 11; + break; + case "ALIGN_MEAN": + case 12: + message.perSeriesAligner = 12; + break; + case "ALIGN_COUNT": + case 13: + message.perSeriesAligner = 13; + break; + case "ALIGN_SUM": + case 14: + message.perSeriesAligner = 14; + break; + case "ALIGN_STDDEV": + case 15: + message.perSeriesAligner = 15; + break; + case "ALIGN_COUNT_TRUE": + case 16: + message.perSeriesAligner = 16; + break; + case "ALIGN_COUNT_FALSE": + case 24: + message.perSeriesAligner = 24; + break; + case "ALIGN_FRACTION_TRUE": + case 17: + message.perSeriesAligner = 17; + break; + case "ALIGN_PERCENTILE_99": + case 18: + message.perSeriesAligner = 18; + break; + case "ALIGN_PERCENTILE_95": + case 19: + message.perSeriesAligner = 19; + break; + case "ALIGN_PERCENTILE_50": + case 20: + message.perSeriesAligner = 20; + break; + case "ALIGN_PERCENTILE_05": + case 21: + message.perSeriesAligner = 21; + break; + case "ALIGN_PERCENT_CHANGE": + case 23: + message.perSeriesAligner = 23; + break; + } + switch (object.crossSeriesReducer) { + case "REDUCE_NONE": + case 0: + message.crossSeriesReducer = 0; + break; + case "REDUCE_MEAN": + case 1: + message.crossSeriesReducer = 1; + break; + case "REDUCE_MIN": + case 2: + message.crossSeriesReducer = 2; + break; + case "REDUCE_MAX": + case 3: + message.crossSeriesReducer = 3; + break; + case "REDUCE_SUM": + case 4: + message.crossSeriesReducer = 4; + break; + case "REDUCE_STDDEV": + case 5: + message.crossSeriesReducer = 5; + break; + case "REDUCE_COUNT": + case 6: + message.crossSeriesReducer = 6; + break; + case "REDUCE_COUNT_TRUE": + case 7: + message.crossSeriesReducer = 7; + break; + case "REDUCE_COUNT_FALSE": + case 15: + message.crossSeriesReducer = 15; + break; + case "REDUCE_FRACTION_TRUE": + case 8: + message.crossSeriesReducer = 8; + break; + case "REDUCE_PERCENTILE_99": + case 9: + message.crossSeriesReducer = 9; + break; + case "REDUCE_PERCENTILE_95": + case 10: + message.crossSeriesReducer = 10; + break; + case "REDUCE_PERCENTILE_50": + case 11: + message.crossSeriesReducer = 11; + break; + case "REDUCE_PERCENTILE_05": + case 12: + message.crossSeriesReducer = 12; + break; + } + if (object.groupByFields) { + if (!Array.isArray(object.groupByFields)) + throw TypeError(".google.monitoring.v3.Aggregation.groupByFields: array expected"); + message.groupByFields = []; + for (var i = 0; i < object.groupByFields.length; ++i) + message.groupByFields[i] = String(object.groupByFields[i]); + } + return message; + }; - /** - * Converts this Condition to JSON. - * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - * @returns {Object.} JSON object - */ - Condition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {google.monitoring.v3.Aggregation} message Aggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Aggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupByFields = []; + if (options.defaults) { + object.alignmentPeriod = null; + object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; + object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; + } + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + object.perSeriesAligner = options.enums === String ? $root.google.monitoring.v3.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.v3.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; + if (message.groupByFields && message.groupByFields.length) { + object.groupByFields = []; + for (var j = 0; j < message.groupByFields.length; ++j) + object.groupByFields[j] = message.groupByFields[j]; + } + return object; + }; - Condition.Trigger = (function() { + /** + * Converts this Aggregation to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Aggregation + * @instance + * @returns {Object.} JSON object + */ + Aggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Trigger. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @interface ITrigger - * @property {number|null} [count] Trigger count - * @property {number|null} [percent] Trigger percent - */ + /** + * Aligner enum. + * @name google.monitoring.v3.Aggregation.Aligner + * @enum {string} + * @property {number} ALIGN_NONE=0 ALIGN_NONE value + * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value + * @property {number} ALIGN_RATE=2 ALIGN_RATE value + * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value + * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value + * @property {number} ALIGN_MIN=10 ALIGN_MIN value + * @property {number} ALIGN_MAX=11 ALIGN_MAX value + * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value + * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value + * @property {number} ALIGN_SUM=14 ALIGN_SUM value + * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value + * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value + * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value + * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value + * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value + * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value + * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value + * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value + * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value + */ + Aggregation.Aligner = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ALIGN_NONE"] = 0; + values[valuesById[1] = "ALIGN_DELTA"] = 1; + values[valuesById[2] = "ALIGN_RATE"] = 2; + values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; + values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; + values[valuesById[10] = "ALIGN_MIN"] = 10; + values[valuesById[11] = "ALIGN_MAX"] = 11; + values[valuesById[12] = "ALIGN_MEAN"] = 12; + values[valuesById[13] = "ALIGN_COUNT"] = 13; + values[valuesById[14] = "ALIGN_SUM"] = 14; + values[valuesById[15] = "ALIGN_STDDEV"] = 15; + values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; + values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; + values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; + values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; + values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; + values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; + values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; + values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; + return values; + })(); - /** - * Constructs a new Trigger. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @classdesc Represents a Trigger. - * @implements ITrigger - * @constructor - * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger=} [properties] Properties to set - */ - function Trigger(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Reducer enum. + * @name google.monitoring.v3.Aggregation.Reducer + * @enum {string} + * @property {number} REDUCE_NONE=0 REDUCE_NONE value + * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value + * @property {number} REDUCE_MIN=2 REDUCE_MIN value + * @property {number} REDUCE_MAX=3 REDUCE_MAX value + * @property {number} REDUCE_SUM=4 REDUCE_SUM value + * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value + * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value + * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value + * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value + * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value + * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value + * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value + * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value + * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value + */ + Aggregation.Reducer = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REDUCE_NONE"] = 0; + values[valuesById[1] = "REDUCE_MEAN"] = 1; + values[valuesById[2] = "REDUCE_MIN"] = 2; + values[valuesById[3] = "REDUCE_MAX"] = 3; + values[valuesById[4] = "REDUCE_SUM"] = 4; + values[valuesById[5] = "REDUCE_STDDEV"] = 5; + values[valuesById[6] = "REDUCE_COUNT"] = 6; + values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; + values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; + values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; + values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; + values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; + values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; + values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; + return values; + })(); - /** - * Trigger count. - * @member {number} count - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @instance - */ - Trigger.prototype.count = 0; + return Aggregation; + })(); - /** - * Trigger percent. - * @member {number} percent - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @instance - */ - Trigger.prototype.percent = 0; + /** + * ComparisonType enum. + * @name google.monitoring.v3.ComparisonType + * @enum {string} + * @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value + * @property {number} COMPARISON_GT=1 COMPARISON_GT value + * @property {number} COMPARISON_GE=2 COMPARISON_GE value + * @property {number} COMPARISON_LT=3 COMPARISON_LT value + * @property {number} COMPARISON_LE=4 COMPARISON_LE value + * @property {number} COMPARISON_EQ=5 COMPARISON_EQ value + * @property {number} COMPARISON_NE=6 COMPARISON_NE value + */ + v3.ComparisonType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPARISON_UNSPECIFIED"] = 0; + values[valuesById[1] = "COMPARISON_GT"] = 1; + values[valuesById[2] = "COMPARISON_GE"] = 2; + values[valuesById[3] = "COMPARISON_LT"] = 3; + values[valuesById[4] = "COMPARISON_LE"] = 4; + values[valuesById[5] = "COMPARISON_EQ"] = 5; + values[valuesById[6] = "COMPARISON_NE"] = 6; + return values; + })(); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ServiceTier enum. + * @name google.monitoring.v3.ServiceTier + * @enum {string} + * @property {number} SERVICE_TIER_UNSPECIFIED=0 SERVICE_TIER_UNSPECIFIED value + * @property {number} SERVICE_TIER_BASIC=1 SERVICE_TIER_BASIC value + * @property {number} SERVICE_TIER_PREMIUM=2 SERVICE_TIER_PREMIUM value + */ + v3.ServiceTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVICE_TIER_BASIC"] = 1; + values[valuesById[2] = "SERVICE_TIER_PREMIUM"] = 2; + return values; + })(); - /** - * Trigger type. - * @member {"count"|"percent"|undefined} type - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @instance - */ - Object.defineProperty(Trigger.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["count", "percent"]), - set: $util.oneOfSetter($oneOfFields) - }); + v3.MutationRecord = (function() { - /** - * Creates a new Trigger instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger instance - */ - Trigger.create = function create(properties) { - return new Trigger(properties); - }; + /** + * Properties of a MutationRecord. + * @memberof google.monitoring.v3 + * @interface IMutationRecord + * @property {google.protobuf.ITimestamp|null} [mutateTime] MutationRecord mutateTime + * @property {string|null} [mutatedBy] MutationRecord mutatedBy + */ - /** - * Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger} message Trigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trigger.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.count != null && message.hasOwnProperty("count")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); - if (message.percent != null && message.hasOwnProperty("percent")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.percent); - return writer; - }; + /** + * Constructs a new MutationRecord. + * @memberof google.monitoring.v3 + * @classdesc Represents a MutationRecord. + * @implements IMutationRecord + * @constructor + * @param {google.monitoring.v3.IMutationRecord=} [properties] Properties to set + */ + function MutationRecord(properties) { + if (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 Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.ITrigger} message Trigger message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trigger.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MutationRecord mutateTime. + * @member {google.protobuf.ITimestamp|null|undefined} mutateTime + * @memberof google.monitoring.v3.MutationRecord + * @instance + */ + MutationRecord.prototype.mutateTime = null; - /** - * Decodes a Trigger message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trigger.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.Trigger(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.count = reader.int32(); - break; - case 2: - message.percent = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MutationRecord mutatedBy. + * @member {string} mutatedBy + * @memberof google.monitoring.v3.MutationRecord + * @instance + */ + MutationRecord.prototype.mutatedBy = ""; - /** - * Decodes a Trigger message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trigger.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new MutationRecord instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.IMutationRecord=} [properties] Properties to set + * @returns {google.monitoring.v3.MutationRecord} MutationRecord instance + */ + MutationRecord.create = function create(properties) { + return new MutationRecord(properties); + }; - /** - * Verifies a Trigger message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trigger.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.count != null && message.hasOwnProperty("count")) { - properties.type = 1; - if (!$util.isInteger(message.count)) - return "count: integer expected"; - } - if (message.percent != null && message.hasOwnProperty("percent")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - if (typeof message.percent !== "number") - return "percent: number expected"; - } - return null; - }; + /** + * Encodes the specified MutationRecord message. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.IMutationRecord} message MutationRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutationRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) + $root.google.protobuf.Timestamp.encode(message.mutateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mutatedBy); + return writer; + }; - /** - * Creates a Trigger message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy.Condition.Trigger} Trigger - */ - Trigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.Trigger) - return object; - var message = new $root.google.monitoring.v3.AlertPolicy.Condition.Trigger(); - if (object.count != null) - message.count = object.count | 0; - if (object.percent != null) - message.percent = Number(object.percent); - return message; - }; + /** + * Encodes the specified MutationRecord message, length delimited. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.IMutationRecord} message MutationRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutationRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Trigger message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.Trigger} message Trigger - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trigger.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.count != null && message.hasOwnProperty("count")) { - object.count = message.count; - if (options.oneofs) - object.type = "count"; - } - if (message.percent != null && message.hasOwnProperty("percent")) { - object.percent = options.json && !isFinite(message.percent) ? String(message.percent) : message.percent; - if (options.oneofs) - object.type = "percent"; - } - return object; - }; + /** + * Decodes a MutationRecord message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutationRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.MutationRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mutateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.mutatedBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this Trigger to JSON. - * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger - * @instance - * @returns {Object.} JSON object - */ - Trigger.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a MutationRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutationRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return Trigger; - })(); + /** + * Verifies a MutationRecord message. + * @function verify + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutationRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.mutateTime); + if (error) + return "mutateTime." + error; + } + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + if (!$util.isString(message.mutatedBy)) + return "mutatedBy: string expected"; + return null; + }; - Condition.MetricThreshold = (function() { + /** + * Creates a MutationRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.MutationRecord} MutationRecord + */ + MutationRecord.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.MutationRecord) + return object; + var message = new $root.google.monitoring.v3.MutationRecord(); + if (object.mutateTime != null) { + if (typeof object.mutateTime !== "object") + throw TypeError(".google.monitoring.v3.MutationRecord.mutateTime: object expected"); + message.mutateTime = $root.google.protobuf.Timestamp.fromObject(object.mutateTime); + } + if (object.mutatedBy != null) + message.mutatedBy = String(object.mutatedBy); + return message; + }; - /** - * Properties of a MetricThreshold. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @interface IMetricThreshold - * @property {string|null} [filter] MetricThreshold filter - * @property {Array.|null} [aggregations] MetricThreshold aggregations - * @property {string|null} [denominatorFilter] MetricThreshold denominatorFilter - * @property {Array.|null} [denominatorAggregations] MetricThreshold denominatorAggregations - * @property {google.monitoring.v3.ComparisonType|null} [comparison] MetricThreshold comparison - * @property {number|null} [thresholdValue] MetricThreshold thresholdValue - * @property {google.protobuf.IDuration|null} [duration] MetricThreshold duration - * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MetricThreshold trigger - */ + /** + * Creates a plain object from a MutationRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {google.monitoring.v3.MutationRecord} message MutationRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutationRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mutateTime = null; + object.mutatedBy = ""; + } + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) + object.mutateTime = $root.google.protobuf.Timestamp.toObject(message.mutateTime, options); + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + object.mutatedBy = message.mutatedBy; + return object; + }; - /** - * Constructs a new MetricThreshold. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @classdesc Represents a MetricThreshold. - * @implements IMetricThreshold - * @constructor - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold=} [properties] Properties to set - */ - function MetricThreshold(properties) { - this.aggregations = []; - this.denominatorAggregations = []; - if (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 MutationRecord to JSON. + * @function toJSON + * @memberof google.monitoring.v3.MutationRecord + * @instance + * @returns {Object.} JSON object + */ + MutationRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MetricThreshold filter. - * @member {string} filter - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.filter = ""; + return MutationRecord; + })(); - /** - * MetricThreshold aggregations. - * @member {Array.} aggregations - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.aggregations = $util.emptyArray; + v3.AlertPolicyService = (function() { - /** - * MetricThreshold denominatorFilter. - * @member {string} denominatorFilter - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.denominatorFilter = ""; + /** + * Constructs a new AlertPolicyService service. + * @memberof google.monitoring.v3 + * @classdesc Represents an AlertPolicyService + * @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 AlertPolicyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * MetricThreshold denominatorAggregations. - * @member {Array.} denominatorAggregations - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.denominatorAggregations = $util.emptyArray; + (AlertPolicyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AlertPolicyService; - /** - * MetricThreshold comparison. - * @member {google.monitoring.v3.ComparisonType} comparison - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.comparison = 0; + /** + * Creates new AlertPolicyService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.AlertPolicyService + * @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 {AlertPolicyService} RPC service. Useful where requests and/or responses are streamed. + */ + AlertPolicyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * MetricThreshold thresholdValue. - * @member {number} thresholdValue - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.thresholdValue = 0; + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef ListAlertPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListAlertPoliciesResponse} [response] ListAlertPoliciesResponse + */ - /** - * MetricThreshold duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.duration = null; + /** + * Calls ListAlertPolicies. + * @function listAlertPolicies + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IListAlertPoliciesRequest} request ListAlertPoliciesRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.ListAlertPoliciesCallback} callback Node-style callback called with the error, if any, and ListAlertPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.listAlertPolicies = function listAlertPolicies(request, callback) { + return this.rpcCall(listAlertPolicies, $root.google.monitoring.v3.ListAlertPoliciesRequest, $root.google.monitoring.v3.ListAlertPoliciesResponse, request, callback); + }, "name", { value: "ListAlertPolicies" }); - /** - * MetricThreshold trigger. - * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - */ - MetricThreshold.prototype.trigger = null; + /** + * Calls ListAlertPolicies. + * @function listAlertPolicies + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IListAlertPoliciesRequest} request ListAlertPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new MetricThreshold instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold instance - */ - MetricThreshold.create = function create(properties) { - return new MetricThreshold(properties); - }; + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef GetAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy + */ - /** - * Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold} message MetricThreshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricThreshold.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.comparison != null && message.hasOwnProperty("comparison")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.comparison); - if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.thresholdValue); - if (message.duration != null && message.hasOwnProperty("duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.trigger != null && message.hasOwnProperty("trigger")) - $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.aggregations != null && message.aggregations.length) - for (var i = 0; i < message.aggregations.length; ++i) - $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.denominatorFilter); - if (message.denominatorAggregations != null && message.denominatorAggregations.length) - for (var i = 0; i < message.denominatorAggregations.length; ++i) - $root.google.monitoring.v3.Aggregation.encode(message.denominatorAggregations[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * Calls GetAlertPolicy. + * @function getAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IGetAlertPolicyRequest} request GetAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.GetAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.getAlertPolicy = function getAlertPolicy(request, callback) { + return this.rpcCall(getAlertPolicy, $root.google.monitoring.v3.GetAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); + }, "name", { value: "GetAlertPolicy" }); - /** - * Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold} message MetricThreshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricThreshold.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls GetAlertPolicy. + * @function getAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IGetAlertPolicyRequest} request GetAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a MetricThreshold message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricThreshold.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.filter = reader.string(); - break; - case 8: - if (!(message.aggregations && message.aggregations.length)) - message.aggregations = []; - message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); - break; - case 9: - message.denominatorFilter = reader.string(); - break; - case 10: - if (!(message.denominatorAggregations && message.denominatorAggregations.length)) - message.denominatorAggregations = []; - message.denominatorAggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); - break; - case 4: - message.comparison = reader.int32(); - break; - case 5: - message.thresholdValue = reader.double(); - break; - case 6: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 7: - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef CreateAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy + */ - /** - * Decodes a MetricThreshold message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricThreshold.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls CreateAlertPolicy. + * @function createAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} request CreateAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.CreateAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.createAlertPolicy = function createAlertPolicy(request, callback) { + return this.rpcCall(createAlertPolicy, $root.google.monitoring.v3.CreateAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); + }, "name", { value: "CreateAlertPolicy" }); - /** - * Verifies a MetricThreshold message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricThreshold.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregations != null && message.hasOwnProperty("aggregations")) { - if (!Array.isArray(message.aggregations)) - return "aggregations: array expected"; - for (var i = 0; i < message.aggregations.length; ++i) { - var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregations[i]); - if (error) - return "aggregations." + error; - } - } - if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) - if (!$util.isString(message.denominatorFilter)) - return "denominatorFilter: string expected"; - if (message.denominatorAggregations != null && message.hasOwnProperty("denominatorAggregations")) { - if (!Array.isArray(message.denominatorAggregations)) - return "denominatorAggregations: array expected"; - for (var i = 0; i < message.denominatorAggregations.length; ++i) { - var error = $root.google.monitoring.v3.Aggregation.verify(message.denominatorAggregations[i]); - if (error) - return "denominatorAggregations." + error; - } - } - if (message.comparison != null && message.hasOwnProperty("comparison")) - switch (message.comparison) { - default: - return "comparison: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) - if (typeof message.thresholdValue !== "number") - return "thresholdValue: number expected"; - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); - if (error) - return "trigger." + error; - } - return null; - }; + /** + * Calls CreateAlertPolicy. + * @function createAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} request CreateAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} MetricThreshold - */ - MetricThreshold.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold) - return object; - var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregations) { - if (!Array.isArray(object.aggregations)) - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.aggregations: array expected"); - message.aggregations = []; - for (var i = 0; i < object.aggregations.length; ++i) { - if (typeof object.aggregations[i] !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.aggregations: object expected"); - message.aggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregations[i]); - } - } - if (object.denominatorFilter != null) - message.denominatorFilter = String(object.denominatorFilter); - if (object.denominatorAggregations) { - if (!Array.isArray(object.denominatorAggregations)) - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.denominatorAggregations: array expected"); - message.denominatorAggregations = []; - for (var i = 0; i < object.denominatorAggregations.length; ++i) { - if (typeof object.denominatorAggregations[i] !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.denominatorAggregations: object expected"); - message.denominatorAggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.denominatorAggregations[i]); - } - } - switch (object.comparison) { - case "COMPARISON_UNSPECIFIED": - case 0: - message.comparison = 0; - break; - case "COMPARISON_GT": - case 1: - message.comparison = 1; - break; - case "COMPARISON_GE": - case 2: - message.comparison = 2; - break; - case "COMPARISON_LT": - case 3: - message.comparison = 3; - break; - case "COMPARISON_LE": - case 4: - message.comparison = 4; - break; - case "COMPARISON_EQ": - case 5: - message.comparison = 5; - break; - case "COMPARISON_NE": - case 6: - message.comparison = 6; - break; - } - if (object.thresholdValue != null) - message.thresholdValue = Number(object.thresholdValue); - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.trigger: object expected"); - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); - } - return message; - }; + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef DeleteAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Creates a plain object from a MetricThreshold message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.MetricThreshold} message MetricThreshold - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricThreshold.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.aggregations = []; - object.denominatorAggregations = []; - } - if (options.defaults) { - object.filter = ""; - object.comparison = options.enums === String ? "COMPARISON_UNSPECIFIED" : 0; - object.thresholdValue = 0; - object.duration = null; - object.trigger = null; - object.denominatorFilter = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.comparison != null && message.hasOwnProperty("comparison")) - object.comparison = options.enums === String ? $root.google.monitoring.v3.ComparisonType[message.comparison] : message.comparison; - if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) - object.thresholdValue = options.json && !isFinite(message.thresholdValue) ? String(message.thresholdValue) : message.thresholdValue; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); - if (message.aggregations && message.aggregations.length) { - object.aggregations = []; - for (var j = 0; j < message.aggregations.length; ++j) - object.aggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.aggregations[j], options); - } - if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) - object.denominatorFilter = message.denominatorFilter; - if (message.denominatorAggregations && message.denominatorAggregations.length) { - object.denominatorAggregations = []; - for (var j = 0; j < message.denominatorAggregations.length; ++j) - object.denominatorAggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.denominatorAggregations[j], options); - } - return object; - }; + /** + * Calls DeleteAlertPolicy. + * @function deleteAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} request DeleteAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.DeleteAlertPolicyCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.deleteAlertPolicy = function deleteAlertPolicy(request, callback) { + return this.rpcCall(deleteAlertPolicy, $root.google.monitoring.v3.DeleteAlertPolicyRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAlertPolicy" }); - /** - * Converts this MetricThreshold to JSON. - * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - * @instance - * @returns {Object.} JSON object - */ - MetricThreshold.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls DeleteAlertPolicy. + * @function deleteAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} request DeleteAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return MetricThreshold; - })(); + /** + * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. + * @memberof google.monitoring.v3.AlertPolicyService + * @typedef UpdateAlertPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.AlertPolicy} [response] AlertPolicy + */ - Condition.MetricAbsence = (function() { + /** + * Calls UpdateAlertPolicy. + * @function updateAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} request UpdateAlertPolicyRequest message or plain object + * @param {google.monitoring.v3.AlertPolicyService.UpdateAlertPolicyCallback} callback Node-style callback called with the error, if any, and AlertPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AlertPolicyService.prototype.updateAlertPolicy = function updateAlertPolicy(request, callback) { + return this.rpcCall(updateAlertPolicy, $root.google.monitoring.v3.UpdateAlertPolicyRequest, $root.google.monitoring.v3.AlertPolicy, request, callback); + }, "name", { value: "UpdateAlertPolicy" }); - /** - * Properties of a MetricAbsence. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @interface IMetricAbsence - * @property {string|null} [filter] MetricAbsence filter - * @property {Array.|null} [aggregations] MetricAbsence aggregations - * @property {google.protobuf.IDuration|null} [duration] MetricAbsence duration - * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MetricAbsence trigger - */ + /** + * Calls UpdateAlertPolicy. + * @function updateAlertPolicy + * @memberof google.monitoring.v3.AlertPolicyService + * @instance + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} request UpdateAlertPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new MetricAbsence. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @classdesc Represents a MetricAbsence. - * @implements IMetricAbsence - * @constructor - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence=} [properties] Properties to set - */ - function MetricAbsence(properties) { - this.aggregations = []; - if (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 AlertPolicyService; + })(); - /** - * MetricAbsence filter. - * @member {string} filter - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @instance - */ - MetricAbsence.prototype.filter = ""; + v3.CreateAlertPolicyRequest = (function() { - /** - * MetricAbsence aggregations. - * @member {Array.} aggregations - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @instance - */ - MetricAbsence.prototype.aggregations = $util.emptyArray; + /** + * Properties of a CreateAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @interface ICreateAlertPolicyRequest + * @property {string|null} [name] CreateAlertPolicyRequest name + * @property {google.monitoring.v3.IAlertPolicy|null} [alertPolicy] CreateAlertPolicyRequest alertPolicy + */ - /** - * MetricAbsence duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @instance - */ - MetricAbsence.prototype.duration = null; + /** + * Constructs a new CreateAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateAlertPolicyRequest. + * @implements ICreateAlertPolicyRequest + * @constructor + * @param {google.monitoring.v3.ICreateAlertPolicyRequest=} [properties] Properties to set + */ + function CreateAlertPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MetricAbsence trigger. - * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @instance - */ - MetricAbsence.prototype.trigger = null; + /** + * CreateAlertPolicyRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @instance + */ + CreateAlertPolicyRequest.prototype.name = ""; - /** - * Creates a new MetricAbsence instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence instance - */ - MetricAbsence.create = function create(properties) { - return new MetricAbsence(properties); - }; + /** + * CreateAlertPolicyRequest alertPolicy. + * @member {google.monitoring.v3.IAlertPolicy|null|undefined} alertPolicy + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @instance + */ + CreateAlertPolicyRequest.prototype.alertPolicy = null; - /** - * Encodes the specified MetricAbsence message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence} message MetricAbsence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricAbsence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.duration != null && message.hasOwnProperty("duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trigger != null && message.hasOwnProperty("trigger")) - $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.aggregations != null && message.aggregations.length) - for (var i = 0; i < message.aggregations.length; ++i) - $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Creates a new CreateAlertPolicyRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.ICreateAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest instance + */ + CreateAlertPolicyRequest.create = function create(properties) { + return new CreateAlertPolicyRequest(properties); + }; - /** - * Encodes the specified MetricAbsence message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence} message MetricAbsence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricAbsence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricAbsence message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricAbsence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 5: - if (!(message.aggregations && message.aggregations.length)) - message.aggregations = []; - message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); - break; - case 2: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricAbsence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricAbsence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricAbsence message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricAbsence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.aggregations != null && message.hasOwnProperty("aggregations")) { - if (!Array.isArray(message.aggregations)) - return "aggregations: array expected"; - for (var i = 0; i < message.aggregations.length; ++i) { - var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregations[i]); - if (error) - return "aggregations." + error; - } - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); - if (error) - return "trigger." + error; - } - return null; - }; - - /** - * Creates a MetricAbsence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} MetricAbsence - */ - MetricAbsence.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence) - return object; - var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence(); - if (object.filter != null) - message.filter = String(object.filter); - if (object.aggregations) { - if (!Array.isArray(object.aggregations)) - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.aggregations: array expected"); - message.aggregations = []; - for (var i = 0; i < object.aggregations.length; ++i) { - if (typeof object.aggregations[i] !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.aggregations: object expected"); - message.aggregations[i] = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregations[i]); - } - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.trigger: object expected"); - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); - } - return message; - }; - - /** - * Creates a plain object from a MetricAbsence message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.MetricAbsence} message MetricAbsence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricAbsence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.aggregations = []; - if (options.defaults) { - object.filter = ""; - object.duration = null; - object.trigger = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); - if (message.aggregations && message.aggregations.length) { - object.aggregations = []; - for (var j = 0; j < message.aggregations.length; ++j) - object.aggregations[j] = $root.google.monitoring.v3.Aggregation.toObject(message.aggregations[j], options); - } - return object; - }; - - /** - * Converts this MetricAbsence to JSON. - * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - * @instance - * @returns {Object.} JSON object - */ - MetricAbsence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MetricAbsence; - })(); - - return Condition; - })(); + /** + * Encodes the specified CreateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} message CreateAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAlertPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; /** - * ConditionCombinerType enum. - * @name google.monitoring.v3.AlertPolicy.ConditionCombinerType - * @enum {string} - * @property {number} COMBINE_UNSPECIFIED=0 COMBINE_UNSPECIFIED value - * @property {number} AND=1 AND value - * @property {number} OR=2 OR value - * @property {number} AND_WITH_MATCHING_RESOURCE=3 AND_WITH_MATCHING_RESOURCE value + * Encodes the specified CreateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateAlertPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.ICreateAlertPolicyRequest} message CreateAlertPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - AlertPolicy.ConditionCombinerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMBINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AND"] = 1; - values[valuesById[2] = "OR"] = 2; - values[valuesById[3] = "AND_WITH_MATCHING_RESOURCE"] = 3; - return values; - })(); - - return AlertPolicy; - })(); - - v3.TypedValue = (function() { + CreateAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Properties of a TypedValue. - * @memberof google.monitoring.v3 - * @interface ITypedValue - * @property {boolean|null} [boolValue] TypedValue boolValue - * @property {number|Long|null} [int64Value] TypedValue int64Value - * @property {number|null} [doubleValue] TypedValue doubleValue - * @property {string|null} [stringValue] TypedValue stringValue - * @property {google.api.IDistribution|null} [distributionValue] TypedValue distributionValue + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateAlertPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateAlertPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 2: + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Constructs a new TypedValue. - * @memberof google.monitoring.v3 - * @classdesc Represents a TypedValue. - * @implements ITypedValue - * @constructor - * @param {google.monitoring.v3.ITypedValue=} [properties] Properties to set + * Decodes a CreateAlertPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - function TypedValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + CreateAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * TypedValue boolValue. - * @member {boolean} boolValue - * @memberof google.monitoring.v3.TypedValue - * @instance + * Verifies a CreateAlertPolicyRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TypedValue.prototype.boolValue = false; + CreateAlertPolicyRequest.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.alertPolicy != null && message.hasOwnProperty("alertPolicy")) { + var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicy); + if (error) + return "alertPolicy." + error; + } + return null; + }; /** - * TypedValue int64Value. - * @member {number|Long} int64Value - * @memberof google.monitoring.v3.TypedValue - * @instance + * Creates a CreateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateAlertPolicyRequest} CreateAlertPolicyRequest */ - TypedValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CreateAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateAlertPolicyRequest) + return object; + var message = new $root.google.monitoring.v3.CreateAlertPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.alertPolicy != null) { + if (typeof object.alertPolicy !== "object") + throw TypeError(".google.monitoring.v3.CreateAlertPolicyRequest.alertPolicy: object expected"); + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicy); + } + return message; + }; /** - * TypedValue doubleValue. - * @member {number} doubleValue - * @memberof google.monitoring.v3.TypedValue - * @instance + * Creates a plain object from a CreateAlertPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {google.monitoring.v3.CreateAlertPolicyRequest} message CreateAlertPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - TypedValue.prototype.doubleValue = 0; + CreateAlertPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.alertPolicy = null; + object.name = ""; + } + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + object.alertPolicy = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicy, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; /** - * TypedValue stringValue. - * @member {string} stringValue - * @memberof google.monitoring.v3.TypedValue + * Converts this CreateAlertPolicyRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateAlertPolicyRequest * @instance + * @returns {Object.} JSON object */ - TypedValue.prototype.stringValue = ""; + CreateAlertPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateAlertPolicyRequest; + })(); + + v3.GetAlertPolicyRequest = (function() { /** - * TypedValue distributionValue. - * @member {google.api.IDistribution|null|undefined} distributionValue - * @memberof google.monitoring.v3.TypedValue - * @instance + * Properties of a GetAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @interface IGetAlertPolicyRequest + * @property {string|null} [name] GetAlertPolicyRequest name */ - TypedValue.prototype.distributionValue = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new GetAlertPolicyRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetAlertPolicyRequest. + * @implements IGetAlertPolicyRequest + * @constructor + * @param {google.monitoring.v3.IGetAlertPolicyRequest=} [properties] Properties to set + */ + function GetAlertPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * TypedValue value. - * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value - * @memberof google.monitoring.v3.TypedValue + * GetAlertPolicyRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @instance */ - Object.defineProperty(TypedValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetAlertPolicyRequest.prototype.name = ""; /** - * Creates a new TypedValue instance using the specified properties. + * Creates a new GetAlertPolicyRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static - * @param {google.monitoring.v3.ITypedValue=} [properties] Properties to set - * @returns {google.monitoring.v3.TypedValue} TypedValue instance + * @param {google.monitoring.v3.IGetAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest instance */ - TypedValue.create = function create(properties) { - return new TypedValue(properties); + GetAlertPolicyRequest.create = function create(properties) { + return new GetAlertPolicyRequest(properties); }; /** - * Encodes the specified TypedValue message. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * Encodes the specified GetAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static - * @param {google.monitoring.v3.ITypedValue} message TypedValue message or plain object to encode + * @param {google.monitoring.v3.IGetAlertPolicyRequest} message GetAlertPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypedValue.encode = function encode(message, writer) { + GetAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && message.hasOwnProperty("int64Value")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) - $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.monitoring.v3.TypedValue.verify|verify} messages. + * Encodes the specified GetAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetAlertPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static - * @param {google.monitoring.v3.ITypedValue} message TypedValue message or plain object to encode + * @param {google.monitoring.v3.IGetAlertPolicyRequest} message GetAlertPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypedValue.encodeDelimited = function encodeDelimited(message, writer) { + GetAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TypedValue message from the specified reader or buffer. + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.TypedValue} TypedValue + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TypedValue.decode = function decode(reader, length) { + GetAlertPolicyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TypedValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetAlertPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.boolValue = reader.bool(); - break; - case 2: - message.int64Value = reader.int64(); - break; case 3: - message.doubleValue = reader.double(); - break; - case 4: - message.stringValue = reader.string(); - break; - case 5: - message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -3736,184 +3906,111 @@ }; /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * Decodes a GetAlertPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.TypedValue} TypedValue + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TypedValue.decodeDelimited = function decodeDelimited(reader) { + GetAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TypedValue message. + * Verifies a GetAlertPolicyRequest message. * @function verify - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TypedValue.verify = function verify(message) { + GetAlertPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - properties.value = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) - return "int64Value: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.google.api.Distribution.verify(message.distributionValue); - if (error) - return "distributionValue." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a TypedValue message from a plain object. Also converts values to their respective internal types. + * Creates a GetAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.TypedValue} TypedValue + * @returns {google.monitoring.v3.GetAlertPolicyRequest} GetAlertPolicyRequest */ - TypedValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.TypedValue) + GetAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetAlertPolicyRequest) return object; - var message = new $root.google.monitoring.v3.TypedValue(); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.distributionValue != null) { - if (typeof object.distributionValue !== "object") - throw TypeError(".google.monitoring.v3.TypedValue.distributionValue: object expected"); - message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); - } + var message = new $root.google.monitoring.v3.GetAlertPolicyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * Creates a plain object from a GetAlertPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @static - * @param {google.monitoring.v3.TypedValue} message TypedValue + * @param {google.monitoring.v3.GetAlertPolicyRequest} message GetAlertPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TypedValue.toObject = function toObject(message, options) { + GetAlertPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.value = "boolValue"; - } - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (typeof message.int64Value === "number") - object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; - else - object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; - if (options.oneofs) - object.value = "int64Value"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) { - object.distributionValue = $root.google.api.Distribution.toObject(message.distributionValue, options); - if (options.oneofs) - object.value = "distributionValue"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this TypedValue to JSON. + * Converts this GetAlertPolicyRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.TypedValue + * @memberof google.monitoring.v3.GetAlertPolicyRequest * @instance * @returns {Object.} JSON object */ - TypedValue.prototype.toJSON = function toJSON() { + GetAlertPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TypedValue; + return GetAlertPolicyRequest; })(); - v3.TimeInterval = (function() { + v3.ListAlertPoliciesRequest = (function() { /** - * Properties of a TimeInterval. + * Properties of a ListAlertPoliciesRequest. * @memberof google.monitoring.v3 - * @interface ITimeInterval - * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime - * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime + * @interface IListAlertPoliciesRequest + * @property {string|null} [name] ListAlertPoliciesRequest name + * @property {string|null} [filter] ListAlertPoliciesRequest filter + * @property {string|null} [orderBy] ListAlertPoliciesRequest orderBy + * @property {number|null} [pageSize] ListAlertPoliciesRequest pageSize + * @property {string|null} [pageToken] ListAlertPoliciesRequest pageToken */ /** - * Constructs a new TimeInterval. + * Constructs a new ListAlertPoliciesRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a TimeInterval. - * @implements ITimeInterval + * @classdesc Represents a ListAlertPoliciesRequest. + * @implements IListAlertPoliciesRequest * @constructor - * @param {google.monitoring.v3.ITimeInterval=} [properties] Properties to set + * @param {google.monitoring.v3.IListAlertPoliciesRequest=} [properties] Properties to set */ - function TimeInterval(properties) { + function ListAlertPoliciesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3921,88 +4018,127 @@ } /** - * TimeInterval endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.monitoring.v3.TimeInterval + * ListAlertPoliciesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @instance */ - TimeInterval.prototype.endTime = null; + ListAlertPoliciesRequest.prototype.name = ""; /** - * TimeInterval startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.monitoring.v3.TimeInterval + * ListAlertPoliciesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @instance */ - TimeInterval.prototype.startTime = null; + ListAlertPoliciesRequest.prototype.filter = ""; /** - * Creates a new TimeInterval instance using the specified properties. + * ListAlertPoliciesRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.orderBy = ""; + + /** + * ListAlertPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.pageSize = 0; + + /** + * ListAlertPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @instance + */ + ListAlertPoliciesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAlertPoliciesRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static - * @param {google.monitoring.v3.ITimeInterval=} [properties] Properties to set - * @returns {google.monitoring.v3.TimeInterval} TimeInterval instance + * @param {google.monitoring.v3.IListAlertPoliciesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest instance */ - TimeInterval.create = function create(properties) { - return new TimeInterval(properties); + ListAlertPoliciesRequest.create = function create(properties) { + return new ListAlertPoliciesRequest(properties); }; /** - * Encodes the specified TimeInterval message. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * Encodes the specified ListAlertPoliciesRequest message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static - * @param {google.monitoring.v3.ITimeInterval} message TimeInterval message or plain object to encode + * @param {google.monitoring.v3.IListAlertPoliciesRequest} message ListAlertPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeInterval.encode = function encode(message, writer) { + ListAlertPoliciesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && message.hasOwnProperty("endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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 4, wireType 2 =*/34).string(message.name); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); return writer; }; /** - * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeInterval.verify|verify} messages. + * Encodes the specified ListAlertPoliciesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static - * @param {google.monitoring.v3.ITimeInterval} message TimeInterval message or plain object to encode + * @param {google.monitoring.v3.IListAlertPoliciesRequest} message ListAlertPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { + ListAlertPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeInterval message from the specified reader or buffer. + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeInterval.decode = function decode(reader, length) { + ListAlertPoliciesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeInterval(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListAlertPoliciesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.orderBy = reader.string(); + break; case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; - case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4013,130 +4149,142 @@ }; /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * Decodes a ListAlertPoliciesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeInterval.decodeDelimited = function decodeDelimited(reader) { + ListAlertPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeInterval message. + * Verifies a ListAlertPoliciesRequest message. * @function verify - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeInterval.verify = function verify(message) { + ListAlertPoliciesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } + 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.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 TimeInterval message from a plain object. Also converts values to their respective internal types. + * Creates a ListAlertPoliciesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.TimeInterval} TimeInterval + * @returns {google.monitoring.v3.ListAlertPoliciesRequest} ListAlertPoliciesRequest */ - TimeInterval.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.TimeInterval) + ListAlertPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListAlertPoliciesRequest) return object; - var message = new $root.google.monitoring.v3.TimeInterval(); - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.monitoring.v3.TimeInterval.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.monitoring.v3.TimeInterval.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } + var message = new $root.google.monitoring.v3.ListAlertPoliciesRequest(); + if (object.name != null) + message.name = String(object.name); + 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 TimeInterval message. Also converts values to other types if specified. + * Creates a plain object from a ListAlertPoliciesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @static - * @param {google.monitoring.v3.TimeInterval} message TimeInterval + * @param {google.monitoring.v3.ListAlertPoliciesRequest} message ListAlertPoliciesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeInterval.toObject = function toObject(message, options) { + ListAlertPoliciesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.startTime = null; - object.endTime = null; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + object.filter = ""; + object.orderBy = ""; } - 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.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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this TimeInterval to JSON. + * Converts this ListAlertPoliciesRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.TimeInterval + * @memberof google.monitoring.v3.ListAlertPoliciesRequest * @instance * @returns {Object.} JSON object */ - TimeInterval.prototype.toJSON = function toJSON() { + ListAlertPoliciesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeInterval; + return ListAlertPoliciesRequest; })(); - v3.Aggregation = (function() { + v3.ListAlertPoliciesResponse = (function() { /** - * Properties of an Aggregation. + * Properties of a ListAlertPoliciesResponse. * @memberof google.monitoring.v3 - * @interface IAggregation - * @property {google.protobuf.IDuration|null} [alignmentPeriod] Aggregation alignmentPeriod - * @property {google.monitoring.v3.Aggregation.Aligner|null} [perSeriesAligner] Aggregation perSeriesAligner - * @property {google.monitoring.v3.Aggregation.Reducer|null} [crossSeriesReducer] Aggregation crossSeriesReducer - * @property {Array.|null} [groupByFields] Aggregation groupByFields + * @interface IListAlertPoliciesResponse + * @property {Array.|null} [alertPolicies] ListAlertPoliciesResponse alertPolicies + * @property {string|null} [nextPageToken] ListAlertPoliciesResponse nextPageToken */ /** - * Constructs a new Aggregation. + * Constructs a new ListAlertPoliciesResponse. * @memberof google.monitoring.v3 - * @classdesc Represents an Aggregation. - * @implements IAggregation + * @classdesc Represents a ListAlertPoliciesResponse. + * @implements IListAlertPoliciesResponse * @constructor - * @param {google.monitoring.v3.IAggregation=} [properties] Properties to set + * @param {google.monitoring.v3.IListAlertPoliciesResponse=} [properties] Properties to set */ - function Aggregation(properties) { - this.groupByFields = []; + function ListAlertPoliciesResponse(properties) { + this.alertPolicies = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4144,117 +4292,91 @@ } /** - * Aggregation alignmentPeriod. - * @member {google.protobuf.IDuration|null|undefined} alignmentPeriod - * @memberof google.monitoring.v3.Aggregation - * @instance - */ - Aggregation.prototype.alignmentPeriod = null; - - /** - * Aggregation perSeriesAligner. - * @member {google.monitoring.v3.Aggregation.Aligner} perSeriesAligner - * @memberof google.monitoring.v3.Aggregation - * @instance - */ - Aggregation.prototype.perSeriesAligner = 0; - - /** - * Aggregation crossSeriesReducer. - * @member {google.monitoring.v3.Aggregation.Reducer} crossSeriesReducer - * @memberof google.monitoring.v3.Aggregation + * ListAlertPoliciesResponse alertPolicies. + * @member {Array.} alertPolicies + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @instance */ - Aggregation.prototype.crossSeriesReducer = 0; + ListAlertPoliciesResponse.prototype.alertPolicies = $util.emptyArray; /** - * Aggregation groupByFields. - * @member {Array.} groupByFields - * @memberof google.monitoring.v3.Aggregation + * ListAlertPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @instance */ - Aggregation.prototype.groupByFields = $util.emptyArray; + ListAlertPoliciesResponse.prototype.nextPageToken = ""; /** - * Creates a new Aggregation instance using the specified properties. + * Creates a new ListAlertPoliciesResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static - * @param {google.monitoring.v3.IAggregation=} [properties] Properties to set - * @returns {google.monitoring.v3.Aggregation} Aggregation instance + * @param {google.monitoring.v3.IListAlertPoliciesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse instance */ - Aggregation.create = function create(properties) { - return new Aggregation(properties); + ListAlertPoliciesResponse.create = function create(properties) { + return new ListAlertPoliciesResponse(properties); }; /** - * Encodes the specified Aggregation message. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * Encodes the specified ListAlertPoliciesResponse message. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static - * @param {google.monitoring.v3.IAggregation} message Aggregation message or plain object to encode + * @param {google.monitoring.v3.IListAlertPoliciesResponse} message ListAlertPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encode = function encode(message, writer) { + ListAlertPoliciesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) - $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); - if (message.groupByFields != null && message.groupByFields.length) - for (var i = 0; i < message.groupByFields.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.groupByFields[i]); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.alertPolicies != null && message.alertPolicies.length) + for (var i = 0; i < message.alertPolicies.length; ++i) + $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.monitoring.v3.Aggregation.verify|verify} messages. + * Encodes the specified ListAlertPoliciesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListAlertPoliciesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static - * @param {google.monitoring.v3.IAggregation} message Aggregation message or plain object to encode + * @param {google.monitoring.v3.IListAlertPoliciesResponse} message ListAlertPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Aggregation.encodeDelimited = function encodeDelimited(message, writer) { + ListAlertPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Aggregation message from the specified reader or buffer. + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Aggregation} Aggregation + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decode = function decode(reader, length) { + ListAlertPoliciesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Aggregation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListAlertPoliciesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 3: + if (!(message.alertPolicies && message.alertPolicies.length)) + message.alertPolicies = []; + message.alertPolicies.push($root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32())); break; case 2: - message.perSeriesAligner = reader.int32(); - break; - case 4: - message.crossSeriesReducer = reader.int32(); - break; - case 5: - if (!(message.groupByFields && message.groupByFields.length)) - message.groupByFields = []; - message.groupByFields.push(reader.string()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -4265,448 +4387,134 @@ }; /** - * Decodes an Aggregation message from the specified reader or buffer, length delimited. + * Decodes a ListAlertPoliciesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Aggregation} Aggregation + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Aggregation.decodeDelimited = function decodeDelimited(reader) { + ListAlertPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Aggregation message. + * Verifies a ListAlertPoliciesResponse message. * @function verify - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Aggregation.verify = function verify(message) { + ListAlertPoliciesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.alignmentPeriod); - if (error) - return "alignmentPeriod." + error; - } - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - switch (message.perSeriesAligner) { - default: - return "perSeriesAligner: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 24: - case 17: - case 18: - case 19: - case 20: - case 21: - case 23: - break; + if (message.alertPolicies != null && message.hasOwnProperty("alertPolicies")) { + if (!Array.isArray(message.alertPolicies)) + return "alertPolicies: array expected"; + for (var i = 0; i < message.alertPolicies.length; ++i) { + var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicies[i]); + if (error) + return "alertPolicies." + error; } - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - switch (message.crossSeriesReducer) { - default: - return "crossSeriesReducer: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 15: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - if (message.groupByFields != null && message.hasOwnProperty("groupByFields")) { - if (!Array.isArray(message.groupByFields)) - return "groupByFields: array expected"; - for (var i = 0; i < message.groupByFields.length; ++i) - if (!$util.isString(message.groupByFields[i])) - return "groupByFields: string[] expected"; } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * Creates a ListAlertPoliciesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Aggregation} Aggregation + * @returns {google.monitoring.v3.ListAlertPoliciesResponse} ListAlertPoliciesResponse */ - Aggregation.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Aggregation) + ListAlertPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListAlertPoliciesResponse) return object; - var message = new $root.google.monitoring.v3.Aggregation(); - if (object.alignmentPeriod != null) { - if (typeof object.alignmentPeriod !== "object") - throw TypeError(".google.monitoring.v3.Aggregation.alignmentPeriod: object expected"); - message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); - } - switch (object.perSeriesAligner) { - case "ALIGN_NONE": - case 0: - message.perSeriesAligner = 0; - break; - case "ALIGN_DELTA": - case 1: - message.perSeriesAligner = 1; - break; - case "ALIGN_RATE": - case 2: - message.perSeriesAligner = 2; - break; - case "ALIGN_INTERPOLATE": - case 3: - message.perSeriesAligner = 3; - break; - case "ALIGN_NEXT_OLDER": - case 4: - message.perSeriesAligner = 4; - break; - case "ALIGN_MIN": - case 10: - message.perSeriesAligner = 10; - break; - case "ALIGN_MAX": - case 11: - message.perSeriesAligner = 11; - break; - case "ALIGN_MEAN": - case 12: - message.perSeriesAligner = 12; - break; - case "ALIGN_COUNT": - case 13: - message.perSeriesAligner = 13; - break; - case "ALIGN_SUM": - case 14: - message.perSeriesAligner = 14; - break; - case "ALIGN_STDDEV": - case 15: - message.perSeriesAligner = 15; - break; - case "ALIGN_COUNT_TRUE": - case 16: - message.perSeriesAligner = 16; - break; - case "ALIGN_COUNT_FALSE": - case 24: - message.perSeriesAligner = 24; - break; - case "ALIGN_FRACTION_TRUE": - case 17: - message.perSeriesAligner = 17; - break; - case "ALIGN_PERCENTILE_99": - case 18: - message.perSeriesAligner = 18; - break; - case "ALIGN_PERCENTILE_95": - case 19: - message.perSeriesAligner = 19; - break; - case "ALIGN_PERCENTILE_50": - case 20: - message.perSeriesAligner = 20; - break; - case "ALIGN_PERCENTILE_05": - case 21: - message.perSeriesAligner = 21; - break; - case "ALIGN_PERCENT_CHANGE": - case 23: - message.perSeriesAligner = 23; - break; - } - switch (object.crossSeriesReducer) { - case "REDUCE_NONE": - case 0: - message.crossSeriesReducer = 0; - break; - case "REDUCE_MEAN": - case 1: - message.crossSeriesReducer = 1; - break; - case "REDUCE_MIN": - case 2: - message.crossSeriesReducer = 2; - break; - case "REDUCE_MAX": - case 3: - message.crossSeriesReducer = 3; - break; - case "REDUCE_SUM": - case 4: - message.crossSeriesReducer = 4; - break; - case "REDUCE_STDDEV": - case 5: - message.crossSeriesReducer = 5; - break; - case "REDUCE_COUNT": - case 6: - message.crossSeriesReducer = 6; - break; - case "REDUCE_COUNT_TRUE": - case 7: - message.crossSeriesReducer = 7; - break; - case "REDUCE_COUNT_FALSE": - case 15: - message.crossSeriesReducer = 15; - break; - case "REDUCE_FRACTION_TRUE": - case 8: - message.crossSeriesReducer = 8; - break; - case "REDUCE_PERCENTILE_99": - case 9: - message.crossSeriesReducer = 9; - break; - case "REDUCE_PERCENTILE_95": - case 10: - message.crossSeriesReducer = 10; - break; - case "REDUCE_PERCENTILE_50": - case 11: - message.crossSeriesReducer = 11; - break; - case "REDUCE_PERCENTILE_05": - case 12: - message.crossSeriesReducer = 12; - break; - } - if (object.groupByFields) { - if (!Array.isArray(object.groupByFields)) - throw TypeError(".google.monitoring.v3.Aggregation.groupByFields: array expected"); - message.groupByFields = []; - for (var i = 0; i < object.groupByFields.length; ++i) - message.groupByFields[i] = String(object.groupByFields[i]); + var message = new $root.google.monitoring.v3.ListAlertPoliciesResponse(); + if (object.alertPolicies) { + if (!Array.isArray(object.alertPolicies)) + throw TypeError(".google.monitoring.v3.ListAlertPoliciesResponse.alertPolicies: array expected"); + message.alertPolicies = []; + for (var i = 0; i < object.alertPolicies.length; ++i) { + if (typeof object.alertPolicies[i] !== "object") + throw TypeError(".google.monitoring.v3.ListAlertPoliciesResponse.alertPolicies: object expected"); + message.alertPolicies[i] = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicies[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * Creates a plain object from a ListAlertPoliciesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @static - * @param {google.monitoring.v3.Aggregation} message Aggregation + * @param {google.monitoring.v3.ListAlertPoliciesResponse} message ListAlertPoliciesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Aggregation.toObject = function toObject(message, options) { + ListAlertPoliciesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.groupByFields = []; - if (options.defaults) { - object.alignmentPeriod = null; - object.perSeriesAligner = options.enums === String ? "ALIGN_NONE" : 0; - object.crossSeriesReducer = options.enums === String ? "REDUCE_NONE" : 0; - } - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) - object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - object.perSeriesAligner = options.enums === String ? $root.google.monitoring.v3.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.v3.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; - if (message.groupByFields && message.groupByFields.length) { - object.groupByFields = []; - for (var j = 0; j < message.groupByFields.length; ++j) - object.groupByFields[j] = message.groupByFields[j]; + object.alertPolicies = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.alertPolicies && message.alertPolicies.length) { + object.alertPolicies = []; + for (var j = 0; j < message.alertPolicies.length; ++j) + object.alertPolicies[j] = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicies[j], options); } return object; }; /** - * Converts this Aggregation to JSON. + * Converts this ListAlertPoliciesResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.Aggregation + * @memberof google.monitoring.v3.ListAlertPoliciesResponse * @instance * @returns {Object.} JSON object */ - Aggregation.prototype.toJSON = function toJSON() { + ListAlertPoliciesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Aligner enum. - * @name google.monitoring.v3.Aggregation.Aligner - * @enum {string} - * @property {number} ALIGN_NONE=0 ALIGN_NONE value - * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value - * @property {number} ALIGN_RATE=2 ALIGN_RATE value - * @property {number} ALIGN_INTERPOLATE=3 ALIGN_INTERPOLATE value - * @property {number} ALIGN_NEXT_OLDER=4 ALIGN_NEXT_OLDER value - * @property {number} ALIGN_MIN=10 ALIGN_MIN value - * @property {number} ALIGN_MAX=11 ALIGN_MAX value - * @property {number} ALIGN_MEAN=12 ALIGN_MEAN value - * @property {number} ALIGN_COUNT=13 ALIGN_COUNT value - * @property {number} ALIGN_SUM=14 ALIGN_SUM value - * @property {number} ALIGN_STDDEV=15 ALIGN_STDDEV value - * @property {number} ALIGN_COUNT_TRUE=16 ALIGN_COUNT_TRUE value - * @property {number} ALIGN_COUNT_FALSE=24 ALIGN_COUNT_FALSE value - * @property {number} ALIGN_FRACTION_TRUE=17 ALIGN_FRACTION_TRUE value - * @property {number} ALIGN_PERCENTILE_99=18 ALIGN_PERCENTILE_99 value - * @property {number} ALIGN_PERCENTILE_95=19 ALIGN_PERCENTILE_95 value - * @property {number} ALIGN_PERCENTILE_50=20 ALIGN_PERCENTILE_50 value - * @property {number} ALIGN_PERCENTILE_05=21 ALIGN_PERCENTILE_05 value - * @property {number} ALIGN_PERCENT_CHANGE=23 ALIGN_PERCENT_CHANGE value - */ - Aggregation.Aligner = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ALIGN_NONE"] = 0; - values[valuesById[1] = "ALIGN_DELTA"] = 1; - values[valuesById[2] = "ALIGN_RATE"] = 2; - values[valuesById[3] = "ALIGN_INTERPOLATE"] = 3; - values[valuesById[4] = "ALIGN_NEXT_OLDER"] = 4; - values[valuesById[10] = "ALIGN_MIN"] = 10; - values[valuesById[11] = "ALIGN_MAX"] = 11; - values[valuesById[12] = "ALIGN_MEAN"] = 12; - values[valuesById[13] = "ALIGN_COUNT"] = 13; - values[valuesById[14] = "ALIGN_SUM"] = 14; - values[valuesById[15] = "ALIGN_STDDEV"] = 15; - values[valuesById[16] = "ALIGN_COUNT_TRUE"] = 16; - values[valuesById[24] = "ALIGN_COUNT_FALSE"] = 24; - values[valuesById[17] = "ALIGN_FRACTION_TRUE"] = 17; - values[valuesById[18] = "ALIGN_PERCENTILE_99"] = 18; - values[valuesById[19] = "ALIGN_PERCENTILE_95"] = 19; - values[valuesById[20] = "ALIGN_PERCENTILE_50"] = 20; - values[valuesById[21] = "ALIGN_PERCENTILE_05"] = 21; - values[valuesById[23] = "ALIGN_PERCENT_CHANGE"] = 23; - return values; - })(); - - /** - * Reducer enum. - * @name google.monitoring.v3.Aggregation.Reducer - * @enum {string} - * @property {number} REDUCE_NONE=0 REDUCE_NONE value - * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value - * @property {number} REDUCE_MIN=2 REDUCE_MIN value - * @property {number} REDUCE_MAX=3 REDUCE_MAX value - * @property {number} REDUCE_SUM=4 REDUCE_SUM value - * @property {number} REDUCE_STDDEV=5 REDUCE_STDDEV value - * @property {number} REDUCE_COUNT=6 REDUCE_COUNT value - * @property {number} REDUCE_COUNT_TRUE=7 REDUCE_COUNT_TRUE value - * @property {number} REDUCE_COUNT_FALSE=15 REDUCE_COUNT_FALSE value - * @property {number} REDUCE_FRACTION_TRUE=8 REDUCE_FRACTION_TRUE value - * @property {number} REDUCE_PERCENTILE_99=9 REDUCE_PERCENTILE_99 value - * @property {number} REDUCE_PERCENTILE_95=10 REDUCE_PERCENTILE_95 value - * @property {number} REDUCE_PERCENTILE_50=11 REDUCE_PERCENTILE_50 value - * @property {number} REDUCE_PERCENTILE_05=12 REDUCE_PERCENTILE_05 value - */ - Aggregation.Reducer = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REDUCE_NONE"] = 0; - values[valuesById[1] = "REDUCE_MEAN"] = 1; - values[valuesById[2] = "REDUCE_MIN"] = 2; - values[valuesById[3] = "REDUCE_MAX"] = 3; - values[valuesById[4] = "REDUCE_SUM"] = 4; - values[valuesById[5] = "REDUCE_STDDEV"] = 5; - values[valuesById[6] = "REDUCE_COUNT"] = 6; - values[valuesById[7] = "REDUCE_COUNT_TRUE"] = 7; - values[valuesById[15] = "REDUCE_COUNT_FALSE"] = 15; - values[valuesById[8] = "REDUCE_FRACTION_TRUE"] = 8; - values[valuesById[9] = "REDUCE_PERCENTILE_99"] = 9; - values[valuesById[10] = "REDUCE_PERCENTILE_95"] = 10; - values[valuesById[11] = "REDUCE_PERCENTILE_50"] = 11; - values[valuesById[12] = "REDUCE_PERCENTILE_05"] = 12; - return values; - })(); - - return Aggregation; - })(); - - /** - * ComparisonType enum. - * @name google.monitoring.v3.ComparisonType - * @enum {string} - * @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value - * @property {number} COMPARISON_GT=1 COMPARISON_GT value - * @property {number} COMPARISON_GE=2 COMPARISON_GE value - * @property {number} COMPARISON_LT=3 COMPARISON_LT value - * @property {number} COMPARISON_LE=4 COMPARISON_LE value - * @property {number} COMPARISON_EQ=5 COMPARISON_EQ value - * @property {number} COMPARISON_NE=6 COMPARISON_NE value - */ - v3.ComparisonType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPARISON_UNSPECIFIED"] = 0; - values[valuesById[1] = "COMPARISON_GT"] = 1; - values[valuesById[2] = "COMPARISON_GE"] = 2; - values[valuesById[3] = "COMPARISON_LT"] = 3; - values[valuesById[4] = "COMPARISON_LE"] = 4; - values[valuesById[5] = "COMPARISON_EQ"] = 5; - values[valuesById[6] = "COMPARISON_NE"] = 6; - return values; - })(); - - /** - * ServiceTier enum. - * @name google.monitoring.v3.ServiceTier - * @enum {string} - * @property {number} SERVICE_TIER_UNSPECIFIED=0 SERVICE_TIER_UNSPECIFIED value - * @property {number} SERVICE_TIER_BASIC=1 SERVICE_TIER_BASIC value - * @property {number} SERVICE_TIER_PREMIUM=2 SERVICE_TIER_PREMIUM value - */ - v3.ServiceTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SERVICE_TIER_BASIC"] = 1; - values[valuesById[2] = "SERVICE_TIER_PREMIUM"] = 2; - return values; + return ListAlertPoliciesResponse; })(); - v3.MutationRecord = (function() { + v3.UpdateAlertPolicyRequest = (function() { /** - * Properties of a MutationRecord. + * Properties of an UpdateAlertPolicyRequest. * @memberof google.monitoring.v3 - * @interface IMutationRecord - * @property {google.protobuf.ITimestamp|null} [mutateTime] MutationRecord mutateTime - * @property {string|null} [mutatedBy] MutationRecord mutatedBy + * @interface IUpdateAlertPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAlertPolicyRequest updateMask + * @property {google.monitoring.v3.IAlertPolicy|null} [alertPolicy] UpdateAlertPolicyRequest alertPolicy */ /** - * Constructs a new MutationRecord. + * Constructs a new UpdateAlertPolicyRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a MutationRecord. - * @implements IMutationRecord + * @classdesc Represents an UpdateAlertPolicyRequest. + * @implements IUpdateAlertPolicyRequest * @constructor - * @param {google.monitoring.v3.IMutationRecord=} [properties] Properties to set + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest=} [properties] Properties to set */ - function MutationRecord(properties) { + function UpdateAlertPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4714,88 +4522,88 @@ } /** - * MutationRecord mutateTime. - * @member {google.protobuf.ITimestamp|null|undefined} mutateTime - * @memberof google.monitoring.v3.MutationRecord + * UpdateAlertPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @instance */ - MutationRecord.prototype.mutateTime = null; + UpdateAlertPolicyRequest.prototype.updateMask = null; /** - * MutationRecord mutatedBy. - * @member {string} mutatedBy - * @memberof google.monitoring.v3.MutationRecord + * UpdateAlertPolicyRequest alertPolicy. + * @member {google.monitoring.v3.IAlertPolicy|null|undefined} alertPolicy + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @instance */ - MutationRecord.prototype.mutatedBy = ""; + UpdateAlertPolicyRequest.prototype.alertPolicy = null; /** - * Creates a new MutationRecord instance using the specified properties. + * Creates a new UpdateAlertPolicyRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static - * @param {google.monitoring.v3.IMutationRecord=} [properties] Properties to set - * @returns {google.monitoring.v3.MutationRecord} MutationRecord instance + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest instance */ - MutationRecord.create = function create(properties) { - return new MutationRecord(properties); + UpdateAlertPolicyRequest.create = function create(properties) { + return new UpdateAlertPolicyRequest(properties); }; /** - * Encodes the specified MutationRecord message. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * Encodes the specified UpdateAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static - * @param {google.monitoring.v3.IMutationRecord} message MutationRecord message or plain object to encode + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} message UpdateAlertPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutationRecord.encode = function encode(message, writer) { + UpdateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) - $root.google.protobuf.Timestamp.encode(message.mutateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mutatedBy); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified MutationRecord message, length delimited. Does not implicitly {@link google.monitoring.v3.MutationRecord.verify|verify} messages. + * Encodes the specified UpdateAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateAlertPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static - * @param {google.monitoring.v3.IMutationRecord} message MutationRecord message or plain object to encode + * @param {google.monitoring.v3.IUpdateAlertPolicyRequest} message UpdateAlertPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MutationRecord.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MutationRecord message from the specified reader or buffer. + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MutationRecord.decode = function decode(reader, length) { + UpdateAlertPolicyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.MutationRecord(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateAlertPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mutateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; case 2: - message.mutatedBy = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4806,359 +4614,126 @@ }; /** - * Decodes a MutationRecord message from the specified reader or buffer, length delimited. + * Decodes an UpdateAlertPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MutationRecord.decodeDelimited = function decodeDelimited(reader) { + UpdateAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MutationRecord message. + * Verifies an UpdateAlertPolicyRequest message. * @function verify - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MutationRecord.verify = function verify(message) { + UpdateAlertPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.mutateTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "mutateTime." + error; + return "updateMask." + error; + } + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) { + var error = $root.google.monitoring.v3.AlertPolicy.verify(message.alertPolicy); + if (error) + return "alertPolicy." + error; } - if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) - if (!$util.isString(message.mutatedBy)) - return "mutatedBy: string expected"; return null; }; /** - * Creates a MutationRecord message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.MutationRecord} MutationRecord + * @returns {google.monitoring.v3.UpdateAlertPolicyRequest} UpdateAlertPolicyRequest */ - MutationRecord.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.MutationRecord) + UpdateAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateAlertPolicyRequest) return object; - var message = new $root.google.monitoring.v3.MutationRecord(); - if (object.mutateTime != null) { - if (typeof object.mutateTime !== "object") - throw TypeError(".google.monitoring.v3.MutationRecord.mutateTime: object expected"); - message.mutateTime = $root.google.protobuf.Timestamp.fromObject(object.mutateTime); + var message = new $root.google.monitoring.v3.UpdateAlertPolicyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateAlertPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.alertPolicy != null) { + if (typeof object.alertPolicy !== "object") + throw TypeError(".google.monitoring.v3.UpdateAlertPolicyRequest.alertPolicy: object expected"); + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.fromObject(object.alertPolicy); } - if (object.mutatedBy != null) - message.mutatedBy = String(object.mutatedBy); return message; }; /** - * Creates a plain object from a MutationRecord message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAlertPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @static - * @param {google.monitoring.v3.MutationRecord} message MutationRecord + * @param {google.monitoring.v3.UpdateAlertPolicyRequest} message UpdateAlertPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MutationRecord.toObject = function toObject(message, options) { + UpdateAlertPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.mutateTime = null; - object.mutatedBy = ""; + object.updateMask = null; + object.alertPolicy = null; } - if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) - object.mutateTime = $root.google.protobuf.Timestamp.toObject(message.mutateTime, options); - if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) - object.mutatedBy = message.mutatedBy; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + object.alertPolicy = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicy, options); return object; }; /** - * Converts this MutationRecord to JSON. + * Converts this UpdateAlertPolicyRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.MutationRecord + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest * @instance * @returns {Object.} JSON object */ - MutationRecord.prototype.toJSON = function toJSON() { + UpdateAlertPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MutationRecord; - })(); - - v3.GroupService = (function() { - - /** - * Constructs a new GroupService service. - * @memberof google.monitoring.v3 - * @classdesc Represents a GroupService - * @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 GroupService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (GroupService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GroupService; - - /** - * Creates new GroupService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.GroupService - * @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 {GroupService} RPC service. Useful where requests and/or responses are streamed. - */ - GroupService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. - * @memberof google.monitoring.v3.GroupService - * @typedef ListGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListGroupsResponse} [response] ListGroupsResponse - */ - - /** - * Calls ListGroups. - * @function listGroups - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IListGroupsRequest} request ListGroupsRequest message or plain object - * @param {google.monitoring.v3.GroupService.ListGroupsCallback} callback Node-style callback called with the error, if any, and ListGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GroupService.prototype.listGroups = function listGroups(request, callback) { - return this.rpcCall(listGroups, $root.google.monitoring.v3.ListGroupsRequest, $root.google.monitoring.v3.ListGroupsResponse, request, callback); - }, "name", { value: "ListGroups" }); - - /** - * Calls ListGroups. - * @function listGroups - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IListGroupsRequest} request ListGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. - * @memberof google.monitoring.v3.GroupService - * @typedef GetGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.Group} [response] Group - */ - - /** - * Calls GetGroup. - * @function getGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IGetGroupRequest} request GetGroupRequest message or plain object - * @param {google.monitoring.v3.GroupService.GetGroupCallback} callback Node-style callback called with the error, if any, and Group - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GroupService.prototype.getGroup = function getGroup(request, callback) { - return this.rpcCall(getGroup, $root.google.monitoring.v3.GetGroupRequest, $root.google.monitoring.v3.Group, request, callback); - }, "name", { value: "GetGroup" }); - - /** - * Calls GetGroup. - * @function getGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IGetGroupRequest} request GetGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. - * @memberof google.monitoring.v3.GroupService - * @typedef CreateGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.Group} [response] Group - */ - - /** - * Calls CreateGroup. - * @function createGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.ICreateGroupRequest} request CreateGroupRequest message or plain object - * @param {google.monitoring.v3.GroupService.CreateGroupCallback} callback Node-style callback called with the error, if any, and Group - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GroupService.prototype.createGroup = function createGroup(request, callback) { - return this.rpcCall(createGroup, $root.google.monitoring.v3.CreateGroupRequest, $root.google.monitoring.v3.Group, request, callback); - }, "name", { value: "CreateGroup" }); - - /** - * Calls CreateGroup. - * @function createGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.ICreateGroupRequest} request CreateGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. - * @memberof google.monitoring.v3.GroupService - * @typedef UpdateGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.Group} [response] Group - */ - - /** - * Calls UpdateGroup. - * @function updateGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IUpdateGroupRequest} request UpdateGroupRequest message or plain object - * @param {google.monitoring.v3.GroupService.UpdateGroupCallback} callback Node-style callback called with the error, if any, and Group - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GroupService.prototype.updateGroup = function updateGroup(request, callback) { - return this.rpcCall(updateGroup, $root.google.monitoring.v3.UpdateGroupRequest, $root.google.monitoring.v3.Group, request, callback); - }, "name", { value: "UpdateGroup" }); - - /** - * Calls UpdateGroup. - * @function updateGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IUpdateGroupRequest} request UpdateGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. - * @memberof google.monitoring.v3.GroupService - * @typedef DeleteGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteGroup. - * @function deleteGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IDeleteGroupRequest} request DeleteGroupRequest message or plain object - * @param {google.monitoring.v3.GroupService.DeleteGroupCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GroupService.prototype.deleteGroup = function deleteGroup(request, callback) { - return this.rpcCall(deleteGroup, $root.google.monitoring.v3.DeleteGroupRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteGroup" }); - - /** - * Calls DeleteGroup. - * @function deleteGroup - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IDeleteGroupRequest} request DeleteGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. - * @memberof google.monitoring.v3.GroupService - * @typedef ListGroupMembersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListGroupMembersResponse} [response] ListGroupMembersResponse - */ - - /** - * Calls ListGroupMembers. - * @function listGroupMembers - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IListGroupMembersRequest} request ListGroupMembersRequest message or plain object - * @param {google.monitoring.v3.GroupService.ListGroupMembersCallback} callback Node-style callback called with the error, if any, and ListGroupMembersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GroupService.prototype.listGroupMembers = function listGroupMembers(request, callback) { - return this.rpcCall(listGroupMembers, $root.google.monitoring.v3.ListGroupMembersRequest, $root.google.monitoring.v3.ListGroupMembersResponse, request, callback); - }, "name", { value: "ListGroupMembers" }); - - /** - * Calls ListGroupMembers. - * @function listGroupMembers - * @memberof google.monitoring.v3.GroupService - * @instance - * @param {google.monitoring.v3.IListGroupMembersRequest} request ListGroupMembersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return GroupService; + return UpdateAlertPolicyRequest; })(); - v3.ListGroupsRequest = (function() { + v3.DeleteAlertPolicyRequest = (function() { /** - * Properties of a ListGroupsRequest. + * Properties of a DeleteAlertPolicyRequest. * @memberof google.monitoring.v3 - * @interface IListGroupsRequest - * @property {string|null} [name] ListGroupsRequest name - * @property {string|null} [childrenOfGroup] ListGroupsRequest childrenOfGroup - * @property {string|null} [ancestorsOfGroup] ListGroupsRequest ancestorsOfGroup - * @property {string|null} [descendantsOfGroup] ListGroupsRequest descendantsOfGroup - * @property {number|null} [pageSize] ListGroupsRequest pageSize - * @property {string|null} [pageToken] ListGroupsRequest pageToken + * @interface IDeleteAlertPolicyRequest + * @property {string|null} [name] DeleteAlertPolicyRequest name */ /** - * Constructs a new ListGroupsRequest. + * Constructs a new DeleteAlertPolicyRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListGroupsRequest. - * @implements IListGroupsRequest + * @classdesc Represents a DeleteAlertPolicyRequest. + * @implements IDeleteAlertPolicyRequest * @constructor - * @param {google.monitoring.v3.IListGroupsRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest=} [properties] Properties to set */ - function ListGroupsRequest(properties) { + function DeleteAlertPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5166,154 +4741,75 @@ } /** - * ListGroupsRequest name. + * DeleteAlertPolicyRequest name. * @member {string} name - * @memberof google.monitoring.v3.ListGroupsRequest - * @instance - */ - ListGroupsRequest.prototype.name = ""; - - /** - * ListGroupsRequest childrenOfGroup. - * @member {string} childrenOfGroup - * @memberof google.monitoring.v3.ListGroupsRequest - * @instance - */ - ListGroupsRequest.prototype.childrenOfGroup = ""; - - /** - * ListGroupsRequest ancestorsOfGroup. - * @member {string} ancestorsOfGroup - * @memberof google.monitoring.v3.ListGroupsRequest - * @instance - */ - ListGroupsRequest.prototype.ancestorsOfGroup = ""; - - /** - * ListGroupsRequest descendantsOfGroup. - * @member {string} descendantsOfGroup - * @memberof google.monitoring.v3.ListGroupsRequest - * @instance - */ - ListGroupsRequest.prototype.descendantsOfGroup = ""; - - /** - * ListGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListGroupsRequest - * @instance - */ - ListGroupsRequest.prototype.pageSize = 0; - - /** - * ListGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListGroupsRequest - * @instance - */ - ListGroupsRequest.prototype.pageToken = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ListGroupsRequest filter. - * @member {"childrenOfGroup"|"ancestorsOfGroup"|"descendantsOfGroup"|undefined} filter - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @instance */ - Object.defineProperty(ListGroupsRequest.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["childrenOfGroup", "ancestorsOfGroup", "descendantsOfGroup"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteAlertPolicyRequest.prototype.name = ""; /** - * Creates a new ListGroupsRequest instance using the specified properties. + * Creates a new DeleteAlertPolicyRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static - * @param {google.monitoring.v3.IListGroupsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest instance + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest instance */ - ListGroupsRequest.create = function create(properties) { - return new ListGroupsRequest(properties); + DeleteAlertPolicyRequest.create = function create(properties) { + return new DeleteAlertPolicyRequest(properties); }; /** - * Encodes the specified ListGroupsRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * Encodes the specified DeleteAlertPolicyRequest message. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static - * @param {google.monitoring.v3.IListGroupsRequest} message ListGroupsRequest message or plain object to encode + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} message DeleteAlertPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupsRequest.encode = function encode(message, writer) { + DeleteAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childrenOfGroup); - if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorsOfGroup); - if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.descendantsOfGroup); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified ListGroupsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. + * Encodes the specified DeleteAlertPolicyRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteAlertPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static - * @param {google.monitoring.v3.IListGroupsRequest} message ListGroupsRequest message or plain object to encode + * @param {google.monitoring.v3.IDeleteAlertPolicyRequest} message DeleteAlertPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAlertPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListGroupsRequest message from the specified reader or buffer. + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupsRequest.decode = function decode(reader, length) { + DeleteAlertPolicyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteAlertPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: - message.name = reader.string(); - break; - case 2: - message.childrenOfGroup = reader.string(); - break; case 3: - message.ancestorsOfGroup = reader.string(); - break; - case 4: - message.descendantsOfGroup = reader.string(); - break; - case 5: - message.pageSize = reader.int32(); - break; - case 6: - message.pageToken = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -5324,167 +4820,108 @@ }; /** - * Decodes a ListGroupsRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAlertPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteAlertPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListGroupsRequest message. + * Verifies a DeleteAlertPolicyRequest message. * @function verify - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListGroupsRequest.verify = function verify(message) { + DeleteAlertPolicyRequest.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.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) { - properties.filter = 1; - if (!$util.isString(message.childrenOfGroup)) - return "childrenOfGroup: string expected"; - } - if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.ancestorsOfGroup)) - return "ancestorsOfGroup: string expected"; - } - if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - if (!$util.isString(message.descendantsOfGroup)) - return "descendantsOfGroup: 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 ListGroupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAlertPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest + * @returns {google.monitoring.v3.DeleteAlertPolicyRequest} DeleteAlertPolicyRequest */ - ListGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListGroupsRequest) + DeleteAlertPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteAlertPolicyRequest) return object; - var message = new $root.google.monitoring.v3.ListGroupsRequest(); + var message = new $root.google.monitoring.v3.DeleteAlertPolicyRequest(); if (object.name != null) message.name = String(object.name); - if (object.childrenOfGroup != null) - message.childrenOfGroup = String(object.childrenOfGroup); - if (object.ancestorsOfGroup != null) - message.ancestorsOfGroup = String(object.ancestorsOfGroup); - if (object.descendantsOfGroup != null) - message.descendantsOfGroup = String(object.descendantsOfGroup); - 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 ListGroupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAlertPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @static - * @param {google.monitoring.v3.ListGroupsRequest} message ListGroupsRequest + * @param {google.monitoring.v3.DeleteAlertPolicyRequest} message DeleteAlertPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListGroupsRequest.toObject = function toObject(message, options) { + DeleteAlertPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; + if (options.defaults) object.name = ""; - } - if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) { - object.childrenOfGroup = message.childrenOfGroup; - if (options.oneofs) - object.filter = "childrenOfGroup"; - } - if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) { - object.ancestorsOfGroup = message.ancestorsOfGroup; - if (options.oneofs) - object.filter = "ancestorsOfGroup"; - } - if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) { - object.descendantsOfGroup = message.descendantsOfGroup; - if (options.oneofs) - object.filter = "descendantsOfGroup"; - } - 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; }; /** - * Converts this ListGroupsRequest to JSON. + * Converts this DeleteAlertPolicyRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListGroupsRequest + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest * @instance * @returns {Object.} JSON object */ - ListGroupsRequest.prototype.toJSON = function toJSON() { + DeleteAlertPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListGroupsRequest; + return DeleteAlertPolicyRequest; })(); - v3.ListGroupsResponse = (function() { + v3.DroppedLabels = (function() { /** - * Properties of a ListGroupsResponse. + * Properties of a DroppedLabels. * @memberof google.monitoring.v3 - * @interface IListGroupsResponse - * @property {Array.|null} [group] ListGroupsResponse group - * @property {string|null} [nextPageToken] ListGroupsResponse nextPageToken + * @interface IDroppedLabels + * @property {Object.|null} [label] DroppedLabels label */ /** - * Constructs a new ListGroupsResponse. + * Constructs a new DroppedLabels. * @memberof google.monitoring.v3 - * @classdesc Represents a ListGroupsResponse. - * @implements IListGroupsResponse + * @classdesc Represents a DroppedLabels. + * @implements IDroppedLabels * @constructor - * @param {google.monitoring.v3.IListGroupsResponse=} [properties] Properties to set + * @param {google.monitoring.v3.IDroppedLabels=} [properties] Properties to set */ - function ListGroupsResponse(properties) { - this.group = []; + function DroppedLabels(properties) { + this.label = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5492,91 +4929,81 @@ } /** - * ListGroupsResponse group. - * @member {Array.} group - * @memberof google.monitoring.v3.ListGroupsResponse + * DroppedLabels label. + * @member {Object.} label + * @memberof google.monitoring.v3.DroppedLabels * @instance */ - ListGroupsResponse.prototype.group = $util.emptyArray; - - /** - * ListGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListGroupsResponse - * @instance - */ - ListGroupsResponse.prototype.nextPageToken = ""; + DroppedLabels.prototype.label = $util.emptyObject; /** - * Creates a new ListGroupsResponse instance using the specified properties. + * Creates a new DroppedLabels instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static - * @param {google.monitoring.v3.IListGroupsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse instance + * @param {google.monitoring.v3.IDroppedLabels=} [properties] Properties to set + * @returns {google.monitoring.v3.DroppedLabels} DroppedLabels instance */ - ListGroupsResponse.create = function create(properties) { - return new ListGroupsResponse(properties); + DroppedLabels.create = function create(properties) { + return new DroppedLabels(properties); }; /** - * Encodes the specified ListGroupsResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * Encodes the specified DroppedLabels message. Does not implicitly {@link google.monitoring.v3.DroppedLabels.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static - * @param {google.monitoring.v3.IListGroupsResponse} message ListGroupsResponse message or plain object to encode + * @param {google.monitoring.v3.IDroppedLabels} message DroppedLabels message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupsResponse.encode = function encode(message, writer) { + DroppedLabels.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && message.group.length) - for (var i = 0; i < message.group.length; ++i) - $root.google.monitoring.v3.Group.encode(message.group[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.label != null && message.hasOwnProperty("label")) + for (var keys = Object.keys(message.label), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.label[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ListGroupsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. + * Encodes the specified DroppedLabels message, length delimited. Does not implicitly {@link google.monitoring.v3.DroppedLabels.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static - * @param {google.monitoring.v3.IListGroupsResponse} message ListGroupsResponse message or plain object to encode + * @param {google.monitoring.v3.IDroppedLabels} message DroppedLabels message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DroppedLabels.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListGroupsResponse message from the specified reader or buffer. + * Decodes a DroppedLabels message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse + * @returns {google.monitoring.v3.DroppedLabels} DroppedLabels * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupsResponse.decode = function decode(reader, length) { + DroppedLabels.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DroppedLabels(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.group && message.group.length)) - message.group = []; - message.group.push($root.google.monitoring.v3.Group.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + reader.skip().pos++; + if (message.label === $util.emptyObject) + message.label = {}; + key = reader.string(); + reader.pos++; + message.label[key] = reader.string(); break; default: reader.skipType(tag & 7); @@ -5587,133 +5014,125 @@ }; /** - * Decodes a ListGroupsResponse message from the specified reader or buffer, length delimited. + * Decodes a DroppedLabels message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse + * @returns {google.monitoring.v3.DroppedLabels} DroppedLabels * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + DroppedLabels.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListGroupsResponse message. + * Verifies a DroppedLabels message. * @function verify - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListGroupsResponse.verify = function verify(message) { + DroppedLabels.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.group != null && message.hasOwnProperty("group")) { - if (!Array.isArray(message.group)) - return "group: array expected"; - for (var i = 0; i < message.group.length; ++i) { - var error = $root.google.monitoring.v3.Group.verify(message.group[i]); - if (error) - return "group." + error; - } + if (message.label != null && message.hasOwnProperty("label")) { + if (!$util.isObject(message.label)) + return "label: object expected"; + var key = Object.keys(message.label); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.label[key[i]])) + return "label: string{k:string} expected"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListGroupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DroppedLabels message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse + * @returns {google.monitoring.v3.DroppedLabels} DroppedLabels */ - ListGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListGroupsResponse) + DroppedLabels.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DroppedLabels) return object; - var message = new $root.google.monitoring.v3.ListGroupsResponse(); - if (object.group) { - if (!Array.isArray(object.group)) - throw TypeError(".google.monitoring.v3.ListGroupsResponse.group: array expected"); - message.group = []; - for (var i = 0; i < object.group.length; ++i) { - if (typeof object.group[i] !== "object") - throw TypeError(".google.monitoring.v3.ListGroupsResponse.group: object expected"); - message.group[i] = $root.google.monitoring.v3.Group.fromObject(object.group[i]); - } + var message = new $root.google.monitoring.v3.DroppedLabels(); + if (object.label) { + if (typeof object.label !== "object") + throw TypeError(".google.monitoring.v3.DroppedLabels.label: object expected"); + message.label = {}; + for (var keys = Object.keys(object.label), i = 0; i < keys.length; ++i) + message.label[keys[i]] = String(object.label[keys[i]]); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListGroupsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DroppedLabels message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @static - * @param {google.monitoring.v3.ListGroupsResponse} message ListGroupsResponse + * @param {google.monitoring.v3.DroppedLabels} message DroppedLabels * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListGroupsResponse.toObject = function toObject(message, options) { + DroppedLabels.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.group = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.group && message.group.length) { - object.group = []; - for (var j = 0; j < message.group.length; ++j) - object.group[j] = $root.google.monitoring.v3.Group.toObject(message.group[j], options); + if (options.objects || options.defaults) + object.label = {}; + var keys2; + if (message.label && (keys2 = Object.keys(message.label)).length) { + object.label = {}; + for (var j = 0; j < keys2.length; ++j) + object.label[keys2[j]] = message.label[keys2[j]]; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListGroupsResponse to JSON. + * Converts this DroppedLabels to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListGroupsResponse + * @memberof google.monitoring.v3.DroppedLabels * @instance * @returns {Object.} JSON object */ - ListGroupsResponse.prototype.toJSON = function toJSON() { + DroppedLabels.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListGroupsResponse; + return DroppedLabels; })(); - v3.GetGroupRequest = (function() { + v3.Group = (function() { /** - * Properties of a GetGroupRequest. + * Properties of a Group. * @memberof google.monitoring.v3 - * @interface IGetGroupRequest - * @property {string|null} [name] GetGroupRequest name + * @interface IGroup + * @property {string|null} [name] Group name + * @property {string|null} [displayName] Group displayName + * @property {string|null} [parentName] Group parentName + * @property {string|null} [filter] Group filter + * @property {boolean|null} [isCluster] Group isCluster */ /** - * Constructs a new GetGroupRequest. + * Constructs a new Group. * @memberof google.monitoring.v3 - * @classdesc Represents a GetGroupRequest. - * @implements IGetGroupRequest + * @classdesc Represents a Group. + * @implements IGroup * @constructor - * @param {google.monitoring.v3.IGetGroupRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGroup=} [properties] Properties to set */ - function GetGroupRequest(properties) { + function Group(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5721,76 +5140,128 @@ } /** - * GetGroupRequest name. + * Group name. * @member {string} name - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @instance */ - GetGroupRequest.prototype.name = ""; + Group.prototype.name = ""; /** - * Creates a new GetGroupRequest instance using the specified properties. + * Group displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.displayName = ""; + + /** + * Group parentName. + * @member {string} parentName + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.parentName = ""; + + /** + * Group filter. + * @member {string} filter + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.filter = ""; + + /** + * Group isCluster. + * @member {boolean} isCluster + * @memberof google.monitoring.v3.Group + * @instance + */ + Group.prototype.isCluster = false; + + /** + * Creates a new Group instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static - * @param {google.monitoring.v3.IGetGroupRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest instance + * @param {google.monitoring.v3.IGroup=} [properties] Properties to set + * @returns {google.monitoring.v3.Group} Group instance */ - GetGroupRequest.create = function create(properties) { - return new GetGroupRequest(properties); + Group.create = function create(properties) { + return new Group(properties); }; /** - * Encodes the specified GetGroupRequest message. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * Encodes the specified Group message. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static - * @param {google.monitoring.v3.IGetGroupRequest} message GetGroupRequest message or plain object to encode + * @param {google.monitoring.v3.IGroup} message Group message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGroupRequest.encode = function encode(message, writer) { + Group.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.parentName != null && message.hasOwnProperty("parentName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentName); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.isCluster != null && message.hasOwnProperty("isCluster")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isCluster); return writer; }; /** - * Encodes the specified GetGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. + * Encodes the specified Group message, length delimited. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static - * @param {google.monitoring.v3.IGetGroupRequest} message GetGroupRequest message or plain object to encode + * @param {google.monitoring.v3.IGroup} message Group message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + Group.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetGroupRequest message from the specified reader or buffer. + * Decodes a Group message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest + * @returns {google.monitoring.v3.Group} Group * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGroupRequest.decode = function decode(reader, length) { + Group.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Group(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: + case 1: message.name = reader.string(); break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.parentName = reader.string(); + break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.isCluster = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -5800,345 +5271,378 @@ }; /** - * Decodes a GetGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a Group message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest + * @returns {google.monitoring.v3.Group} Group * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetGroupRequest.decodeDelimited = function decodeDelimited(reader) { + Group.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetGroupRequest message. + * Verifies a Group message. * @function verify - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetGroupRequest.verify = function verify(message) { + Group.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.parentName != null && message.hasOwnProperty("parentName")) + if (!$util.isString(message.parentName)) + return "parentName: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.isCluster != null && message.hasOwnProperty("isCluster")) + if (typeof message.isCluster !== "boolean") + return "isCluster: boolean expected"; return null; }; /** - * Creates a GetGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Group message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest + * @returns {google.monitoring.v3.Group} Group */ - GetGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetGroupRequest) + Group.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Group) return object; - var message = new $root.google.monitoring.v3.GetGroupRequest(); + var message = new $root.google.monitoring.v3.Group(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.parentName != null) + message.parentName = String(object.parentName); + if (object.filter != null) + message.filter = String(object.filter); + if (object.isCluster != null) + message.isCluster = Boolean(object.isCluster); return message; }; /** - * Creates a plain object from a GetGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a Group message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @static - * @param {google.monitoring.v3.GetGroupRequest} message GetGroupRequest + * @param {google.monitoring.v3.Group} message Group * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetGroupRequest.toObject = function toObject(message, options) { + Group.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.parentName = ""; + object.filter = ""; + object.isCluster = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.parentName != null && message.hasOwnProperty("parentName")) + object.parentName = message.parentName; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.isCluster != null && message.hasOwnProperty("isCluster")) + object.isCluster = message.isCluster; return object; }; /** - * Converts this GetGroupRequest to JSON. + * Converts this Group to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetGroupRequest + * @memberof google.monitoring.v3.Group * @instance * @returns {Object.} JSON object */ - GetGroupRequest.prototype.toJSON = function toJSON() { + Group.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetGroupRequest; + return Group; })(); - v3.CreateGroupRequest = (function() { + v3.GroupService = (function() { /** - * Properties of a CreateGroupRequest. + * Constructs a new GroupService service. * @memberof google.monitoring.v3 - * @interface ICreateGroupRequest - * @property {string|null} [name] CreateGroupRequest name - * @property {google.monitoring.v3.IGroup|null} [group] CreateGroupRequest group - * @property {boolean|null} [validateOnly] CreateGroupRequest validateOnly + * @classdesc Represents a GroupService + * @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 GroupService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (GroupService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GroupService; /** - * Constructs a new CreateGroupRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a CreateGroupRequest. - * @implements ICreateGroupRequest - * @constructor - * @param {google.monitoring.v3.ICreateGroupRequest=} [properties] Properties to set + * Creates new GroupService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.GroupService + * @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 {GroupService} RPC service. Useful where requests and/or responses are streamed. */ - function CreateGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + GroupService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * CreateGroupRequest name. - * @member {string} name - * @memberof google.monitoring.v3.CreateGroupRequest - * @instance + * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. + * @memberof google.monitoring.v3.GroupService + * @typedef ListGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListGroupsResponse} [response] ListGroupsResponse */ - CreateGroupRequest.prototype.name = ""; /** - * CreateGroupRequest group. - * @member {google.monitoring.v3.IGroup|null|undefined} group - * @memberof google.monitoring.v3.CreateGroupRequest + * Calls ListGroups. + * @function listGroups + * @memberof google.monitoring.v3.GroupService * @instance + * @param {google.monitoring.v3.IListGroupsRequest} request ListGroupsRequest message or plain object + * @param {google.monitoring.v3.GroupService.ListGroupsCallback} callback Node-style callback called with the error, if any, and ListGroupsResponse + * @returns {undefined} + * @variation 1 */ - CreateGroupRequest.prototype.group = null; + Object.defineProperty(GroupService.prototype.listGroups = function listGroups(request, callback) { + return this.rpcCall(listGroups, $root.google.monitoring.v3.ListGroupsRequest, $root.google.monitoring.v3.ListGroupsResponse, request, callback); + }, "name", { value: "ListGroups" }); /** - * CreateGroupRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.monitoring.v3.CreateGroupRequest + * Calls ListGroups. + * @function listGroups + * @memberof google.monitoring.v3.GroupService * @instance + * @param {google.monitoring.v3.IListGroupsRequest} request ListGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateGroupRequest.prototype.validateOnly = false; /** - * Creates a new CreateGroupRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {google.monitoring.v3.ICreateGroupRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest instance + * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef GetGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Group} [response] Group */ - CreateGroupRequest.create = function create(properties) { - return new CreateGroupRequest(properties); - }; /** - * Encodes the specified CreateGroupRequest message. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {google.monitoring.v3.ICreateGroupRequest} message CreateGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetGroup. + * @function getGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IGetGroupRequest} request GetGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.GetGroupCallback} callback Node-style callback called with the error, if any, and Group + * @returns {undefined} + * @variation 1 */ - CreateGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.group != null && message.hasOwnProperty("group")) - $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; + Object.defineProperty(GroupService.prototype.getGroup = function getGroup(request, callback) { + return this.rpcCall(getGroup, $root.google.monitoring.v3.GetGroupRequest, $root.google.monitoring.v3.Group, request, callback); + }, "name", { value: "GetGroup" }); /** - * Encodes the specified CreateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {google.monitoring.v3.ICreateGroupRequest} message CreateGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetGroup. + * @function getGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IGetGroupRequest} request GetGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a CreateGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest - * @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.monitoring.v3.GroupService#createGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef CreateGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Group} [response] Group */ - CreateGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 2: - message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a CreateGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateGroup. + * @function createGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.ICreateGroupRequest} request CreateGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.CreateGroupCallback} callback Node-style callback called with the error, if any, and Group + * @returns {undefined} + * @variation 1 */ - CreateGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(GroupService.prototype.createGroup = function createGroup(request, callback) { + return this.rpcCall(createGroup, $root.google.monitoring.v3.CreateGroupRequest, $root.google.monitoring.v3.Group, request, callback); + }, "name", { value: "CreateGroup" }); /** - * Verifies a CreateGroupRequest message. - * @function verify - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateGroup. + * @function createGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.ICreateGroupRequest} request CreateGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateGroupRequest.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.group != null && message.hasOwnProperty("group")) { - var error = $root.google.monitoring.v3.Group.verify(message.group); - if (error) - return "group." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; /** - * Creates a CreateGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest + * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef UpdateGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Group} [response] Group */ - CreateGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateGroupRequest) - return object; - var message = new $root.google.monitoring.v3.CreateGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.group != null) { - if (typeof object.group !== "object") - throw TypeError(".google.monitoring.v3.CreateGroupRequest.group: object expected"); - message.group = $root.google.monitoring.v3.Group.fromObject(object.group); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; /** - * Creates a plain object from a CreateGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.CreateGroupRequest - * @static - * @param {google.monitoring.v3.CreateGroupRequest} message CreateGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateGroup. + * @function updateGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IUpdateGroupRequest} request UpdateGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.UpdateGroupCallback} callback Node-style callback called with the error, if any, and Group + * @returns {undefined} + * @variation 1 */ - CreateGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.group = null; - object.validateOnly = false; - object.name = ""; - } - if (message.group != null && message.hasOwnProperty("group")) - object.group = $root.google.monitoring.v3.Group.toObject(message.group, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + Object.defineProperty(GroupService.prototype.updateGroup = function updateGroup(request, callback) { + return this.rpcCall(updateGroup, $root.google.monitoring.v3.UpdateGroupRequest, $root.google.monitoring.v3.Group, request, callback); + }, "name", { value: "UpdateGroup" }); /** - * Converts this CreateGroupRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.CreateGroupRequest + * Calls UpdateGroup. + * @function updateGroup + * @memberof google.monitoring.v3.GroupService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IUpdateGroupRequest} request UpdateGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return CreateGroupRequest; + /** + * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. + * @memberof google.monitoring.v3.GroupService + * @typedef DeleteGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteGroup. + * @function deleteGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IDeleteGroupRequest} request DeleteGroupRequest message or plain object + * @param {google.monitoring.v3.GroupService.DeleteGroupCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.deleteGroup = function deleteGroup(request, callback) { + return this.rpcCall(deleteGroup, $root.google.monitoring.v3.DeleteGroupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGroup" }); + + /** + * Calls DeleteGroup. + * @function deleteGroup + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IDeleteGroupRequest} request DeleteGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. + * @memberof google.monitoring.v3.GroupService + * @typedef ListGroupMembersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListGroupMembersResponse} [response] ListGroupMembersResponse + */ + + /** + * Calls ListGroupMembers. + * @function listGroupMembers + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IListGroupMembersRequest} request ListGroupMembersRequest message or plain object + * @param {google.monitoring.v3.GroupService.ListGroupMembersCallback} callback Node-style callback called with the error, if any, and ListGroupMembersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GroupService.prototype.listGroupMembers = function listGroupMembers(request, callback) { + return this.rpcCall(listGroupMembers, $root.google.monitoring.v3.ListGroupMembersRequest, $root.google.monitoring.v3.ListGroupMembersResponse, request, callback); + }, "name", { value: "ListGroupMembers" }); + + /** + * Calls ListGroupMembers. + * @function listGroupMembers + * @memberof google.monitoring.v3.GroupService + * @instance + * @param {google.monitoring.v3.IListGroupMembersRequest} request ListGroupMembersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return GroupService; })(); - v3.UpdateGroupRequest = (function() { + v3.ListGroupsRequest = (function() { /** - * Properties of an UpdateGroupRequest. + * Properties of a ListGroupsRequest. * @memberof google.monitoring.v3 - * @interface IUpdateGroupRequest - * @property {google.monitoring.v3.IGroup|null} [group] UpdateGroupRequest group - * @property {boolean|null} [validateOnly] UpdateGroupRequest validateOnly + * @interface IListGroupsRequest + * @property {string|null} [name] ListGroupsRequest name + * @property {string|null} [childrenOfGroup] ListGroupsRequest childrenOfGroup + * @property {string|null} [ancestorsOfGroup] ListGroupsRequest ancestorsOfGroup + * @property {string|null} [descendantsOfGroup] ListGroupsRequest descendantsOfGroup + * @property {number|null} [pageSize] ListGroupsRequest pageSize + * @property {string|null} [pageToken] ListGroupsRequest pageToken */ /** - * Constructs a new UpdateGroupRequest. + * Constructs a new ListGroupsRequest. * @memberof google.monitoring.v3 - * @classdesc Represents an UpdateGroupRequest. - * @implements IUpdateGroupRequest + * @classdesc Represents a ListGroupsRequest. + * @implements IListGroupsRequest * @constructor - * @param {google.monitoring.v3.IUpdateGroupRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListGroupsRequest=} [properties] Properties to set */ - function UpdateGroupRequest(properties) { + function ListGroupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6146,88 +5650,154 @@ } /** - * UpdateGroupRequest group. - * @member {google.monitoring.v3.IGroup|null|undefined} group - * @memberof google.monitoring.v3.UpdateGroupRequest + * ListGroupsRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListGroupsRequest * @instance */ - UpdateGroupRequest.prototype.group = null; + ListGroupsRequest.prototype.name = ""; /** - * UpdateGroupRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.monitoring.v3.UpdateGroupRequest + * ListGroupsRequest childrenOfGroup. + * @member {string} childrenOfGroup + * @memberof google.monitoring.v3.ListGroupsRequest * @instance */ - UpdateGroupRequest.prototype.validateOnly = false; + ListGroupsRequest.prototype.childrenOfGroup = ""; /** - * Creates a new UpdateGroupRequest instance using the specified properties. + * ListGroupsRequest ancestorsOfGroup. + * @member {string} ancestorsOfGroup + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.ancestorsOfGroup = ""; + + /** + * ListGroupsRequest descendantsOfGroup. + * @member {string} descendantsOfGroup + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.descendantsOfGroup = ""; + + /** + * ListGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.pageSize = 0; + + /** + * ListGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + ListGroupsRequest.prototype.pageToken = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ListGroupsRequest filter. + * @member {"childrenOfGroup"|"ancestorsOfGroup"|"descendantsOfGroup"|undefined} filter + * @memberof google.monitoring.v3.ListGroupsRequest + * @instance + */ + Object.defineProperty(ListGroupsRequest.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["childrenOfGroup", "ancestorsOfGroup", "descendantsOfGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListGroupsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static - * @param {google.monitoring.v3.IUpdateGroupRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest instance + * @param {google.monitoring.v3.IListGroupsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest instance */ - UpdateGroupRequest.create = function create(properties) { - return new UpdateGroupRequest(properties); + ListGroupsRequest.create = function create(properties) { + return new ListGroupsRequest(properties); }; /** - * Encodes the specified UpdateGroupRequest message. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * Encodes the specified ListGroupsRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static - * @param {google.monitoring.v3.IUpdateGroupRequest} message UpdateGroupRequest message or plain object to encode + * @param {google.monitoring.v3.IListGroupsRequest} message ListGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateGroupRequest.encode = function encode(message, writer) { + ListGroupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && message.hasOwnProperty("group")) - $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childrenOfGroup); + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorsOfGroup); + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.descendantsOfGroup); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; /** - * Encodes the specified UpdateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * Encodes the specified ListGroupsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static - * @param {google.monitoring.v3.IUpdateGroupRequest} message UpdateGroupRequest message or plain object to encode + * @param {google.monitoring.v3.IListGroupsRequest} message ListGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateGroupRequest message from the specified reader or buffer. + * Decodes a ListGroupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateGroupRequest.decode = function decode(reader, length) { + ListGroupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 7: + message.name = reader.string(); + break; case 2: - message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); + message.childrenOfGroup = reader.string(); break; case 3: - message.validateOnly = reader.bool(); + message.ancestorsOfGroup = reader.string(); + break; + case 4: + message.descendantsOfGroup = reader.string(); + break; + case 5: + message.pageSize = reader.int32(); + break; + case 6: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6238,122 +5808,167 @@ }; /** - * Decodes an UpdateGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGroupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateGroupRequest.decodeDelimited = function decodeDelimited(reader) { + ListGroupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateGroupRequest message. + * Verifies a ListGroupsRequest message. * @function verify - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateGroupRequest.verify = function verify(message) { + ListGroupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.group != null && message.hasOwnProperty("group")) { - var error = $root.google.monitoring.v3.Group.verify(message.group); - if (error) - return "group." + error; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) { + properties.filter = 1; + if (!$util.isString(message.childrenOfGroup)) + return "childrenOfGroup: string expected"; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.ancestorsOfGroup)) + return "ancestorsOfGroup: string expected"; + } + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + if (!$util.isString(message.descendantsOfGroup)) + return "descendantsOfGroup: 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 UpdateGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGroupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @returns {google.monitoring.v3.ListGroupsRequest} ListGroupsRequest */ - UpdateGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.UpdateGroupRequest) + ListGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupsRequest) return object; - var message = new $root.google.monitoring.v3.UpdateGroupRequest(); - if (object.group != null) { - if (typeof object.group !== "object") - throw TypeError(".google.monitoring.v3.UpdateGroupRequest.group: object expected"); - message.group = $root.google.monitoring.v3.Group.fromObject(object.group); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.monitoring.v3.ListGroupsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.childrenOfGroup != null) + message.childrenOfGroup = String(object.childrenOfGroup); + if (object.ancestorsOfGroup != null) + message.ancestorsOfGroup = String(object.ancestorsOfGroup); + if (object.descendantsOfGroup != null) + message.descendantsOfGroup = String(object.descendantsOfGroup); + 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 UpdateGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGroupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @static - * @param {google.monitoring.v3.UpdateGroupRequest} message UpdateGroupRequest + * @param {google.monitoring.v3.ListGroupsRequest} message ListGroupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateGroupRequest.toObject = function toObject(message, options) { + ListGroupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.group = null; - object.validateOnly = false; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; } - if (message.group != null && message.hasOwnProperty("group")) - object.group = $root.google.monitoring.v3.Group.toObject(message.group, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) { + object.childrenOfGroup = message.childrenOfGroup; + if (options.oneofs) + object.filter = "childrenOfGroup"; + } + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) { + object.ancestorsOfGroup = message.ancestorsOfGroup; + if (options.oneofs) + object.filter = "ancestorsOfGroup"; + } + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) { + object.descendantsOfGroup = message.descendantsOfGroup; + if (options.oneofs) + object.filter = "descendantsOfGroup"; + } + 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; }; /** - * Converts this UpdateGroupRequest to JSON. + * Converts this ListGroupsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.UpdateGroupRequest + * @memberof google.monitoring.v3.ListGroupsRequest * @instance * @returns {Object.} JSON object */ - UpdateGroupRequest.prototype.toJSON = function toJSON() { + ListGroupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateGroupRequest; + return ListGroupsRequest; })(); - v3.DeleteGroupRequest = (function() { + v3.ListGroupsResponse = (function() { /** - * Properties of a DeleteGroupRequest. + * Properties of a ListGroupsResponse. * @memberof google.monitoring.v3 - * @interface IDeleteGroupRequest - * @property {string|null} [name] DeleteGroupRequest name - * @property {boolean|null} [recursive] DeleteGroupRequest recursive + * @interface IListGroupsResponse + * @property {Array.|null} [group] ListGroupsResponse group + * @property {string|null} [nextPageToken] ListGroupsResponse nextPageToken */ /** - * Constructs a new DeleteGroupRequest. + * Constructs a new ListGroupsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteGroupRequest. - * @implements IDeleteGroupRequest + * @classdesc Represents a ListGroupsResponse. + * @implements IListGroupsResponse * @constructor - * @param {google.monitoring.v3.IDeleteGroupRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListGroupsResponse=} [properties] Properties to set */ - function DeleteGroupRequest(properties) { + function ListGroupsResponse(properties) { + this.group = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6361,88 +5976,91 @@ } /** - * DeleteGroupRequest name. - * @member {string} name - * @memberof google.monitoring.v3.DeleteGroupRequest + * ListGroupsResponse group. + * @member {Array.} group + * @memberof google.monitoring.v3.ListGroupsResponse * @instance */ - DeleteGroupRequest.prototype.name = ""; + ListGroupsResponse.prototype.group = $util.emptyArray; /** - * DeleteGroupRequest recursive. - * @member {boolean} recursive - * @memberof google.monitoring.v3.DeleteGroupRequest + * ListGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListGroupsResponse * @instance */ - DeleteGroupRequest.prototype.recursive = false; + ListGroupsResponse.prototype.nextPageToken = ""; /** - * Creates a new DeleteGroupRequest instance using the specified properties. + * Creates a new ListGroupsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static - * @param {google.monitoring.v3.IDeleteGroupRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest instance + * @param {google.monitoring.v3.IListGroupsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse instance */ - DeleteGroupRequest.create = function create(properties) { - return new DeleteGroupRequest(properties); + ListGroupsResponse.create = function create(properties) { + return new ListGroupsResponse(properties); }; /** - * Encodes the specified DeleteGroupRequest message. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * Encodes the specified ListGroupsResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static - * @param {google.monitoring.v3.IDeleteGroupRequest} message DeleteGroupRequest message or plain object to encode + * @param {google.monitoring.v3.IListGroupsResponse} message ListGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteGroupRequest.encode = function encode(message, writer) { + ListGroupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.recursive != null && message.hasOwnProperty("recursive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); + if (message.group != null && message.group.length) + for (var i = 0; i < message.group.length; ++i) + $root.google.monitoring.v3.Group.encode(message.group[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 DeleteGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. + * Encodes the specified ListGroupsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static - * @param {google.monitoring.v3.IDeleteGroupRequest} message DeleteGroupRequest message or plain object to encode + * @param {google.monitoring.v3.IListGroupsResponse} message ListGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteGroupRequest message from the specified reader or buffer. + * Decodes a ListGroupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteGroupRequest.decode = function decode(reader, length) { + ListGroupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteGroupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + case 1: + if (!(message.group && message.group.length)) + message.group = []; + message.group.push($root.google.monitoring.v3.Group.decode(reader, reader.uint32())); break; - case 4: - message.recursive = reader.bool(); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -6453,120 +6071,133 @@ }; /** - * Decodes a DeleteGroupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGroupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteGroupRequest.decodeDelimited = function decodeDelimited(reader) { + ListGroupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteGroupRequest message. + * Verifies a ListGroupsResponse message. * @function verify - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteGroupRequest.verify = function verify(message) { + ListGroupsResponse.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.recursive != null && message.hasOwnProperty("recursive")) - if (typeof message.recursive !== "boolean") - return "recursive: boolean expected"; + if (message.group != null && message.hasOwnProperty("group")) { + if (!Array.isArray(message.group)) + return "group: array expected"; + for (var i = 0; i < message.group.length; ++i) { + var error = $root.google.monitoring.v3.Group.verify(message.group[i]); + if (error) + return "group." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteGroupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGroupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest + * @returns {google.monitoring.v3.ListGroupsResponse} ListGroupsResponse */ - DeleteGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteGroupRequest) + ListGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupsResponse) return object; - var message = new $root.google.monitoring.v3.DeleteGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.recursive != null) - message.recursive = Boolean(object.recursive); + var message = new $root.google.monitoring.v3.ListGroupsResponse(); + if (object.group) { + if (!Array.isArray(object.group)) + throw TypeError(".google.monitoring.v3.ListGroupsResponse.group: array expected"); + message.group = []; + for (var i = 0; i < object.group.length; ++i) { + if (typeof object.group[i] !== "object") + throw TypeError(".google.monitoring.v3.ListGroupsResponse.group: object expected"); + message.group[i] = $root.google.monitoring.v3.Group.fromObject(object.group[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteGroupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGroupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @static - * @param {google.monitoring.v3.DeleteGroupRequest} message DeleteGroupRequest + * @param {google.monitoring.v3.ListGroupsResponse} message ListGroupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteGroupRequest.toObject = function toObject(message, options) { + ListGroupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.recursive = false; + if (options.arrays || options.defaults) + object.group = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.group && message.group.length) { + object.group = []; + for (var j = 0; j < message.group.length; ++j) + object.group[j] = $root.google.monitoring.v3.Group.toObject(message.group[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.recursive != null && message.hasOwnProperty("recursive")) - object.recursive = message.recursive; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteGroupRequest to JSON. + * Converts this ListGroupsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.DeleteGroupRequest + * @memberof google.monitoring.v3.ListGroupsResponse * @instance * @returns {Object.} JSON object */ - DeleteGroupRequest.prototype.toJSON = function toJSON() { + ListGroupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteGroupRequest; + return ListGroupsResponse; })(); - v3.ListGroupMembersRequest = (function() { + v3.GetGroupRequest = (function() { /** - * Properties of a ListGroupMembersRequest. + * Properties of a GetGroupRequest. * @memberof google.monitoring.v3 - * @interface IListGroupMembersRequest - * @property {string|null} [name] ListGroupMembersRequest name - * @property {number|null} [pageSize] ListGroupMembersRequest pageSize - * @property {string|null} [pageToken] ListGroupMembersRequest pageToken - * @property {string|null} [filter] ListGroupMembersRequest filter - * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListGroupMembersRequest interval + * @interface IGetGroupRequest + * @property {string|null} [name] GetGroupRequest name */ /** - * Constructs a new ListGroupMembersRequest. + * Constructs a new GetGroupRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListGroupMembersRequest. - * @implements IListGroupMembersRequest + * @classdesc Represents a GetGroupRequest. + * @implements IGetGroupRequest * @constructor - * @param {google.monitoring.v3.IListGroupMembersRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGetGroupRequest=} [properties] Properties to set */ - function ListGroupMembersRequest(properties) { + function GetGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6574,127 +6205,75 @@ } /** - * ListGroupMembersRequest name. + * GetGroupRequest name. * @member {string} name - * @memberof google.monitoring.v3.ListGroupMembersRequest - * @instance - */ - ListGroupMembersRequest.prototype.name = ""; - - /** - * ListGroupMembersRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListGroupMembersRequest - * @instance - */ - ListGroupMembersRequest.prototype.pageSize = 0; - - /** - * ListGroupMembersRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListGroupMembersRequest - * @instance - */ - ListGroupMembersRequest.prototype.pageToken = ""; - - /** - * ListGroupMembersRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListGroupMembersRequest - * @instance - */ - ListGroupMembersRequest.prototype.filter = ""; - - /** - * ListGroupMembersRequest interval. - * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @instance */ - ListGroupMembersRequest.prototype.interval = null; + GetGroupRequest.prototype.name = ""; /** - * Creates a new ListGroupMembersRequest instance using the specified properties. + * Creates a new GetGroupRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static - * @param {google.monitoring.v3.IListGroupMembersRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest instance + * @param {google.monitoring.v3.IGetGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest instance */ - ListGroupMembersRequest.create = function create(properties) { - return new ListGroupMembersRequest(properties); + GetGroupRequest.create = function create(properties) { + return new GetGroupRequest(properties); }; /** - * Encodes the specified ListGroupMembersRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * Encodes the specified GetGroupRequest message. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static - * @param {google.monitoring.v3.IListGroupMembersRequest} message ListGroupMembersRequest message or plain object to encode + * @param {google.monitoring.v3.IGetGroupRequest} message GetGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupMembersRequest.encode = function encode(message, writer) { + GetGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.interval != null && message.hasOwnProperty("interval")) - $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified ListGroupMembersRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. + * Encodes the specified GetGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static - * @param {google.monitoring.v3.IListGroupMembersRequest} message ListGroupMembersRequest message or plain object to encode + * @param {google.monitoring.v3.IGetGroupRequest} message GetGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupMembersRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListGroupMembersRequest message from the specified reader or buffer. + * Decodes a GetGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupMembersRequest.decode = function decode(reader, length) { + GetGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupMembersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: - message.name = reader.string(); - break; case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -6705,148 +6284,109 @@ }; /** - * Decodes a ListGroupMembersRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupMembersRequest.decodeDelimited = function decodeDelimited(reader) { + GetGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListGroupMembersRequest message. + * Verifies a GetGroupRequest message. * @function verify - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListGroupMembersRequest.verify = function verify(message) { + GetGroupRequest.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.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); - if (error) - return "interval." + error; - } return null; }; /** - * Creates a ListGroupMembersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest + * @returns {google.monitoring.v3.GetGroupRequest} GetGroupRequest */ - ListGroupMembersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListGroupMembersRequest) + GetGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetGroupRequest) return object; - var message = new $root.google.monitoring.v3.ListGroupMembersRequest(); + var message = new $root.google.monitoring.v3.GetGroupRequest(); if (object.name != null) message.name = String(object.name); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.monitoring.v3.ListGroupMembersRequest.interval: object expected"); - message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); - } return message; }; /** - * Creates a plain object from a ListGroupMembersRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @static - * @param {google.monitoring.v3.ListGroupMembersRequest} message ListGroupMembersRequest + * @param {google.monitoring.v3.GetGroupRequest} message GetGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListGroupMembersRequest.toObject = function toObject(message, options) { + GetGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.interval = null; + if (options.defaults) object.name = ""; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** - * Converts this ListGroupMembersRequest to JSON. + * Converts this GetGroupRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListGroupMembersRequest + * @memberof google.monitoring.v3.GetGroupRequest * @instance * @returns {Object.} JSON object */ - ListGroupMembersRequest.prototype.toJSON = function toJSON() { + GetGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListGroupMembersRequest; + return GetGroupRequest; })(); - v3.ListGroupMembersResponse = (function() { + v3.CreateGroupRequest = (function() { /** - * Properties of a ListGroupMembersResponse. + * Properties of a CreateGroupRequest. * @memberof google.monitoring.v3 - * @interface IListGroupMembersResponse - * @property {Array.|null} [members] ListGroupMembersResponse members - * @property {string|null} [nextPageToken] ListGroupMembersResponse nextPageToken - * @property {number|null} [totalSize] ListGroupMembersResponse totalSize + * @interface ICreateGroupRequest + * @property {string|null} [name] CreateGroupRequest name + * @property {google.monitoring.v3.IGroup|null} [group] CreateGroupRequest group + * @property {boolean|null} [validateOnly] CreateGroupRequest validateOnly */ /** - * Constructs a new ListGroupMembersResponse. + * Constructs a new CreateGroupRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListGroupMembersResponse. - * @implements IListGroupMembersResponse + * @classdesc Represents a CreateGroupRequest. + * @implements ICreateGroupRequest * @constructor - * @param {google.monitoring.v3.IListGroupMembersResponse=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateGroupRequest=} [properties] Properties to set */ - function ListGroupMembersResponse(properties) { - this.members = []; + function CreateGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6854,104 +6394,101 @@ } /** - * ListGroupMembersResponse members. - * @member {Array.} members - * @memberof google.monitoring.v3.ListGroupMembersResponse + * CreateGroupRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateGroupRequest * @instance */ - ListGroupMembersResponse.prototype.members = $util.emptyArray; + CreateGroupRequest.prototype.name = ""; /** - * ListGroupMembersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListGroupMembersResponse + * CreateGroupRequest group. + * @member {google.monitoring.v3.IGroup|null|undefined} group + * @memberof google.monitoring.v3.CreateGroupRequest * @instance */ - ListGroupMembersResponse.prototype.nextPageToken = ""; + CreateGroupRequest.prototype.group = null; /** - * ListGroupMembersResponse totalSize. - * @member {number} totalSize - * @memberof google.monitoring.v3.ListGroupMembersResponse + * CreateGroupRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.monitoring.v3.CreateGroupRequest * @instance */ - ListGroupMembersResponse.prototype.totalSize = 0; + CreateGroupRequest.prototype.validateOnly = false; /** - * Creates a new ListGroupMembersResponse instance using the specified properties. + * Creates a new CreateGroupRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static - * @param {google.monitoring.v3.IListGroupMembersResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse instance + * @param {google.monitoring.v3.ICreateGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest instance */ - ListGroupMembersResponse.create = function create(properties) { - return new ListGroupMembersResponse(properties); + CreateGroupRequest.create = function create(properties) { + return new CreateGroupRequest(properties); }; /** - * Encodes the specified ListGroupMembersResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * Encodes the specified CreateGroupRequest message. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static - * @param {google.monitoring.v3.IListGroupMembersResponse} message ListGroupMembersResponse message or plain object to encode + * @param {google.monitoring.v3.ICreateGroupRequest} message CreateGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupMembersResponse.encode = function encode(message, writer) { + CreateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - $root.google.api.MonitoredResource.encode(message.members[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.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.group != null && message.hasOwnProperty("group")) + $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified ListGroupMembersResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. + * Encodes the specified CreateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static - * @param {google.monitoring.v3.IListGroupMembersResponse} message ListGroupMembersResponse message or plain object to encode + * @param {google.monitoring.v3.ICreateGroupRequest} message CreateGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListGroupMembersResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListGroupMembersResponse message from the specified reader or buffer. + * Decodes a CreateGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupMembersResponse.decode = function decode(reader, length) { + CreateGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupMembersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push($root.google.api.MonitoredResource.decode(reader, reader.uint32())); + case 4: + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); break; case 3: - message.totalSize = reader.int32(); + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -6962,146 +6499,130 @@ }; /** - * Decodes a ListGroupMembersResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListGroupMembersResponse.decodeDelimited = function decodeDelimited(reader) { + CreateGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListGroupMembersResponse message. + * Verifies a CreateGroupRequest message. * @function verify - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListGroupMembersResponse.verify = function verify(message) { + CreateGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) { - var error = $root.google.api.MonitoredResource.verify(message.members[i]); - if (error) - return "members." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.group != null && message.hasOwnProperty("group")) { + var error = $root.google.monitoring.v3.Group.verify(message.group); + if (error) + return "group." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListGroupMembersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse + * @returns {google.monitoring.v3.CreateGroupRequest} CreateGroupRequest */ - ListGroupMembersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListGroupMembersResponse) + CreateGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateGroupRequest) return object; - var message = new $root.google.monitoring.v3.ListGroupMembersResponse(); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.monitoring.v3.ListGroupMembersResponse.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) { - if (typeof object.members[i] !== "object") - throw TypeError(".google.monitoring.v3.ListGroupMembersResponse.members: object expected"); - message.members[i] = $root.google.api.MonitoredResource.fromObject(object.members[i]); - } + var message = new $root.google.monitoring.v3.CreateGroupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.group != null) { + if (typeof object.group !== "object") + throw TypeError(".google.monitoring.v3.CreateGroupRequest.group: object expected"); + message.group = $root.google.monitoring.v3.Group.fromObject(object.group); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListGroupMembersResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @static - * @param {google.monitoring.v3.ListGroupMembersResponse} message ListGroupMembersResponse + * @param {google.monitoring.v3.CreateGroupRequest} message CreateGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListGroupMembersResponse.toObject = function toObject(message, options) { + CreateGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.members = []; if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = $root.google.api.MonitoredResource.toObject(message.members[j], options); + object.group = null; + object.validateOnly = false; + object.name = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.group != null && message.hasOwnProperty("group")) + object.group = $root.google.monitoring.v3.Group.toObject(message.group, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListGroupMembersResponse to JSON. + * Converts this CreateGroupRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListGroupMembersResponse + * @memberof google.monitoring.v3.CreateGroupRequest * @instance * @returns {Object.} JSON object */ - ListGroupMembersResponse.prototype.toJSON = function toJSON() { + CreateGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListGroupMembersResponse; + return CreateGroupRequest; })(); - v3.Group = (function() { + v3.UpdateGroupRequest = (function() { /** - * Properties of a Group. + * Properties of an UpdateGroupRequest. * @memberof google.monitoring.v3 - * @interface IGroup - * @property {string|null} [name] Group name - * @property {string|null} [displayName] Group displayName - * @property {string|null} [parentName] Group parentName - * @property {string|null} [filter] Group filter - * @property {boolean|null} [isCluster] Group isCluster + * @interface IUpdateGroupRequest + * @property {google.monitoring.v3.IGroup|null} [group] UpdateGroupRequest group + * @property {boolean|null} [validateOnly] UpdateGroupRequest validateOnly */ /** - * Constructs a new Group. + * Constructs a new UpdateGroupRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a Group. - * @implements IGroup + * @classdesc Represents an UpdateGroupRequest. + * @implements IUpdateGroupRequest * @constructor - * @param {google.monitoring.v3.IGroup=} [properties] Properties to set + * @param {google.monitoring.v3.IUpdateGroupRequest=} [properties] Properties to set */ - function Group(properties) { + function UpdateGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7109,127 +6630,303 @@ } /** - * Group name. - * @member {string} name - * @memberof google.monitoring.v3.Group + * UpdateGroupRequest group. + * @member {google.monitoring.v3.IGroup|null|undefined} group + * @memberof google.monitoring.v3.UpdateGroupRequest * @instance */ - Group.prototype.name = ""; + UpdateGroupRequest.prototype.group = null; /** - * Group displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.Group + * UpdateGroupRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.monitoring.v3.UpdateGroupRequest * @instance */ - Group.prototype.displayName = ""; + UpdateGroupRequest.prototype.validateOnly = false; /** - * Group parentName. - * @member {string} parentName - * @memberof google.monitoring.v3.Group + * Creates a new UpdateGroupRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.IUpdateGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest instance + */ + UpdateGroupRequest.create = function create(properties) { + return new UpdateGroupRequest(properties); + }; + + /** + * Encodes the specified UpdateGroupRequest message. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.IUpdateGroupRequest} message UpdateGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.group != null && message.hasOwnProperty("group")) + $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.IUpdateGroupRequest} message UpdateGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGroupRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); + break; + case 3: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGroupRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.group != null && message.hasOwnProperty("group")) { + var error = $root.google.monitoring.v3.Group.verify(message.group); + if (error) + return "group." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateGroupRequest} UpdateGroupRequest + */ + UpdateGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateGroupRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateGroupRequest(); + if (object.group != null) { + if (typeof object.group !== "object") + throw TypeError(".google.monitoring.v3.UpdateGroupRequest.group: object expected"); + message.group = $root.google.monitoring.v3.Group.fromObject(object.group); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {google.monitoring.v3.UpdateGroupRequest} message UpdateGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.group = null; + object.validateOnly = false; + } + if (message.group != null && message.hasOwnProperty("group")) + object.group = $root.google.monitoring.v3.Group.toObject(message.group, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateGroupRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateGroupRequest * @instance + * @returns {Object.} JSON object */ - Group.prototype.parentName = ""; + UpdateGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateGroupRequest; + })(); + + v3.DeleteGroupRequest = (function() { /** - * Group filter. - * @member {string} filter - * @memberof google.monitoring.v3.Group + * Properties of a DeleteGroupRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteGroupRequest + * @property {string|null} [name] DeleteGroupRequest name + * @property {boolean|null} [recursive] DeleteGroupRequest recursive + */ + + /** + * Constructs a new DeleteGroupRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteGroupRequest. + * @implements IDeleteGroupRequest + * @constructor + * @param {google.monitoring.v3.IDeleteGroupRequest=} [properties] Properties to set + */ + function DeleteGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteGroupRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteGroupRequest * @instance */ - Group.prototype.filter = ""; + DeleteGroupRequest.prototype.name = ""; /** - * Group isCluster. - * @member {boolean} isCluster - * @memberof google.monitoring.v3.Group + * DeleteGroupRequest recursive. + * @member {boolean} recursive + * @memberof google.monitoring.v3.DeleteGroupRequest * @instance */ - Group.prototype.isCluster = false; + DeleteGroupRequest.prototype.recursive = false; /** - * Creates a new Group instance using the specified properties. + * Creates a new DeleteGroupRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static - * @param {google.monitoring.v3.IGroup=} [properties] Properties to set - * @returns {google.monitoring.v3.Group} Group instance + * @param {google.monitoring.v3.IDeleteGroupRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest instance */ - Group.create = function create(properties) { - return new Group(properties); + DeleteGroupRequest.create = function create(properties) { + return new DeleteGroupRequest(properties); }; /** - * Encodes the specified Group message. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * Encodes the specified DeleteGroupRequest message. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static - * @param {google.monitoring.v3.IGroup} message Group message or plain object to encode + * @param {google.monitoring.v3.IDeleteGroupRequest} message DeleteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Group.encode = function encode(message, writer) { + DeleteGroupRequest.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.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.parentName != null && message.hasOwnProperty("parentName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentName); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.isCluster != null && message.hasOwnProperty("isCluster")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isCluster); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.recursive != null && message.hasOwnProperty("recursive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); return writer; }; /** - * Encodes the specified Group message, length delimited. Does not implicitly {@link google.monitoring.v3.Group.verify|verify} messages. + * Encodes the specified DeleteGroupRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static - * @param {google.monitoring.v3.IGroup} message Group message or plain object to encode + * @param {google.monitoring.v3.IDeleteGroupRequest} message DeleteGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Group.encodeDelimited = function encodeDelimited(message, writer) { + DeleteGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Group message from the specified reader or buffer. + * Decodes a DeleteGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Group} Group + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Group.decode = function decode(reader, length) { + DeleteGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Group(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; case 3: - message.parentName = reader.string(); - break; - case 5: - message.filter = reader.string(); + message.name = reader.string(); break; - case 6: - message.isCluster = reader.bool(); + case 4: + message.recursive = reader.bool(); break; default: reader.skipType(tag & 7); @@ -7240,558 +6937,249 @@ }; /** - * Decodes a Group message from the specified reader or buffer, length delimited. + * Decodes a DeleteGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Group} Group + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Group.decodeDelimited = function decodeDelimited(reader) { + DeleteGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Group message. + * Verifies a DeleteGroupRequest message. * @function verify - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Group.verify = function verify(message) { + DeleteGroupRequest.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.parentName != null && message.hasOwnProperty("parentName")) - if (!$util.isString(message.parentName)) - return "parentName: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.isCluster != null && message.hasOwnProperty("isCluster")) - if (typeof message.isCluster !== "boolean") - return "isCluster: boolean expected"; + if (message.recursive != null && message.hasOwnProperty("recursive")) + if (typeof message.recursive !== "boolean") + return "recursive: boolean expected"; return null; }; /** - * Creates a Group message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Group} Group + * @returns {google.monitoring.v3.DeleteGroupRequest} DeleteGroupRequest */ - Group.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Group) + DeleteGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteGroupRequest) return object; - var message = new $root.google.monitoring.v3.Group(); + var message = new $root.google.monitoring.v3.DeleteGroupRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.parentName != null) - message.parentName = String(object.parentName); - if (object.filter != null) - message.filter = String(object.filter); - if (object.isCluster != null) - message.isCluster = Boolean(object.isCluster); + if (object.recursive != null) + message.recursive = Boolean(object.recursive); return message; }; /** - * Creates a plain object from a Group message. Also converts values to other types if specified. + * Creates a plain object from a DeleteGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @static - * @param {google.monitoring.v3.Group} message Group + * @param {google.monitoring.v3.DeleteGroupRequest} message DeleteGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Group.toObject = function toObject(message, options) { + DeleteGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.parentName = ""; - object.filter = ""; - object.isCluster = false; + object.recursive = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.parentName != null && message.hasOwnProperty("parentName")) - object.parentName = message.parentName; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.isCluster != null && message.hasOwnProperty("isCluster")) - object.isCluster = message.isCluster; + if (message.recursive != null && message.hasOwnProperty("recursive")) + object.recursive = message.recursive; return object; }; /** - * Converts this Group to JSON. + * Converts this DeleteGroupRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.Group + * @memberof google.monitoring.v3.DeleteGroupRequest * @instance * @returns {Object.} JSON object */ - Group.prototype.toJSON = function toJSON() { + DeleteGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Group; + return DeleteGroupRequest; })(); - v3.MetricService = (function() { + v3.ListGroupMembersRequest = (function() { /** - * Constructs a new MetricService service. + * Properties of a ListGroupMembersRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a MetricService - * @extends $protobuf.rpc.Service + * @interface IListGroupMembersRequest + * @property {string|null} [name] ListGroupMembersRequest name + * @property {number|null} [pageSize] ListGroupMembersRequest pageSize + * @property {string|null} [pageToken] ListGroupMembersRequest pageToken + * @property {string|null} [filter] ListGroupMembersRequest filter + * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListGroupMembersRequest interval + */ + + /** + * Constructs a new ListGroupMembersRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListGroupMembersRequest. + * @implements IListGroupMembersRequest * @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.monitoring.v3.IListGroupMembersRequest=} [properties] Properties to set */ - function MetricService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function ListGroupMembersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (MetricService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricService; - /** - * Creates new MetricService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.MetricService - * @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 {MetricService} RPC service. Useful where requests and/or responses are streamed. + * ListGroupMembersRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance */ - MetricService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + ListGroupMembersRequest.prototype.name = ""; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. - * @memberof google.monitoring.v3.MetricService - * @typedef ListMonitoredResourceDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + * ListGroupMembersRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @instance */ + ListGroupMembersRequest.prototype.pageSize = 0; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.monitoring.v3.MetricService + * ListGroupMembersRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListGroupMembersRequest * @instance - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetricService.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); + ListGroupMembersRequest.prototype.pageToken = ""; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.monitoring.v3.MetricService + * ListGroupMembersRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListGroupMembersRequest * @instance - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListGroupMembersRequest.prototype.filter = ""; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef GetMonitoredResourceDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.api.MonitoredResourceDescriptor} [response] MonitoredResourceDescriptor - */ - - /** - * Calls GetMonitoredResourceDescriptor. - * @function getMonitoredResourceDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback} callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.getMonitoredResourceDescriptor = function getMonitoredResourceDescriptor(request, callback) { - return this.rpcCall(getMonitoredResourceDescriptor, $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest, $root.google.api.MonitoredResourceDescriptor, request, callback); - }, "name", { value: "GetMonitoredResourceDescriptor" }); - - /** - * Calls GetMonitoredResourceDescriptor. - * @function getMonitoredResourceDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. - * @memberof google.monitoring.v3.MetricService - * @typedef ListMetricDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListMetricDescriptorsResponse} [response] ListMetricDescriptorsResponse - */ - - /** - * Calls ListMetricDescriptors. - * @function listMetricDescriptors - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object - * @param {google.monitoring.v3.MetricService.ListMetricDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.listMetricDescriptors = function listMetricDescriptors(request, callback) { - return this.rpcCall(listMetricDescriptors, $root.google.monitoring.v3.ListMetricDescriptorsRequest, $root.google.monitoring.v3.ListMetricDescriptorsResponse, request, callback); - }, "name", { value: "ListMetricDescriptors" }); - - /** - * Calls ListMetricDescriptors. - * @function listMetricDescriptors - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef GetMetricDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.api.MetricDescriptor} [response] MetricDescriptor - */ - - /** - * Calls GetMetricDescriptor. - * @function getMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.GetMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.getMetricDescriptor = function getMetricDescriptor(request, callback) { - return this.rpcCall(getMetricDescriptor, $root.google.monitoring.v3.GetMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); - }, "name", { value: "GetMetricDescriptor" }); - - /** - * Calls GetMetricDescriptor. - * @function getMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef CreateMetricDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.api.MetricDescriptor} [response] MetricDescriptor - */ - - /** - * Calls CreateMetricDescriptor. - * @function createMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.CreateMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.createMetricDescriptor = function createMetricDescriptor(request, callback) { - return this.rpcCall(createMetricDescriptor, $root.google.monitoring.v3.CreateMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); - }, "name", { value: "CreateMetricDescriptor" }); - - /** - * Calls CreateMetricDescriptor. - * @function createMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef DeleteMetricDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteMetricDescriptor. - * @function deleteMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.deleteMetricDescriptor = function deleteMetricDescriptor(request, callback) { - return this.rpcCall(deleteMetricDescriptor, $root.google.monitoring.v3.DeleteMetricDescriptorRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteMetricDescriptor" }); - - /** - * Calls DeleteMetricDescriptor. - * @function deleteMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. - * @memberof google.monitoring.v3.MetricService - * @typedef ListTimeSeriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListTimeSeriesResponse} [response] ListTimeSeriesResponse - */ - - /** - * Calls ListTimeSeries. - * @function listTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object - * @param {google.monitoring.v3.MetricService.ListTimeSeriesCallback} callback Node-style callback called with the error, if any, and ListTimeSeriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.listTimeSeries = function listTimeSeries(request, callback) { - return this.rpcCall(listTimeSeries, $root.google.monitoring.v3.ListTimeSeriesRequest, $root.google.monitoring.v3.ListTimeSeriesResponse, request, callback); - }, "name", { value: "ListTimeSeries" }); - - /** - * Calls ListTimeSeries. - * @function listTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. - * @memberof google.monitoring.v3.MetricService - * @typedef CreateTimeSeriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CreateTimeSeries. - * @function createTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object - * @param {google.monitoring.v3.MetricService.CreateTimeSeriesCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.createTimeSeries = function createTimeSeries(request, callback) { - return this.rpcCall(createTimeSeries, $root.google.monitoring.v3.CreateTimeSeriesRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CreateTimeSeries" }); - - /** - * Calls CreateTimeSeries. - * @function createTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MetricService; - })(); - - v3.ListMonitoredResourceDescriptorsRequest = (function() { - - /** - * Properties of a ListMonitoredResourceDescriptorsRequest. - * @memberof google.monitoring.v3 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {string|null} [name] ListMonitoredResourceDescriptorsRequest name - * @property {string|null} [filter] ListMonitoredResourceDescriptorsRequest filter - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken - */ - - /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest - * @constructor - * @param {google.monitoring.v3.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 name. - * @member {string} name - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.name = ""; - - /** - * ListMonitoredResourceDescriptorsRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.filter = ""; - - /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; - - /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * ListGroupMembersRequest interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.ListGroupMembersRequest * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + ListGroupMembersRequest.prototype.interval = null; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new ListGroupMembersRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + * @param {google.monitoring.v3.IListGroupMembersRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest instance */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); + ListGroupMembersRequest.create = function create(properties) { + return new ListGroupMembersRequest(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified ListGroupMembersRequest message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.IListGroupMembersRequest} message ListGroupMembersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + ListGroupMembersRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified ListGroupMembersRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.IListGroupMembersRequest} message ListGroupMembersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGroupMembersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a ListGroupMembersRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest * @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) { + ListGroupMembersRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupMembersRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: + case 7: message.name = reader.string(); break; - case 2: - message.filter = reader.string(); - break; case 3: message.pageSize = reader.int32(); break; case 4: message.pageToken = reader.string(); break; + case 5: + message.filter = reader.string(); + break; + case 6: + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -7801,134 +7189,148 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGroupMembersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest * @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) { + ListGroupMembersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a ListGroupMembersRequest message. * @function verify - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @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) { + ListGroupMembersRequest.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"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } return null; }; /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGroupMembersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.monitoring.v3.ListGroupMembersRequest} ListGroupMembersRequest */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest) + ListGroupMembersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupMembersRequest) return object; - var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); + var message = new $root.google.monitoring.v3.ListGroupMembersRequest(); 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); + if (object.filter != null) + message.filter = String(object.filter); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.ListGroupMembersRequest.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); + } return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGroupMembersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @static - * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {google.monitoring.v3.ListGroupMembersRequest} message ListGroupMembersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + ListGroupMembersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.filter = ""; object.pageSize = 0; object.pageToken = ""; + object.filter = ""; + object.interval = null; 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this ListGroupMembersRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.ListGroupMembersRequest * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + ListGroupMembersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsRequest; + return ListGroupMembersRequest; })(); - v3.ListMonitoredResourceDescriptorsResponse = (function() { + v3.ListGroupMembersResponse = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsResponse. + * Properties of a ListGroupMembersResponse. * @memberof google.monitoring.v3 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + * @interface IListGroupMembersResponse + * @property {Array.|null} [members] ListGroupMembersResponse members + * @property {string|null} [nextPageToken] ListGroupMembersResponse nextPageToken + * @property {number|null} [totalSize] ListGroupMembersResponse totalSize */ /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new ListGroupMembersResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse + * @classdesc Represents a ListGroupMembersResponse. + * @implements IListGroupMembersResponse * @constructor - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @param {google.monitoring.v3.IListGroupMembersResponse=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; + function ListGroupMembersResponse(properties) { + this.members = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7936,92 +7338,105 @@ } /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * ListGroupMembersResponse members. + * @member {Array.} members + * @memberof google.monitoring.v3.ListGroupMembersResponse * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + ListGroupMembersResponse.prototype.members = $util.emptyArray; /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. + * ListGroupMembersResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + ListGroupMembersResponse.prototype.nextPageToken = ""; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * ListGroupMembersResponse totalSize. + * @member {number} totalSize + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @instance + */ + ListGroupMembersResponse.prototype.totalSize = 0; + + /** + * Creates a new ListGroupMembersResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + * @param {google.monitoring.v3.IListGroupMembersResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse instance */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); + ListGroupMembersResponse.create = function create(properties) { + return new ListGroupMembersResponse(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified ListGroupMembersResponse message. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.monitoring.v3.IListGroupMembersResponse} message ListGroupMembersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + ListGroupMembersResponse.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.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + $root.google.api.MonitoredResource.encode(message.members[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.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified ListGroupMembersResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListGroupMembersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.monitoring.v3.IListGroupMembersResponse} message ListGroupMembersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListGroupMembersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a ListGroupMembersResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse * @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) { + ListGroupMembersResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListGroupMembersResponse(); 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; + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.google.api.MonitoredResource.decode(reader, reader.uint32())); + break; case 2: message.nextPageToken = reader.string(); break; + case 3: + message.totalSize = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -8031,133 +7446,143 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListGroupMembersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse * @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) { + ListGroupMembersResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a ListGroupMembersResponse message. * @function verify - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @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) { + ListGroupMembersResponse.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 (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) { + var error = $root.google.api.MonitoredResource.verify(message.members[i]); if (error) - return "resourceDescriptors." + error; + return "members." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; /** - * Creates a ListMonitoredResourceDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListGroupMembersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.monitoring.v3.ListGroupMembersResponse} ListGroupMembersResponse */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) + ListGroupMembersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListGroupMembersResponse) return object; - var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: object expected"); - message.resourceDescriptors[i] = $root.google.api.MonitoredResourceDescriptor.fromObject(object.resourceDescriptors[i]); + var message = new $root.google.monitoring.v3.ListGroupMembersResponse(); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.monitoring.v3.ListGroupMembersResponse.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) { + if (typeof object.members[i] !== "object") + throw TypeError(".google.monitoring.v3.ListGroupMembersResponse.members: object expected"); + message.members[i] = $root.google.api.MonitoredResource.fromObject(object.members[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 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 ListGroupMembersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @static - * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {google.monitoring.v3.ListGroupMembersResponse} message ListGroupMembersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + ListGroupMembersResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.resourceDescriptors = []; - if (options.defaults) + object.members = []; + 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.totalSize = 0; + } + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = $root.google.api.MonitoredResource.toObject(message.members[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this ListGroupMembersResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.ListGroupMembersResponse * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + ListGroupMembersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsResponse; + return ListGroupMembersResponse; })(); - v3.GetMonitoredResourceDescriptorRequest = (function() { + v3.Point = (function() { /** - * Properties of a GetMonitoredResourceDescriptorRequest. + * Properties of a Point. * @memberof google.monitoring.v3 - * @interface IGetMonitoredResourceDescriptorRequest - * @property {string|null} [name] GetMonitoredResourceDescriptorRequest name + * @interface IPoint + * @property {google.monitoring.v3.ITimeInterval|null} [interval] Point interval + * @property {google.monitoring.v3.ITypedValue|null} [value] Point value */ /** - * Constructs a new GetMonitoredResourceDescriptorRequest. + * Constructs a new Point. * @memberof google.monitoring.v3 - * @classdesc Represents a GetMonitoredResourceDescriptorRequest. - * @implements IGetMonitoredResourceDescriptorRequest + * @classdesc Represents a Point. + * @implements IPoint * @constructor - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IPoint=} [properties] Properties to set */ - function GetMonitoredResourceDescriptorRequest(properties) { + function Point(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8165,75 +7590,88 @@ } /** - * GetMonitoredResourceDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * Point interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.Point * @instance */ - GetMonitoredResourceDescriptorRequest.prototype.name = ""; + Point.prototype.interval = null; /** - * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * Point value. + * @member {google.monitoring.v3.ITypedValue|null|undefined} value + * @memberof google.monitoring.v3.Point + * @instance + */ + Point.prototype.value = null; + + /** + * Creates a new Point instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest instance + * @param {google.monitoring.v3.IPoint=} [properties] Properties to set + * @returns {google.monitoring.v3.Point} Point instance */ - GetMonitoredResourceDescriptorRequest.create = function create(properties) { - return new GetMonitoredResourceDescriptorRequest(properties); + Point.create = function create(properties) { + return new Point(properties); }; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * Encodes the specified Point message. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IPoint} message Point message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMonitoredResourceDescriptorRequest.encode = function encode(message, writer) { + Point.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.value != null && message.hasOwnProperty("value")) + $root.google.monitoring.v3.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IPoint} message Point message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMonitoredResourceDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + Point.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * Decodes a Point message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @returns {google.monitoring.v3.Point} Point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMonitoredResourceDescriptorRequest.decode = function decode(reader, length) { + Point.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Point(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + case 1: + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + case 2: + message.value = $root.google.monitoring.v3.TypedValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8244,110 +7682,132 @@ }; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a Point message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @returns {google.monitoring.v3.Point} Point * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMonitoredResourceDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + Point.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetMonitoredResourceDescriptorRequest message. + * Verifies a Point message. * @function verify - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMonitoredResourceDescriptorRequest.verify = function verify(message) { + Point.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.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.monitoring.v3.TypedValue.verify(message.value); + if (error) + return "value." + error; + } return null; }; /** - * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Point message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @returns {google.monitoring.v3.Point} Point */ - GetMonitoredResourceDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest) + Point.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Point) return object; - var message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.monitoring.v3.Point(); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.Point.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.monitoring.v3.Point.value: object expected"); + message.value = $root.google.monitoring.v3.TypedValue.fromObject(object.value); + } return message; }; /** - * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. + * Creates a plain object from a Point message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @static - * @param {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest + * @param {google.monitoring.v3.Point} message Point * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMonitoredResourceDescriptorRequest.toObject = function toObject(message, options) { + Point.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.interval = null; + object.value = null; + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.monitoring.v3.TypedValue.toObject(message.value, options); return object; }; /** - * Converts this GetMonitoredResourceDescriptorRequest to JSON. + * Converts this Point to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.Point * @instance * @returns {Object.} JSON object */ - GetMonitoredResourceDescriptorRequest.prototype.toJSON = function toJSON() { + Point.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetMonitoredResourceDescriptorRequest; + return Point; })(); - v3.ListMetricDescriptorsRequest = (function() { + v3.TimeSeries = (function() { /** - * Properties of a ListMetricDescriptorsRequest. + * Properties of a TimeSeries. * @memberof google.monitoring.v3 - * @interface IListMetricDescriptorsRequest - * @property {string|null} [name] ListMetricDescriptorsRequest name - * @property {string|null} [filter] ListMetricDescriptorsRequest filter - * @property {number|null} [pageSize] ListMetricDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMetricDescriptorsRequest pageToken + * @interface ITimeSeries + * @property {google.api.IMetric|null} [metric] TimeSeries metric + * @property {google.api.IMonitoredResource|null} [resource] TimeSeries resource + * @property {google.api.IMonitoredResourceMetadata|null} [metadata] TimeSeries metadata + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] TimeSeries metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] TimeSeries valueType + * @property {Array.|null} [points] TimeSeries points */ /** - * Constructs a new ListMetricDescriptorsRequest. + * Constructs a new TimeSeries. * @memberof google.monitoring.v3 - * @classdesc Represents a ListMetricDescriptorsRequest. - * @implements IListMetricDescriptorsRequest + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries * @constructor - * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ITimeSeries=} [properties] Properties to set */ - function ListMetricDescriptorsRequest(properties) { + function TimeSeries(properties) { + this.points = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8355,114 +7815,143 @@ } /** - * ListMetricDescriptorsRequest name. - * @member {string} name - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TimeSeries metric. + * @member {google.api.IMetric|null|undefined} metric + * @memberof google.monitoring.v3.TimeSeries * @instance */ - ListMetricDescriptorsRequest.prototype.name = ""; + TimeSeries.prototype.metric = null; /** - * ListMetricDescriptorsRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TimeSeries resource. + * @member {google.api.IMonitoredResource|null|undefined} resource + * @memberof google.monitoring.v3.TimeSeries * @instance */ - ListMetricDescriptorsRequest.prototype.filter = ""; + TimeSeries.prototype.resource = null; /** - * ListMetricDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TimeSeries metadata. + * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata + * @memberof google.monitoring.v3.TimeSeries * @instance */ - ListMetricDescriptorsRequest.prototype.pageSize = 0; + TimeSeries.prototype.metadata = null; /** - * ListMetricDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TimeSeries metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.monitoring.v3.TimeSeries * @instance */ - ListMetricDescriptorsRequest.prototype.pageToken = ""; + TimeSeries.prototype.metricKind = 0; /** - * Creates a new ListMetricDescriptorsRequest instance using the specified properties. + * TimeSeries valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.valueType = 0; + + /** + * TimeSeries points. + * @member {Array.} points + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.points = $util.emptyArray; + + /** + * Creates a new TimeSeries instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static - * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest instance + * @param {google.monitoring.v3.ITimeSeries=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeries} TimeSeries instance */ - ListMetricDescriptorsRequest.create = function create(properties) { - return new ListMetricDescriptorsRequest(properties); + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); }; /** - * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * Encodes the specified TimeSeries message. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.ITimeSeries} message TimeSeries message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetricDescriptorsRequest.encode = function encode(message, writer) { + TimeSeries.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.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.metric != null && message.hasOwnProperty("metric")) + $root.google.api.Metric.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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.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.points != null && message.points.length) + for (var i = 0; i < message.points.length; ++i) + $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.ITimeSeries} message TimeSeries message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetricDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. + * Decodes a TimeSeries message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @returns {google.monitoring.v3.TimeSeries} TimeSeries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetricDescriptorsRequest.decode = function decode(reader, length) { + TimeSeries.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeries(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); + case 1: + message.metric = $root.google.api.Metric.decode(reader, reader.uint32()); break; case 2: - message.filter = reader.string(); + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + case 7: + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); break; case 3: - message.pageSize = reader.int32(); + message.metricKind = reader.int32(); break; case 4: - message.pageToken = reader.string(); + message.valueType = reader.int32(); + break; + case 5: + if (!(message.points && message.points.length)) + message.points = []; + message.points.push($root.google.monitoring.v3.Point.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -8473,551 +7962,544 @@ }; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @returns {google.monitoring.v3.TimeSeries} TimeSeries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetricDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + TimeSeries.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetricDescriptorsRequest message. + * Verifies a TimeSeries message. * @function verify - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetricDescriptorsRequest.verify = function verify(message) { + TimeSeries.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"; + if (message.metric != null && message.hasOwnProperty("metric")) { + var error = $root.google.api.Metric.verify(message.metric); + if (error) + return "metric." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.api.MonitoredResource.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); + if (error) + return "metadata." + 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.points != null && message.hasOwnProperty("points")) { + if (!Array.isArray(message.points)) + return "points: array expected"; + for (var i = 0; i < message.points.length; ++i) { + var error = $root.google.monitoring.v3.Point.verify(message.points[i]); + if (error) + return "points." + error; + } + } return null; }; /** - * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @returns {google.monitoring.v3.TimeSeries} TimeSeries */ - ListMetricDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsRequest) + TimeSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeries) return object; - var message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); - 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; - }; - - /** - * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. + var message = new $root.google.monitoring.v3.TimeSeries(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.metric: object expected"); + message.metric = $root.google.api.Metric.fromObject(object.metric); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.resource: object expected"); + message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.metadata: object expected"); + message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + } + 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.points) { + if (!Array.isArray(object.points)) + throw TypeError(".google.monitoring.v3.TimeSeries.points: array expected"); + message.points = []; + for (var i = 0; i < object.points.length; ++i) { + if (typeof object.points[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeries.points: object expected"); + message.points[i] = $root.google.monitoring.v3.Point.fromObject(object.points[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @static - * @param {google.monitoring.v3.ListMetricDescriptorsRequest} message ListMetricDescriptorsRequest + * @param {google.monitoring.v3.TimeSeries} message TimeSeries * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetricDescriptorsRequest.toObject = function toObject(message, options) { + TimeSeries.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.points = []; if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; + object.metric = null; + object.resource = null; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.metadata = null; } - 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; + if (message.metric != null && message.hasOwnProperty("metric")) + object.metric = $root.google.api.Metric.toObject(message.metric, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.api.MonitoredResource.toObject(message.resource, 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.points && message.points.length) { + object.points = []; + for (var j = 0; j < message.points.length; ++j) + object.points[j] = $root.google.monitoring.v3.Point.toObject(message.points[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); return object; }; /** - * Converts this ListMetricDescriptorsRequest to JSON. + * Converts this TimeSeries to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeries * @instance * @returns {Object.} JSON object */ - ListMetricDescriptorsRequest.prototype.toJSON = function toJSON() { + TimeSeries.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMetricDescriptorsRequest; + return TimeSeries; })(); - v3.ListMetricDescriptorsResponse = (function() { - - /** - * Properties of a ListMetricDescriptorsResponse. - * @memberof google.monitoring.v3 - * @interface IListMetricDescriptorsResponse - * @property {Array.|null} [metricDescriptors] ListMetricDescriptorsResponse metricDescriptors - * @property {string|null} [nextPageToken] ListMetricDescriptorsResponse nextPageToken - */ + v3.MetricService = (function() { /** - * Constructs a new ListMetricDescriptorsResponse. + * Constructs a new MetricService service. * @memberof google.monitoring.v3 - * @classdesc Represents a ListMetricDescriptorsResponse. - * @implements IListMetricDescriptorsResponse + * @classdesc Represents a MetricService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [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 ListMetricDescriptorsResponse(properties) { - this.metricDescriptors = []; - if (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 MetricService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * ListMetricDescriptorsResponse metricDescriptors. - * @member {Array.} metricDescriptors - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @instance - */ - ListMetricDescriptorsResponse.prototype.metricDescriptors = $util.emptyArray; - - /** - * ListMetricDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @instance - */ - ListMetricDescriptorsResponse.prototype.nextPageToken = ""; + (MetricService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricService; /** - * Creates a new ListMetricDescriptorsResponse instance using the specified properties. + * Creates new MetricService service using the specified rpc implementation. * @function create - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @memberof google.monitoring.v3.MetricService * @static - * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse instance + * @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 {MetricService} RPC service. Useful where requests and/or responses are streamed. */ - ListMetricDescriptorsResponse.create = function create(properties) { - return new ListMetricDescriptorsResponse(properties); + MetricService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse */ - ListMetricDescriptorsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricDescriptors != null && message.metricDescriptors.length) - for (var i = 0; i < message.metricDescriptors.length; ++i) - $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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 ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(MetricService.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetricDescriptorsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.metricDescriptors && message.metricDescriptors.length)) - message.metricDescriptors = []; - message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse - * @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.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef GetMonitoredResourceDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MonitoredResourceDescriptor} [response] MonitoredResourceDescriptor */ - ListMetricDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListMetricDescriptorsResponse message. - * @function verify - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetMonitoredResourceDescriptor. + * @function getMonitoredResourceDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback} callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricDescriptors != null && message.hasOwnProperty("metricDescriptors")) { - if (!Array.isArray(message.metricDescriptors)) - return "metricDescriptors: array expected"; - for (var i = 0; i < message.metricDescriptors.length; ++i) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptors[i]); - if (error) - return "metricDescriptors." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(MetricService.prototype.getMonitoredResourceDescriptor = function getMonitoredResourceDescriptor(request, callback) { + return this.rpcCall(getMonitoredResourceDescriptor, $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest, $root.google.api.MonitoredResourceDescriptor, request, callback); + }, "name", { value: "GetMonitoredResourceDescriptor" }); /** - * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse + * Calls GetMonitoredResourceDescriptor. + * @function getMonitoredResourceDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetricDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsResponse) - return object; - var message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); - if (object.metricDescriptors) { - if (!Array.isArray(object.metricDescriptors)) - throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: array expected"); - message.metricDescriptors = []; - for (var i = 0; i < object.metricDescriptors.length; ++i) { - if (typeof object.metricDescriptors[i] !== "object") - throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: object expected"); - message.metricDescriptors[i] = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptors[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.ListMetricDescriptorsResponse} message ListMetricDescriptorsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListMetricDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListMetricDescriptorsResponse} [response] ListMetricDescriptorsResponse */ - ListMetricDescriptorsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metricDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.metricDescriptors && message.metricDescriptors.length) { - object.metricDescriptors = []; - for (var j = 0; j < message.metricDescriptors.length; ++j) - object.metricDescriptors[j] = $root.google.api.MetricDescriptor.toObject(message.metricDescriptors[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListMetricDescriptorsResponse to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * Calls ListMetricDescriptors. + * @function listMetricDescriptors + * @memberof google.monitoring.v3.MetricService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListMetricDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListMetricDescriptorsResponse; - })(); + Object.defineProperty(MetricService.prototype.listMetricDescriptors = function listMetricDescriptors(request, callback) { + return this.rpcCall(listMetricDescriptors, $root.google.monitoring.v3.ListMetricDescriptorsRequest, $root.google.monitoring.v3.ListMetricDescriptorsResponse, request, callback); + }, "name", { value: "ListMetricDescriptors" }); - v3.GetMetricDescriptorRequest = (function() { + /** + * Calls ListMetricDescriptors. + * @function listMetricDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a GetMetricDescriptorRequest. - * @memberof google.monitoring.v3 - * @interface IGetMetricDescriptorRequest - * @property {string|null} [name] GetMetricDescriptorRequest name + * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef GetMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MetricDescriptor} [response] MetricDescriptor */ /** - * Constructs a new GetMetricDescriptorRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a GetMetricDescriptorRequest. - * @implements IGetMetricDescriptorRequest - * @constructor - * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set + * Calls GetMetricDescriptor. + * @function getMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.GetMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor + * @returns {undefined} + * @variation 1 */ - function GetMetricDescriptorRequest(properties) { - if (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(MetricService.prototype.getMetricDescriptor = function getMetricDescriptor(request, callback) { + return this.rpcCall(getMetricDescriptor, $root.google.monitoring.v3.GetMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); + }, "name", { value: "GetMetricDescriptor" }); /** - * GetMetricDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * Calls GetMetricDescriptor. + * @function getMetricDescriptor + * @memberof google.monitoring.v3.MetricService * @instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetricDescriptorRequest.prototype.name = ""; /** - * Creates a new GetMetricDescriptorRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest instance + * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef CreateMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MetricDescriptor} [response] MetricDescriptor */ - GetMetricDescriptorRequest.create = function create(properties) { - return new GetMetricDescriptorRequest(properties); - }; /** - * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateMetricDescriptor. + * @function createMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.CreateMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor + * @returns {undefined} + * @variation 1 */ - GetMetricDescriptorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; + Object.defineProperty(MetricService.prototype.createMetricDescriptor = function createMetricDescriptor(request, callback) { + return this.rpcCall(createMetricDescriptor, $root.google.monitoring.v3.CreateMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); + }, "name", { value: "CreateMetricDescriptor" }); /** - * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateMetricDescriptor. + * @function createMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest - * @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.monitoring.v3.MetricService#deleteMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef DeleteMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GetMetricDescriptorRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteMetricDescriptor. + * @function deleteMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GetMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(MetricService.prototype.deleteMetricDescriptor = function deleteMetricDescriptor(request, callback) { + return this.rpcCall(deleteMetricDescriptor, $root.google.monitoring.v3.DeleteMetricDescriptorRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMetricDescriptor" }); /** - * Verifies a GetMetricDescriptorRequest message. - * @function verify - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteMetricDescriptor. + * @function deleteMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetricDescriptorRequest.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 GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListTimeSeriesResponse} [response] ListTimeSeriesResponse */ - GetMetricDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetMetricDescriptorRequest) - return object; - var message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.GetMetricDescriptorRequest - * @static - * @param {google.monitoring.v3.GetMetricDescriptorRequest} message GetMetricDescriptorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ListTimeSeries. + * @function listTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListTimeSeriesCallback} callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + * @returns {undefined} + * @variation 1 */ - GetMetricDescriptorRequest.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(MetricService.prototype.listTimeSeries = function listTimeSeries(request, callback) { + return this.rpcCall(listTimeSeries, $root.google.monitoring.v3.ListTimeSeriesRequest, $root.google.monitoring.v3.ListTimeSeriesResponse, request, callback); + }, "name", { value: "ListTimeSeries" }); /** - * Converts this GetMetricDescriptorRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * Calls ListTimeSeries. + * @function listTimeSeries + * @memberof google.monitoring.v3.MetricService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetricDescriptorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return GetMetricDescriptorRequest; + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * @memberof google.monitoring.v3.MetricService + * @typedef CreateTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CreateTimeSeries. + * @function createTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.MetricService.CreateTimeSeriesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.createTimeSeries = function createTimeSeries(request, callback) { + return this.rpcCall(createTimeSeries, $root.google.monitoring.v3.CreateTimeSeriesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CreateTimeSeries" }); + + /** + * Calls CreateTimeSeries. + * @function createTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetricService; })(); - v3.CreateMetricDescriptorRequest = (function() { + v3.ListMonitoredResourceDescriptorsRequest = (function() { /** - * Properties of a CreateMetricDescriptorRequest. + * Properties of a ListMonitoredResourceDescriptorsRequest. * @memberof google.monitoring.v3 - * @interface ICreateMetricDescriptorRequest - * @property {string|null} [name] CreateMetricDescriptorRequest name - * @property {google.api.IMetricDescriptor|null} [metricDescriptor] CreateMetricDescriptorRequest metricDescriptor + * @interface IListMonitoredResourceDescriptorsRequest + * @property {string|null} [name] ListMonitoredResourceDescriptorsRequest name + * @property {string|null} [filter] ListMonitoredResourceDescriptorsRequest filter + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken */ /** - * Constructs a new CreateMetricDescriptorRequest. + * Constructs a new ListMonitoredResourceDescriptorsRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateMetricDescriptorRequest. - * @implements ICreateMetricDescriptorRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest * @constructor - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set */ - function CreateMetricDescriptorRequest(properties) { + function ListMonitoredResourceDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9025,88 +8507,114 @@ } /** - * CreateMetricDescriptorRequest name. + * ListMonitoredResourceDescriptorsRequest name. * @member {string} name - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @instance */ - CreateMetricDescriptorRequest.prototype.name = ""; + ListMonitoredResourceDescriptorsRequest.prototype.name = ""; /** - * CreateMetricDescriptorRequest metricDescriptor. - * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * ListMonitoredResourceDescriptorsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @instance */ - CreateMetricDescriptorRequest.prototype.metricDescriptor = null; + ListMonitoredResourceDescriptorsRequest.prototype.filter = ""; /** - * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + + /** + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance */ - CreateMetricDescriptorRequest.create = function create(properties) { - return new CreateMetricDescriptorRequest(properties); + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); }; /** - * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetricDescriptorRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; /** - * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetricDescriptorRequest.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.monitoring.v3.CreateMetricDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: + case 5: message.name = reader.string(); break; case 2: - message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -9117,121 +8625,134 @@ }; /** - * Decodes a CreateMetricDescriptorRequest 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.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetricDescriptorRequest.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 CreateMetricDescriptorRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @function verify - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMetricDescriptorRequest.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.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); - if (error) - return "metricDescriptor." + error; - } + 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 CreateMetricDescriptorRequest 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.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest */ - CreateMetricDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateMetricDescriptorRequest) + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest) return object; - var message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); + var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); if (object.name != null) message.name = String(object.name); - if (object.metricDescriptor != null) { - if (typeof object.metricDescriptor !== "object") - throw TypeError(".google.monitoring.v3.CreateMetricDescriptorRequest.metricDescriptor: object expected"); - message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); - } + 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; }; /** - * Creates a plain object from a CreateMetricDescriptorRequest 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.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.CreateMetricDescriptorRequest} message CreateMetricDescriptorRequest + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMetricDescriptorRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.metricDescriptor = null; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; object.name = ""; } - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + 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; }; /** - * Converts this CreateMetricDescriptorRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @instance * @returns {Object.} JSON object */ - CreateMetricDescriptorRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateMetricDescriptorRequest; + return ListMonitoredResourceDescriptorsRequest; })(); - v3.DeleteMetricDescriptorRequest = (function() { + v3.ListMonitoredResourceDescriptorsResponse = (function() { /** - * Properties of a DeleteMetricDescriptorRequest. + * Properties of a ListMonitoredResourceDescriptorsResponse. * @memberof google.monitoring.v3 - * @interface IDeleteMetricDescriptorRequest - * @property {string|null} [name] DeleteMetricDescriptorRequest name + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken */ /** - * Constructs a new DeleteMetricDescriptorRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteMetricDescriptorRequest. - * @implements IDeleteMetricDescriptorRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse * @constructor - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set */ - function DeleteMetricDescriptorRequest(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) @@ -9239,75 +8760,91 @@ } /** - * DeleteMetricDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @instance */ - DeleteMetricDescriptorRequest.prototype.name = ""; + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; /** - * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @instance + */ + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance */ - DeleteMetricDescriptorRequest.create = function create(properties) { - return new DeleteMetricDescriptorRequest(properties); + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); }; /** - * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMetricDescriptorRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + 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 DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMetricDescriptorRequest.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.monitoring.v3.DeleteMetricDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + 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); @@ -9318,114 +8855,133 @@ }; /** - * Decodes a DeleteMetricDescriptorRequest 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.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMetricDescriptorRequest.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 DeleteMetricDescriptorRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @function verify - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteMetricDescriptorRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsResponse.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.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 DeleteMetricDescriptorRequest 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.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse */ - DeleteMetricDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteMetricDescriptorRequest) + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) return object; - var message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.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 DeleteMetricDescriptorRequest 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.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.DeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteMetricDescriptorRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.resourceDescriptors = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + 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 DeleteMetricDescriptorRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @instance * @returns {Object.} JSON object */ - DeleteMetricDescriptorRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteMetricDescriptorRequest; + return ListMonitoredResourceDescriptorsResponse; })(); - v3.ListTimeSeriesRequest = (function() { + v3.GetMonitoredResourceDescriptorRequest = (function() { /** - * Properties of a ListTimeSeriesRequest. + * Properties of a GetMonitoredResourceDescriptorRequest. * @memberof google.monitoring.v3 - * @interface IListTimeSeriesRequest - * @property {string|null} [name] ListTimeSeriesRequest name - * @property {string|null} [filter] ListTimeSeriesRequest filter - * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListTimeSeriesRequest interval - * @property {google.monitoring.v3.IAggregation|null} [aggregation] ListTimeSeriesRequest aggregation - * @property {string|null} [orderBy] ListTimeSeriesRequest orderBy - * @property {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null} [view] ListTimeSeriesRequest view - * @property {number|null} [pageSize] ListTimeSeriesRequest pageSize - * @property {string|null} [pageToken] ListTimeSeriesRequest pageToken + * @interface IGetMonitoredResourceDescriptorRequest + * @property {string|null} [name] GetMonitoredResourceDescriptorRequest name */ /** - * Constructs a new ListTimeSeriesRequest. + * Constructs a new GetMonitoredResourceDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListTimeSeriesRequest. - * @implements IListTimeSeriesRequest + * @classdesc Represents a GetMonitoredResourceDescriptorRequest. + * @implements IGetMonitoredResourceDescriptorRequest * @constructor - * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set */ - function ListTimeSeriesRequest(properties) { + function GetMonitoredResourceDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9433,167 +8989,76 @@ } /** - * ListTimeSeriesRequest name. + * GetMonitoredResourceDescriptorRequest name. * @member {string} name - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.name = ""; - - /** - * ListTimeSeriesRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.filter = ""; - - /** - * ListTimeSeriesRequest interval. - * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.interval = null; - - /** - * ListTimeSeriesRequest aggregation. - * @member {google.monitoring.v3.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.aggregation = null; - - /** - * ListTimeSeriesRequest orderBy. - * @member {string} orderBy - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.orderBy = ""; - - /** - * ListTimeSeriesRequest view. - * @member {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} view - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.view = 0; - - /** - * ListTimeSeriesRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.pageSize = 0; - - /** - * ListTimeSeriesRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @instance */ - ListTimeSeriesRequest.prototype.pageToken = ""; + GetMonitoredResourceDescriptorRequest.prototype.name = ""; /** - * Creates a new ListTimeSeriesRequest instance using the specified properties. + * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest instance */ - ListTimeSeriesRequest.create = function create(properties) { - return new ListTimeSeriesRequest(properties); + GetMonitoredResourceDescriptorRequest.create = function create(properties) { + return new GetMonitoredResourceDescriptorRequest(properties); }; /** - * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesRequest.encode = function encode(message, writer) { + GetMonitoredResourceDescriptorRequest.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.interval != null && message.hasOwnProperty("interval")) - $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.view != null && message.hasOwnProperty("view")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetMonitoredResourceDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesRequest.decode = function decode(reader, length) { + GetMonitoredResourceDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 10: + case 3: message.name = reader.string(); break; - case 2: - message.filter = reader.string(); - break; - case 4: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; - case 5: - message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); - break; - case 6: - message.orderBy = reader.string(); - break; - case 7: - message.view = reader.int32(); - break; - case 8: - message.pageSize = reader.int32(); - break; - case 9: - message.pageToken = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -9603,205 +9068,110 @@ }; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + GetMonitoredResourceDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTimeSeriesRequest message. + * Verifies a GetMonitoredResourceDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTimeSeriesRequest.verify = function verify(message) { + GetMonitoredResourceDescriptorRequest.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.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); - if (error) - return "interval." + error; - } - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - break; - } - 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 ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest */ - ListTimeSeriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListTimeSeriesRequest) + GetMonitoredResourceDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + var message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); if (object.name != null) message.name = String(object.name); - if (object.filter != null) - message.filter = String(object.filter); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.interval: object expected"); - message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); - } - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.aggregation: object expected"); - message.aggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregation); - } - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - switch (object.view) { - case "FULL": - case 0: - message.view = 0; - break; - case "HEADERS": - case 1: - message.view = 1; - break; - } - 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 ListTimeSeriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.ListTimeSeriesRequest} message ListTimeSeriesRequest + * @param {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTimeSeriesRequest.toObject = function toObject(message, options) { + GetMonitoredResourceDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filter = ""; - object.interval = null; - object.aggregation = null; - object.orderBy = ""; - object.view = options.enums === String ? "FULL" : 0; - object.pageSize = 0; - object.pageToken = ""; + if (options.defaults) object.name = ""; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.v3.Aggregation.toObject(message.aggregation, options); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; - 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; }; /** - * Converts this ListTimeSeriesRequest to JSON. + * Converts this GetMonitoredResourceDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @instance * @returns {Object.} JSON object */ - ListTimeSeriesRequest.prototype.toJSON = function toJSON() { + GetMonitoredResourceDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * TimeSeriesView enum. - * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView - * @enum {string} - * @property {number} FULL=0 FULL value - * @property {number} HEADERS=1 HEADERS value - */ - ListTimeSeriesRequest.TimeSeriesView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FULL"] = 0; - values[valuesById[1] = "HEADERS"] = 1; - return values; - })(); - - return ListTimeSeriesRequest; + return GetMonitoredResourceDescriptorRequest; })(); - v3.ListTimeSeriesResponse = (function() { + v3.ListMetricDescriptorsRequest = (function() { /** - * Properties of a ListTimeSeriesResponse. + * Properties of a ListMetricDescriptorsRequest. * @memberof google.monitoring.v3 - * @interface IListTimeSeriesResponse - * @property {Array.|null} [timeSeries] ListTimeSeriesResponse timeSeries - * @property {string|null} [nextPageToken] ListTimeSeriesResponse nextPageToken - * @property {Array.|null} [executionErrors] ListTimeSeriesResponse executionErrors + * @interface IListMetricDescriptorsRequest + * @property {string|null} [name] ListMetricDescriptorsRequest name + * @property {string|null} [filter] ListMetricDescriptorsRequest filter + * @property {number|null} [pageSize] ListMetricDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMetricDescriptorsRequest pageToken */ /** - * Constructs a new ListTimeSeriesResponse. + * Constructs a new ListMetricDescriptorsRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListTimeSeriesResponse. - * @implements IListTimeSeriesResponse + * @classdesc Represents a ListMetricDescriptorsRequest. + * @implements IListMetricDescriptorsRequest * @constructor - * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set */ - function ListTimeSeriesResponse(properties) { - this.timeSeries = []; - this.executionErrors = []; + function ListMetricDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9809,107 +9179,114 @@ } /** - * ListTimeSeriesResponse timeSeries. - * @member {Array.} timeSeries - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * ListMetricDescriptorsRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesResponse.prototype.timeSeries = $util.emptyArray; + ListMetricDescriptorsRequest.prototype.name = ""; /** - * ListTimeSeriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * ListMetricDescriptorsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesResponse.prototype.nextPageToken = ""; + ListMetricDescriptorsRequest.prototype.filter = ""; /** - * ListTimeSeriesResponse executionErrors. - * @member {Array.} executionErrors - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * ListMetricDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesResponse.prototype.executionErrors = $util.emptyArray; + ListMetricDescriptorsRequest.prototype.pageSize = 0; /** - * Creates a new ListTimeSeriesResponse instance using the specified properties. + * ListMetricDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @instance + */ + ListMetricDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMetricDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest instance */ - ListTimeSeriesResponse.create = function create(properties) { - return new ListTimeSeriesResponse(properties); + ListMetricDescriptorsRequest.create = function create(properties) { + return new ListMetricDescriptorsRequest(properties); }; /** - * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesResponse.encode = function encode(message, writer) { + ListMetricDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.timeSeries.length) - for (var i = 0; i < message.timeSeries.length; ++i) - $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[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.executionErrors != null && message.executionErrors.length) - for (var i = 0; i < message.executionErrors.length; ++i) - $root.google.rpc.Status.encode(message.executionErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; /** - * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListMetricDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesResponse.decode = function decode(reader, length) { + ListMetricDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.timeSeries && message.timeSeries.length)) - message.timeSeries = []; - message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + case 5: + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.filter = reader.string(); break; case 3: - if (!(message.executionErrors && message.executionErrors.length)) - message.executionErrors = []; - message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -9920,161 +9297,134 @@ }; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesResponse.decodeDelimited = function decodeDelimited(reader) { + ListMetricDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTimeSeriesResponse message. + * Verifies a ListMetricDescriptorsRequest message. * @function verify - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTimeSeriesResponse.verify = function verify(message) { + ListMetricDescriptorsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { - if (!Array.isArray(message.timeSeries)) - return "timeSeries: array expected"; - for (var i = 0; i < message.timeSeries.length; ++i) { - var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); - if (error) - return "timeSeries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { - if (!Array.isArray(message.executionErrors)) - return "executionErrors: array expected"; - for (var i = 0; i < message.executionErrors.length; ++i) { - var error = $root.google.rpc.Status.verify(message.executionErrors[i]); - if (error) - return "executionErrors." + error; - } - } + 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 ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest */ - ListTimeSeriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListTimeSeriesResponse) + ListMetricDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsRequest) return object; - var message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); - if (object.timeSeries) { - if (!Array.isArray(object.timeSeries)) - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: array expected"); - message.timeSeries = []; - for (var i = 0; i < object.timeSeries.length; ++i) { - if (typeof object.timeSeries[i] !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: object expected"); - message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.executionErrors) { - if (!Array.isArray(object.executionErrors)) - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: array expected"); - message.executionErrors = []; - for (var i = 0; i < object.executionErrors.length; ++i) { - if (typeof object.executionErrors[i] !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: object expected"); - message.executionErrors[i] = $root.google.rpc.Status.fromObject(object.executionErrors[i]); - } - } + var message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); + 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; }; /** - * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.ListTimeSeriesResponse} message ListTimeSeriesResponse + * @param {google.monitoring.v3.ListMetricDescriptorsRequest} message ListMetricDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTimeSeriesResponse.toObject = function toObject(message, options) { + ListMetricDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.timeSeries = []; - object.executionErrors = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.timeSeries && message.timeSeries.length) { - object.timeSeries = []; - for (var j = 0; j < message.timeSeries.length; ++j) - object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.executionErrors && message.executionErrors.length) { - object.executionErrors = []; - for (var j = 0; j < message.executionErrors.length; ++j) - object.executionErrors[j] = $root.google.rpc.Status.toObject(message.executionErrors[j], options); + 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; }; /** - * Converts this ListTimeSeriesResponse to JSON. + * Converts this ListMetricDescriptorsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance * @returns {Object.} JSON object */ - ListTimeSeriesResponse.prototype.toJSON = function toJSON() { + ListMetricDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTimeSeriesResponse; + return ListMetricDescriptorsRequest; })(); - v3.CreateTimeSeriesRequest = (function() { + v3.ListMetricDescriptorsResponse = (function() { /** - * Properties of a CreateTimeSeriesRequest. + * Properties of a ListMetricDescriptorsResponse. * @memberof google.monitoring.v3 - * @interface ICreateTimeSeriesRequest - * @property {string|null} [name] CreateTimeSeriesRequest name - * @property {Array.|null} [timeSeries] CreateTimeSeriesRequest timeSeries + * @interface IListMetricDescriptorsResponse + * @property {Array.|null} [metricDescriptors] ListMetricDescriptorsResponse metricDescriptors + * @property {string|null} [nextPageToken] ListMetricDescriptorsResponse nextPageToken */ /** - * Constructs a new CreateTimeSeriesRequest. + * Constructs a new ListMetricDescriptorsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateTimeSeriesRequest. - * @implements ICreateTimeSeriesRequest + * @classdesc Represents a ListMetricDescriptorsResponse. + * @implements IListMetricDescriptorsResponse * @constructor - * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set */ - function CreateTimeSeriesRequest(properties) { - this.timeSeries = []; + function ListMetricDescriptorsResponse(properties) { + this.metricDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10082,91 +9432,91 @@ } /** - * CreateTimeSeriesRequest name. - * @member {string} name - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * ListMetricDescriptorsResponse metricDescriptors. + * @member {Array.} metricDescriptors + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @instance */ - CreateTimeSeriesRequest.prototype.name = ""; + ListMetricDescriptorsResponse.prototype.metricDescriptors = $util.emptyArray; /** - * CreateTimeSeriesRequest timeSeries. - * @member {Array.} timeSeries - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * ListMetricDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @instance */ - CreateTimeSeriesRequest.prototype.timeSeries = $util.emptyArray; + ListMetricDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * Creates a new ListMetricDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest instance + * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse instance */ - CreateTimeSeriesRequest.create = function create(properties) { - return new CreateTimeSeriesRequest(properties); + ListMetricDescriptorsResponse.create = function create(properties) { + return new ListMetricDescriptorsResponse(properties); }; /** - * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesRequest.encode = function encode(message, writer) { + ListMetricDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.timeSeries.length) - for (var i = 0; i < message.timeSeries.length; ++i) - $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.metricDescriptors != null && message.metricDescriptors.length) + for (var i = 0; i < message.metricDescriptors.length; ++i) + $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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 CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMetricDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesRequest.decode = function decode(reader, length) { + ListMetricDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + case 1: + if (!(message.metricDescriptors && message.metricDescriptors.length)) + message.metricDescriptors = []; + message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); break; case 2: - if (!(message.timeSeries && message.timeSeries.length)) - message.timeSeries = []; - message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -10177,134 +9527,133 @@ }; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + ListMetricDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTimeSeriesRequest message. + * Verifies a ListMetricDescriptorsResponse message. * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTimeSeriesRequest.verify = function verify(message) { + ListMetricDescriptorsResponse.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.timeSeries != null && message.hasOwnProperty("timeSeries")) { - if (!Array.isArray(message.timeSeries)) - return "timeSeries: array expected"; - for (var i = 0; i < message.timeSeries.length; ++i) { - var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (message.metricDescriptors != null && message.hasOwnProperty("metricDescriptors")) { + if (!Array.isArray(message.metricDescriptors)) + return "metricDescriptors: array expected"; + for (var i = 0; i < message.metricDescriptors.length; ++i) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptors[i]); if (error) - return "timeSeries." + error; + return "metricDescriptors." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse */ - CreateTimeSeriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesRequest) + ListMetricDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsResponse) return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.timeSeries) { - if (!Array.isArray(object.timeSeries)) - throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: array expected"); - message.timeSeries = []; - for (var i = 0; i < object.timeSeries.length; ++i) { - if (typeof object.timeSeries[i] !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: object expected"); - message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + var message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); + if (object.metricDescriptors) { + if (!Array.isArray(object.metricDescriptors)) + throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: array expected"); + message.metricDescriptors = []; + for (var i = 0; i < object.metricDescriptors.length; ++i) { + if (typeof object.metricDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: object expected"); + message.metricDescriptors[i] = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptors[i]); } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.CreateTimeSeriesRequest} message CreateTimeSeriesRequest + * @param {google.monitoring.v3.ListMetricDescriptorsResponse} message ListMetricDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTimeSeriesRequest.toObject = function toObject(message, options) { + ListMetricDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.timeSeries = []; + object.metricDescriptors = []; if (options.defaults) - object.name = ""; - if (message.timeSeries && message.timeSeries.length) { - object.timeSeries = []; - for (var j = 0; j < message.timeSeries.length; ++j) - object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + object.nextPageToken = ""; + if (message.metricDescriptors && message.metricDescriptors.length) { + object.metricDescriptors = []; + for (var j = 0; j < message.metricDescriptors.length; ++j) + object.metricDescriptors[j] = $root.google.api.MetricDescriptor.toObject(message.metricDescriptors[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateTimeSeriesRequest to JSON. + * Converts this ListMetricDescriptorsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @instance * @returns {Object.} JSON object */ - CreateTimeSeriesRequest.prototype.toJSON = function toJSON() { + ListMetricDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTimeSeriesRequest; + return ListMetricDescriptorsResponse; })(); - v3.CreateTimeSeriesError = (function() { + v3.GetMetricDescriptorRequest = (function() { /** - * Properties of a CreateTimeSeriesError. + * Properties of a GetMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @interface ICreateTimeSeriesError - * @property {google.monitoring.v3.ITimeSeries|null} [timeSeries] CreateTimeSeriesError timeSeries - * @property {google.rpc.IStatus|null} [status] CreateTimeSeriesError status + * @interface IGetMetricDescriptorRequest + * @property {string|null} [name] GetMetricDescriptorRequest name */ /** - * Constructs a new CreateTimeSeriesError. + * Constructs a new GetMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateTimeSeriesError. - * @implements ICreateTimeSeriesError + * @classdesc Represents a GetMetricDescriptorRequest. + * @implements IGetMetricDescriptorRequest * @constructor - * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set */ - function CreateTimeSeriesError(properties) { + function GetMetricDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10312,88 +9661,75 @@ } /** - * CreateTimeSeriesError timeSeries. - * @member {google.monitoring.v3.ITimeSeries|null|undefined} timeSeries - * @memberof google.monitoring.v3.CreateTimeSeriesError - * @instance - */ - CreateTimeSeriesError.prototype.timeSeries = null; - - /** - * CreateTimeSeriesError status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.monitoring.v3.CreateTimeSeriesError + * GetMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @instance */ - CreateTimeSeriesError.prototype.status = null; + GetMetricDescriptorRequest.prototype.name = ""; /** - * Creates a new CreateTimeSeriesError instance using the specified properties. + * Creates a new GetMetricDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest instance */ - CreateTimeSeriesError.create = function create(properties) { - return new CreateTimeSeriesError(properties); + GetMetricDescriptorRequest.create = function create(properties) { + return new GetMetricDescriptorRequest(properties); }; /** - * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesError.encode = function encode(message, writer) { + GetMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && message.hasOwnProperty("status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesError.encodeDelimited = function encodeDelimited(message, writer) { + GetMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesError.decode = function decode(reader, length) { + GetMetricDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); - break; - case 2: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + case 3: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -10404,129 +9740,108 @@ }; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesError.decodeDelimited = function decodeDelimited(reader) { + GetMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTimeSeriesError message. + * Verifies a GetMetricDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTimeSeriesError.verify = function verify(message) { + GetMetricDescriptorRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { - var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries); - if (error) - return "timeSeries." + error; - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest */ - CreateTimeSeriesError.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesError) + GetMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetMetricDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesError(); - if (object.timeSeries != null) { - if (typeof object.timeSeries !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.timeSeries: object expected"); - message.timeSeries = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries); - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } + var message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.CreateTimeSeriesError} message CreateTimeSeriesError + * @param {google.monitoring.v3.GetMetricDescriptorRequest} message GetMetricDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTimeSeriesError.toObject = function toObject(message, options) { + GetMetricDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.timeSeries = null; - object.status = null; - } - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - object.timeSeries = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateTimeSeriesError to JSON. + * Converts this GetMetricDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @instance * @returns {Object.} JSON object */ - CreateTimeSeriesError.prototype.toJSON = function toJSON() { + GetMetricDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTimeSeriesError; + return GetMetricDescriptorRequest; })(); - v3.CreateTimeSeriesSummary = (function() { + v3.CreateMetricDescriptorRequest = (function() { /** - * Properties of a CreateTimeSeriesSummary. + * Properties of a CreateMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @interface ICreateTimeSeriesSummary - * @property {number|null} [totalPointCount] CreateTimeSeriesSummary totalPointCount - * @property {number|null} [successPointCount] CreateTimeSeriesSummary successPointCount - * @property {Array.|null} [errors] CreateTimeSeriesSummary errors + * @interface ICreateMetricDescriptorRequest + * @property {string|null} [name] CreateMetricDescriptorRequest name + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] CreateMetricDescriptorRequest metricDescriptor */ /** - * Constructs a new CreateTimeSeriesSummary. + * Constructs a new CreateMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateTimeSeriesSummary. - * @implements ICreateTimeSeriesSummary + * @classdesc Represents a CreateMetricDescriptorRequest. + * @implements ICreateMetricDescriptorRequest * @constructor - * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set */ - function CreateTimeSeriesSummary(properties) { - this.errors = []; + function CreateMetricDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10534,104 +9849,88 @@ } /** - * CreateTimeSeriesSummary totalPointCount. - * @member {number} totalPointCount - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @instance - */ - CreateTimeSeriesSummary.prototype.totalPointCount = 0; - - /** - * CreateTimeSeriesSummary successPointCount. - * @member {number} successPointCount - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * CreateMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @instance */ - CreateTimeSeriesSummary.prototype.successPointCount = 0; + CreateMetricDescriptorRequest.prototype.name = ""; /** - * CreateTimeSeriesSummary errors. - * @member {Array.} errors - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * CreateMetricDescriptorRequest metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @instance */ - CreateTimeSeriesSummary.prototype.errors = $util.emptyArray; + CreateMetricDescriptorRequest.prototype.metricDescriptor = null; /** - * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * Creates a new CreateMetricDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest instance */ - CreateTimeSeriesSummary.create = function create(properties) { - return new CreateTimeSeriesSummary(properties); + CreateMetricDescriptorRequest.create = function create(properties) { + return new CreateMetricDescriptorRequest(properties); }; /** - * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesSummary.encode = function encode(message, writer) { + CreateMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.encode(message.errors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesSummary.encodeDelimited = function encodeDelimited(message, writer) { + CreateMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesSummary.decode = function decode(reader, length) { + CreateMetricDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.totalPointCount = reader.int32(); + case 3: + message.name = reader.string(); break; case 2: - message.successPointCount = reader.int32(); - break; - case 3: - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -10642,358 +9941,121 @@ }; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesSummary.decodeDelimited = function decodeDelimited(reader) { + CreateMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTimeSeriesSummary message. + * Verifies a CreateMetricDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTimeSeriesSummary.verify = function verify(message) { + CreateMetricDescriptorRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) - if (!$util.isInteger(message.totalPointCount)) - return "totalPointCount: integer expected"; - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) - if (!$util.isInteger(message.successPointCount)) - return "successPointCount: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); + if (error) + return "metricDescriptor." + error; } return null; }; /** - * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest */ - CreateTimeSeriesSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary) + CreateMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateMetricDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); - if (object.totalPointCount != null) - message.totalPointCount = object.totalPointCount | 0; - if (object.successPointCount != null) - message.successPointCount = object.successPointCount | 0; - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: object expected"); - message.errors[i] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.fromObject(object.errors[i]); - } + var message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.monitoring.v3.CreateMetricDescriptorRequest.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); } return message; }; /** - * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary} message CreateTimeSeriesSummary + * @param {google.monitoring.v3.CreateMetricDescriptorRequest} message CreateMetricDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTimeSeriesSummary.toObject = function toObject(message, options) { + CreateMetricDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errors = []; if (options.defaults) { - object.totalPointCount = 0; - object.successPointCount = 0; - } - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) - object.totalPointCount = message.totalPointCount; - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) - object.successPointCount = message.successPointCount; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.toObject(message.errors[j], options); + object.metricDescriptor = null; + object.name = ""; } + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateTimeSeriesSummary to JSON. + * Converts this CreateMetricDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @instance * @returns {Object.} JSON object */ - CreateTimeSeriesSummary.prototype.toJSON = function toJSON() { + CreateMetricDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - CreateTimeSeriesSummary.Error = (function() { - - /** - * Properties of an Error. - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @interface IError - * @property {google.rpc.IStatus|null} [status] Error status - * @property {number|null} [pointCount] Error pointCount - */ - - /** - * Constructs a new Error. - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @classdesc Represents an Error. - * @implements IError - * @constructor - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set - */ - function Error(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Error status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @instance - */ - Error.prototype.status = null; - - /** - * Error pointCount. - * @member {number} pointCount - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @instance - */ - Error.prototype.pointCount = 0; - - /** - * Creates a new Error instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error instance - */ - Error.create = function create(properties) { - return new Error(properties); - }; - - /** - * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && message.hasOwnProperty("status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pointCount != null && message.hasOwnProperty("pointCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); - return writer; - }; - - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Error message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 2: - message.pointCount = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Error message. - * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Error.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; - } - if (message.pointCount != null && message.hasOwnProperty("pointCount")) - if (!$util.isInteger(message.pointCount)) - return "pointCount: integer expected"; - return null; - }; - - /** - * Creates an Error message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error - */ - Error.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary.Error) - return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.Error.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); - } - if (object.pointCount != null) - message.pointCount = object.pointCount | 0; - return message; - }; - - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.Error} message Error - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Error.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.status = null; - object.pointCount = 0; - } - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - if (message.pointCount != null && message.hasOwnProperty("pointCount")) - object.pointCount = message.pointCount; - return object; - }; - - /** - * Converts this Error to JSON. - * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @instance - * @returns {Object.} JSON object - */ - Error.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Error; - })(); - - return CreateTimeSeriesSummary; + return CreateMetricDescriptorRequest; })(); - v3.Point = (function() { + v3.DeleteMetricDescriptorRequest = (function() { /** - * Properties of a Point. + * Properties of a DeleteMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @interface IPoint - * @property {google.monitoring.v3.ITimeInterval|null} [interval] Point interval - * @property {google.monitoring.v3.ITypedValue|null} [value] Point value + * @interface IDeleteMetricDescriptorRequest + * @property {string|null} [name] DeleteMetricDescriptorRequest name */ /** - * Constructs a new Point. + * Constructs a new DeleteMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a Point. - * @implements IPoint + * @classdesc Represents a DeleteMetricDescriptorRequest. + * @implements IDeleteMetricDescriptorRequest * @constructor - * @param {google.monitoring.v3.IPoint=} [properties] Properties to set + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set */ - function Point(properties) { + function DeleteMetricDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11001,88 +10063,75 @@ } /** - * Point interval. - * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval - * @memberof google.monitoring.v3.Point - * @instance - */ - Point.prototype.interval = null; - - /** - * Point value. - * @member {google.monitoring.v3.ITypedValue|null|undefined} value - * @memberof google.monitoring.v3.Point + * DeleteMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @instance */ - Point.prototype.value = null; + DeleteMetricDescriptorRequest.prototype.name = ""; /** - * Creates a new Point instance using the specified properties. + * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.IPoint=} [properties] Properties to set - * @returns {google.monitoring.v3.Point} Point instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest instance */ - Point.create = function create(properties) { - return new Point(properties); + DeleteMetricDescriptorRequest.create = function create(properties) { + return new DeleteMetricDescriptorRequest(properties); }; /** - * Encodes the specified Point message. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.IPoint} message Point message or plain object to encode + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Point.encode = function encode(message, writer) { + DeleteMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.interval != null && message.hasOwnProperty("interval")) - $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.value != null && message.hasOwnProperty("value")) - $root.google.monitoring.v3.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.monitoring.v3.Point.verify|verify} messages. + * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.IPoint} message Point message or plain object to encode + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Point.encodeDelimited = function encodeDelimited(message, writer) { + DeleteMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Point message from the specified reader or buffer. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Point} Point + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Point.decode = function decode(reader, length) { + DeleteMetricDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Point(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; - case 2: - message.value = $root.google.monitoring.v3.TypedValue.decode(reader, reader.uint32()); + case 3: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -11093,132 +10142,114 @@ }; /** - * Decodes a Point message from the specified reader or buffer, length delimited. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Point} Point + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Point.decodeDelimited = function decodeDelimited(reader) { + DeleteMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Point message. + * Verifies a DeleteMetricDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Point.verify = function verify(message) { + DeleteMetricDescriptorRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); - if (error) - return "interval." + error; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.monitoring.v3.TypedValue.verify(message.value); - if (error) - return "value." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Point} Point + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest */ - Point.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Point) + DeleteMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteMetricDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.Point(); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.monitoring.v3.Point.interval: object expected"); - message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.monitoring.v3.Point.value: object expected"); - message.value = $root.google.monitoring.v3.TypedValue.fromObject(object.value); - } + var message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Point message. Also converts values to other types if specified. + * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.Point} message Point + * @param {google.monitoring.v3.DeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Point.toObject = function toObject(message, options) { + DeleteMetricDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.interval = null; - object.value = null; - } - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.monitoring.v3.TypedValue.toObject(message.value, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Point to JSON. + * Converts this DeleteMetricDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.Point + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @instance * @returns {Object.} JSON object */ - Point.prototype.toJSON = function toJSON() { + DeleteMetricDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Point; + return DeleteMetricDescriptorRequest; })(); - v3.TimeSeries = (function() { + v3.ListTimeSeriesRequest = (function() { /** - * Properties of a TimeSeries. + * Properties of a ListTimeSeriesRequest. * @memberof google.monitoring.v3 - * @interface ITimeSeries - * @property {google.api.IMetric|null} [metric] TimeSeries metric - * @property {google.api.IMonitoredResource|null} [resource] TimeSeries resource - * @property {google.api.IMonitoredResourceMetadata|null} [metadata] TimeSeries metadata - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] TimeSeries metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] TimeSeries valueType - * @property {Array.|null} [points] TimeSeries points + * @interface IListTimeSeriesRequest + * @property {string|null} [name] ListTimeSeriesRequest name + * @property {string|null} [filter] ListTimeSeriesRequest filter + * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListTimeSeriesRequest interval + * @property {google.monitoring.v3.IAggregation|null} [aggregation] ListTimeSeriesRequest aggregation + * @property {string|null} [orderBy] ListTimeSeriesRequest orderBy + * @property {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null} [view] ListTimeSeriesRequest view + * @property {number|null} [pageSize] ListTimeSeriesRequest pageSize + * @property {string|null} [pageToken] ListTimeSeriesRequest pageToken */ /** - * Constructs a new TimeSeries. + * Constructs a new ListTimeSeriesRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a TimeSeries. - * @implements ITimeSeries + * @classdesc Represents a ListTimeSeriesRequest. + * @implements IListTimeSeriesRequest * @constructor - * @param {google.monitoring.v3.ITimeSeries=} [properties] Properties to set + * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set */ - function TimeSeries(properties) { - this.points = []; + function ListTimeSeriesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11226,143 +10257,166 @@ } /** - * TimeSeries metric. - * @member {google.api.IMetric|null|undefined} metric - * @memberof google.monitoring.v3.TimeSeries + * ListTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance */ - TimeSeries.prototype.metric = null; + ListTimeSeriesRequest.prototype.name = ""; /** - * TimeSeries resource. - * @member {google.api.IMonitoredResource|null|undefined} resource - * @memberof google.monitoring.v3.TimeSeries + * ListTimeSeriesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance */ - TimeSeries.prototype.resource = null; + ListTimeSeriesRequest.prototype.filter = ""; /** - * TimeSeries metadata. - * @member {google.api.IMonitoredResourceMetadata|null|undefined} metadata - * @memberof google.monitoring.v3.TimeSeries + * ListTimeSeriesRequest interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance */ - TimeSeries.prototype.metadata = null; + ListTimeSeriesRequest.prototype.interval = null; /** - * TimeSeries metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.monitoring.v3.TimeSeries + * ListTimeSeriesRequest aggregation. + * @member {google.monitoring.v3.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance */ - TimeSeries.prototype.metricKind = 0; + ListTimeSeriesRequest.prototype.aggregation = null; /** - * TimeSeries valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.monitoring.v3.TimeSeries + * ListTimeSeriesRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance */ - TimeSeries.prototype.valueType = 0; + ListTimeSeriesRequest.prototype.orderBy = ""; /** - * TimeSeries points. - * @member {Array.} points - * @memberof google.monitoring.v3.TimeSeries + * ListTimeSeriesRequest view. + * @member {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} view + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance */ - TimeSeries.prototype.points = $util.emptyArray; + ListTimeSeriesRequest.prototype.view = 0; /** - * Creates a new TimeSeries instance using the specified properties. + * ListTimeSeriesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.pageSize = 0; + + /** + * ListTimeSeriesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTimeSeriesRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static - * @param {google.monitoring.v3.ITimeSeries=} [properties] Properties to set - * @returns {google.monitoring.v3.TimeSeries} TimeSeries instance + * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest instance */ - TimeSeries.create = function create(properties) { - return new TimeSeries(properties); + ListTimeSeriesRequest.create = function create(properties) { + return new ListTimeSeriesRequest(properties); }; /** - * Encodes the specified TimeSeries message. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static - * @param {google.monitoring.v3.ITimeSeries} message TimeSeries message or plain object to encode + * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeries.encode = function encode(message, writer) { + ListTimeSeriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metric != null && message.hasOwnProperty("metric")) - $root.google.api.Metric.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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.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.points != null && message.points.length) - for (var i = 0; i < message.points.length; ++i) - $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) - $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); return writer; }; /** - * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeries.verify|verify} messages. + * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static - * @param {google.monitoring.v3.ITimeSeries} message TimeSeries message or plain object to encode + * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + ListTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeries message from the specified reader or buffer. + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.TimeSeries} TimeSeries + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeries.decode = function decode(reader, length) { + ListTimeSeriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeries(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metric = $root.google.api.Metric.decode(reader, reader.uint32()); + case 10: + message.name = reader.string(); break; case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 7: - message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); - break; - case 3: - message.metricKind = reader.int32(); + message.filter = reader.string(); break; case 4: - message.valueType = reader.int32(); + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); break; case 5: - if (!(message.points && message.points.length)) - message.points = []; - message.points.push($root.google.monitoring.v3.Point.decode(reader, reader.uint32())); + message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); + break; + case 6: + message.orderBy = reader.string(); + break; + case 7: + message.view = reader.int32(); + break; + case 8: + message.pageSize = reader.int32(); + break; + case 9: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -11373,711 +10427,313 @@ }; /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.TimeSeries} TimeSeries + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeries.decodeDelimited = function decodeDelimited(reader) { + ListTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeries message. + * Verifies a ListTimeSeriesRequest message. * @function verify - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSeries.verify = function verify(message) { + ListTimeSeriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metric != null && message.hasOwnProperty("metric")) { - var error = $root.google.api.Metric.verify(message.metric); - if (error) - return "metric." + error; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.api.MonitoredResource.verify(message.resource); + 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.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); if (error) - return "resource." + error; + return "interval." + error; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MonitoredResourceMetadata.verify(message.metadata); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregation); if (error) - return "metadata." + error; + return "aggregation." + 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) { + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { default: - return "valueType: enum value expected"; + return "view: enum value expected"; case 0: case 1: - case 2: - case 3: - case 4: - case 5: - case 6: break; } - if (message.points != null && message.hasOwnProperty("points")) { - if (!Array.isArray(message.points)) - return "points: array expected"; - for (var i = 0; i < message.points.length; ++i) { - var error = $root.google.monitoring.v3.Point.verify(message.points[i]); - if (error) - return "points." + 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 TimeSeries message from a plain object. Also converts values to their respective internal types. + * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.TimeSeries} TimeSeries + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest */ - TimeSeries.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.TimeSeries) + ListTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListTimeSeriesRequest) return object; - var message = new $root.google.monitoring.v3.TimeSeries(); - if (object.metric != null) { - if (typeof object.metric !== "object") - throw TypeError(".google.monitoring.v3.TimeSeries.metric: object expected"); - message.metric = $root.google.api.Metric.fromObject(object.metric); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.monitoring.v3.TimeSeries.resource: object expected"); - message.resource = $root.google.api.MonitoredResource.fromObject(object.resource); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.monitoring.v3.TimeSeries.metadata: object expected"); - message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); + var message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); } - 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.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.aggregation: object expected"); + message.aggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregation); } - switch (object.valueType) { - case "VALUE_TYPE_UNSPECIFIED": + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + switch (object.view) { + case "FULL": case 0: - message.valueType = 0; + message.view = 0; break; - case "BOOL": + case "HEADERS": 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.view = 1; break; } - if (object.points) { - if (!Array.isArray(object.points)) - throw TypeError(".google.monitoring.v3.TimeSeries.points: array expected"); - message.points = []; - for (var i = 0; i < object.points.length; ++i) { - if (typeof object.points[i] !== "object") - throw TypeError(".google.monitoring.v3.TimeSeries.points: object expected"); - message.points[i] = $root.google.monitoring.v3.Point.fromObject(object.points[i]); - } - } + 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 TimeSeries message. Also converts values to other types if specified. + * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @static - * @param {google.monitoring.v3.TimeSeries} message TimeSeries + * @param {google.monitoring.v3.ListTimeSeriesRequest} message ListTimeSeriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeries.toObject = function toObject(message, options) { + ListTimeSeriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.points = []; if (options.defaults) { - object.metric = null; - object.resource = null; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.metadata = null; - } - if (message.metric != null && message.hasOwnProperty("metric")) - object.metric = $root.google.api.Metric.toObject(message.metric, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.api.MonitoredResource.toObject(message.resource, 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.points && message.points.length) { - object.points = []; - for (var j = 0; j < message.points.length; ++j) - object.points[j] = $root.google.monitoring.v3.Point.toObject(message.points[j], options); + object.filter = ""; + object.interval = null; + object.aggregation = null; + object.orderBy = ""; + object.view = options.enums === String ? "FULL" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.v3.Aggregation.toObject(message.aggregation, options); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; + 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; }; /** - * Converts this TimeSeries to JSON. + * Converts this ListTimeSeriesRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.TimeSeries + * @memberof google.monitoring.v3.ListTimeSeriesRequest * @instance * @returns {Object.} JSON object */ - TimeSeries.prototype.toJSON = function toJSON() { + ListTimeSeriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeSeries; + /** + * TimeSeriesView enum. + * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView + * @enum {string} + * @property {number} FULL=0 FULL value + * @property {number} HEADERS=1 HEADERS value + */ + ListTimeSeriesRequest.TimeSeriesView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FULL"] = 0; + values[valuesById[1] = "HEADERS"] = 1; + return values; + })(); + + return ListTimeSeriesRequest; })(); - v3.NotificationChannelService = (function() { + v3.ListTimeSeriesResponse = (function() { /** - * Constructs a new NotificationChannelService service. + * Properties of a ListTimeSeriesResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a NotificationChannelService - * @extends $protobuf.rpc.Service + * @interface IListTimeSeriesResponse + * @property {Array.|null} [timeSeries] ListTimeSeriesResponse timeSeries + * @property {string|null} [nextPageToken] ListTimeSeriesResponse nextPageToken + * @property {Array.|null} [executionErrors] ListTimeSeriesResponse executionErrors + */ + + /** + * Constructs a new ListTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListTimeSeriesResponse. + * @implements IListTimeSeriesResponse * @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.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set */ - function NotificationChannelService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function ListTimeSeriesResponse(properties) { + this.timeSeries = []; + this.executionErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (NotificationChannelService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NotificationChannelService; - /** - * Creates new NotificationChannelService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.NotificationChannelService - * @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 {NotificationChannelService} RPC service. Useful where requests and/or responses are streamed. + * ListTimeSeriesResponse timeSeries. + * @member {Array.} timeSeries + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance */ - NotificationChannelService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + ListTimeSeriesResponse.prototype.timeSeries = $util.emptyArray; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef ListNotificationChannelDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} [response] ListNotificationChannelDescriptorsResponse + * ListTimeSeriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance */ + ListTimeSeriesResponse.prototype.nextPageToken = ""; /** - * Calls ListNotificationChannelDescriptors. - * @function listNotificationChannelDescriptors - * @memberof google.monitoring.v3.NotificationChannelService + * ListTimeSeriesResponse executionErrors. + * @member {Array.} executionErrors + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @instance - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} request ListNotificationChannelDescriptorsRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptorsCallback} callback Node-style callback called with the error, if any, and ListNotificationChannelDescriptorsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(NotificationChannelService.prototype.listNotificationChannelDescriptors = function listNotificationChannelDescriptors(request, callback) { - return this.rpcCall(listNotificationChannelDescriptors, $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest, $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse, request, callback); - }, "name", { value: "ListNotificationChannelDescriptors" }); + ListTimeSeriesResponse.prototype.executionErrors = $util.emptyArray; /** - * Calls ListNotificationChannelDescriptors. - * @function listNotificationChannelDescriptors - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} request ListNotificationChannelDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef GetNotificationChannelDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.NotificationChannelDescriptor} [response] NotificationChannelDescriptor - */ - - /** - * Calls GetNotificationChannelDescriptor. - * @function getNotificationChannelDescriptor - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} request GetNotificationChannelDescriptorRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptorCallback} callback Node-style callback called with the error, if any, and NotificationChannelDescriptor - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.getNotificationChannelDescriptor = function getNotificationChannelDescriptor(request, callback) { - return this.rpcCall(getNotificationChannelDescriptor, $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest, $root.google.monitoring.v3.NotificationChannelDescriptor, request, callback); - }, "name", { value: "GetNotificationChannelDescriptor" }); - - /** - * Calls GetNotificationChannelDescriptor. - * @function getNotificationChannelDescriptor - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} request GetNotificationChannelDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef ListNotificationChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListNotificationChannelsResponse} [response] ListNotificationChannelsResponse - */ - - /** - * Calls ListNotificationChannels. - * @function listNotificationChannels - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IListNotificationChannelsRequest} request ListNotificationChannelsRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.ListNotificationChannelsCallback} callback Node-style callback called with the error, if any, and ListNotificationChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.listNotificationChannels = function listNotificationChannels(request, callback) { - return this.rpcCall(listNotificationChannels, $root.google.monitoring.v3.ListNotificationChannelsRequest, $root.google.monitoring.v3.ListNotificationChannelsResponse, request, callback); - }, "name", { value: "ListNotificationChannels" }); - - /** - * Calls ListNotificationChannels. - * @function listNotificationChannels - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IListNotificationChannelsRequest} request ListNotificationChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef GetNotificationChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel - */ - - /** - * Calls GetNotificationChannel. - * @function getNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IGetNotificationChannelRequest} request GetNotificationChannelRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.getNotificationChannel = function getNotificationChannel(request, callback) { - return this.rpcCall(getNotificationChannel, $root.google.monitoring.v3.GetNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); - }, "name", { value: "GetNotificationChannel" }); - - /** - * Calls GetNotificationChannel. - * @function getNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IGetNotificationChannelRequest} request GetNotificationChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef CreateNotificationChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel - */ - - /** - * Calls CreateNotificationChannel. - * @function createNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.ICreateNotificationChannelRequest} request CreateNotificationChannelRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.CreateNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.createNotificationChannel = function createNotificationChannel(request, callback) { - return this.rpcCall(createNotificationChannel, $root.google.monitoring.v3.CreateNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); - }, "name", { value: "CreateNotificationChannel" }); - - /** - * Calls CreateNotificationChannel. - * @function createNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.ICreateNotificationChannelRequest} request CreateNotificationChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#updateNotificationChannel}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef UpdateNotificationChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel - */ - - /** - * Calls UpdateNotificationChannel. - * @function updateNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} request UpdateNotificationChannelRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.UpdateNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.updateNotificationChannel = function updateNotificationChannel(request, callback) { - return this.rpcCall(updateNotificationChannel, $root.google.monitoring.v3.UpdateNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); - }, "name", { value: "UpdateNotificationChannel" }); - - /** - * Calls UpdateNotificationChannel. - * @function updateNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} request UpdateNotificationChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef DeleteNotificationChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteNotificationChannel. - * @function deleteNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} request DeleteNotificationChannelRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.DeleteNotificationChannelCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.deleteNotificationChannel = function deleteNotificationChannel(request, callback) { - return this.rpcCall(deleteNotificationChannel, $root.google.monitoring.v3.DeleteNotificationChannelRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteNotificationChannel" }); - - /** - * Calls DeleteNotificationChannel. - * @function deleteNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} request DeleteNotificationChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef SendNotificationChannelVerificationCodeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls SendNotificationChannelVerificationCode. - * @function sendNotificationChannelVerificationCode - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} request SendNotificationChannelVerificationCodeRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCodeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.sendNotificationChannelVerificationCode = function sendNotificationChannelVerificationCode(request, callback) { - return this.rpcCall(sendNotificationChannelVerificationCode, $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "SendNotificationChannelVerificationCode" }); - - /** - * Calls SendNotificationChannelVerificationCode. - * @function sendNotificationChannelVerificationCode - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} request SendNotificationChannelVerificationCodeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef GetNotificationChannelVerificationCodeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} [response] GetNotificationChannelVerificationCodeResponse - */ - - /** - * Calls GetNotificationChannelVerificationCode. - * @function getNotificationChannelVerificationCode - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} request GetNotificationChannelVerificationCodeRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCodeCallback} callback Node-style callback called with the error, if any, and GetNotificationChannelVerificationCodeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.getNotificationChannelVerificationCode = function getNotificationChannelVerificationCode(request, callback) { - return this.rpcCall(getNotificationChannelVerificationCode, $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest, $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse, request, callback); - }, "name", { value: "GetNotificationChannelVerificationCode" }); - - /** - * Calls GetNotificationChannelVerificationCode. - * @function getNotificationChannelVerificationCode - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} request GetNotificationChannelVerificationCodeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. - * @memberof google.monitoring.v3.NotificationChannelService - * @typedef VerifyNotificationChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel - */ - - /** - * Calls VerifyNotificationChannel. - * @function verifyNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} request VerifyNotificationChannelRequest message or plain object - * @param {google.monitoring.v3.NotificationChannelService.VerifyNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NotificationChannelService.prototype.verifyNotificationChannel = function verifyNotificationChannel(request, callback) { - return this.rpcCall(verifyNotificationChannel, $root.google.monitoring.v3.VerifyNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); - }, "name", { value: "VerifyNotificationChannel" }); - - /** - * Calls VerifyNotificationChannel. - * @function verifyNotificationChannel - * @memberof google.monitoring.v3.NotificationChannelService - * @instance - * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} request VerifyNotificationChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return NotificationChannelService; - })(); - - v3.ListNotificationChannelDescriptorsRequest = (function() { - - /** - * Properties of a ListNotificationChannelDescriptorsRequest. - * @memberof google.monitoring.v3 - * @interface IListNotificationChannelDescriptorsRequest - * @property {string|null} [name] ListNotificationChannelDescriptorsRequest name - * @property {number|null} [pageSize] ListNotificationChannelDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListNotificationChannelDescriptorsRequest pageToken - */ - - /** - * Constructs a new ListNotificationChannelDescriptorsRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListNotificationChannelDescriptorsRequest. - * @implements IListNotificationChannelDescriptorsRequest - * @constructor - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest=} [properties] Properties to set - */ - function ListNotificationChannelDescriptorsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListNotificationChannelDescriptorsRequest name. - * @member {string} name - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest - * @instance - */ - ListNotificationChannelDescriptorsRequest.prototype.name = ""; - - /** - * ListNotificationChannelDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest - * @instance - */ - ListNotificationChannelDescriptorsRequest.prototype.pageSize = 0; - - /** - * ListNotificationChannelDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest - * @instance - */ - ListNotificationChannelDescriptorsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListNotificationChannelDescriptorsRequest instance using the specified properties. + * Creates a new ListTimeSeriesResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest instance + * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse instance */ - ListNotificationChannelDescriptorsRequest.create = function create(properties) { - return new ListNotificationChannelDescriptorsRequest(properties); + ListTimeSeriesResponse.create = function create(properties) { + return new ListTimeSeriesResponse(properties); }; /** - * Encodes the specified ListNotificationChannelDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelDescriptorsRequest.encode = function encode(message, writer) { + ListTimeSeriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 4, wireType 2 =*/34).string(message.name); + if (message.timeSeries != null && message.timeSeries.length) + for (var i = 0; i < message.timeSeries.length; ++i) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[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.executionErrors != null && message.executionErrors.length) + for (var i = 0; i < message.executionErrors.length; ++i) + $root.google.rpc.Status.encode(message.executionErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListNotificationChannelDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. + * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTimeSeriesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer. + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelDescriptorsRequest.decode = function decode(reader, length) { + ListTimeSeriesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); + case 1: + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); break; case 2: - message.pageSize = reader.int32(); + message.nextPageToken = reader.string(); break; case 3: - message.pageToken = reader.string(); + if (!(message.executionErrors && message.executionErrors.length)) + message.executionErrors = []; + message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -12088,126 +10744,161 @@ }; /** - * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + ListTimeSeriesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNotificationChannelDescriptorsRequest message. + * Verifies a ListTimeSeriesResponse message. * @function verify - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNotificationChannelDescriptorsRequest.verify = function verify(message) { + ListTimeSeriesResponse.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.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.timeSeries != null && message.hasOwnProperty("timeSeries")) { + if (!Array.isArray(message.timeSeries)) + return "timeSeries: array expected"; + for (var i = 0; i < message.timeSeries.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (error) + return "timeSeries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { + if (!Array.isArray(message.executionErrors)) + return "executionErrors: array expected"; + for (var i = 0; i < message.executionErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.executionErrors[i]); + if (error) + return "executionErrors." + error; + } + } return null; }; /** - * Creates a ListNotificationChannelDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse */ - ListNotificationChannelDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest) + ListTimeSeriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListTimeSeriesResponse) return object; - var message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + if (object.timeSeries) { + if (!Array.isArray(object.timeSeries)) + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: array expected"); + message.timeSeries = []; + for (var i = 0; i < object.timeSeries.length; ++i) { + if (typeof object.timeSeries[i] !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: object expected"); + message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.executionErrors) { + if (!Array.isArray(object.executionErrors)) + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: array expected"); + message.executionErrors = []; + for (var i = 0; i < object.executionErrors.length; ++i) { + if (typeof object.executionErrors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: object expected"); + message.executionErrors[i] = $root.google.rpc.Status.fromObject(object.executionErrors[i]); + } + } return message; }; /** - * Creates a plain object from a ListNotificationChannelDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @static - * @param {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest + * @param {google.monitoring.v3.ListTimeSeriesResponse} message ListTimeSeriesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotificationChannelDescriptorsRequest.toObject = function toObject(message, options) { + ListTimeSeriesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; + if (options.arrays || options.defaults) { + object.timeSeries = []; + object.executionErrors = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.timeSeries && message.timeSeries.length) { + object.timeSeries = []; + for (var j = 0; j < message.timeSeries.length; ++j) + object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.executionErrors && message.executionErrors.length) { + object.executionErrors = []; + for (var j = 0; j < message.executionErrors.length; ++j) + object.executionErrors[j] = $root.google.rpc.Status.toObject(message.executionErrors[j], options); } - 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; }; /** - * Converts this ListNotificationChannelDescriptorsRequest to JSON. + * Converts this ListTimeSeriesResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @memberof google.monitoring.v3.ListTimeSeriesResponse * @instance * @returns {Object.} JSON object */ - ListNotificationChannelDescriptorsRequest.prototype.toJSON = function toJSON() { + ListTimeSeriesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotificationChannelDescriptorsRequest; + return ListTimeSeriesResponse; })(); - v3.ListNotificationChannelDescriptorsResponse = (function() { + v3.CreateTimeSeriesRequest = (function() { /** - * Properties of a ListNotificationChannelDescriptorsResponse. + * Properties of a CreateTimeSeriesRequest. * @memberof google.monitoring.v3 - * @interface IListNotificationChannelDescriptorsResponse - * @property {Array.|null} [channelDescriptors] ListNotificationChannelDescriptorsResponse channelDescriptors - * @property {string|null} [nextPageToken] ListNotificationChannelDescriptorsResponse nextPageToken + * @interface ICreateTimeSeriesRequest + * @property {string|null} [name] CreateTimeSeriesRequest name + * @property {Array.|null} [timeSeries] CreateTimeSeriesRequest timeSeries */ /** - * Constructs a new ListNotificationChannelDescriptorsResponse. + * Constructs a new CreateTimeSeriesRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListNotificationChannelDescriptorsResponse. - * @implements IListNotificationChannelDescriptorsResponse + * @classdesc Represents a CreateTimeSeriesRequest. + * @implements ICreateTimeSeriesRequest * @constructor - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set */ - function ListNotificationChannelDescriptorsResponse(properties) { - this.channelDescriptors = []; + function CreateTimeSeriesRequest(properties) { + this.timeSeries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12215,91 +10906,91 @@ } /** - * ListNotificationChannelDescriptorsResponse channelDescriptors. - * @member {Array.} channelDescriptors - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * CreateTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @instance */ - ListNotificationChannelDescriptorsResponse.prototype.channelDescriptors = $util.emptyArray; + CreateTimeSeriesRequest.prototype.name = ""; /** - * ListNotificationChannelDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * CreateTimeSeriesRequest timeSeries. + * @member {Array.} timeSeries + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @instance */ - ListNotificationChannelDescriptorsResponse.prototype.nextPageToken = ""; + CreateTimeSeriesRequest.prototype.timeSeries = $util.emptyArray; /** - * Creates a new ListNotificationChannelDescriptorsResponse instance using the specified properties. + * Creates a new CreateTimeSeriesRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest instance */ - ListNotificationChannelDescriptorsResponse.create = function create(properties) { - return new ListNotificationChannelDescriptorsResponse(properties); + CreateTimeSeriesRequest.create = function create(properties) { + return new CreateTimeSeriesRequest(properties); }; /** - * Encodes the specified ListNotificationChannelDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse message or plain object to encode + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelDescriptorsResponse.encode = function encode(message, writer) { + CreateTimeSeriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channelDescriptors != null && message.channelDescriptors.length) - for (var i = 0; i < message.channelDescriptors.length; ++i) - $root.google.monitoring.v3.NotificationChannelDescriptor.encode(message.channelDescriptors[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.timeSeries != null && message.timeSeries.length) + for (var i = 0; i < message.timeSeries.length; ++i) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified ListNotificationChannelDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. + * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static - * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse message or plain object to encode + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer. + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelDescriptorsResponse.decode = function decode(reader, length) { + CreateTimeSeriesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.channelDescriptors && message.channelDescriptors.length)) - message.channelDescriptors = []; - message.channelDescriptors.push($root.google.monitoring.v3.NotificationChannelDescriptor.decode(reader, reader.uint32())); + case 3: + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -12310,133 +11001,134 @@ }; /** - * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNotificationChannelDescriptorsResponse message. + * Verifies a CreateTimeSeriesRequest message. * @function verify - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNotificationChannelDescriptorsResponse.verify = function verify(message) { + CreateTimeSeriesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.channelDescriptors != null && message.hasOwnProperty("channelDescriptors")) { - if (!Array.isArray(message.channelDescriptors)) - return "channelDescriptors: array expected"; - for (var i = 0; i < message.channelDescriptors.length; ++i) { - var error = $root.google.monitoring.v3.NotificationChannelDescriptor.verify(message.channelDescriptors[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { + if (!Array.isArray(message.timeSeries)) + return "timeSeries: array expected"; + for (var i = 0; i < message.timeSeries.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); if (error) - return "channelDescriptors." + error; + return "timeSeries." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListNotificationChannelDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest */ - ListNotificationChannelDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse) + CreateTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesRequest) return object; - var message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse(); - if (object.channelDescriptors) { - if (!Array.isArray(object.channelDescriptors)) - throw TypeError(".google.monitoring.v3.ListNotificationChannelDescriptorsResponse.channelDescriptors: array expected"); - message.channelDescriptors = []; - for (var i = 0; i < object.channelDescriptors.length; ++i) { - if (typeof object.channelDescriptors[i] !== "object") - throw TypeError(".google.monitoring.v3.ListNotificationChannelDescriptorsResponse.channelDescriptors: object expected"); - message.channelDescriptors[i] = $root.google.monitoring.v3.NotificationChannelDescriptor.fromObject(object.channelDescriptors[i]); + var message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeSeries) { + if (!Array.isArray(object.timeSeries)) + throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: array expected"); + message.timeSeries = []; + for (var i = 0; i < object.timeSeries.length; ++i) { + if (typeof object.timeSeries[i] !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: object expected"); + message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListNotificationChannelDescriptorsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @static - * @param {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse + * @param {google.monitoring.v3.CreateTimeSeriesRequest} message CreateTimeSeriesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotificationChannelDescriptorsResponse.toObject = function toObject(message, options) { + CreateTimeSeriesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.channelDescriptors = []; + object.timeSeries = []; if (options.defaults) - object.nextPageToken = ""; - if (message.channelDescriptors && message.channelDescriptors.length) { - object.channelDescriptors = []; - for (var j = 0; j < message.channelDescriptors.length; ++j) - object.channelDescriptors[j] = $root.google.monitoring.v3.NotificationChannelDescriptor.toObject(message.channelDescriptors[j], options); + object.name = ""; + if (message.timeSeries && message.timeSeries.length) { + object.timeSeries = []; + for (var j = 0; j < message.timeSeries.length; ++j) + object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListNotificationChannelDescriptorsResponse to JSON. + * Converts this CreateTimeSeriesRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @memberof google.monitoring.v3.CreateTimeSeriesRequest * @instance * @returns {Object.} JSON object */ - ListNotificationChannelDescriptorsResponse.prototype.toJSON = function toJSON() { + CreateTimeSeriesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotificationChannelDescriptorsResponse; + return CreateTimeSeriesRequest; })(); - v3.GetNotificationChannelDescriptorRequest = (function() { + v3.CreateTimeSeriesError = (function() { /** - * Properties of a GetNotificationChannelDescriptorRequest. + * Properties of a CreateTimeSeriesError. * @memberof google.monitoring.v3 - * @interface IGetNotificationChannelDescriptorRequest - * @property {string|null} [name] GetNotificationChannelDescriptorRequest name + * @interface ICreateTimeSeriesError + * @property {google.monitoring.v3.ITimeSeries|null} [timeSeries] CreateTimeSeriesError timeSeries + * @property {google.rpc.IStatus|null} [status] CreateTimeSeriesError status */ /** - * Constructs a new GetNotificationChannelDescriptorRequest. + * Constructs a new CreateTimeSeriesError. * @memberof google.monitoring.v3 - * @classdesc Represents a GetNotificationChannelDescriptorRequest. - * @implements IGetNotificationChannelDescriptorRequest + * @classdesc Represents a CreateTimeSeriesError. + * @implements ICreateTimeSeriesError * @constructor - * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set */ - function GetNotificationChannelDescriptorRequest(properties) { + function CreateTimeSeriesError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12444,75 +11136,88 @@ } /** - * GetNotificationChannelDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * CreateTimeSeriesError timeSeries. + * @member {google.monitoring.v3.ITimeSeries|null|undefined} timeSeries + * @memberof google.monitoring.v3.CreateTimeSeriesError * @instance */ - GetNotificationChannelDescriptorRequest.prototype.name = ""; + CreateTimeSeriesError.prototype.timeSeries = null; /** - * Creates a new GetNotificationChannelDescriptorRequest instance using the specified properties. + * CreateTimeSeriesError status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + */ + CreateTimeSeriesError.prototype.status = null; + + /** + * Creates a new CreateTimeSeriesError instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static - * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest instance + * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError instance */ - GetNotificationChannelDescriptorRequest.create = function create(properties) { - return new GetNotificationChannelDescriptorRequest(properties); + CreateTimeSeriesError.create = function create(properties) { + return new CreateTimeSeriesError(properties); }; /** - * Encodes the specified GetNotificationChannelDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static - * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationChannelDescriptorRequest.encode = function encode(message, writer) { + CreateTimeSeriesError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && message.hasOwnProperty("status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetNotificationChannelDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. + * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static - * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationChannelDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTimeSeriesError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer. + * Decodes a CreateTimeSeriesError message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationChannelDescriptorRequest.decode = function decode(reader, length) { + CreateTimeSeriesError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + case 1: + message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); + break; + case 2: + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -12523,108 +11228,129 @@ }; /** - * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationChannelDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTimeSeriesError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetNotificationChannelDescriptorRequest message. + * Verifies a CreateTimeSeriesError message. * @function verify - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetNotificationChannelDescriptorRequest.verify = function verify(message) { + CreateTimeSeriesError.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.timeSeries != null && message.hasOwnProperty("timeSeries")) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries); + if (error) + return "timeSeries." + error; + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } return null; }; /** - * Creates a GetNotificationChannelDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError */ - GetNotificationChannelDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest) + CreateTimeSeriesError.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesError) return object; - var message = new $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + if (object.timeSeries != null) { + if (typeof object.timeSeries !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.timeSeries: object expected"); + message.timeSeries = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries); + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } return message; }; /** - * Creates a plain object from a GetNotificationChannelDescriptorRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @static - * @param {google.monitoring.v3.GetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest + * @param {google.monitoring.v3.CreateTimeSeriesError} message CreateTimeSeriesError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNotificationChannelDescriptorRequest.toObject = function toObject(message, options) { + CreateTimeSeriesError.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.timeSeries = null; + object.status = null; + } + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + object.timeSeries = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); return object; }; /** - * Converts this GetNotificationChannelDescriptorRequest to JSON. + * Converts this CreateTimeSeriesError to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @memberof google.monitoring.v3.CreateTimeSeriesError * @instance * @returns {Object.} JSON object */ - GetNotificationChannelDescriptorRequest.prototype.toJSON = function toJSON() { + CreateTimeSeriesError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetNotificationChannelDescriptorRequest; + return CreateTimeSeriesError; })(); - v3.CreateNotificationChannelRequest = (function() { + v3.CreateTimeSeriesSummary = (function() { /** - * Properties of a CreateNotificationChannelRequest. + * Properties of a CreateTimeSeriesSummary. * @memberof google.monitoring.v3 - * @interface ICreateNotificationChannelRequest - * @property {string|null} [name] CreateNotificationChannelRequest name - * @property {google.monitoring.v3.INotificationChannel|null} [notificationChannel] CreateNotificationChannelRequest notificationChannel + * @interface ICreateTimeSeriesSummary + * @property {number|null} [totalPointCount] CreateTimeSeriesSummary totalPointCount + * @property {number|null} [successPointCount] CreateTimeSeriesSummary successPointCount + * @property {Array.|null} [errors] CreateTimeSeriesSummary errors */ /** - * Constructs a new CreateNotificationChannelRequest. + * Constructs a new CreateTimeSeriesSummary. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateNotificationChannelRequest. - * @implements ICreateNotificationChannelRequest + * @classdesc Represents a CreateTimeSeriesSummary. + * @implements ICreateTimeSeriesSummary * @constructor - * @param {google.monitoring.v3.ICreateNotificationChannelRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set */ - function CreateNotificationChannelRequest(properties) { + function CreateTimeSeriesSummary(properties) { + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12632,88 +11358,104 @@ } /** - * CreateNotificationChannelRequest name. - * @member {string} name - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * CreateTimeSeriesSummary totalPointCount. + * @member {number} totalPointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @instance */ - CreateNotificationChannelRequest.prototype.name = ""; + CreateTimeSeriesSummary.prototype.totalPointCount = 0; /** - * CreateNotificationChannelRequest notificationChannel. - * @member {google.monitoring.v3.INotificationChannel|null|undefined} notificationChannel - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * CreateTimeSeriesSummary successPointCount. + * @member {number} successPointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @instance */ - CreateNotificationChannelRequest.prototype.notificationChannel = null; + CreateTimeSeriesSummary.prototype.successPointCount = 0; /** - * Creates a new CreateNotificationChannelRequest instance using the specified properties. + * CreateTimeSeriesSummary errors. + * @member {Array.} errors + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.errors = $util.emptyArray; + + /** + * Creates a new CreateTimeSeriesSummary instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static - * @param {google.monitoring.v3.ICreateNotificationChannelRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest instance + * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary instance */ - CreateNotificationChannelRequest.create = function create(properties) { - return new CreateNotificationChannelRequest(properties); + CreateTimeSeriesSummary.create = function create(properties) { + return new CreateTimeSeriesSummary(properties); }; /** - * Encodes the specified CreateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static - * @param {google.monitoring.v3.ICreateNotificationChannelRequest} message CreateNotificationChannelRequest message or plain object to encode + * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateNotificationChannelRequest.encode = function encode(message, writer) { + CreateTimeSeriesSummary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) - $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.encode(message.errors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. + * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static - * @param {google.monitoring.v3.ICreateNotificationChannelRequest} message CreateNotificationChannelRequest message or plain object to encode + * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateTimeSeriesSummary.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer. + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateNotificationChannelRequest.decode = function decode(reader, length) { + CreateTimeSeriesSummary.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateNotificationChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + case 1: + message.totalPointCount = reader.int32(); break; case 2: - message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); + message.successPointCount = reader.int32(); + break; + case 3: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -12724,125 +11466,365 @@ }; /** - * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + CreateTimeSeriesSummary.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateNotificationChannelRequest message. + * Verifies a CreateTimeSeriesSummary message. * @function verify - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateNotificationChannelRequest.verify = function verify(message) { + CreateTimeSeriesSummary.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.notificationChannel != null && message.hasOwnProperty("notificationChannel")) { - var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannel); - if (error) - return "notificationChannel." + error; + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + if (!$util.isInteger(message.totalPointCount)) + return "totalPointCount: integer expected"; + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + if (!$util.isInteger(message.successPointCount)) + return "successPointCount: integer expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } } return null; }; /** - * Creates a CreateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary */ - CreateNotificationChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateNotificationChannelRequest) + CreateTimeSeriesSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary) return object; - var message = new $root.google.monitoring.v3.CreateNotificationChannelRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.notificationChannel != null) { - if (typeof object.notificationChannel !== "object") - throw TypeError(".google.monitoring.v3.CreateNotificationChannelRequest.notificationChannel: object expected"); - message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannel); + var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + if (object.totalPointCount != null) + message.totalPointCount = object.totalPointCount | 0; + if (object.successPointCount != null) + message.successPointCount = object.successPointCount | 0; + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: object expected"); + message.errors[i] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.fromObject(object.errors[i]); + } } return message; }; /** - * Creates a plain object from a CreateNotificationChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @static - * @param {google.monitoring.v3.CreateNotificationChannelRequest} message CreateNotificationChannelRequest + * @param {google.monitoring.v3.CreateTimeSeriesSummary} message CreateTimeSeriesSummary * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateNotificationChannelRequest.toObject = function toObject(message, options) { + CreateTimeSeriesSummary.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errors = []; if (options.defaults) { - object.notificationChannel = null; - object.name = ""; + object.totalPointCount = 0; + object.successPointCount = 0; + } + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + object.totalPointCount = message.totalPointCount; + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + object.successPointCount = message.successPointCount; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.toObject(message.errors[j], options); } - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) - object.notificationChannel = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannel, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this CreateNotificationChannelRequest to JSON. + * Converts this CreateTimeSeriesSummary to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @memberof google.monitoring.v3.CreateTimeSeriesSummary * @instance * @returns {Object.} JSON object */ - CreateNotificationChannelRequest.prototype.toJSON = function toJSON() { + CreateTimeSeriesSummary.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateNotificationChannelRequest; + CreateTimeSeriesSummary.Error = (function() { + + /** + * Properties of an Error. + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @interface IError + * @property {google.rpc.IStatus|null} [status] Error status + * @property {number|null} [pointCount] Error pointCount + */ + + /** + * Constructs a new Error. + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set + */ + function Error(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Error status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + */ + Error.prototype.status = null; + + /** + * Error pointCount. + * @member {number} pointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + */ + Error.prototype.pointCount = 0; + + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && message.hasOwnProperty("status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); + return writer; + }; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 2: + message.pointCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + if (!$util.isInteger(message.pointCount)) + return "pointCount: integer expected"; + return null; + }; + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + */ + Error.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary.Error) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.Error.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + if (object.pointCount != null) + message.pointCount = object.pointCount | 0; + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = null; + object.pointCount = 0; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + object.pointCount = message.pointCount; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Error; + })(); + + return CreateTimeSeriesSummary; })(); - v3.ListNotificationChannelsRequest = (function() { + v3.NotificationChannelDescriptor = (function() { /** - * Properties of a ListNotificationChannelsRequest. + * Properties of a NotificationChannelDescriptor. * @memberof google.monitoring.v3 - * @interface IListNotificationChannelsRequest - * @property {string|null} [name] ListNotificationChannelsRequest name - * @property {string|null} [filter] ListNotificationChannelsRequest filter - * @property {string|null} [orderBy] ListNotificationChannelsRequest orderBy - * @property {number|null} [pageSize] ListNotificationChannelsRequest pageSize - * @property {string|null} [pageToken] ListNotificationChannelsRequest pageToken + * @interface INotificationChannelDescriptor + * @property {string|null} [name] NotificationChannelDescriptor name + * @property {string|null} [type] NotificationChannelDescriptor type + * @property {string|null} [displayName] NotificationChannelDescriptor displayName + * @property {string|null} [description] NotificationChannelDescriptor description + * @property {Array.|null} [labels] NotificationChannelDescriptor labels + * @property {Array.|null} [supportedTiers] NotificationChannelDescriptor supportedTiers + * @property {google.api.LaunchStage|null} [launchStage] NotificationChannelDescriptor launchStage */ /** - * Constructs a new ListNotificationChannelsRequest. + * Constructs a new NotificationChannelDescriptor. * @memberof google.monitoring.v3 - * @classdesc Represents a ListNotificationChannelsRequest. - * @implements IListNotificationChannelsRequest + * @classdesc Represents a NotificationChannelDescriptor. + * @implements INotificationChannelDescriptor * @constructor - * @param {google.monitoring.v3.IListNotificationChannelsRequest=} [properties] Properties to set + * @param {google.monitoring.v3.INotificationChannelDescriptor=} [properties] Properties to set */ - function ListNotificationChannelsRequest(properties) { + function NotificationChannelDescriptor(properties) { + this.labels = []; + this.supportedTiers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12850,127 +11832,167 @@ } /** - * ListNotificationChannelsRequest name. + * NotificationChannelDescriptor name. * @member {string} name - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @instance */ - ListNotificationChannelsRequest.prototype.name = ""; + NotificationChannelDescriptor.prototype.name = ""; /** - * ListNotificationChannelsRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * NotificationChannelDescriptor type. + * @member {string} type + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @instance */ - ListNotificationChannelsRequest.prototype.filter = ""; + NotificationChannelDescriptor.prototype.type = ""; /** - * ListNotificationChannelsRequest orderBy. - * @member {string} orderBy - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * NotificationChannelDescriptor displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @instance */ - ListNotificationChannelsRequest.prototype.orderBy = ""; + NotificationChannelDescriptor.prototype.displayName = ""; /** - * ListNotificationChannelsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * NotificationChannelDescriptor description. + * @member {string} description + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @instance */ - ListNotificationChannelsRequest.prototype.pageSize = 0; + NotificationChannelDescriptor.prototype.description = ""; /** - * ListNotificationChannelsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * NotificationChannelDescriptor labels. + * @member {Array.} labels + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @instance */ - ListNotificationChannelsRequest.prototype.pageToken = ""; + NotificationChannelDescriptor.prototype.labels = $util.emptyArray; /** - * Creates a new ListNotificationChannelsRequest instance using the specified properties. + * NotificationChannelDescriptor supportedTiers. + * @member {Array.} supportedTiers + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.supportedTiers = $util.emptyArray; + + /** + * NotificationChannelDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @instance + */ + NotificationChannelDescriptor.prototype.launchStage = 0; + + /** + * Creates a new NotificationChannelDescriptor instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static - * @param {google.monitoring.v3.IListNotificationChannelsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest instance + * @param {google.monitoring.v3.INotificationChannelDescriptor=} [properties] Properties to set + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor instance */ - ListNotificationChannelsRequest.create = function create(properties) { - return new ListNotificationChannelsRequest(properties); + NotificationChannelDescriptor.create = function create(properties) { + return new NotificationChannelDescriptor(properties); }; /** - * Encodes the specified ListNotificationChannelsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * Encodes the specified NotificationChannelDescriptor message. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static - * @param {google.monitoring.v3.IListNotificationChannelsRequest} message ListNotificationChannelsRequest message or plain object to encode + * @param {google.monitoring.v3.INotificationChannelDescriptor} message NotificationChannelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelsRequest.encode = function encode(message, writer) { + NotificationChannelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + 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.supportedTiers != null && message.supportedTiers.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (var i = 0; i < message.supportedTiers.length; ++i) + writer.int32(message.supportedTiers[i]); + writer.ldelim(); + } if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); + writer.uint32(/* id 6, wireType 2 =*/50).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 ListNotificationChannelsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. + * Encodes the specified NotificationChannelDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static - * @param {google.monitoring.v3.IListNotificationChannelsRequest} message ListNotificationChannelsRequest message or plain object to encode + * @param {google.monitoring.v3.INotificationChannelDescriptor} message NotificationChannelDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + NotificationChannelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer. + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelsRequest.decode = function decode(reader, length) { + NotificationChannelDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannelDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: + case 6: message.name = reader.string(); break; - case 6: - message.filter = reader.string(); + case 1: + message.type = reader.string(); break; - case 7: - message.orderBy = reader.string(); + case 2: + message.displayName = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.description = reader.string(); break; case 4: - message.pageToken = reader.string(); + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.supportedTiers && message.supportedTiers.length)) + message.supportedTiers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedTiers.push(reader.int32()); + } else + message.supportedTiers.push(reader.int32()); + break; + case 7: + message.launchStage = reader.int32(); break; default: reader.skipType(tag & 7); @@ -12981,142 +12003,249 @@ }; /** - * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer, length delimited. + * Decodes a NotificationChannelDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + NotificationChannelDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNotificationChannelsRequest message. + * Verifies a NotificationChannelDescriptor message. * @function verify - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNotificationChannelsRequest.verify = function verify(message) { + NotificationChannelDescriptor.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.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 ListNotificationChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + 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.supportedTiers != null && message.hasOwnProperty("supportedTiers")) { + if (!Array.isArray(message.supportedTiers)) + return "supportedTiers: array expected"; + for (var i = 0; i < message.supportedTiers.length; ++i) + switch (message.supportedTiers[i]) { + default: + return "supportedTiers: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + 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 NotificationChannelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest + * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor */ - ListNotificationChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListNotificationChannelsRequest) + NotificationChannelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.NotificationChannelDescriptor) return object; - var message = new $root.google.monitoring.v3.ListNotificationChannelsRequest(); + var message = new $root.google.monitoring.v3.NotificationChannelDescriptor(); if (object.name != null) message.name = String(object.name); - 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.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.monitoring.v3.NotificationChannelDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannelDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + if (object.supportedTiers) { + if (!Array.isArray(object.supportedTiers)) + throw TypeError(".google.monitoring.v3.NotificationChannelDescriptor.supportedTiers: array expected"); + message.supportedTiers = []; + for (var i = 0; i < object.supportedTiers.length; ++i) + switch (object.supportedTiers[i]) { + default: + case "SERVICE_TIER_UNSPECIFIED": + case 0: + message.supportedTiers[i] = 0; + break; + case "SERVICE_TIER_BASIC": + case 1: + message.supportedTiers[i] = 1; + break; + case "SERVICE_TIER_PREMIUM": + case 2: + message.supportedTiers[i] = 2; + break; + } + } + 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 ListNotificationChannelsRequest message. Also converts values to other types if specified. + * Creates a plain object from a NotificationChannelDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @static - * @param {google.monitoring.v3.ListNotificationChannelsRequest} message ListNotificationChannelsRequest + * @param {google.monitoring.v3.NotificationChannelDescriptor} message NotificationChannelDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotificationChannelsRequest.toObject = function toObject(message, options) { + NotificationChannelDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.supportedTiers = []; + } if (options.defaults) { - object.pageSize = 0; - object.pageToken = ""; + object.type = ""; + object.displayName = ""; + object.description = ""; object.name = ""; - object.filter = ""; - object.orderBy = ""; + 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.supportedTiers && message.supportedTiers.length) { + object.supportedTiers = []; + for (var j = 0; j < message.supportedTiers.length; ++j) + object.supportedTiers[j] = options.enums === String ? $root.google.monitoring.v3.ServiceTier[message.supportedTiers[j]] : message.supportedTiers[j]; } - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] : message.launchStage; return object; }; /** - * Converts this ListNotificationChannelsRequest to JSON. + * Converts this NotificationChannelDescriptor to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @memberof google.monitoring.v3.NotificationChannelDescriptor * @instance * @returns {Object.} JSON object */ - ListNotificationChannelsRequest.prototype.toJSON = function toJSON() { + NotificationChannelDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotificationChannelsRequest; + return NotificationChannelDescriptor; })(); - v3.ListNotificationChannelsResponse = (function() { + v3.NotificationChannel = (function() { /** - * Properties of a ListNotificationChannelsResponse. + * Properties of a NotificationChannel. * @memberof google.monitoring.v3 - * @interface IListNotificationChannelsResponse - * @property {Array.|null} [notificationChannels] ListNotificationChannelsResponse notificationChannels - * @property {string|null} [nextPageToken] ListNotificationChannelsResponse nextPageToken + * @interface INotificationChannel + * @property {string|null} [type] NotificationChannel type + * @property {string|null} [name] NotificationChannel name + * @property {string|null} [displayName] NotificationChannel displayName + * @property {string|null} [description] NotificationChannel description + * @property {Object.|null} [labels] NotificationChannel labels + * @property {Object.|null} [userLabels] NotificationChannel userLabels + * @property {google.monitoring.v3.NotificationChannel.VerificationStatus|null} [verificationStatus] NotificationChannel verificationStatus + * @property {google.protobuf.IBoolValue|null} [enabled] NotificationChannel enabled */ /** - * Constructs a new ListNotificationChannelsResponse. + * Constructs a new NotificationChannel. * @memberof google.monitoring.v3 - * @classdesc Represents a ListNotificationChannelsResponse. - * @implements IListNotificationChannelsResponse + * @classdesc Represents a NotificationChannel. + * @implements INotificationChannel * @constructor - * @param {google.monitoring.v3.IListNotificationChannelsResponse=} [properties] Properties to set + * @param {google.monitoring.v3.INotificationChannel=} [properties] Properties to set */ - function ListNotificationChannelsResponse(properties) { - this.notificationChannels = []; + function NotificationChannel(properties) { + this.labels = {}; + this.userLabels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13124,91 +12253,178 @@ } /** - * ListNotificationChannelsResponse notificationChannels. - * @member {Array.} notificationChannels - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * NotificationChannel type. + * @member {string} type + * @memberof google.monitoring.v3.NotificationChannel * @instance */ - ListNotificationChannelsResponse.prototype.notificationChannels = $util.emptyArray; + NotificationChannel.prototype.type = ""; /** - * ListNotificationChannelsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * NotificationChannel name. + * @member {string} name + * @memberof google.monitoring.v3.NotificationChannel * @instance */ - ListNotificationChannelsResponse.prototype.nextPageToken = ""; + NotificationChannel.prototype.name = ""; /** - * Creates a new ListNotificationChannelsResponse instance using the specified properties. + * NotificationChannel displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.displayName = ""; + + /** + * NotificationChannel description. + * @member {string} description + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.description = ""; + + /** + * NotificationChannel labels. + * @member {Object.} labels + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.labels = $util.emptyObject; + + /** + * NotificationChannel userLabels. + * @member {Object.} userLabels + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.userLabels = $util.emptyObject; + + /** + * NotificationChannel verificationStatus. + * @member {google.monitoring.v3.NotificationChannel.VerificationStatus} verificationStatus + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.verificationStatus = 0; + + /** + * NotificationChannel enabled. + * @member {google.protobuf.IBoolValue|null|undefined} enabled + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.enabled = null; + + /** + * Creates a new NotificationChannel instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static - * @param {google.monitoring.v3.IListNotificationChannelsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse instance + * @param {google.monitoring.v3.INotificationChannel=} [properties] Properties to set + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel instance */ - ListNotificationChannelsResponse.create = function create(properties) { - return new ListNotificationChannelsResponse(properties); + NotificationChannel.create = function create(properties) { + return new NotificationChannel(properties); }; /** - * Encodes the specified ListNotificationChannelsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * Encodes the specified NotificationChannel message. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static - * @param {google.monitoring.v3.IListNotificationChannelsResponse} message ListNotificationChannelsResponse message or plain object to encode + * @param {google.monitoring.v3.INotificationChannel} message NotificationChannel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelsResponse.encode = function encode(message, writer) { + NotificationChannel.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.notificationChannels != null && message.notificationChannels.length) - for (var i = 0; i < message.notificationChannels.length; ++i) - $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.labels != null && message.hasOwnProperty("labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.userLabels != null && message.hasOwnProperty("userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); + if (message.enabled != null && message.hasOwnProperty("enabled")) + $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListNotificationChannelsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. + * Encodes the specified NotificationChannel message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static - * @param {google.monitoring.v3.IListNotificationChannelsResponse} message ListNotificationChannelsResponse message or plain object to encode + * @param {google.monitoring.v3.INotificationChannel} message NotificationChannel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListNotificationChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + NotificationChannel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer. + * Decodes a NotificationChannel message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelsResponse.decode = function decode(reader, length) { + NotificationChannel.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannel(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 6: + message.name = reader.string(); + break; case 3: - if (!(message.notificationChannels && message.notificationChannels.length)) - message.notificationChannels = []; - message.notificationChannels.push($root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32())); + message.displayName = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 4: + message.description = reader.string(); + break; + case 5: + reader.skip().pos++; + if (message.labels === $util.emptyObject) + message.labels = {}; + key = reader.string(); + reader.pos++; + message.labels[key] = reader.string(); + break; + case 8: + reader.skip().pos++; + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + key = reader.string(); + reader.pos++; + message.userLabels[key] = reader.string(); + break; + case 9: + message.verificationStatus = reader.int32(); + break; + case 11: + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -13219,541 +12435,599 @@ }; /** - * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer, length delimited. + * Decodes a NotificationChannel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListNotificationChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + NotificationChannel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListNotificationChannelsResponse message. + * Verifies a NotificationChannel message. * @function verify - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListNotificationChannelsResponse.verify = function verify(message) { + NotificationChannel.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { - if (!Array.isArray(message.notificationChannels)) - return "notificationChannels: array expected"; - for (var i = 0; i < message.notificationChannels.length; ++i) { - var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannels[i]); - if (error) - return "notificationChannels." + error; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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 (!$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.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.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + switch (message.verificationStatus) { + default: + return "verificationStatus: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.enabled); + if (error) + return "enabled." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListNotificationChannelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationChannel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse + * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel */ - ListNotificationChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListNotificationChannelsResponse) + NotificationChannel.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.NotificationChannel) return object; - var message = new $root.google.monitoring.v3.ListNotificationChannelsResponse(); - if (object.notificationChannels) { - if (!Array.isArray(object.notificationChannels)) - throw TypeError(".google.monitoring.v3.ListNotificationChannelsResponse.notificationChannels: array expected"); - message.notificationChannels = []; - for (var i = 0; i < object.notificationChannels.length; ++i) { - if (typeof object.notificationChannels[i] !== "object") - throw TypeError(".google.monitoring.v3.ListNotificationChannelsResponse.notificationChannels: object expected"); - message.notificationChannels[i] = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannels[i]); - } + var message = new $root.google.monitoring.v3.NotificationChannel(); + if (object.type != null) + message.type = String(object.type); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.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.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.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]]); + } + switch (object.verificationStatus) { + case "VERIFICATION_STATUS_UNSPECIFIED": + case 0: + message.verificationStatus = 0; + break; + case "UNVERIFIED": + case 1: + message.verificationStatus = 1; + break; + case "VERIFIED": + case 2: + message.verificationStatus = 2; + break; + } + if (object.enabled != null) { + if (typeof object.enabled !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.enabled: object expected"); + message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListNotificationChannelsResponse message. Also converts values to other types if specified. + * Creates a plain object from a NotificationChannel message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @static - * @param {google.monitoring.v3.ListNotificationChannelsResponse} message ListNotificationChannelsResponse + * @param {google.monitoring.v3.NotificationChannel} message NotificationChannel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListNotificationChannelsResponse.toObject = function toObject(message, options) { + NotificationChannel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.notificationChannels = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.notificationChannels && message.notificationChannels.length) { - object.notificationChannels = []; - for (var j = 0; j < message.notificationChannels.length; ++j) - object.notificationChannels[j] = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannels[j], options); + if (options.objects || options.defaults) { + object.labels = {}; + object.userLabels = {}; + } + if (options.defaults) { + object.type = ""; + object.displayName = ""; + object.description = ""; + object.name = ""; + object.verificationStatus = options.enums === String ? "VERIFICATION_STATUS_UNSPECIFIED" : 0; + object.enabled = null; + } + 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; + 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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + object.verificationStatus = options.enums === String ? $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] : message.verificationStatus; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); return object; }; /** - * Converts this ListNotificationChannelsResponse to JSON. + * Converts this NotificationChannel to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @memberof google.monitoring.v3.NotificationChannel * @instance * @returns {Object.} JSON object */ - ListNotificationChannelsResponse.prototype.toJSON = function toJSON() { + NotificationChannel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListNotificationChannelsResponse; - })(); - - v3.GetNotificationChannelRequest = (function() { - /** - * Properties of a GetNotificationChannelRequest. - * @memberof google.monitoring.v3 - * @interface IGetNotificationChannelRequest - * @property {string|null} [name] GetNotificationChannelRequest name + * VerificationStatus enum. + * @name google.monitoring.v3.NotificationChannel.VerificationStatus + * @enum {string} + * @property {number} VERIFICATION_STATUS_UNSPECIFIED=0 VERIFICATION_STATUS_UNSPECIFIED value + * @property {number} UNVERIFIED=1 UNVERIFIED value + * @property {number} VERIFIED=2 VERIFIED value */ + NotificationChannel.VerificationStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERIFICATION_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + values[valuesById[2] = "VERIFIED"] = 2; + return values; + })(); + + return NotificationChannel; + })(); + + v3.NotificationChannelService = (function() { /** - * Constructs a new GetNotificationChannelRequest. + * Constructs a new NotificationChannelService service. * @memberof google.monitoring.v3 - * @classdesc Represents a GetNotificationChannelRequest. - * @implements IGetNotificationChannelRequest + * @classdesc Represents a NotificationChannelService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.monitoring.v3.IGetNotificationChannelRequest=} [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 GetNotificationChannelRequest(properties) { - if (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 NotificationChannelService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * GetNotificationChannelRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @instance - */ - GetNotificationChannelRequest.prototype.name = ""; + (NotificationChannelService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NotificationChannelService; /** - * Creates a new GetNotificationChannelRequest instance using the specified properties. + * Creates new NotificationChannelService service using the specified rpc implementation. * @function create - * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @memberof google.monitoring.v3.NotificationChannelService * @static - * @param {google.monitoring.v3.IGetNotificationChannelRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest instance + * @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 {NotificationChannelService} RPC service. Useful where requests and/or responses are streamed. */ - GetNotificationChannelRequest.create = function create(properties) { - return new GetNotificationChannelRequest(properties); + NotificationChannelService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified GetNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {google.monitoring.v3.IGetNotificationChannelRequest} message GetNotificationChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef ListNotificationChannelDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} [response] ListNotificationChannelDescriptorsResponse */ - GetNotificationChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - return writer; - }; /** - * Encodes the specified GetNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {google.monitoring.v3.IGetNotificationChannelRequest} message GetNotificationChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListNotificationChannelDescriptors. + * @function listNotificationChannelDescriptors + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} request ListNotificationChannelDescriptorsRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.ListNotificationChannelDescriptorsCallback} callback Node-style callback called with the error, if any, and ListNotificationChannelDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - GetNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(NotificationChannelService.prototype.listNotificationChannelDescriptors = function listNotificationChannelDescriptors(request, callback) { + return this.rpcCall(listNotificationChannelDescriptors, $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest, $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse, request, callback); + }, "name", { value: "ListNotificationChannelDescriptors" }); /** - * Decodes a GetNotificationChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListNotificationChannelDescriptors. + * @function listNotificationChannelDescriptors + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} request ListNotificationChannelDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetNotificationChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetNotificationChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest - * @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.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef GetNotificationChannelDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannelDescriptor} [response] NotificationChannelDescriptor */ - GetNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetNotificationChannelRequest message. - * @function verify - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetNotificationChannelDescriptor. + * @function getNotificationChannelDescriptor + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} request GetNotificationChannelDescriptorRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptorCallback} callback Node-style callback called with the error, if any, and NotificationChannelDescriptor + * @returns {undefined} + * @variation 1 */ - GetNotificationChannelRequest.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; - }; + Object.defineProperty(NotificationChannelService.prototype.getNotificationChannelDescriptor = function getNotificationChannelDescriptor(request, callback) { + return this.rpcCall(getNotificationChannelDescriptor, $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest, $root.google.monitoring.v3.NotificationChannelDescriptor, request, callback); + }, "name", { value: "GetNotificationChannelDescriptor" }); /** - * Creates a GetNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest + * Calls GetNotificationChannelDescriptor. + * @function getNotificationChannelDescriptor + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} request GetNotificationChannelDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetNotificationChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetNotificationChannelRequest) - return object; - var message = new $root.google.monitoring.v3.GetNotificationChannelRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetNotificationChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.GetNotificationChannelRequest - * @static - * @param {google.monitoring.v3.GetNotificationChannelRequest} message GetNotificationChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef ListNotificationChannelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListNotificationChannelsResponse} [response] ListNotificationChannelsResponse */ - GetNotificationChannelRequest.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 GetNotificationChannelRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.GetNotificationChannelRequest + * Calls ListNotificationChannels. + * @function listNotificationChannels + * @memberof google.monitoring.v3.NotificationChannelService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IListNotificationChannelsRequest} request ListNotificationChannelsRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.ListNotificationChannelsCallback} callback Node-style callback called with the error, if any, and ListNotificationChannelsResponse + * @returns {undefined} + * @variation 1 */ - GetNotificationChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetNotificationChannelRequest; - })(); - - v3.UpdateNotificationChannelRequest = (function() { + Object.defineProperty(NotificationChannelService.prototype.listNotificationChannels = function listNotificationChannels(request, callback) { + return this.rpcCall(listNotificationChannels, $root.google.monitoring.v3.ListNotificationChannelsRequest, $root.google.monitoring.v3.ListNotificationChannelsResponse, request, callback); + }, "name", { value: "ListNotificationChannels" }); /** - * Properties of an UpdateNotificationChannelRequest. - * @memberof google.monitoring.v3 - * @interface IUpdateNotificationChannelRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNotificationChannelRequest updateMask - * @property {google.monitoring.v3.INotificationChannel|null} [notificationChannel] UpdateNotificationChannelRequest notificationChannel + * Calls ListNotificationChannels. + * @function listNotificationChannels + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IListNotificationChannelsRequest} request ListNotificationChannelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new UpdateNotificationChannelRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents an UpdateNotificationChannelRequest. - * @implements IUpdateNotificationChannelRequest - * @constructor - * @param {google.monitoring.v3.IUpdateNotificationChannelRequest=} [properties] Properties to set + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef GetNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel */ - function UpdateNotificationChannelRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * UpdateNotificationChannelRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * Calls GetNotificationChannel. + * @function getNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService * @instance + * @param {google.monitoring.v3.IGetNotificationChannelRequest} request GetNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 */ - UpdateNotificationChannelRequest.prototype.updateMask = null; + Object.defineProperty(NotificationChannelService.prototype.getNotificationChannel = function getNotificationChannel(request, callback) { + return this.rpcCall(getNotificationChannel, $root.google.monitoring.v3.GetNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "GetNotificationChannel" }); /** - * UpdateNotificationChannelRequest notificationChannel. - * @member {google.monitoring.v3.INotificationChannel|null|undefined} notificationChannel - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * Calls GetNotificationChannel. + * @function getNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService * @instance + * @param {google.monitoring.v3.IGetNotificationChannelRequest} request GetNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateNotificationChannelRequest.prototype.notificationChannel = null; /** - * Creates a new UpdateNotificationChannelRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {google.monitoring.v3.IUpdateNotificationChannelRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest instance + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef CreateNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel */ - UpdateNotificationChannelRequest.create = function create(properties) { - return new UpdateNotificationChannelRequest(properties); - }; /** - * Encodes the specified UpdateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} message UpdateNotificationChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateNotificationChannel. + * @function createNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} request CreateNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.CreateNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 */ - UpdateNotificationChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) - $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + Object.defineProperty(NotificationChannelService.prototype.createNotificationChannel = function createNotificationChannel(request, callback) { + return this.rpcCall(createNotificationChannel, $root.google.monitoring.v3.CreateNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "CreateNotificationChannel" }); /** - * Encodes the specified UpdateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} message UpdateNotificationChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateNotificationChannel. + * @function createNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} request CreateNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest - * @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.monitoring.v3.NotificationChannelService#updateNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef UpdateNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel */ - UpdateNotificationChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateNotificationChannelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateNotificationChannel. + * @function updateNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} request UpdateNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.UpdateNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 */ - UpdateNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(NotificationChannelService.prototype.updateNotificationChannel = function updateNotificationChannel(request, callback) { + return this.rpcCall(updateNotificationChannel, $root.google.monitoring.v3.UpdateNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "UpdateNotificationChannel" }); /** - * Verifies an UpdateNotificationChannelRequest message. - * @function verify - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateNotificationChannel. + * @function updateNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} request UpdateNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateNotificationChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) { - var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannel); - if (error) - return "notificationChannel." + error; - } - return null; - }; /** - * Creates an UpdateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef DeleteNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - UpdateNotificationChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.UpdateNotificationChannelRequest) - return object; - var message = new $root.google.monitoring.v3.UpdateNotificationChannelRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.monitoring.v3.UpdateNotificationChannelRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.notificationChannel != null) { - if (typeof object.notificationChannel !== "object") - throw TypeError(".google.monitoring.v3.UpdateNotificationChannelRequest.notificationChannel: object expected"); - message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannel); - } - return message; - }; /** - * Creates a plain object from an UpdateNotificationChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest - * @static - * @param {google.monitoring.v3.UpdateNotificationChannelRequest} message UpdateNotificationChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls DeleteNotificationChannel. + * @function deleteNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} request DeleteNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.DeleteNotificationChannelCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - UpdateNotificationChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.notificationChannel = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) - object.notificationChannel = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannel, options); - return object; - }; + Object.defineProperty(NotificationChannelService.prototype.deleteNotificationChannel = function deleteNotificationChannel(request, callback) { + return this.rpcCall(deleteNotificationChannel, $root.google.monitoring.v3.DeleteNotificationChannelRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteNotificationChannel" }); /** - * Converts this UpdateNotificationChannelRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * Calls DeleteNotificationChannel. + * @function deleteNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} request DeleteNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateNotificationChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return UpdateNotificationChannelRequest; + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef SendNotificationChannelVerificationCodeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls SendNotificationChannelVerificationCode. + * @function sendNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} request SendNotificationChannelVerificationCodeRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.SendNotificationChannelVerificationCodeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.sendNotificationChannelVerificationCode = function sendNotificationChannelVerificationCode(request, callback) { + return this.rpcCall(sendNotificationChannelVerificationCode, $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "SendNotificationChannelVerificationCode" }); + + /** + * Calls SendNotificationChannelVerificationCode. + * @function sendNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} request SendNotificationChannelVerificationCodeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef GetNotificationChannelVerificationCodeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} [response] GetNotificationChannelVerificationCodeResponse + */ + + /** + * Calls GetNotificationChannelVerificationCode. + * @function getNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} request GetNotificationChannelVerificationCodeRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.GetNotificationChannelVerificationCodeCallback} callback Node-style callback called with the error, if any, and GetNotificationChannelVerificationCodeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.getNotificationChannelVerificationCode = function getNotificationChannelVerificationCode(request, callback) { + return this.rpcCall(getNotificationChannelVerificationCode, $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest, $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse, request, callback); + }, "name", { value: "GetNotificationChannelVerificationCode" }); + + /** + * Calls GetNotificationChannelVerificationCode. + * @function getNotificationChannelVerificationCode + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} request GetNotificationChannelVerificationCodeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. + * @memberof google.monitoring.v3.NotificationChannelService + * @typedef VerifyNotificationChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.NotificationChannel} [response] NotificationChannel + */ + + /** + * Calls VerifyNotificationChannel. + * @function verifyNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} request VerifyNotificationChannelRequest message or plain object + * @param {google.monitoring.v3.NotificationChannelService.VerifyNotificationChannelCallback} callback Node-style callback called with the error, if any, and NotificationChannel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NotificationChannelService.prototype.verifyNotificationChannel = function verifyNotificationChannel(request, callback) { + return this.rpcCall(verifyNotificationChannel, $root.google.monitoring.v3.VerifyNotificationChannelRequest, $root.google.monitoring.v3.NotificationChannel, request, callback); + }, "name", { value: "VerifyNotificationChannel" }); + + /** + * Calls VerifyNotificationChannel. + * @function verifyNotificationChannel + * @memberof google.monitoring.v3.NotificationChannelService + * @instance + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} request VerifyNotificationChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NotificationChannelService; })(); - v3.DeleteNotificationChannelRequest = (function() { + v3.ListNotificationChannelDescriptorsRequest = (function() { /** - * Properties of a DeleteNotificationChannelRequest. + * Properties of a ListNotificationChannelDescriptorsRequest. * @memberof google.monitoring.v3 - * @interface IDeleteNotificationChannelRequest - * @property {string|null} [name] DeleteNotificationChannelRequest name - * @property {boolean|null} [force] DeleteNotificationChannelRequest force + * @interface IListNotificationChannelDescriptorsRequest + * @property {string|null} [name] ListNotificationChannelDescriptorsRequest name + * @property {number|null} [pageSize] ListNotificationChannelDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListNotificationChannelDescriptorsRequest pageToken */ /** - * Constructs a new DeleteNotificationChannelRequest. + * Constructs a new ListNotificationChannelDescriptorsRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteNotificationChannelRequest. - * @implements IDeleteNotificationChannelRequest + * @classdesc Represents a ListNotificationChannelDescriptorsRequest. + * @implements IListNotificationChannelDescriptorsRequest * @constructor - * @param {google.monitoring.v3.IDeleteNotificationChannelRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest=} [properties] Properties to set */ - function DeleteNotificationChannelRequest(properties) { + function ListNotificationChannelDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13761,88 +13035,101 @@ } /** - * DeleteNotificationChannelRequest name. + * ListNotificationChannelDescriptorsRequest name. * @member {string} name - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @instance */ - DeleteNotificationChannelRequest.prototype.name = ""; + ListNotificationChannelDescriptorsRequest.prototype.name = ""; /** - * DeleteNotificationChannelRequest force. - * @member {boolean} force - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * ListNotificationChannelDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @instance */ - DeleteNotificationChannelRequest.prototype.force = false; + ListNotificationChannelDescriptorsRequest.prototype.pageSize = 0; /** - * Creates a new DeleteNotificationChannelRequest instance using the specified properties. + * ListNotificationChannelDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @instance + */ + ListNotificationChannelDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNotificationChannelDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static - * @param {google.monitoring.v3.IDeleteNotificationChannelRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest instance + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest instance */ - DeleteNotificationChannelRequest.create = function create(properties) { - return new DeleteNotificationChannelRequest(properties); + ListNotificationChannelDescriptorsRequest.create = function create(properties) { + return new ListNotificationChannelDescriptorsRequest(properties); }; /** - * Encodes the specified DeleteNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * Encodes the specified ListNotificationChannelDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static - * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} message DeleteNotificationChannelRequest message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteNotificationChannelRequest.encode = function encode(message, writer) { + ListNotificationChannelDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + 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 3, wireType 2 =*/26).string(message.name); - if (message.force != null && message.hasOwnProperty("force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified DeleteNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. + * Encodes the specified ListNotificationChannelDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static - * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} message DeleteNotificationChannelRequest message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListNotificationChannelDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer. + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteNotificationChannelRequest.decode = function decode(reader, length) { + ListNotificationChannelDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteNotificationChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: + case 4: message.name = reader.string(); break; - case 5: - message.force = reader.bool(); + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -13853,116 +13140,126 @@ }; /** - * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + ListNotificationChannelDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteNotificationChannelRequest message. + * Verifies a ListNotificationChannelDescriptorsRequest message. * @function verify - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteNotificationChannelRequest.verify = function verify(message) { + ListNotificationChannelDescriptorsRequest.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.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: 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 DeleteNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} ListNotificationChannelDescriptorsRequest */ - DeleteNotificationChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteNotificationChannelRequest) + ListNotificationChannelDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest) return object; - var message = new $root.google.monitoring.v3.DeleteNotificationChannelRequest(); + var message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsRequest(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + 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 DeleteNotificationChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListNotificationChannelDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @static - * @param {google.monitoring.v3.DeleteNotificationChannelRequest} message DeleteNotificationChannelRequest + * @param {google.monitoring.v3.ListNotificationChannelDescriptorsRequest} message ListNotificationChannelDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteNotificationChannelRequest.toObject = function toObject(message, options) { + ListNotificationChannelDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; object.name = ""; - object.force = 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.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteNotificationChannelRequest to JSON. + * Converts this ListNotificationChannelDescriptorsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest * @instance * @returns {Object.} JSON object */ - DeleteNotificationChannelRequest.prototype.toJSON = function toJSON() { + ListNotificationChannelDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteNotificationChannelRequest; + return ListNotificationChannelDescriptorsRequest; })(); - v3.SendNotificationChannelVerificationCodeRequest = (function() { + v3.ListNotificationChannelDescriptorsResponse = (function() { /** - * Properties of a SendNotificationChannelVerificationCodeRequest. + * Properties of a ListNotificationChannelDescriptorsResponse. * @memberof google.monitoring.v3 - * @interface ISendNotificationChannelVerificationCodeRequest - * @property {string|null} [name] SendNotificationChannelVerificationCodeRequest name + * @interface IListNotificationChannelDescriptorsResponse + * @property {Array.|null} [channelDescriptors] ListNotificationChannelDescriptorsResponse channelDescriptors + * @property {string|null} [nextPageToken] ListNotificationChannelDescriptorsResponse nextPageToken */ /** - * Constructs a new SendNotificationChannelVerificationCodeRequest. + * Constructs a new ListNotificationChannelDescriptorsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a SendNotificationChannelVerificationCodeRequest. - * @implements ISendNotificationChannelVerificationCodeRequest + * @classdesc Represents a ListNotificationChannelDescriptorsResponse. + * @implements IListNotificationChannelDescriptorsResponse * @constructor - * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse=} [properties] Properties to set */ - function SendNotificationChannelVerificationCodeRequest(properties) { + function ListNotificationChannelDescriptorsResponse(properties) { + this.channelDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13970,75 +13267,91 @@ } /** - * SendNotificationChannelVerificationCodeRequest name. - * @member {string} name - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * ListNotificationChannelDescriptorsResponse channelDescriptors. + * @member {Array.} channelDescriptors + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @instance */ - SendNotificationChannelVerificationCodeRequest.prototype.name = ""; + ListNotificationChannelDescriptorsResponse.prototype.channelDescriptors = $util.emptyArray; /** - * Creates a new SendNotificationChannelVerificationCodeRequest instance using the specified properties. + * ListNotificationChannelDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @instance + */ + ListNotificationChannelDescriptorsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListNotificationChannelDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static - * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest instance + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse instance */ - SendNotificationChannelVerificationCodeRequest.create = function create(properties) { - return new SendNotificationChannelVerificationCodeRequest(properties); + ListNotificationChannelDescriptorsResponse.create = function create(properties) { + return new ListNotificationChannelDescriptorsResponse(properties); }; /** - * Encodes the specified SendNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * Encodes the specified ListNotificationChannelDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static - * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendNotificationChannelVerificationCodeRequest.encode = function encode(message, writer) { + ListNotificationChannelDescriptorsResponse.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.channelDescriptors != null && message.channelDescriptors.length) + for (var i = 0; i < message.channelDescriptors.length; ++i) + $root.google.monitoring.v3.NotificationChannelDescriptor.encode(message.channelDescriptors[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 SendNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. + * Encodes the specified ListNotificationChannelDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static - * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SendNotificationChannelVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListNotificationChannelDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendNotificationChannelVerificationCodeRequest.decode = function decode(reader, length) { + ListNotificationChannelDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.channelDescriptors && message.channelDescriptors.length)) + message.channelDescriptors = []; + message.channelDescriptors.push($root.google.monitoring.v3.NotificationChannelDescriptor.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14049,108 +13362,133 @@ }; /** - * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SendNotificationChannelVerificationCodeRequest.decodeDelimited = function decodeDelimited(reader) { + ListNotificationChannelDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SendNotificationChannelVerificationCodeRequest message. + * Verifies a ListNotificationChannelDescriptorsResponse message. * @function verify - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SendNotificationChannelVerificationCodeRequest.verify = function verify(message) { + ListNotificationChannelDescriptorsResponse.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.channelDescriptors != null && message.hasOwnProperty("channelDescriptors")) { + if (!Array.isArray(message.channelDescriptors)) + return "channelDescriptors: array expected"; + for (var i = 0; i < message.channelDescriptors.length; ++i) { + var error = $root.google.monitoring.v3.NotificationChannelDescriptor.verify(message.channelDescriptors[i]); + if (error) + return "channelDescriptors." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a SendNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest + * @returns {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} ListNotificationChannelDescriptorsResponse */ - SendNotificationChannelVerificationCodeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest) + ListNotificationChannelDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse) return object; - var message = new $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.monitoring.v3.ListNotificationChannelDescriptorsResponse(); + if (object.channelDescriptors) { + if (!Array.isArray(object.channelDescriptors)) + throw TypeError(".google.monitoring.v3.ListNotificationChannelDescriptorsResponse.channelDescriptors: array expected"); + message.channelDescriptors = []; + for (var i = 0; i < object.channelDescriptors.length; ++i) { + if (typeof object.channelDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListNotificationChannelDescriptorsResponse.channelDescriptors: object expected"); + message.channelDescriptors[i] = $root.google.monitoring.v3.NotificationChannelDescriptor.fromObject(object.channelDescriptors[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a SendNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListNotificationChannelDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @static - * @param {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest + * @param {google.monitoring.v3.ListNotificationChannelDescriptorsResponse} message ListNotificationChannelDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SendNotificationChannelVerificationCodeRequest.toObject = function toObject(message, options) { + ListNotificationChannelDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.channelDescriptors = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.channelDescriptors && message.channelDescriptors.length) { + object.channelDescriptors = []; + for (var j = 0; j < message.channelDescriptors.length; ++j) + object.channelDescriptors[j] = $root.google.monitoring.v3.NotificationChannelDescriptor.toObject(message.channelDescriptors[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this SendNotificationChannelVerificationCodeRequest to JSON. + * Converts this ListNotificationChannelDescriptorsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse * @instance * @returns {Object.} JSON object */ - SendNotificationChannelVerificationCodeRequest.prototype.toJSON = function toJSON() { + ListNotificationChannelDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SendNotificationChannelVerificationCodeRequest; + return ListNotificationChannelDescriptorsResponse; })(); - v3.GetNotificationChannelVerificationCodeRequest = (function() { + v3.GetNotificationChannelDescriptorRequest = (function() { /** - * Properties of a GetNotificationChannelVerificationCodeRequest. + * Properties of a GetNotificationChannelDescriptorRequest. * @memberof google.monitoring.v3 - * @interface IGetNotificationChannelVerificationCodeRequest - * @property {string|null} [name] GetNotificationChannelVerificationCodeRequest name - * @property {google.protobuf.ITimestamp|null} [expireTime] GetNotificationChannelVerificationCodeRequest expireTime + * @interface IGetNotificationChannelDescriptorRequest + * @property {string|null} [name] GetNotificationChannelDescriptorRequest name */ /** - * Constructs a new GetNotificationChannelVerificationCodeRequest. + * Constructs a new GetNotificationChannelDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a GetNotificationChannelVerificationCodeRequest. - * @implements IGetNotificationChannelVerificationCodeRequest + * @classdesc Represents a GetNotificationChannelDescriptorRequest. + * @implements IGetNotificationChannelDescriptorRequest * @constructor - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest=} [properties] Properties to set */ - function GetNotificationChannelVerificationCodeRequest(properties) { + function GetNotificationChannelDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14158,89 +13496,76 @@ } /** - * GetNotificationChannelVerificationCodeRequest name. + * GetNotificationChannelDescriptorRequest name. * @member {string} name - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest - * @instance - */ - GetNotificationChannelVerificationCodeRequest.prototype.name = ""; - - /** - * GetNotificationChannelVerificationCodeRequest expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @instance */ - GetNotificationChannelVerificationCodeRequest.prototype.expireTime = null; + GetNotificationChannelDescriptorRequest.prototype.name = ""; /** - * Creates a new GetNotificationChannelVerificationCodeRequest instance using the specified properties. + * Creates a new GetNotificationChannelDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest instance + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest instance */ - GetNotificationChannelVerificationCodeRequest.create = function create(properties) { - return new GetNotificationChannelVerificationCodeRequest(properties); + GetNotificationChannelDescriptorRequest.create = function create(properties) { + return new GetNotificationChannelDescriptorRequest(properties); }; /** - * Encodes the specified GetNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * Encodes the specified GetNotificationChannelDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationChannelVerificationCodeRequest.encode = function encode(message, writer) { + GetNotificationChannelDescriptorRequest.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.expireTime != null && message.hasOwnProperty("expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified GetNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. + * Encodes the specified GetNotificationChannelDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationChannelVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetNotificationChannelDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer. + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationChannelVerificationCodeRequest.decode = function decode(reader, length) { + GetNotificationChannelDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 3: message.name = reader.string(); break; - case 2: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -14250,122 +13575,108 @@ }; /** - * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationChannelDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationChannelVerificationCodeRequest.decodeDelimited = function decodeDelimited(reader) { + GetNotificationChannelDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetNotificationChannelVerificationCodeRequest message. + * Verifies a GetNotificationChannelDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetNotificationChannelVerificationCodeRequest.verify = function verify(message) { + GetNotificationChannelDescriptorRequest.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.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } return null; }; /** - * Creates a GetNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationChannelDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest + * @returns {google.monitoring.v3.GetNotificationChannelDescriptorRequest} GetNotificationChannelDescriptorRequest */ - GetNotificationChannelVerificationCodeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest) + GetNotificationChannelDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest(); + var message = new $root.google.monitoring.v3.GetNotificationChannelDescriptorRequest(); if (object.name != null) message.name = String(object.name); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } return message; }; /** - * Creates a plain object from a GetNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetNotificationChannelDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @static - * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest + * @param {google.monitoring.v3.GetNotificationChannelDescriptorRequest} message GetNotificationChannelDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNotificationChannelVerificationCodeRequest.toObject = function toObject(message, options) { + GetNotificationChannelDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.expireTime = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); return object; }; /** - * Converts this GetNotificationChannelVerificationCodeRequest to JSON. + * Converts this GetNotificationChannelDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest * @instance * @returns {Object.} JSON object */ - GetNotificationChannelVerificationCodeRequest.prototype.toJSON = function toJSON() { + GetNotificationChannelDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetNotificationChannelVerificationCodeRequest; + return GetNotificationChannelDescriptorRequest; })(); - v3.GetNotificationChannelVerificationCodeResponse = (function() { + v3.CreateNotificationChannelRequest = (function() { /** - * Properties of a GetNotificationChannelVerificationCodeResponse. + * Properties of a CreateNotificationChannelRequest. * @memberof google.monitoring.v3 - * @interface IGetNotificationChannelVerificationCodeResponse - * @property {string|null} [code] GetNotificationChannelVerificationCodeResponse code - * @property {google.protobuf.ITimestamp|null} [expireTime] GetNotificationChannelVerificationCodeResponse expireTime + * @interface ICreateNotificationChannelRequest + * @property {string|null} [name] CreateNotificationChannelRequest name + * @property {google.monitoring.v3.INotificationChannel|null} [notificationChannel] CreateNotificationChannelRequest notificationChannel */ /** - * Constructs a new GetNotificationChannelVerificationCodeResponse. + * Constructs a new CreateNotificationChannelRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a GetNotificationChannelVerificationCodeResponse. - * @implements IGetNotificationChannelVerificationCodeResponse + * @classdesc Represents a CreateNotificationChannelRequest. + * @implements ICreateNotificationChannelRequest * @constructor - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateNotificationChannelRequest=} [properties] Properties to set */ - function GetNotificationChannelVerificationCodeResponse(properties) { + function CreateNotificationChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14373,88 +13684,88 @@ } /** - * GetNotificationChannelVerificationCodeResponse code. - * @member {string} code - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * CreateNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @instance */ - GetNotificationChannelVerificationCodeResponse.prototype.code = ""; + CreateNotificationChannelRequest.prototype.name = ""; /** - * GetNotificationChannelVerificationCodeResponse expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * CreateNotificationChannelRequest notificationChannel. + * @member {google.monitoring.v3.INotificationChannel|null|undefined} notificationChannel + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @instance */ - GetNotificationChannelVerificationCodeResponse.prototype.expireTime = null; + CreateNotificationChannelRequest.prototype.notificationChannel = null; /** - * Creates a new GetNotificationChannelVerificationCodeResponse instance using the specified properties. + * Creates a new CreateNotificationChannelRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse instance + * @param {google.monitoring.v3.ICreateNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest instance */ - GetNotificationChannelVerificationCodeResponse.create = function create(properties) { - return new GetNotificationChannelVerificationCodeResponse(properties); + CreateNotificationChannelRequest.create = function create(properties) { + return new CreateNotificationChannelRequest(properties); }; /** - * Encodes the specified GetNotificationChannelVerificationCodeResponse message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * Encodes the specified CreateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} message CreateNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationChannelVerificationCodeResponse.encode = function encode(message, writer) { + CreateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && message.hasOwnProperty("code")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified GetNotificationChannelVerificationCodeResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. + * Encodes the specified CreateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateNotificationChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static - * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse message or plain object to encode + * @param {google.monitoring.v3.ICreateNotificationChannelRequest} message CreateNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetNotificationChannelVerificationCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer. + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationChannelVerificationCodeResponse.decode = function decode(reader, length) { + CreateNotificationChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateNotificationChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.string(); + case 3: + message.name = reader.string(); break; case 2: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14465,122 +13776,125 @@ }; /** - * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateNotificationChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetNotificationChannelVerificationCodeResponse.decodeDelimited = function decodeDelimited(reader) { + CreateNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetNotificationChannelVerificationCodeResponse message. + * Verifies a CreateNotificationChannelRequest message. * @function verify - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetNotificationChannelVerificationCodeResponse.verify = function verify(message) { + CreateNotificationChannelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) { + var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannel); if (error) - return "expireTime." + error; + return "notificationChannel." + error; } return null; }; /** - * Creates a GetNotificationChannelVerificationCodeResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse + * @returns {google.monitoring.v3.CreateNotificationChannelRequest} CreateNotificationChannelRequest */ - GetNotificationChannelVerificationCodeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) + CreateNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateNotificationChannelRequest) return object; - var message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse(); - if (object.code != null) - message.code = String(object.code); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + var message = new $root.google.monitoring.v3.CreateNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.notificationChannel != null) { + if (typeof object.notificationChannel !== "object") + throw TypeError(".google.monitoring.v3.CreateNotificationChannelRequest.notificationChannel: object expected"); + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannel); } return message; }; /** - * Creates a plain object from a GetNotificationChannelVerificationCodeResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateNotificationChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @static - * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse + * @param {google.monitoring.v3.CreateNotificationChannelRequest} message CreateNotificationChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetNotificationChannelVerificationCodeResponse.toObject = function toObject(message, options) { + CreateNotificationChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.code = ""; - object.expireTime = null; + object.notificationChannel = null; + object.name = ""; } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + object.notificationChannel = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannel, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this GetNotificationChannelVerificationCodeResponse to JSON. + * Converts this CreateNotificationChannelRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @memberof google.monitoring.v3.CreateNotificationChannelRequest * @instance * @returns {Object.} JSON object */ - GetNotificationChannelVerificationCodeResponse.prototype.toJSON = function toJSON() { + CreateNotificationChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetNotificationChannelVerificationCodeResponse; + return CreateNotificationChannelRequest; })(); - v3.VerifyNotificationChannelRequest = (function() { + v3.ListNotificationChannelsRequest = (function() { /** - * Properties of a VerifyNotificationChannelRequest. + * Properties of a ListNotificationChannelsRequest. * @memberof google.monitoring.v3 - * @interface IVerifyNotificationChannelRequest - * @property {string|null} [name] VerifyNotificationChannelRequest name - * @property {string|null} [code] VerifyNotificationChannelRequest code + * @interface IListNotificationChannelsRequest + * @property {string|null} [name] ListNotificationChannelsRequest name + * @property {string|null} [filter] ListNotificationChannelsRequest filter + * @property {string|null} [orderBy] ListNotificationChannelsRequest orderBy + * @property {number|null} [pageSize] ListNotificationChannelsRequest pageSize + * @property {string|null} [pageToken] ListNotificationChannelsRequest pageToken */ /** - * Constructs a new VerifyNotificationChannelRequest. + * Constructs a new ListNotificationChannelsRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a VerifyNotificationChannelRequest. - * @implements IVerifyNotificationChannelRequest + * @classdesc Represents a ListNotificationChannelsRequest. + * @implements IListNotificationChannelsRequest * @constructor - * @param {google.monitoring.v3.IVerifyNotificationChannelRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListNotificationChannelsRequest=} [properties] Properties to set */ - function VerifyNotificationChannelRequest(properties) { + function ListNotificationChannelsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14588,88 +13902,127 @@ } /** - * VerifyNotificationChannelRequest name. + * ListNotificationChannelsRequest name. * @member {string} name - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @instance */ - VerifyNotificationChannelRequest.prototype.name = ""; + ListNotificationChannelsRequest.prototype.name = ""; /** - * VerifyNotificationChannelRequest code. - * @member {string} code - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * ListNotificationChannelsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @instance */ - VerifyNotificationChannelRequest.prototype.code = ""; + ListNotificationChannelsRequest.prototype.filter = ""; /** - * Creates a new VerifyNotificationChannelRequest instance using the specified properties. + * ListNotificationChannelsRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.orderBy = ""; + + /** + * ListNotificationChannelsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.pageSize = 0; + + /** + * ListNotificationChannelsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @instance + */ + ListNotificationChannelsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListNotificationChannelsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static - * @param {google.monitoring.v3.IVerifyNotificationChannelRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest instance + * @param {google.monitoring.v3.IListNotificationChannelsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest instance */ - VerifyNotificationChannelRequest.create = function create(properties) { - return new VerifyNotificationChannelRequest(properties); + ListNotificationChannelsRequest.create = function create(properties) { + return new ListNotificationChannelsRequest(properties); }; /** - * Encodes the specified VerifyNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * Encodes the specified ListNotificationChannelsRequest message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static - * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} message VerifyNotificationChannelRequest message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelsRequest} message ListNotificationChannelsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyNotificationChannelRequest.encode = function encode(message, writer) { + ListNotificationChannelsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.code != null && message.hasOwnProperty("code")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); return writer; }; /** - * Encodes the specified VerifyNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. + * Encodes the specified ListNotificationChannelsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static - * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} message VerifyNotificationChannelRequest message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelsRequest} message ListNotificationChannelsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListNotificationChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer. + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyNotificationChannelRequest.decode = function decode(reader, length) { + ListNotificationChannelsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.VerifyNotificationChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 5: message.name = reader.string(); break; - case 2: - message.code = reader.string(); + case 6: + message.filter = reader.string(); + break; + case 7: + message.orderBy = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14680,123 +14033,142 @@ }; /** - * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + ListNotificationChannelsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerifyNotificationChannelRequest message. + * Verifies a ListNotificationChannelsRequest message. * @function verify - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VerifyNotificationChannelRequest.verify = function verify(message) { + ListNotificationChannelsRequest.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.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: 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 VerifyNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest + * @returns {google.monitoring.v3.ListNotificationChannelsRequest} ListNotificationChannelsRequest */ - VerifyNotificationChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.VerifyNotificationChannelRequest) + ListNotificationChannelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelsRequest) return object; - var message = new $root.google.monitoring.v3.VerifyNotificationChannelRequest(); + var message = new $root.google.monitoring.v3.ListNotificationChannelsRequest(); if (object.name != null) message.name = String(object.name); - if (object.code != null) - message.code = String(object.code); + 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 VerifyNotificationChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListNotificationChannelsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @static - * @param {google.monitoring.v3.VerifyNotificationChannelRequest} message VerifyNotificationChannelRequest + * @param {google.monitoring.v3.ListNotificationChannelsRequest} message ListNotificationChannelsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerifyNotificationChannelRequest.toObject = function toObject(message, options) { + ListNotificationChannelsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; object.name = ""; - object.code = ""; + object.filter = ""; + object.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.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this VerifyNotificationChannelRequest to JSON. + * Converts this ListNotificationChannelsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @memberof google.monitoring.v3.ListNotificationChannelsRequest * @instance * @returns {Object.} JSON object */ - VerifyNotificationChannelRequest.prototype.toJSON = function toJSON() { + ListNotificationChannelsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VerifyNotificationChannelRequest; + return ListNotificationChannelsRequest; })(); - v3.NotificationChannelDescriptor = (function() { + v3.ListNotificationChannelsResponse = (function() { /** - * Properties of a NotificationChannelDescriptor. + * Properties of a ListNotificationChannelsResponse. * @memberof google.monitoring.v3 - * @interface INotificationChannelDescriptor - * @property {string|null} [name] NotificationChannelDescriptor name - * @property {string|null} [type] NotificationChannelDescriptor type - * @property {string|null} [displayName] NotificationChannelDescriptor displayName - * @property {string|null} [description] NotificationChannelDescriptor description - * @property {Array.|null} [labels] NotificationChannelDescriptor labels - * @property {Array.|null} [supportedTiers] NotificationChannelDescriptor supportedTiers + * @interface IListNotificationChannelsResponse + * @property {Array.|null} [notificationChannels] ListNotificationChannelsResponse notificationChannels + * @property {string|null} [nextPageToken] ListNotificationChannelsResponse nextPageToken */ /** - * Constructs a new NotificationChannelDescriptor. + * Constructs a new ListNotificationChannelsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a NotificationChannelDescriptor. - * @implements INotificationChannelDescriptor + * @classdesc Represents a ListNotificationChannelsResponse. + * @implements IListNotificationChannelsResponse * @constructor - * @param {google.monitoring.v3.INotificationChannelDescriptor=} [properties] Properties to set + * @param {google.monitoring.v3.IListNotificationChannelsResponse=} [properties] Properties to set */ - function NotificationChannelDescriptor(properties) { - this.labels = []; - this.supportedTiers = []; + function ListNotificationChannelsResponse(properties) { + this.notificationChannels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14804,154 +14176,91 @@ } /** - * NotificationChannelDescriptor name. - * @member {string} name - * @memberof google.monitoring.v3.NotificationChannelDescriptor - * @instance - */ - NotificationChannelDescriptor.prototype.name = ""; - - /** - * NotificationChannelDescriptor type. - * @member {string} type - * @memberof google.monitoring.v3.NotificationChannelDescriptor - * @instance - */ - NotificationChannelDescriptor.prototype.type = ""; - - /** - * NotificationChannelDescriptor displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.NotificationChannelDescriptor - * @instance - */ - NotificationChannelDescriptor.prototype.displayName = ""; - - /** - * NotificationChannelDescriptor description. - * @member {string} description - * @memberof google.monitoring.v3.NotificationChannelDescriptor - * @instance - */ - NotificationChannelDescriptor.prototype.description = ""; - - /** - * NotificationChannelDescriptor labels. - * @member {Array.} labels - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * ListNotificationChannelsResponse notificationChannels. + * @member {Array.} notificationChannels + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @instance */ - NotificationChannelDescriptor.prototype.labels = $util.emptyArray; + ListNotificationChannelsResponse.prototype.notificationChannels = $util.emptyArray; /** - * NotificationChannelDescriptor supportedTiers. - * @member {Array.} supportedTiers - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * ListNotificationChannelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @instance */ - NotificationChannelDescriptor.prototype.supportedTiers = $util.emptyArray; + ListNotificationChannelsResponse.prototype.nextPageToken = ""; /** - * Creates a new NotificationChannelDescriptor instance using the specified properties. + * Creates a new ListNotificationChannelsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static - * @param {google.monitoring.v3.INotificationChannelDescriptor=} [properties] Properties to set - * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor instance + * @param {google.monitoring.v3.IListNotificationChannelsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse instance */ - NotificationChannelDescriptor.create = function create(properties) { - return new NotificationChannelDescriptor(properties); + ListNotificationChannelsResponse.create = function create(properties) { + return new ListNotificationChannelsResponse(properties); }; /** - * Encodes the specified NotificationChannelDescriptor message. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * Encodes the specified ListNotificationChannelsResponse message. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static - * @param {google.monitoring.v3.INotificationChannelDescriptor} message NotificationChannelDescriptor message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelsResponse} message ListNotificationChannelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationChannelDescriptor.encode = function encode(message, writer) { + ListNotificationChannelsResponse.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.supportedTiers != null && message.supportedTiers.length) { - writer.uint32(/* id 5, wireType 2 =*/42).fork(); - for (var i = 0; i < message.supportedTiers.length; ++i) - writer.int32(message.supportedTiers[i]); - writer.ldelim(); - } - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.notificationChannels != null && message.notificationChannels.length) + for (var i = 0; i < message.notificationChannels.length; ++i) + $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified NotificationChannelDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannelDescriptor.verify|verify} messages. + * Encodes the specified ListNotificationChannelsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListNotificationChannelsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static - * @param {google.monitoring.v3.INotificationChannelDescriptor} message NotificationChannelDescriptor message or plain object to encode + * @param {google.monitoring.v3.IListNotificationChannelsResponse} message ListNotificationChannelsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationChannelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + ListNotificationChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationChannelDescriptor message from the specified reader or buffer. + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationChannelDescriptor.decode = function decode(reader, length) { + ListNotificationChannelsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannelDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListNotificationChannelsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - 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())); + if (!(message.notificationChannels && message.notificationChannels.length)) + message.notificationChannels = []; + message.notificationChannels.push($root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32())); break; - case 5: - if (!(message.supportedTiers && message.supportedTiers.length)) - message.supportedTiers = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedTiers.push(reader.int32()); - } else - message.supportedTiers.push(reader.int32()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -14962,208 +14271,133 @@ }; /** - * Decodes a NotificationChannelDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ListNotificationChannelsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationChannelDescriptor.decodeDelimited = function decodeDelimited(reader) { + ListNotificationChannelsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationChannelDescriptor message. + * Verifies a ListNotificationChannelsResponse message. * @function verify - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationChannelDescriptor.verify = function verify(message) { + ListNotificationChannelsResponse.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.notificationChannels != null && message.hasOwnProperty("notificationChannels")) { + if (!Array.isArray(message.notificationChannels)) + return "notificationChannels: array expected"; + for (var i = 0; i < message.notificationChannels.length; ++i) { + var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannels[i]); if (error) - return "labels." + error; + return "notificationChannels." + error; } } - if (message.supportedTiers != null && message.hasOwnProperty("supportedTiers")) { - if (!Array.isArray(message.supportedTiers)) - return "supportedTiers: array expected"; - for (var i = 0; i < message.supportedTiers.length; ++i) - switch (message.supportedTiers[i]) { - default: - return "supportedTiers: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a NotificationChannelDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ListNotificationChannelsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.NotificationChannelDescriptor} NotificationChannelDescriptor + * @returns {google.monitoring.v3.ListNotificationChannelsResponse} ListNotificationChannelsResponse */ - NotificationChannelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.NotificationChannelDescriptor) + ListNotificationChannelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListNotificationChannelsResponse) return object; - var message = new $root.google.monitoring.v3.NotificationChannelDescriptor(); - 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.monitoring.v3.NotificationChannelDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.monitoring.v3.NotificationChannelDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + var message = new $root.google.monitoring.v3.ListNotificationChannelsResponse(); + if (object.notificationChannels) { + if (!Array.isArray(object.notificationChannels)) + throw TypeError(".google.monitoring.v3.ListNotificationChannelsResponse.notificationChannels: array expected"); + message.notificationChannels = []; + for (var i = 0; i < object.notificationChannels.length; ++i) { + if (typeof object.notificationChannels[i] !== "object") + throw TypeError(".google.monitoring.v3.ListNotificationChannelsResponse.notificationChannels: object expected"); + message.notificationChannels[i] = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannels[i]); } } - if (object.supportedTiers) { - if (!Array.isArray(object.supportedTiers)) - throw TypeError(".google.monitoring.v3.NotificationChannelDescriptor.supportedTiers: array expected"); - message.supportedTiers = []; - for (var i = 0; i < object.supportedTiers.length; ++i) - switch (object.supportedTiers[i]) { - default: - case "SERVICE_TIER_UNSPECIFIED": - case 0: - message.supportedTiers[i] = 0; - break; - case "SERVICE_TIER_BASIC": - case 1: - message.supportedTiers[i] = 1; - break; - case "SERVICE_TIER_PREMIUM": - case 2: - message.supportedTiers[i] = 2; - break; - } - } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a NotificationChannelDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a ListNotificationChannelsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @static - * @param {google.monitoring.v3.NotificationChannelDescriptor} message NotificationChannelDescriptor + * @param {google.monitoring.v3.ListNotificationChannelsResponse} message ListNotificationChannelsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationChannelDescriptor.toObject = function toObject(message, options) { + ListNotificationChannelsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.labels = []; - object.supportedTiers = []; - } - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; - object.name = ""; - } - 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.supportedTiers && message.supportedTiers.length) { - object.supportedTiers = []; - for (var j = 0; j < message.supportedTiers.length; ++j) - object.supportedTiers[j] = options.enums === String ? $root.google.monitoring.v3.ServiceTier[message.supportedTiers[j]] : message.supportedTiers[j]; + if (options.arrays || options.defaults) + object.notificationChannels = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.notificationChannels && message.notificationChannels.length) { + object.notificationChannels = []; + for (var j = 0; j < message.notificationChannels.length; ++j) + object.notificationChannels[j] = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannels[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; return object; }; /** - * Converts this NotificationChannelDescriptor to JSON. + * Converts this ListNotificationChannelsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @memberof google.monitoring.v3.ListNotificationChannelsResponse * @instance * @returns {Object.} JSON object */ - NotificationChannelDescriptor.prototype.toJSON = function toJSON() { + ListNotificationChannelsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NotificationChannelDescriptor; + return ListNotificationChannelsResponse; })(); - v3.NotificationChannel = (function() { + v3.GetNotificationChannelRequest = (function() { /** - * Properties of a NotificationChannel. + * Properties of a GetNotificationChannelRequest. * @memberof google.monitoring.v3 - * @interface INotificationChannel - * @property {string|null} [type] NotificationChannel type - * @property {string|null} [name] NotificationChannel name - * @property {string|null} [displayName] NotificationChannel displayName - * @property {string|null} [description] NotificationChannel description - * @property {Object.|null} [labels] NotificationChannel labels - * @property {Object.|null} [userLabels] NotificationChannel userLabels - * @property {google.monitoring.v3.NotificationChannel.VerificationStatus|null} [verificationStatus] NotificationChannel verificationStatus - * @property {google.protobuf.IBoolValue|null} [enabled] NotificationChannel enabled + * @interface IGetNotificationChannelRequest + * @property {string|null} [name] GetNotificationChannelRequest name */ /** - * Constructs a new NotificationChannel. + * Constructs a new GetNotificationChannelRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a NotificationChannel. - * @implements INotificationChannel + * @classdesc Represents a GetNotificationChannelRequest. + * @implements IGetNotificationChannelRequest * @constructor - * @param {google.monitoring.v3.INotificationChannel=} [properties] Properties to set + * @param {google.monitoring.v3.IGetNotificationChannelRequest=} [properties] Properties to set */ - function NotificationChannel(properties) { - this.labels = {}; - this.userLabels = {}; + function GetNotificationChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15171,178 +14405,75 @@ } /** - * NotificationChannel type. - * @member {string} type - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.type = ""; - - /** - * NotificationChannel name. + * GetNotificationChannelRequest name. * @member {string} name - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.name = ""; - - /** - * NotificationChannel displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.displayName = ""; - - /** - * NotificationChannel description. - * @member {string} description - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.description = ""; - - /** - * NotificationChannel labels. - * @member {Object.} labels - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.labels = $util.emptyObject; - - /** - * NotificationChannel userLabels. - * @member {Object.} userLabels - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.userLabels = $util.emptyObject; - - /** - * NotificationChannel verificationStatus. - * @member {google.monitoring.v3.NotificationChannel.VerificationStatus} verificationStatus - * @memberof google.monitoring.v3.NotificationChannel - * @instance - */ - NotificationChannel.prototype.verificationStatus = 0; - - /** - * NotificationChannel enabled. - * @member {google.protobuf.IBoolValue|null|undefined} enabled - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @instance */ - NotificationChannel.prototype.enabled = null; + GetNotificationChannelRequest.prototype.name = ""; /** - * Creates a new NotificationChannel instance using the specified properties. + * Creates a new GetNotificationChannelRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static - * @param {google.monitoring.v3.INotificationChannel=} [properties] Properties to set - * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel instance + * @param {google.monitoring.v3.IGetNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest instance */ - NotificationChannel.create = function create(properties) { - return new NotificationChannel(properties); + GetNotificationChannelRequest.create = function create(properties) { + return new GetNotificationChannelRequest(properties); }; /** - * Encodes the specified NotificationChannel message. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * Encodes the specified GetNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static - * @param {google.monitoring.v3.INotificationChannel} message NotificationChannel message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelRequest} message GetNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationChannel.encode = function encode(message, writer) { + GetNotificationChannelRequest.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 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.labels != null && message.hasOwnProperty("labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.userLabels != null && message.hasOwnProperty("userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); - if (message.enabled != null && message.hasOwnProperty("enabled")) - $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified NotificationChannel message, length delimited. Does not implicitly {@link google.monitoring.v3.NotificationChannel.verify|verify} messages. + * Encodes the specified GetNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static - * @param {google.monitoring.v3.INotificationChannel} message NotificationChannel message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelRequest} message GetNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationChannel.encodeDelimited = function encodeDelimited(message, writer) { + GetNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationChannel message from the specified reader or buffer. + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationChannel.decode = function decode(reader, length) { + GetNotificationChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannel(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 6: - message.name = reader.string(); - break; case 3: - message.displayName = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - reader.skip().pos++; - if (message.labels === $util.emptyObject) - message.labels = {}; - key = reader.string(); - reader.pos++; - message.labels[key] = reader.string(); - break; - case 8: - reader.skip().pos++; - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - key = reader.string(); - reader.pos++; - message.userLabels[key] = reader.string(); - break; - case 9: - message.verificationStatus = reader.int32(); - break; - case 11: - message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -15353,701 +14484,417 @@ }; /** - * Decodes a NotificationChannel message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationChannel.decodeDelimited = function decodeDelimited(reader) { + GetNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationChannel message. + * Verifies a GetNotificationChannelRequest message. * @function verify - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationChannel.verify = function verify(message) { + GetNotificationChannelRequest.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.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: 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 (!$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.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.verificationStatus != null && message.hasOwnProperty("verificationStatus")) - switch (message.verificationStatus) { - default: - return "verificationStatus: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) { - var error = $root.google.protobuf.BoolValue.verify(message.enabled); - if (error) - return "enabled." + error; - } return null; }; /** - * Creates a NotificationChannel message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.NotificationChannel} NotificationChannel + * @returns {google.monitoring.v3.GetNotificationChannelRequest} GetNotificationChannelRequest */ - NotificationChannel.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.NotificationChannel) + GetNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelRequest) return object; - var message = new $root.google.monitoring.v3.NotificationChannel(); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.monitoring.v3.GetNotificationChannelRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.monitoring.v3.NotificationChannel.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.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.monitoring.v3.NotificationChannel.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]]); - } - switch (object.verificationStatus) { - case "VERIFICATION_STATUS_UNSPECIFIED": - case 0: - message.verificationStatus = 0; - break; - case "UNVERIFIED": - case 1: - message.verificationStatus = 1; - break; - case "VERIFIED": - case 2: - message.verificationStatus = 2; - break; - } - if (object.enabled != null) { - if (typeof object.enabled !== "object") - throw TypeError(".google.monitoring.v3.NotificationChannel.enabled: object expected"); - message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); - } return message; }; /** - * Creates a plain object from a NotificationChannel message. Also converts values to other types if specified. + * Creates a plain object from a GetNotificationChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @static - * @param {google.monitoring.v3.NotificationChannel} message NotificationChannel + * @param {google.monitoring.v3.GetNotificationChannelRequest} message GetNotificationChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationChannel.toObject = function toObject(message, options) { + GetNotificationChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.userLabels = {}; - } - if (options.defaults) { - object.type = ""; - object.displayName = ""; - object.description = ""; + if (options.defaults) object.name = ""; - object.verificationStatus = options.enums === String ? "VERIFICATION_STATUS_UNSPECIFIED" : 0; - object.enabled = null; - } - 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; - 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.name != null && message.hasOwnProperty("name")) object.name = message.name; - 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.verificationStatus != null && message.hasOwnProperty("verificationStatus")) - object.verificationStatus = options.enums === String ? $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] : message.verificationStatus; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); return object; }; /** - * Converts this NotificationChannel to JSON. + * Converts this GetNotificationChannelRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.NotificationChannel + * @memberof google.monitoring.v3.GetNotificationChannelRequest * @instance * @returns {Object.} JSON object */ - NotificationChannel.prototype.toJSON = function toJSON() { + GetNotificationChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VerificationStatus enum. - * @name google.monitoring.v3.NotificationChannel.VerificationStatus - * @enum {string} - * @property {number} VERIFICATION_STATUS_UNSPECIFIED=0 VERIFICATION_STATUS_UNSPECIFIED value - * @property {number} UNVERIFIED=1 UNVERIFIED value - * @property {number} VERIFIED=2 VERIFIED value - */ - NotificationChannel.VerificationStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VERIFICATION_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - values[valuesById[2] = "VERIFIED"] = 2; - return values; - })(); - - return NotificationChannel; + return GetNotificationChannelRequest; })(); - v3.ServiceMonitoringService = (function() { + v3.UpdateNotificationChannelRequest = (function() { /** - * Constructs a new ServiceMonitoringService service. + * Properties of an UpdateNotificationChannelRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ServiceMonitoringService - * @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 IUpdateNotificationChannelRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateNotificationChannelRequest updateMask + * @property {google.monitoring.v3.INotificationChannel|null} [notificationChannel] UpdateNotificationChannelRequest notificationChannel */ - function ServiceMonitoringService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ServiceMonitoringService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ServiceMonitoringService; /** - * Creates new ServiceMonitoringService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.ServiceMonitoringService - * @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 {ServiceMonitoringService} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new UpdateNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateNotificationChannelRequest. + * @implements IUpdateNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest=} [properties] Properties to set */ - ServiceMonitoringService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function UpdateNotificationChannelRequest(properties) { + if (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.monitoring.v3.ServiceMonitoringService#createService}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef CreateServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.Service} [response] Service + * UpdateNotificationChannelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @instance */ + UpdateNotificationChannelRequest.prototype.updateMask = null; /** - * Calls CreateService. - * @function createService - * @memberof google.monitoring.v3.ServiceMonitoringService + * UpdateNotificationChannelRequest notificationChannel. + * @member {google.monitoring.v3.INotificationChannel|null|undefined} notificationChannel + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest * @instance - * @param {google.monitoring.v3.ICreateServiceRequest} request CreateServiceRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.CreateServiceCallback} callback Node-style callback called with the error, if any, and Service - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ServiceMonitoringService.prototype.createService = function createService(request, callback) { - return this.rpcCall(createService, $root.google.monitoring.v3.CreateServiceRequest, $root.google.monitoring.v3.Service, request, callback); - }, "name", { value: "CreateService" }); + UpdateNotificationChannelRequest.prototype.notificationChannel = null; /** - * Calls CreateService. - * @function createService - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.ICreateServiceRequest} request CreateServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new UpdateNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest instance */ + UpdateNotificationChannelRequest.create = function create(properties) { + return new UpdateNotificationChannelRequest(properties); + }; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef GetServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.Service} [response] Service + * Encodes the specified UpdateNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} message UpdateNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateNotificationChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; /** - * Calls GetService. - * @function getService - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IGetServiceRequest} request GetServiceRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.GetServiceCallback} callback Node-style callback called with the error, if any, and Service - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateNotificationChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IUpdateNotificationChannelRequest} message UpdateNotificationChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ServiceMonitoringService.prototype.getService = function getService(request, callback) { - return this.rpcCall(getService, $root.google.monitoring.v3.GetServiceRequest, $root.google.monitoring.v3.Service, request, callback); - }, "name", { value: "GetService" }); + UpdateNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetService. - * @function getService - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IGetServiceRequest} request GetServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateNotificationChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateNotificationChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef ListServicesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListServicesResponse} [response] ListServicesResponse + * Decodes an UpdateNotificationChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListServices. - * @function listServices - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IListServicesRequest} request ListServicesRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse - * @returns {undefined} - * @variation 1 + * Verifies an UpdateNotificationChannelRequest message. + * @function verify + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ServiceMonitoringService.prototype.listServices = function listServices(request, callback) { - return this.rpcCall(listServices, $root.google.monitoring.v3.ListServicesRequest, $root.google.monitoring.v3.ListServicesResponse, request, callback); - }, "name", { value: "ListServices" }); + UpdateNotificationChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) { + var error = $root.google.monitoring.v3.NotificationChannel.verify(message.notificationChannel); + if (error) + return "notificationChannel." + error; + } + return null; + }; /** - * Calls ListServices. - * @function listServices - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IListServicesRequest} request ListServicesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an UpdateNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.UpdateNotificationChannelRequest} UpdateNotificationChannelRequest */ + UpdateNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateNotificationChannelRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateNotificationChannelRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateNotificationChannelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.notificationChannel != null) { + if (typeof object.notificationChannel !== "object") + throw TypeError(".google.monitoring.v3.UpdateNotificationChannelRequest.notificationChannel: object expected"); + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.fromObject(object.notificationChannel); + } + return message; + }; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef UpdateServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.Service} [response] Service + * Creates a plain object from an UpdateNotificationChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {google.monitoring.v3.UpdateNotificationChannelRequest} message UpdateNotificationChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + UpdateNotificationChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.notificationChannel = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + object.notificationChannel = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannel, options); + return object; + }; /** - * Calls UpdateService. - * @function updateService - * @memberof google.monitoring.v3.ServiceMonitoringService + * Converts this UpdateNotificationChannelRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest * @instance - * @param {google.monitoring.v3.IUpdateServiceRequest} request UpdateServiceRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Service - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ServiceMonitoringService.prototype.updateService = function updateService(request, callback) { - return this.rpcCall(updateService, $root.google.monitoring.v3.UpdateServiceRequest, $root.google.monitoring.v3.Service, request, callback); - }, "name", { value: "UpdateService" }); + UpdateNotificationChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateNotificationChannelRequest; + })(); + + v3.DeleteNotificationChannelRequest = (function() { /** - * Calls UpdateService. - * @function updateService - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IUpdateServiceRequest} request UpdateServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a DeleteNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteNotificationChannelRequest + * @property {string|null} [name] DeleteNotificationChannelRequest name + * @property {boolean|null} [force] DeleteNotificationChannelRequest force */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef DeleteServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Constructs a new DeleteNotificationChannelRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteNotificationChannelRequest. + * @implements IDeleteNotificationChannelRequest + * @constructor + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest=} [properties] Properties to set */ + function DeleteNotificationChannelRequest(properties) { + if (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 DeleteService. - * @function deleteService - * @memberof google.monitoring.v3.ServiceMonitoringService + * DeleteNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @instance - * @param {google.monitoring.v3.IDeleteServiceRequest} request DeleteServiceRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ServiceMonitoringService.prototype.deleteService = function deleteService(request, callback) { - return this.rpcCall(deleteService, $root.google.monitoring.v3.DeleteServiceRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteService" }); + DeleteNotificationChannelRequest.prototype.name = ""; /** - * Calls DeleteService. - * @function deleteService - * @memberof google.monitoring.v3.ServiceMonitoringService + * DeleteNotificationChannelRequest force. + * @member {boolean} force + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @instance - * @param {google.monitoring.v3.IDeleteServiceRequest} request DeleteServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeleteNotificationChannelRequest.prototype.force = false; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef CreateServiceLevelObjectiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + * Creates a new DeleteNotificationChannelRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest instance */ + DeleteNotificationChannelRequest.create = function create(properties) { + return new DeleteNotificationChannelRequest(properties); + }; /** - * Calls CreateServiceLevelObjective. - * @function createServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} request CreateServiceLevelObjectiveRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.CreateServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceMonitoringService.prototype.createServiceLevelObjective = function createServiceLevelObjective(request, callback) { - return this.rpcCall(createServiceLevelObjective, $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); - }, "name", { value: "CreateServiceLevelObjective" }); - - /** - * Calls CreateServiceLevelObjective. - * @function createServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} request CreateServiceLevelObjectiveRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef GetServiceLevelObjectiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective - */ - - /** - * Calls GetServiceLevelObjective. - * @function getServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} request GetServiceLevelObjectiveRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceMonitoringService.prototype.getServiceLevelObjective = function getServiceLevelObjective(request, callback) { - return this.rpcCall(getServiceLevelObjective, $root.google.monitoring.v3.GetServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); - }, "name", { value: "GetServiceLevelObjective" }); - - /** - * Calls GetServiceLevelObjective. - * @function getServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} request GetServiceLevelObjectiveRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef ListServiceLevelObjectivesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListServiceLevelObjectivesResponse} [response] ListServiceLevelObjectivesResponse - */ - - /** - * Calls ListServiceLevelObjectives. - * @function listServiceLevelObjectives - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} request ListServiceLevelObjectivesRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectivesCallback} callback Node-style callback called with the error, if any, and ListServiceLevelObjectivesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceMonitoringService.prototype.listServiceLevelObjectives = function listServiceLevelObjectives(request, callback) { - return this.rpcCall(listServiceLevelObjectives, $root.google.monitoring.v3.ListServiceLevelObjectivesRequest, $root.google.monitoring.v3.ListServiceLevelObjectivesResponse, request, callback); - }, "name", { value: "ListServiceLevelObjectives" }); - - /** - * Calls ListServiceLevelObjectives. - * @function listServiceLevelObjectives - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} request ListServiceLevelObjectivesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef UpdateServiceLevelObjectiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective - */ - - /** - * Calls UpdateServiceLevelObjective. - * @function updateServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} request UpdateServiceLevelObjectiveRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.UpdateServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceMonitoringService.prototype.updateServiceLevelObjective = function updateServiceLevelObjective(request, callback) { - return this.rpcCall(updateServiceLevelObjective, $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); - }, "name", { value: "UpdateServiceLevelObjective" }); - - /** - * Calls UpdateServiceLevelObjective. - * @function updateServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} request UpdateServiceLevelObjectiveRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. - * @memberof google.monitoring.v3.ServiceMonitoringService - * @typedef DeleteServiceLevelObjectiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteServiceLevelObjective. - * @function deleteServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} request DeleteServiceLevelObjectiveRequest message or plain object - * @param {google.monitoring.v3.ServiceMonitoringService.DeleteServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ServiceMonitoringService.prototype.deleteServiceLevelObjective = function deleteServiceLevelObjective(request, callback) { - return this.rpcCall(deleteServiceLevelObjective, $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteServiceLevelObjective" }); - - /** - * Calls DeleteServiceLevelObjective. - * @function deleteServiceLevelObjective - * @memberof google.monitoring.v3.ServiceMonitoringService - * @instance - * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} request DeleteServiceLevelObjectiveRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ServiceMonitoringService; - })(); - - v3.CreateServiceRequest = (function() { - - /** - * Properties of a CreateServiceRequest. - * @memberof google.monitoring.v3 - * @interface ICreateServiceRequest - * @property {string|null} [parent] CreateServiceRequest parent - * @property {string|null} [serviceId] CreateServiceRequest serviceId - * @property {google.monitoring.v3.IService|null} [service] CreateServiceRequest service - */ - - /** - * Constructs a new CreateServiceRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a CreateServiceRequest. - * @implements ICreateServiceRequest - * @constructor - * @param {google.monitoring.v3.ICreateServiceRequest=} [properties] Properties to set - */ - function CreateServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateServiceRequest parent. - * @member {string} parent - * @memberof google.monitoring.v3.CreateServiceRequest - * @instance - */ - CreateServiceRequest.prototype.parent = ""; - - /** - * CreateServiceRequest serviceId. - * @member {string} serviceId - * @memberof google.monitoring.v3.CreateServiceRequest - * @instance - */ - CreateServiceRequest.prototype.serviceId = ""; - - /** - * CreateServiceRequest service. - * @member {google.monitoring.v3.IService|null|undefined} service - * @memberof google.monitoring.v3.CreateServiceRequest - * @instance - */ - CreateServiceRequest.prototype.service = null; - - /** - * Creates a new CreateServiceRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.CreateServiceRequest - * @static - * @param {google.monitoring.v3.ICreateServiceRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest instance - */ - CreateServiceRequest.create = function create(properties) { - return new CreateServiceRequest(properties); - }; - - /** - * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * Encodes the specified DeleteNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static - * @param {google.monitoring.v3.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} message DeleteNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encode = function encode(message, writer) { + DeleteNotificationChannelRequest.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.service != null && message.hasOwnProperty("service")) - $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.force != null && message.hasOwnProperty("force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; /** - * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. + * Encodes the specified DeleteNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteNotificationChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static - * @param {google.monitoring.v3.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode + * @param {google.monitoring.v3.IDeleteNotificationChannelRequest} message DeleteNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer. + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decode = function decode(reader, length) { + DeleteNotificationChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteNotificationChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; case 3: - message.serviceId = reader.string(); + message.name = reader.string(); break; - case 2: - message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); + case 5: + message.force = reader.bool(); break; default: reader.skipType(tag & 7); @@ -16058,129 +14905,116 @@ }; /** - * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteNotificationChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateServiceRequest message. + * Verifies a DeleteNotificationChannelRequest message. * @function verify - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateServiceRequest.verify = function verify(message) { + DeleteNotificationChannelRequest.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.serviceId != null && message.hasOwnProperty("serviceId")) - if (!$util.isString(message.serviceId)) - return "serviceId: string expected"; - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.monitoring.v3.Service.verify(message.service); - if (error) - return "service." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest + * @returns {google.monitoring.v3.DeleteNotificationChannelRequest} DeleteNotificationChannelRequest */ - CreateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateServiceRequest) + DeleteNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteNotificationChannelRequest) return object; - var message = new $root.google.monitoring.v3.CreateServiceRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.serviceId != null) - message.serviceId = String(object.serviceId); - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.monitoring.v3.CreateServiceRequest.service: object expected"); - message.service = $root.google.monitoring.v3.Service.fromObject(object.service); - } + var message = new $root.google.monitoring.v3.DeleteNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteNotificationChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @static - * @param {google.monitoring.v3.CreateServiceRequest} message CreateServiceRequest + * @param {google.monitoring.v3.DeleteNotificationChannelRequest} message DeleteNotificationChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateServiceRequest.toObject = function toObject(message, options) { + DeleteNotificationChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.service = null; - object.serviceId = ""; + object.name = ""; + object.force = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.monitoring.v3.Service.toObject(message.service, options); - if (message.serviceId != null && message.hasOwnProperty("serviceId")) - object.serviceId = message.serviceId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this CreateServiceRequest to JSON. + * Converts this DeleteNotificationChannelRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateServiceRequest + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest * @instance * @returns {Object.} JSON object */ - CreateServiceRequest.prototype.toJSON = function toJSON() { + DeleteNotificationChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateServiceRequest; + return DeleteNotificationChannelRequest; })(); - v3.GetServiceRequest = (function() { + v3.SendNotificationChannelVerificationCodeRequest = (function() { /** - * Properties of a GetServiceRequest. + * Properties of a SendNotificationChannelVerificationCodeRequest. * @memberof google.monitoring.v3 - * @interface IGetServiceRequest - * @property {string|null} [name] GetServiceRequest name + * @interface ISendNotificationChannelVerificationCodeRequest + * @property {string|null} [name] SendNotificationChannelVerificationCodeRequest name */ /** - * Constructs a new GetServiceRequest. + * Constructs a new SendNotificationChannelVerificationCodeRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a GetServiceRequest. - * @implements IGetServiceRequest + * @classdesc Represents a SendNotificationChannelVerificationCodeRequest. + * @implements ISendNotificationChannelVerificationCodeRequest * @constructor - * @param {google.monitoring.v3.IGetServiceRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest=} [properties] Properties to set */ - function GetServiceRequest(properties) { + function SendNotificationChannelVerificationCodeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16188,35 +15022,35 @@ } /** - * GetServiceRequest name. + * SendNotificationChannelVerificationCodeRequest name. * @member {string} name - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @instance */ - GetServiceRequest.prototype.name = ""; + SendNotificationChannelVerificationCodeRequest.prototype.name = ""; /** - * Creates a new GetServiceRequest instance using the specified properties. + * Creates a new SendNotificationChannelVerificationCodeRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.IGetServiceRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest instance + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest instance */ - GetServiceRequest.create = function create(properties) { - return new GetServiceRequest(properties); + SendNotificationChannelVerificationCodeRequest.create = function create(properties) { + return new SendNotificationChannelVerificationCodeRequest(properties); }; /** - * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * Encodes the specified SendNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encode = function encode(message, writer) { + SendNotificationChannelVerificationCodeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -16225,33 +15059,33 @@ }; /** - * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. + * Encodes the specified SendNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.IGetServiceRequest} message GetServiceRequest message or plain object to encode + * @param {google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + SendNotificationChannelVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer. + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decode = function decode(reader, length) { + SendNotificationChannelVerificationCodeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -16267,30 +15101,30 @@ }; /** - * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a SendNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { + SendNotificationChannelVerificationCodeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetServiceRequest message. + * Verifies a SendNotificationChannelVerificationCodeRequest message. * @function verify - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetServiceRequest.verify = function verify(message) { + SendNotificationChannelVerificationCodeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -16300,32 +15134,32 @@ }; /** - * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SendNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest + * @returns {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} SendNotificationChannelVerificationCodeRequest */ - GetServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetServiceRequest) + SendNotificationChannelVerificationCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest) return object; - var message = new $root.google.monitoring.v3.GetServiceRequest(); + var message = new $root.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a SendNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.GetServiceRequest} message GetServiceRequest + * @param {google.monitoring.v3.SendNotificationChannelVerificationCodeRequest} message SendNotificationChannelVerificationCodeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetServiceRequest.toObject = function toObject(message, options) { + SendNotificationChannelVerificationCodeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16337,40 +15171,38 @@ }; /** - * Converts this GetServiceRequest to JSON. + * Converts this SendNotificationChannelVerificationCodeRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetServiceRequest + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest * @instance * @returns {Object.} JSON object */ - GetServiceRequest.prototype.toJSON = function toJSON() { + SendNotificationChannelVerificationCodeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetServiceRequest; + return SendNotificationChannelVerificationCodeRequest; })(); - v3.ListServicesRequest = (function() { + v3.GetNotificationChannelVerificationCodeRequest = (function() { /** - * Properties of a ListServicesRequest. + * Properties of a GetNotificationChannelVerificationCodeRequest. * @memberof google.monitoring.v3 - * @interface IListServicesRequest - * @property {string|null} [parent] ListServicesRequest parent - * @property {string|null} [filter] ListServicesRequest filter - * @property {number|null} [pageSize] ListServicesRequest pageSize - * @property {string|null} [pageToken] ListServicesRequest pageToken + * @interface IGetNotificationChannelVerificationCodeRequest + * @property {string|null} [name] GetNotificationChannelVerificationCodeRequest name + * @property {google.protobuf.ITimestamp|null} [expireTime] GetNotificationChannelVerificationCodeRequest expireTime */ /** - * Constructs a new ListServicesRequest. + * Constructs a new GetNotificationChannelVerificationCodeRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListServicesRequest. - * @implements IListServicesRequest + * @classdesc Represents a GetNotificationChannelVerificationCodeRequest. + * @implements IGetNotificationChannelVerificationCodeRequest * @constructor - * @param {google.monitoring.v3.IListServicesRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest=} [properties] Properties to set */ - function ListServicesRequest(properties) { + function GetNotificationChannelVerificationCodeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16378,114 +15210,88 @@ } /** - * ListServicesRequest parent. - * @member {string} parent - * @memberof google.monitoring.v3.ListServicesRequest - * @instance - */ - ListServicesRequest.prototype.parent = ""; - - /** - * ListServicesRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListServicesRequest + * GetNotificationChannelVerificationCodeRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @instance */ - ListServicesRequest.prototype.filter = ""; + GetNotificationChannelVerificationCodeRequest.prototype.name = ""; /** - * ListServicesRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListServicesRequest + * GetNotificationChannelVerificationCodeRequest expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @instance */ - ListServicesRequest.prototype.pageSize = 0; + GetNotificationChannelVerificationCodeRequest.prototype.expireTime = null; /** - * ListServicesRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListServicesRequest - * @instance + * Creates a new GetNotificationChannelVerificationCodeRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest instance */ - ListServicesRequest.prototype.pageToken = ""; + GetNotificationChannelVerificationCodeRequest.create = function create(properties) { + return new GetNotificationChannelVerificationCodeRequest(properties); + }; /** - * Creates a new ListServicesRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListServicesRequest - * @static - * @param {google.monitoring.v3.IListServicesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest instance - */ - ListServicesRequest.create = function create(properties) { - return new ListServicesRequest(properties); - }; - - /** - * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * Encodes the specified GetNotificationChannelVerificationCodeRequest message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encode = function encode(message, writer) { + GetNotificationChannelVerificationCodeRequest.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.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. + * Encodes the specified GetNotificationChannelVerificationCodeRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.IListServicesRequest} message ListServicesRequest message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetNotificationChannelVerificationCodeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer. + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decode = function decode(reader, length) { + GetNotificationChannelVerificationCodeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServicesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest(); 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.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16496,134 +15302,122 @@ }; /** - * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationChannelVerificationCodeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { + GetNotificationChannelVerificationCodeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesRequest message. + * Verifies a GetNotificationChannelVerificationCodeRequest message. * @function verify - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesRequest.verify = function verify(message) { + GetNotificationChannelVerificationCodeRequest.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.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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } return null; }; /** - * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationChannelVerificationCodeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} GetNotificationChannelVerificationCodeRequest */ - ListServicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListServicesRequest) + GetNotificationChannelVerificationCodeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest) return object; - var message = new $root.google.monitoring.v3.ListServicesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); + var message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.monitoring.v3.GetNotificationChannelVerificationCodeRequest.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } return message; }; /** - * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetNotificationChannelVerificationCodeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @static - * @param {google.monitoring.v3.ListServicesRequest} message ListServicesRequest + * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeRequest} message GetNotificationChannelVerificationCodeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesRequest.toObject = function toObject(message, options) { + GetNotificationChannelVerificationCodeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.expireTime = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); return object; }; /** - * Converts this ListServicesRequest to JSON. + * Converts this GetNotificationChannelVerificationCodeRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListServicesRequest + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest * @instance * @returns {Object.} JSON object */ - ListServicesRequest.prototype.toJSON = function toJSON() { + GetNotificationChannelVerificationCodeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListServicesRequest; + return GetNotificationChannelVerificationCodeRequest; })(); - v3.ListServicesResponse = (function() { + v3.GetNotificationChannelVerificationCodeResponse = (function() { /** - * Properties of a ListServicesResponse. + * Properties of a GetNotificationChannelVerificationCodeResponse. * @memberof google.monitoring.v3 - * @interface IListServicesResponse - * @property {Array.|null} [services] ListServicesResponse services - * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken + * @interface IGetNotificationChannelVerificationCodeResponse + * @property {string|null} [code] GetNotificationChannelVerificationCodeResponse code + * @property {google.protobuf.ITimestamp|null} [expireTime] GetNotificationChannelVerificationCodeResponse expireTime */ /** - * Constructs a new ListServicesResponse. + * Constructs a new GetNotificationChannelVerificationCodeResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a ListServicesResponse. - * @implements IListServicesResponse + * @classdesc Represents a GetNotificationChannelVerificationCodeResponse. + * @implements IGetNotificationChannelVerificationCodeResponse * @constructor - * @param {google.monitoring.v3.IListServicesResponse=} [properties] Properties to set + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse=} [properties] Properties to set */ - function ListServicesResponse(properties) { - this.services = []; + function GetNotificationChannelVerificationCodeResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16631,91 +15425,88 @@ } /** - * ListServicesResponse services. - * @member {Array.} services - * @memberof google.monitoring.v3.ListServicesResponse + * GetNotificationChannelVerificationCodeResponse code. + * @member {string} code + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @instance */ - ListServicesResponse.prototype.services = $util.emptyArray; + GetNotificationChannelVerificationCodeResponse.prototype.code = ""; /** - * ListServicesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListServicesResponse + * GetNotificationChannelVerificationCodeResponse expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @instance */ - ListServicesResponse.prototype.nextPageToken = ""; + GetNotificationChannelVerificationCodeResponse.prototype.expireTime = null; /** - * Creates a new ListServicesResponse instance using the specified properties. + * Creates a new GetNotificationChannelVerificationCodeResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static - * @param {google.monitoring.v3.IListServicesResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse instance + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse instance */ - ListServicesResponse.create = function create(properties) { - return new ListServicesResponse(properties); + GetNotificationChannelVerificationCodeResponse.create = function create(properties) { + return new GetNotificationChannelVerificationCodeResponse(properties); }; /** - * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * Encodes the specified GetNotificationChannelVerificationCodeResponse message. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static - * @param {google.monitoring.v3.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encode = function encode(message, writer) { + GetNotificationChannelVerificationCodeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.services != null && message.services.length) - for (var i = 0; i < message.services.length; ++i) - $root.google.monitoring.v3.Service.encode(message.services[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.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * Encodes the specified GetNotificationChannelVerificationCodeResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static - * @param {google.monitoring.v3.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetNotificationChannelVerificationCodeResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer. + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decode = function decode(reader, length) { + GetNotificationChannelVerificationCodeResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServicesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.services && message.services.length)) - message.services = []; - message.services.push($root.google.monitoring.v3.Service.decode(reader, reader.uint32())); + message.code = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16726,134 +15517,122 @@ }; /** - * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetNotificationChannelVerificationCodeResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + GetNotificationChannelVerificationCodeResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServicesResponse message. + * Verifies a GetNotificationChannelVerificationCodeResponse message. * @function verify - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServicesResponse.verify = function verify(message) { + GetNotificationChannelVerificationCodeResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.services != null && message.hasOwnProperty("services")) { - if (!Array.isArray(message.services)) - return "services: array expected"; - for (var i = 0; i < message.services.length; ++i) { - var error = $root.google.monitoring.v3.Service.verify(message.services[i]); - if (error) - return "services." + error; - } + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetNotificationChannelVerificationCodeResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @returns {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} GetNotificationChannelVerificationCodeResponse */ - ListServicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListServicesResponse) + GetNotificationChannelVerificationCodeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) return object; - var message = new $root.google.monitoring.v3.ListServicesResponse(); - if (object.services) { - if (!Array.isArray(object.services)) - throw TypeError(".google.monitoring.v3.ListServicesResponse.services: array expected"); - message.services = []; - for (var i = 0; i < object.services.length; ++i) { - if (typeof object.services[i] !== "object") - throw TypeError(".google.monitoring.v3.ListServicesResponse.services: object expected"); - message.services[i] = $root.google.monitoring.v3.Service.fromObject(object.services[i]); - } + var message = new $root.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse(); + if (object.code != null) + message.code = String(object.code); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.monitoring.v3.GetNotificationChannelVerificationCodeResponse.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetNotificationChannelVerificationCodeResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @static - * @param {google.monitoring.v3.ListServicesResponse} message ListServicesResponse + * @param {google.monitoring.v3.GetNotificationChannelVerificationCodeResponse} message GetNotificationChannelVerificationCodeResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServicesResponse.toObject = function toObject(message, options) { + GetNotificationChannelVerificationCodeResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.services = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.services && message.services.length) { - object.services = []; - for (var j = 0; j < message.services.length; ++j) - object.services[j] = $root.google.monitoring.v3.Service.toObject(message.services[j], options); + if (options.defaults) { + object.code = ""; + object.expireTime = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); return object; }; /** - * Converts this ListServicesResponse to JSON. + * Converts this GetNotificationChannelVerificationCodeResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListServicesResponse + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse * @instance * @returns {Object.} JSON object */ - ListServicesResponse.prototype.toJSON = function toJSON() { + GetNotificationChannelVerificationCodeResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListServicesResponse; + return GetNotificationChannelVerificationCodeResponse; })(); - v3.UpdateServiceRequest = (function() { + v3.VerifyNotificationChannelRequest = (function() { /** - * Properties of an UpdateServiceRequest. + * Properties of a VerifyNotificationChannelRequest. * @memberof google.monitoring.v3 - * @interface IUpdateServiceRequest - * @property {google.monitoring.v3.IService|null} [service] UpdateServiceRequest service - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask + * @interface IVerifyNotificationChannelRequest + * @property {string|null} [name] VerifyNotificationChannelRequest name + * @property {string|null} [code] VerifyNotificationChannelRequest code */ /** - * Constructs a new UpdateServiceRequest. + * Constructs a new VerifyNotificationChannelRequest. * @memberof google.monitoring.v3 - * @classdesc Represents an UpdateServiceRequest. - * @implements IUpdateServiceRequest + * @classdesc Represents a VerifyNotificationChannelRequest. + * @implements IVerifyNotificationChannelRequest * @constructor - * @param {google.monitoring.v3.IUpdateServiceRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest=} [properties] Properties to set */ - function UpdateServiceRequest(properties) { + function VerifyNotificationChannelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16861,88 +15640,88 @@ } /** - * UpdateServiceRequest service. - * @member {google.monitoring.v3.IService|null|undefined} service - * @memberof google.monitoring.v3.UpdateServiceRequest + * VerifyNotificationChannelRequest name. + * @member {string} name + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @instance */ - UpdateServiceRequest.prototype.service = null; + VerifyNotificationChannelRequest.prototype.name = ""; /** - * UpdateServiceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.monitoring.v3.UpdateServiceRequest + * VerifyNotificationChannelRequest code. + * @member {string} code + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @instance */ - UpdateServiceRequest.prototype.updateMask = null; + VerifyNotificationChannelRequest.prototype.code = ""; /** - * Creates a new UpdateServiceRequest instance using the specified properties. + * Creates a new VerifyNotificationChannelRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static - * @param {google.monitoring.v3.IUpdateServiceRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest instance + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest instance */ - UpdateServiceRequest.create = function create(properties) { - return new UpdateServiceRequest(properties); + VerifyNotificationChannelRequest.create = function create(properties) { + return new VerifyNotificationChannelRequest(properties); }; /** - * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * Encodes the specified VerifyNotificationChannelRequest message. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static - * @param {google.monitoring.v3.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} message VerifyNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServiceRequest.encode = function encode(message, writer) { + VerifyNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && message.hasOwnProperty("service")) - $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); return writer; }; /** - * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. + * Encodes the specified VerifyNotificationChannelRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.VerifyNotificationChannelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static - * @param {google.monitoring.v3.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode + * @param {google.monitoring.v3.IVerifyNotificationChannelRequest} message VerifyNotificationChannelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + VerifyNotificationChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer. + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServiceRequest.decode = function decode(reader, length) { + VerifyNotificationChannelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateServiceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.VerifyNotificationChannelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.code = reader.string(); break; default: reader.skipType(tag & 7); @@ -16953,126 +15732,122 @@ }; /** - * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. + * Decodes a VerifyNotificationChannelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { + VerifyNotificationChannelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateServiceRequest message. + * Verifies a VerifyNotificationChannelRequest message. * @function verify - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateServiceRequest.verify = function verify(message) { + VerifyNotificationChannelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) { - var error = $root.google.monitoring.v3.Service.verify(message.service); - if (error) - return "service." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; return null; }; /** - * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyNotificationChannelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest + * @returns {google.monitoring.v3.VerifyNotificationChannelRequest} VerifyNotificationChannelRequest */ - UpdateServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.UpdateServiceRequest) + VerifyNotificationChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.VerifyNotificationChannelRequest) return object; - var message = new $root.google.monitoring.v3.UpdateServiceRequest(); - if (object.service != null) { - if (typeof object.service !== "object") - throw TypeError(".google.monitoring.v3.UpdateServiceRequest.service: object expected"); - message.service = $root.google.monitoring.v3.Service.fromObject(object.service); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.monitoring.v3.UpdateServiceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.monitoring.v3.VerifyNotificationChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.code != null) + message.code = String(object.code); return message; }; /** - * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. + * Creates a plain object from a VerifyNotificationChannelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @static - * @param {google.monitoring.v3.UpdateServiceRequest} message UpdateServiceRequest + * @param {google.monitoring.v3.VerifyNotificationChannelRequest} message VerifyNotificationChannelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateServiceRequest.toObject = function toObject(message, options) { + VerifyNotificationChannelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.service = null; - object.updateMask = null; + object.name = ""; + object.code = ""; } - if (message.service != null && message.hasOwnProperty("service")) - object.service = $root.google.monitoring.v3.Service.toObject(message.service, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; return object; }; /** - * Converts this UpdateServiceRequest to JSON. + * Converts this VerifyNotificationChannelRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.UpdateServiceRequest + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest * @instance * @returns {Object.} JSON object */ - UpdateServiceRequest.prototype.toJSON = function toJSON() { + VerifyNotificationChannelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateServiceRequest; + return VerifyNotificationChannelRequest; })(); - v3.DeleteServiceRequest = (function() { + v3.Service = (function() { /** - * Properties of a DeleteServiceRequest. + * Properties of a Service. * @memberof google.monitoring.v3 - * @interface IDeleteServiceRequest - * @property {string|null} [name] DeleteServiceRequest name + * @interface IService + * @property {string|null} [name] Service name + * @property {string|null} [displayName] Service displayName + * @property {google.monitoring.v3.Service.ICustom|null} [custom] Service custom + * @property {google.monitoring.v3.Service.IAppEngine|null} [appEngine] Service appEngine + * @property {google.monitoring.v3.Service.ICloudEndpoints|null} [cloudEndpoints] Service cloudEndpoints + * @property {google.monitoring.v3.Service.IClusterIstio|null} [clusterIstio] Service clusterIstio + * @property {google.monitoring.v3.Service.ITelemetry|null} [telemetry] Service telemetry */ /** - * Constructs a new DeleteServiceRequest. + * Constructs a new Service. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteServiceRequest. - * @implements IDeleteServiceRequest + * @classdesc Represents a Service. + * @implements IService * @constructor - * @param {google.monitoring.v3.IDeleteServiceRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IService=} [properties] Properties to set */ - function DeleteServiceRequest(properties) { + function Service(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17080,290 +15855,167 @@ } /** - * DeleteServiceRequest name. + * Service name. * @member {string} name - * @memberof google.monitoring.v3.DeleteServiceRequest + * @memberof google.monitoring.v3.Service * @instance */ - DeleteServiceRequest.prototype.name = ""; - - /** - * Creates a new DeleteServiceRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {google.monitoring.v3.IDeleteServiceRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest instance - */ - DeleteServiceRequest.create = function create(properties) { - return new DeleteServiceRequest(properties); - }; - - /** - * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {google.monitoring.v3.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteServiceRequest.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 DeleteServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {google.monitoring.v3.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteServiceRequest(); - 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 DeleteServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteServiceRequest message. - * @function verify - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteServiceRequest.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 DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest - */ - DeleteServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteServiceRequest) - return object; - var message = new $root.google.monitoring.v3.DeleteServiceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + Service.prototype.name = ""; /** - * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.DeleteServiceRequest - * @static - * @param {google.monitoring.v3.DeleteServiceRequest} message DeleteServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Service displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.Service + * @instance */ - DeleteServiceRequest.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; - }; + Service.prototype.displayName = ""; /** - * Converts this DeleteServiceRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.DeleteServiceRequest + * Service custom. + * @member {google.monitoring.v3.Service.ICustom|null|undefined} custom + * @memberof google.monitoring.v3.Service * @instance - * @returns {Object.} JSON object */ - DeleteServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteServiceRequest; - })(); - - v3.CreateServiceLevelObjectiveRequest = (function() { + Service.prototype.custom = null; /** - * Properties of a CreateServiceLevelObjectiveRequest. - * @memberof google.monitoring.v3 - * @interface ICreateServiceLevelObjectiveRequest - * @property {string|null} [parent] CreateServiceLevelObjectiveRequest parent - * @property {string|null} [serviceLevelObjectiveId] CreateServiceLevelObjectiveRequest serviceLevelObjectiveId - * @property {google.monitoring.v3.IServiceLevelObjective|null} [serviceLevelObjective] CreateServiceLevelObjectiveRequest serviceLevelObjective + * Service appEngine. + * @member {google.monitoring.v3.Service.IAppEngine|null|undefined} appEngine + * @memberof google.monitoring.v3.Service + * @instance */ + Service.prototype.appEngine = null; /** - * Constructs a new CreateServiceLevelObjectiveRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a CreateServiceLevelObjectiveRequest. - * @implements ICreateServiceLevelObjectiveRequest - * @constructor - * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest=} [properties] Properties to set + * Service cloudEndpoints. + * @member {google.monitoring.v3.Service.ICloudEndpoints|null|undefined} cloudEndpoints + * @memberof google.monitoring.v3.Service + * @instance */ - function CreateServiceLevelObjectiveRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Service.prototype.cloudEndpoints = null; /** - * CreateServiceLevelObjectiveRequest parent. - * @member {string} parent - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * Service clusterIstio. + * @member {google.monitoring.v3.Service.IClusterIstio|null|undefined} clusterIstio + * @memberof google.monitoring.v3.Service * @instance */ - CreateServiceLevelObjectiveRequest.prototype.parent = ""; + Service.prototype.clusterIstio = null; /** - * CreateServiceLevelObjectiveRequest serviceLevelObjectiveId. - * @member {string} serviceLevelObjectiveId - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * Service telemetry. + * @member {google.monitoring.v3.Service.ITelemetry|null|undefined} telemetry + * @memberof google.monitoring.v3.Service * @instance */ - CreateServiceLevelObjectiveRequest.prototype.serviceLevelObjectiveId = ""; + Service.prototype.telemetry = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CreateServiceLevelObjectiveRequest serviceLevelObjective. - * @member {google.monitoring.v3.IServiceLevelObjective|null|undefined} serviceLevelObjective - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * Service identifier. + * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|undefined} identifier + * @memberof google.monitoring.v3.Service * @instance */ - CreateServiceLevelObjectiveRequest.prototype.serviceLevelObjective = null; + Object.defineProperty(Service.prototype, "identifier", { + get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CreateServiceLevelObjectiveRequest instance using the specified properties. + * Creates a new Service instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static - * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest instance + * @param {google.monitoring.v3.IService=} [properties] Properties to set + * @returns {google.monitoring.v3.Service} Service instance */ - CreateServiceLevelObjectiveRequest.create = function create(properties) { - return new CreateServiceLevelObjectiveRequest(properties); + Service.create = function create(properties) { + return new Service(properties); }; /** - * Encodes the specified CreateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * Encodes the specified Service message. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static - * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param {google.monitoring.v3.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceLevelObjectiveRequest.encode = function encode(message, writer) { + Service.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.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) - $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceLevelObjectiveId); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.custom != null && message.hasOwnProperty("custom")) + $root.google.monitoring.v3.Service.Custom.encode(message.custom, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.appEngine != null && message.hasOwnProperty("appEngine")) + $root.google.monitoring.v3.Service.AppEngine.encode(message.appEngine, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) + $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) + $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.telemetry != null && message.hasOwnProperty("telemetry")) + $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * Encodes the specified Service message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static - * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param {google.monitoring.v3.IService} message Service message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + Service.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer. + * Decodes a Service message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest + * @returns {google.monitoring.v3.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceLevelObjectiveRequest.decode = function decode(reader, length) { + Service.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 3: - message.serviceLevelObjectiveId = reader.string(); + message.name = reader.string(); break; case 2: - message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + case 6: + message.custom = $root.google.monitoring.v3.Service.Custom.decode(reader, reader.uint32()); + break; + case 7: + message.appEngine = $root.google.monitoring.v3.Service.AppEngine.decode(reader, reader.uint32()); + break; + case 8: + message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.decode(reader, reader.uint32()); + break; + case 9: + message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.decode(reader, reader.uint32()); + break; + case 13: + message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -17374,1102 +16026,1188 @@ }; /** - * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * Decodes a Service message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest + * @returns {google.monitoring.v3.Service} Service * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { + Service.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateServiceLevelObjectiveRequest message. + * Verifies a Service message. * @function verify - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateServiceLevelObjectiveRequest.verify = function verify(message) { + Service.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.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) - if (!$util.isString(message.serviceLevelObjectiveId)) - return "serviceLevelObjectiveId: string expected"; - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) { - var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjective); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.custom != null && message.hasOwnProperty("custom")) { + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.Custom.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.appEngine != null && message.hasOwnProperty("appEngine")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.AppEngine.verify(message.appEngine); + if (error) + return "appEngine." + error; + } + } + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.CloudEndpoints.verify(message.cloudEndpoints); + if (error) + return "cloudEndpoints." + error; + } + } + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.ClusterIstio.verify(message.clusterIstio); + if (error) + return "clusterIstio." + error; + } + } + if (message.telemetry != null && message.hasOwnProperty("telemetry")) { + var error = $root.google.monitoring.v3.Service.Telemetry.verify(message.telemetry); if (error) - return "serviceLevelObjective." + error; + return "telemetry." + error; } return null; }; /** - * Creates a CreateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Service message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest + * @returns {google.monitoring.v3.Service} Service */ - CreateServiceLevelObjectiveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest) + Service.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service) return object; - var message = new $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.serviceLevelObjectiveId != null) - message.serviceLevelObjectiveId = String(object.serviceLevelObjectiveId); - if (object.serviceLevelObjective != null) { - if (typeof object.serviceLevelObjective !== "object") - throw TypeError(".google.monitoring.v3.CreateServiceLevelObjectiveRequest.serviceLevelObjective: object expected"); - message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjective); + var message = new $root.google.monitoring.v3.Service(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.monitoring.v3.Service.custom: object expected"); + message.custom = $root.google.monitoring.v3.Service.Custom.fromObject(object.custom); + } + if (object.appEngine != null) { + if (typeof object.appEngine !== "object") + throw TypeError(".google.monitoring.v3.Service.appEngine: object expected"); + message.appEngine = $root.google.monitoring.v3.Service.AppEngine.fromObject(object.appEngine); + } + if (object.cloudEndpoints != null) { + if (typeof object.cloudEndpoints !== "object") + throw TypeError(".google.monitoring.v3.Service.cloudEndpoints: object expected"); + message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.fromObject(object.cloudEndpoints); + } + if (object.clusterIstio != null) { + if (typeof object.clusterIstio !== "object") + throw TypeError(".google.monitoring.v3.Service.clusterIstio: object expected"); + message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.fromObject(object.clusterIstio); + } + if (object.telemetry != null) { + if (typeof object.telemetry !== "object") + throw TypeError(".google.monitoring.v3.Service.telemetry: object expected"); + message.telemetry = $root.google.monitoring.v3.Service.Telemetry.fromObject(object.telemetry); } return message; }; /** - * Creates a plain object from a CreateServiceLevelObjectiveRequest message. Also converts values to other types if specified. + * Creates a plain object from a Service message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @static - * @param {google.monitoring.v3.CreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest + * @param {google.monitoring.v3.Service} message Service * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateServiceLevelObjectiveRequest.toObject = function toObject(message, options) { + Service.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.serviceLevelObjective = null; - object.serviceLevelObjectiveId = ""; + object.name = ""; + object.displayName = ""; + object.telemetry = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) - object.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjective, options); - if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) - object.serviceLevelObjectiveId = message.serviceLevelObjectiveId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.monitoring.v3.Service.Custom.toObject(message.custom, options); + if (options.oneofs) + object.identifier = "custom"; + } + if (message.appEngine != null && message.hasOwnProperty("appEngine")) { + object.appEngine = $root.google.monitoring.v3.Service.AppEngine.toObject(message.appEngine, options); + if (options.oneofs) + object.identifier = "appEngine"; + } + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) { + object.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.toObject(message.cloudEndpoints, options); + if (options.oneofs) + object.identifier = "cloudEndpoints"; + } + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) { + object.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.toObject(message.clusterIstio, options); + if (options.oneofs) + object.identifier = "clusterIstio"; + } + if (message.telemetry != null && message.hasOwnProperty("telemetry")) + object.telemetry = $root.google.monitoring.v3.Service.Telemetry.toObject(message.telemetry, options); return object; }; /** - * Converts this CreateServiceLevelObjectiveRequest to JSON. + * Converts this Service to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.Service * @instance * @returns {Object.} JSON object */ - CreateServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { + Service.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateServiceLevelObjectiveRequest; - })(); - - v3.GetServiceLevelObjectiveRequest = (function() { + Service.Custom = (function() { - /** - * Properties of a GetServiceLevelObjectiveRequest. - * @memberof google.monitoring.v3 - * @interface IGetServiceLevelObjectiveRequest - * @property {string|null} [name] GetServiceLevelObjectiveRequest name - * @property {google.monitoring.v3.ServiceLevelObjective.View|null} [view] GetServiceLevelObjectiveRequest view - */ + /** + * Properties of a Custom. + * @memberof google.monitoring.v3.Service + * @interface ICustom + */ - /** - * Constructs a new GetServiceLevelObjectiveRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a GetServiceLevelObjectiveRequest. - * @implements IGetServiceLevelObjectiveRequest - * @constructor - * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest=} [properties] Properties to set - */ - function GetServiceLevelObjectiveRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetServiceLevelObjectiveRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @instance - */ - GetServiceLevelObjectiveRequest.prototype.name = ""; - - /** - * GetServiceLevelObjectiveRequest view. - * @member {google.monitoring.v3.ServiceLevelObjective.View} view - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @instance - */ - GetServiceLevelObjectiveRequest.prototype.view = 0; + /** + * Constructs a new Custom. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a Custom. + * @implements ICustom + * @constructor + * @param {google.monitoring.v3.Service.ICustom=} [properties] Properties to set + */ + function Custom(properties) { + if (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 GetServiceLevelObjectiveRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest instance - */ - GetServiceLevelObjectiveRequest.create = function create(properties) { - return new GetServiceLevelObjectiveRequest(properties); - }; + /** + * Creates a new Custom instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.ICustom=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.Custom} Custom instance + */ + Custom.create = function create(properties) { + return new Custom(properties); + }; - /** - * Encodes the specified GetServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetServiceLevelObjectiveRequest.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.view != null && message.hasOwnProperty("view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; + /** + * Encodes the specified Custom message. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.ICustom} message Custom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Custom.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified GetServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Custom message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.ICustom} message Custom message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Custom.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetServiceLevelObjectiveRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetServiceLevelObjectiveRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Custom message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.Custom} Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Custom.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.Custom(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Custom message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.Custom} Custom + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Custom.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GetServiceLevelObjectiveRequest message. - * @function verify - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetServiceLevelObjectiveRequest.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")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 2: - case 1: - break; - } - return null; - }; + /** + * Verifies a Custom message. + * @function verify + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Custom.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a GetServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest - */ - GetServiceLevelObjectiveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetServiceLevelObjectiveRequest) - return object; - var message = new $root.google.monitoring.v3.GetServiceLevelObjectiveRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - case "VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "FULL": - case 2: - message.view = 2; - break; - case "EXPLICIT": - case 1: - message.view = 1; - break; - } - return message; - }; + /** + * Creates a Custom message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.Custom} Custom + */ + Custom.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.Custom) + return object; + return new $root.google.monitoring.v3.Service.Custom(); + }; - /** - * Creates a plain object from a GetServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.GetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetServiceLevelObjectiveRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; - return object; - }; + /** + * Creates a plain object from a Custom message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {google.monitoring.v3.Service.Custom} message Custom + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Custom.toObject = function toObject() { + return {}; + }; - /** - * Converts this GetServiceLevelObjectiveRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest - * @instance - * @returns {Object.} JSON object - */ - GetServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Custom to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.Custom + * @instance + * @returns {Object.} JSON object + */ + Custom.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GetServiceLevelObjectiveRequest; - })(); + return Custom; + })(); - v3.ListServiceLevelObjectivesRequest = (function() { + Service.AppEngine = (function() { - /** - * Properties of a ListServiceLevelObjectivesRequest. - * @memberof google.monitoring.v3 - * @interface IListServiceLevelObjectivesRequest - * @property {string|null} [parent] ListServiceLevelObjectivesRequest parent - * @property {string|null} [filter] ListServiceLevelObjectivesRequest filter - * @property {number|null} [pageSize] ListServiceLevelObjectivesRequest pageSize - * @property {string|null} [pageToken] ListServiceLevelObjectivesRequest pageToken - * @property {google.monitoring.v3.ServiceLevelObjective.View|null} [view] ListServiceLevelObjectivesRequest view - */ + /** + * Properties of an AppEngine. + * @memberof google.monitoring.v3.Service + * @interface IAppEngine + * @property {string|null} [moduleId] AppEngine moduleId + */ - /** - * Constructs a new ListServiceLevelObjectivesRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListServiceLevelObjectivesRequest. - * @implements IListServiceLevelObjectivesRequest - * @constructor - * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest=} [properties] Properties to set - */ - function ListServiceLevelObjectivesRequest(properties) { - if (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 AppEngine. + * @memberof google.monitoring.v3.Service + * @classdesc Represents an AppEngine. + * @implements IAppEngine + * @constructor + * @param {google.monitoring.v3.Service.IAppEngine=} [properties] Properties to set + */ + function AppEngine(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ListServiceLevelObjectivesRequest parent. - * @member {string} parent - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @instance - */ - ListServiceLevelObjectivesRequest.prototype.parent = ""; + /** + * AppEngine moduleId. + * @member {string} moduleId + * @memberof google.monitoring.v3.Service.AppEngine + * @instance + */ + AppEngine.prototype.moduleId = ""; - /** - * ListServiceLevelObjectivesRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @instance - */ - ListServiceLevelObjectivesRequest.prototype.filter = ""; + /** + * Creates a new AppEngine instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.IAppEngine=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine instance + */ + AppEngine.create = function create(properties) { + return new AppEngine(properties); + }; - /** - * ListServiceLevelObjectivesRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @instance - */ - ListServiceLevelObjectivesRequest.prototype.pageSize = 0; + /** + * Encodes the specified AppEngine message. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.IAppEngine} message AppEngine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngine.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moduleId != null && message.hasOwnProperty("moduleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moduleId); + return writer; + }; - /** - * ListServiceLevelObjectivesRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @instance - */ - ListServiceLevelObjectivesRequest.prototype.pageToken = ""; + /** + * Encodes the specified AppEngine message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.IAppEngine} message AppEngine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngine.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ListServiceLevelObjectivesRequest view. - * @member {google.monitoring.v3.ServiceLevelObjective.View} view - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @instance - */ - ListServiceLevelObjectivesRequest.prototype.view = 0; + /** + * Decodes an AppEngine message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngine.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.AppEngine(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moduleId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest instance - */ - ListServiceLevelObjectivesRequest.create = function create(properties) { - return new ListServiceLevelObjectivesRequest(properties); - }; + /** + * Decodes an AppEngine message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngine.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListServiceLevelObjectivesRequest message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListServiceLevelObjectivesRequest.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.filter != null && message.hasOwnProperty("filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.view != null && message.hasOwnProperty("view")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); - return writer; - }; + /** + * Verifies an AppEngine message. + * @function verify + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngine.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moduleId != null && message.hasOwnProperty("moduleId")) + if (!$util.isString(message.moduleId)) + return "moduleId: string expected"; + return null; + }; - /** - * Encodes the specified ListServiceLevelObjectivesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListServiceLevelObjectivesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an AppEngine message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + */ + AppEngine.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.AppEngine) + return object; + var message = new $root.google.monitoring.v3.Service.AppEngine(); + if (object.moduleId != null) + message.moduleId = String(object.moduleId); + return message; + }; - /** - * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListServiceLevelObjectivesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServiceLevelObjectivesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.view = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from an AppEngine message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {google.monitoring.v3.Service.AppEngine} message AppEngine + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngine.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.moduleId = ""; + if (message.moduleId != null && message.hasOwnProperty("moduleId")) + object.moduleId = message.moduleId; + return object; + }; - /** - * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListServiceLevelObjectivesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this AppEngine to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.AppEngine + * @instance + * @returns {Object.} JSON object + */ + AppEngine.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a ListServiceLevelObjectivesRequest message. - * @function verify - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListServiceLevelObjectivesRequest.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.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 2: - case 1: - break; - } - return null; - }; + return AppEngine; + })(); - /** - * Creates a ListServiceLevelObjectivesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest - */ - ListServiceLevelObjectivesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListServiceLevelObjectivesRequest) - return object; - var message = new $root.google.monitoring.v3.ListServiceLevelObjectivesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - 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); - switch (object.view) { - case "VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "FULL": - case 2: - message.view = 2; - break; - case "EXPLICIT": - case 1: - message.view = 1; - break; - } - return message; - }; + Service.CloudEndpoints = (function() { - /** - * Creates a plain object from a ListServiceLevelObjectivesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @static - * @param {google.monitoring.v3.ListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListServiceLevelObjectivesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + /** + * Properties of a CloudEndpoints. + * @memberof google.monitoring.v3.Service + * @interface ICloudEndpoints + * @property {string|null} [service] CloudEndpoints service + */ + + /** + * Constructs a new CloudEndpoints. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a CloudEndpoints. + * @implements ICloudEndpoints + * @constructor + * @param {google.monitoring.v3.Service.ICloudEndpoints=} [properties] Properties to set + */ + function CloudEndpoints(properties) { + if (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.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - 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.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; - return object; - }; - /** - * Converts this ListServiceLevelObjectivesRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest - * @instance - * @returns {Object.} JSON object - */ - ListServiceLevelObjectivesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CloudEndpoints service. + * @member {string} service + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @instance + */ + CloudEndpoints.prototype.service = ""; - return ListServiceLevelObjectivesRequest; - })(); + /** + * Creates a new CloudEndpoints instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.ICloudEndpoints=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints instance + */ + CloudEndpoints.create = function create(properties) { + return new CloudEndpoints(properties); + }; - v3.ListServiceLevelObjectivesResponse = (function() { + /** + * Encodes the specified CloudEndpoints message. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.ICloudEndpoints} message CloudEndpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEndpoints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && message.hasOwnProperty("service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; - /** - * Properties of a ListServiceLevelObjectivesResponse. - * @memberof google.monitoring.v3 - * @interface IListServiceLevelObjectivesResponse - * @property {Array.|null} [serviceLevelObjectives] ListServiceLevelObjectivesResponse serviceLevelObjectives - * @property {string|null} [nextPageToken] ListServiceLevelObjectivesResponse nextPageToken - */ + /** + * Encodes the specified CloudEndpoints message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.ICloudEndpoints} message CloudEndpoints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEndpoints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new ListServiceLevelObjectivesResponse. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListServiceLevelObjectivesResponse. - * @implements IListServiceLevelObjectivesResponse - * @constructor - * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse=} [properties] Properties to set - */ - function ListServiceLevelObjectivesResponse(properties) { - this.serviceLevelObjectives = []; - if (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 CloudEndpoints message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEndpoints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.CloudEndpoints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.service = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ListServiceLevelObjectivesResponse serviceLevelObjectives. - * @member {Array.} serviceLevelObjectives - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @instance - */ - ListServiceLevelObjectivesResponse.prototype.serviceLevelObjectives = $util.emptyArray; + /** + * Decodes a CloudEndpoints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEndpoints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ListServiceLevelObjectivesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @instance - */ - ListServiceLevelObjectivesResponse.prototype.nextPageToken = ""; + /** + * Verifies a CloudEndpoints message. + * @function verify + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudEndpoints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; - /** - * Creates a new ListServiceLevelObjectivesResponse instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse instance - */ - ListServiceLevelObjectivesResponse.create = function create(properties) { - return new ListServiceLevelObjectivesResponse(properties); - }; + /** + * Creates a CloudEndpoints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints + */ + CloudEndpoints.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.CloudEndpoints) + return object; + var message = new $root.google.monitoring.v3.Service.CloudEndpoints(); + if (object.service != null) + message.service = String(object.service); + return message; + }; - /** - * Encodes the specified ListServiceLevelObjectivesResponse message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListServiceLevelObjectivesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serviceLevelObjectives != null && message.serviceLevelObjectives.length) - for (var i = 0; i < message.serviceLevelObjectives.length; ++i) - $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjectives[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; - }; + /** + * Creates a plain object from a CloudEndpoints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {google.monitoring.v3.Service.CloudEndpoints} message CloudEndpoints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudEndpoints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; - /** - * Encodes the specified ListServiceLevelObjectivesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListServiceLevelObjectivesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this CloudEndpoints to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @instance + * @returns {Object.} JSON object + */ + CloudEndpoints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListServiceLevelObjectivesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServiceLevelObjectivesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.serviceLevelObjectives && message.serviceLevelObjectives.length)) - message.serviceLevelObjectives = []; - message.serviceLevelObjectives.push($root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return CloudEndpoints; + })(); - /** - * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListServiceLevelObjectivesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Service.ClusterIstio = (function() { - /** - * Verifies a ListServiceLevelObjectivesResponse message. - * @function verify - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListServiceLevelObjectivesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceLevelObjectives != null && message.hasOwnProperty("serviceLevelObjectives")) { - if (!Array.isArray(message.serviceLevelObjectives)) - return "serviceLevelObjectives: array expected"; - for (var i = 0; i < message.serviceLevelObjectives.length; ++i) { - var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjectives[i]); - if (error) - return "serviceLevelObjectives." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Properties of a ClusterIstio. + * @memberof google.monitoring.v3.Service + * @interface IClusterIstio + * @property {string|null} [location] ClusterIstio location + * @property {string|null} [clusterName] ClusterIstio clusterName + * @property {string|null} [serviceNamespace] ClusterIstio serviceNamespace + * @property {string|null} [serviceName] ClusterIstio serviceName + */ - /** - * Creates a ListServiceLevelObjectivesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse - */ - ListServiceLevelObjectivesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListServiceLevelObjectivesResponse) - return object; - var message = new $root.google.monitoring.v3.ListServiceLevelObjectivesResponse(); - if (object.serviceLevelObjectives) { - if (!Array.isArray(object.serviceLevelObjectives)) - throw TypeError(".google.monitoring.v3.ListServiceLevelObjectivesResponse.serviceLevelObjectives: array expected"); - message.serviceLevelObjectives = []; - for (var i = 0; i < object.serviceLevelObjectives.length; ++i) { - if (typeof object.serviceLevelObjectives[i] !== "object") - throw TypeError(".google.monitoring.v3.ListServiceLevelObjectivesResponse.serviceLevelObjectives: object expected"); - message.serviceLevelObjectives[i] = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjectives[i]); - } + /** + * Constructs a new ClusterIstio. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a ClusterIstio. + * @implements IClusterIstio + * @constructor + * @param {google.monitoring.v3.Service.IClusterIstio=} [properties] Properties to set + */ + function ClusterIstio(properties) { + if (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.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - /** - * Creates a plain object from a ListServiceLevelObjectivesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @static - * @param {google.monitoring.v3.ListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListServiceLevelObjectivesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.serviceLevelObjectives = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.serviceLevelObjectives && message.serviceLevelObjectives.length) { - object.serviceLevelObjectives = []; - for (var j = 0; j < message.serviceLevelObjectives.length; ++j) - object.serviceLevelObjectives[j] = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjectives[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * ClusterIstio location. + * @member {string} location + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.location = ""; - /** - * Converts this ListServiceLevelObjectivesResponse to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse - * @instance - * @returns {Object.} JSON object - */ - ListServiceLevelObjectivesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ClusterIstio clusterName. + * @member {string} clusterName + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.clusterName = ""; - return ListServiceLevelObjectivesResponse; - })(); + /** + * ClusterIstio serviceNamespace. + * @member {string} serviceNamespace + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.serviceNamespace = ""; - v3.UpdateServiceLevelObjectiveRequest = (function() { + /** + * ClusterIstio serviceName. + * @member {string} serviceName + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + */ + ClusterIstio.prototype.serviceName = ""; - /** - * Properties of an UpdateServiceLevelObjectiveRequest. - * @memberof google.monitoring.v3 - * @interface IUpdateServiceLevelObjectiveRequest - * @property {google.monitoring.v3.IServiceLevelObjective|null} [serviceLevelObjective] UpdateServiceLevelObjectiveRequest serviceLevelObjective - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceLevelObjectiveRequest updateMask - */ + /** + * Creates a new ClusterIstio instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.IClusterIstio=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio instance + */ + ClusterIstio.create = function create(properties) { + return new ClusterIstio(properties); + }; - /** - * Constructs a new UpdateServiceLevelObjectiveRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents an UpdateServiceLevelObjectiveRequest. - * @implements IUpdateServiceLevelObjectiveRequest - * @constructor - * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest=} [properties] Properties to set - */ - function UpdateServiceLevelObjectiveRequest(properties) { - if (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 ClusterIstio message. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.IClusterIstio} message ClusterIstio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterIstio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.clusterName != null && message.hasOwnProperty("clusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterName); + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); + return writer; + }; - /** - * UpdateServiceLevelObjectiveRequest serviceLevelObjective. - * @member {google.monitoring.v3.IServiceLevelObjective|null|undefined} serviceLevelObjective - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @instance - */ - UpdateServiceLevelObjectiveRequest.prototype.serviceLevelObjective = null; + /** + * Encodes the specified ClusterIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.IClusterIstio} message ClusterIstio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterIstio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * UpdateServiceLevelObjectiveRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @instance - */ - UpdateServiceLevelObjectiveRequest.prototype.updateMask = null; + /** + * Decodes a ClusterIstio message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterIstio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.ClusterIstio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + message.clusterName = reader.string(); + break; + case 3: + message.serviceNamespace = reader.string(); + break; + case 4: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new UpdateServiceLevelObjectiveRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest instance - */ - UpdateServiceLevelObjectiveRequest.create = function create(properties) { - return new UpdateServiceLevelObjectiveRequest(properties); - }; + /** + * Decodes a ClusterIstio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterIstio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified UpdateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateServiceLevelObjectiveRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) - $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Verifies a ClusterIstio message. + * @function verify + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterIstio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.clusterName != null && message.hasOwnProperty("clusterName")) + if (!$util.isString(message.clusterName)) + return "clusterName: string expected"; + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (!$util.isString(message.serviceNamespace)) + return "serviceNamespace: string expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; - /** - * Encodes the specified UpdateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a ClusterIstio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio + */ + ClusterIstio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.ClusterIstio) + return object; + var message = new $root.google.monitoring.v3.Service.ClusterIstio(); + if (object.location != null) + message.location = String(object.location); + if (object.clusterName != null) + message.clusterName = String(object.clusterName); + if (object.serviceNamespace != null) + message.serviceNamespace = String(object.serviceNamespace); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; - /** - * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateServiceLevelObjectiveRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a plain object from a ClusterIstio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {google.monitoring.v3.Service.ClusterIstio} message ClusterIstio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterIstio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = ""; + object.clusterName = ""; + object.serviceNamespace = ""; + object.serviceName = ""; } - } - return message; - }; - - /** - * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.clusterName != null && message.hasOwnProperty("clusterName")) + object.clusterName = message.clusterName; + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + object.serviceNamespace = message.serviceNamespace; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + return object; + }; - /** - * Verifies an UpdateServiceLevelObjectiveRequest message. - * @function verify - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateServiceLevelObjectiveRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) { - var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjective); - if (error) - return "serviceLevelObjective." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + /** + * Converts this ClusterIstio to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.ClusterIstio + * @instance + * @returns {Object.} JSON object + */ + ClusterIstio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClusterIstio; + })(); + + Service.Telemetry = (function() { + + /** + * Properties of a Telemetry. + * @memberof google.monitoring.v3.Service + * @interface ITelemetry + * @property {string|null} [resourceName] Telemetry resourceName + */ + + /** + * Constructs a new Telemetry. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a Telemetry. + * @implements ITelemetry + * @constructor + * @param {google.monitoring.v3.Service.ITelemetry=} [properties] Properties to set + */ + function Telemetry(properties) { + if (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 UpdateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest - */ - UpdateServiceLevelObjectiveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest) + /** + * Telemetry resourceName. + * @member {string} resourceName + * @memberof google.monitoring.v3.Service.Telemetry + * @instance + */ + Telemetry.prototype.resourceName = ""; + + /** + * Creates a new Telemetry instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.ITelemetry=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry instance + */ + Telemetry.create = function create(properties) { + return new Telemetry(properties); + }; + + /** + * Encodes the specified Telemetry message. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.ITelemetry} message Telemetry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Telemetry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); + return writer; + }; + + /** + * Encodes the specified Telemetry message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.ITelemetry} message Telemetry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Telemetry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Telemetry message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Telemetry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.Telemetry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.resourceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Telemetry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Telemetry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Telemetry message. + * @function verify + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Telemetry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + return null; + }; + + /** + * Creates a Telemetry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.Telemetry} Telemetry + */ + Telemetry.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.Telemetry) + return object; + var message = new $root.google.monitoring.v3.Service.Telemetry(); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + return message; + }; + + /** + * Creates a plain object from a Telemetry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {google.monitoring.v3.Service.Telemetry} message Telemetry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Telemetry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.resourceName = ""; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; return object; - var message = new $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest(); - if (object.serviceLevelObjective != null) { - if (typeof object.serviceLevelObjective !== "object") - throw TypeError(".google.monitoring.v3.UpdateServiceLevelObjectiveRequest.serviceLevelObjective: object expected"); - message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjective); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.monitoring.v3.UpdateServiceLevelObjectiveRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + }; - /** - * Creates a plain object from an UpdateServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateServiceLevelObjectiveRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serviceLevelObjective = null; - object.updateMask = null; - } - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) - object.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjective, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Converts this Telemetry to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.Telemetry + * @instance + * @returns {Object.} JSON object + */ + Telemetry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateServiceLevelObjectiveRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Telemetry; + })(); - return UpdateServiceLevelObjectiveRequest; + return Service; })(); - v3.DeleteServiceLevelObjectiveRequest = (function() { + v3.ServiceLevelObjective = (function() { /** - * Properties of a DeleteServiceLevelObjectiveRequest. + * Properties of a ServiceLevelObjective. * @memberof google.monitoring.v3 - * @interface IDeleteServiceLevelObjectiveRequest - * @property {string|null} [name] DeleteServiceLevelObjectiveRequest name + * @interface IServiceLevelObjective + * @property {string|null} [name] ServiceLevelObjective name + * @property {string|null} [displayName] ServiceLevelObjective displayName + * @property {google.monitoring.v3.IServiceLevelIndicator|null} [serviceLevelIndicator] ServiceLevelObjective serviceLevelIndicator + * @property {number|null} [goal] ServiceLevelObjective goal + * @property {google.protobuf.IDuration|null} [rollingPeriod] ServiceLevelObjective rollingPeriod + * @property {google.type.CalendarPeriod|null} [calendarPeriod] ServiceLevelObjective calendarPeriod */ /** - * Constructs a new DeleteServiceLevelObjectiveRequest. + * Constructs a new ServiceLevelObjective. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteServiceLevelObjectiveRequest. - * @implements IDeleteServiceLevelObjectiveRequest + * @classdesc Represents a ServiceLevelObjective. + * @implements IServiceLevelObjective * @constructor - * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IServiceLevelObjective=} [properties] Properties to set */ - function DeleteServiceLevelObjectiveRequest(properties) { + function ServiceLevelObjective(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18477,76 +17215,155 @@ } /** - * DeleteServiceLevelObjectiveRequest name. + * ServiceLevelObjective name. * @member {string} name - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @instance */ - DeleteServiceLevelObjectiveRequest.prototype.name = ""; + ServiceLevelObjective.prototype.name = ""; /** - * Creates a new DeleteServiceLevelObjectiveRequest instance using the specified properties. + * ServiceLevelObjective displayName. + * @member {string} displayName + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.displayName = ""; + + /** + * ServiceLevelObjective serviceLevelIndicator. + * @member {google.monitoring.v3.IServiceLevelIndicator|null|undefined} serviceLevelIndicator + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.serviceLevelIndicator = null; + + /** + * ServiceLevelObjective goal. + * @member {number} goal + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.goal = 0; + + /** + * ServiceLevelObjective rollingPeriod. + * @member {google.protobuf.IDuration|null|undefined} rollingPeriod + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.rollingPeriod = null; + + /** + * ServiceLevelObjective calendarPeriod. + * @member {google.type.CalendarPeriod} calendarPeriod + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + ServiceLevelObjective.prototype.calendarPeriod = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceLevelObjective period. + * @member {"rollingPeriod"|"calendarPeriod"|undefined} period + * @memberof google.monitoring.v3.ServiceLevelObjective + * @instance + */ + Object.defineProperty(ServiceLevelObjective.prototype, "period", { + get: $util.oneOfGetter($oneOfFields = ["rollingPeriod", "calendarPeriod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceLevelObjective instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static - * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest instance + * @param {google.monitoring.v3.IServiceLevelObjective=} [properties] Properties to set + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective instance */ - DeleteServiceLevelObjectiveRequest.create = function create(properties) { - return new DeleteServiceLevelObjectiveRequest(properties); + ServiceLevelObjective.create = function create(properties) { + return new ServiceLevelObjective(properties); }; /** - * Encodes the specified DeleteServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * Encodes the specified ServiceLevelObjective message. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static - * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param {google.monitoring.v3.IServiceLevelObjective} message ServiceLevelObjective message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceLevelObjectiveRequest.encode = function encode(message, writer) { + ServiceLevelObjective.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.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) + $root.google.monitoring.v3.ServiceLevelIndicator.encode(message.serviceLevelIndicator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.goal != null && message.hasOwnProperty("goal")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.goal); + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) + $root.google.protobuf.Duration.encode(message.rollingPeriod, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.calendarPeriod); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); return writer; }; /** - * Encodes the specified DeleteServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. + * Encodes the specified ServiceLevelObjective message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static - * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest message or plain object to encode + * @param {google.monitoring.v3.IServiceLevelObjective} message ServiceLevelObjective message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + ServiceLevelObjective.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer. + * Decodes a ServiceLevelObjective message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceLevelObjectiveRequest.decode = function decode(reader, length) { + ServiceLevelObjective.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ServiceLevelObjective(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 11: + message.displayName = reader.string(); + break; + case 3: + message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.decode(reader, reader.uint32()); + break; + case 4: + message.goal = reader.double(); + break; + case 5: + message.rollingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.calendarPeriod = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -18556,281 +17373,347 @@ }; /** - * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. + * Decodes a ServiceLevelObjective message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { + ServiceLevelObjective.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteServiceLevelObjectiveRequest message. + * Verifies a ServiceLevelObjective message. * @function verify - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteServiceLevelObjectiveRequest.verify = function verify(message) { + ServiceLevelObjective.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) { + var error = $root.google.monitoring.v3.ServiceLevelIndicator.verify(message.serviceLevelIndicator); + if (error) + return "serviceLevelIndicator." + error; + } + if (message.goal != null && message.hasOwnProperty("goal")) + if (typeof message.goal !== "number") + return "goal: number expected"; + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) { + properties.period = 1; + { + var error = $root.google.protobuf.Duration.verify(message.rollingPeriod); + if (error) + return "rollingPeriod." + error; + } + } + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { + if (properties.period === 1) + return "period: multiple values"; + properties.period = 1; + switch (message.calendarPeriod) { + default: + return "calendarPeriod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } return null; }; /** - * Creates a DeleteServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceLevelObjective message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @memberof google.monitoring.v3.ServiceLevelObjective * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest + * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective */ - DeleteServiceLevelObjectiveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest) + ServiceLevelObjective.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ServiceLevelObjective) return object; - var message = new $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest(); + var message = new $root.google.monitoring.v3.ServiceLevelObjective(); if (object.name != null) message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteServiceLevelObjectiveRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest - * @static - * @param {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteServiceLevelObjectiveRequest.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 DeleteServiceLevelObjectiveRequest to JSON. - * @function toJSON - * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteServiceLevelObjectiveRequest; - })(); - - v3.Service = (function() { - - /** - * Properties of a Service. - * @memberof google.monitoring.v3 - * @interface IService - * @property {string|null} [name] Service name - * @property {string|null} [displayName] Service displayName - * @property {google.monitoring.v3.Service.ICustom|null} [custom] Service custom - * @property {google.monitoring.v3.Service.IAppEngine|null} [appEngine] Service appEngine - * @property {google.monitoring.v3.Service.ICloudEndpoints|null} [cloudEndpoints] Service cloudEndpoints - * @property {google.monitoring.v3.Service.IClusterIstio|null} [clusterIstio] Service clusterIstio - * @property {google.monitoring.v3.Service.ITelemetry|null} [telemetry] Service telemetry - */ + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.serviceLevelIndicator != null) { + if (typeof object.serviceLevelIndicator !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelObjective.serviceLevelIndicator: object expected"); + message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.fromObject(object.serviceLevelIndicator); + } + if (object.goal != null) + message.goal = Number(object.goal); + if (object.rollingPeriod != null) { + if (typeof object.rollingPeriod !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelObjective.rollingPeriod: object expected"); + message.rollingPeriod = $root.google.protobuf.Duration.fromObject(object.rollingPeriod); + } + switch (object.calendarPeriod) { + case "CALENDAR_PERIOD_UNSPECIFIED": + case 0: + message.calendarPeriod = 0; + break; + case "DAY": + case 1: + message.calendarPeriod = 1; + break; + case "WEEK": + case 2: + message.calendarPeriod = 2; + break; + case "FORTNIGHT": + case 3: + message.calendarPeriod = 3; + break; + case "MONTH": + case 4: + message.calendarPeriod = 4; + break; + case "QUARTER": + case 5: + message.calendarPeriod = 5; + break; + case "HALF": + case 6: + message.calendarPeriod = 6; + break; + case "YEAR": + case 7: + message.calendarPeriod = 7; + break; + } + return message; + }; /** - * Constructs a new Service. - * @memberof google.monitoring.v3 - * @classdesc Represents a Service. - * @implements IService - * @constructor - * @param {google.monitoring.v3.IService=} [properties] Properties to set + * Creates a plain object from a ServiceLevelObjective message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {google.monitoring.v3.ServiceLevelObjective} message ServiceLevelObjective + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - function Service(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ServiceLevelObjective.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.serviceLevelIndicator = null; + object.goal = 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) + object.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.toObject(message.serviceLevelIndicator, options); + if (message.goal != null && message.hasOwnProperty("goal")) + object.goal = options.json && !isFinite(message.goal) ? String(message.goal) : message.goal; + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) { + object.rollingPeriod = $root.google.protobuf.Duration.toObject(message.rollingPeriod, options); + if (options.oneofs) + object.period = "rollingPeriod"; + } + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { + object.calendarPeriod = options.enums === String ? $root.google.type.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; + if (options.oneofs) + object.period = "calendarPeriod"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; /** - * Service name. - * @member {string} name - * @memberof google.monitoring.v3.Service + * Converts this ServiceLevelObjective to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ServiceLevelObjective * @instance + * @returns {Object.} JSON object */ - Service.prototype.name = ""; + ServiceLevelObjective.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Service displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.Service - * @instance + * View enum. + * @name google.monitoring.v3.ServiceLevelObjective.View + * @enum {string} + * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value + * @property {number} FULL=2 FULL value + * @property {number} EXPLICIT=1 EXPLICIT value */ - Service.prototype.displayName = ""; + ServiceLevelObjective.View = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VIEW_UNSPECIFIED"] = 0; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[1] = "EXPLICIT"] = 1; + return values; + })(); + + return ServiceLevelObjective; + })(); + + v3.ServiceLevelIndicator = (function() { /** - * Service custom. - * @member {google.monitoring.v3.Service.ICustom|null|undefined} custom - * @memberof google.monitoring.v3.Service - * @instance + * Properties of a ServiceLevelIndicator. + * @memberof google.monitoring.v3 + * @interface IServiceLevelIndicator + * @property {google.monitoring.v3.IBasicSli|null} [basicSli] ServiceLevelIndicator basicSli + * @property {google.monitoring.v3.IRequestBasedSli|null} [requestBased] ServiceLevelIndicator requestBased + * @property {google.monitoring.v3.IWindowsBasedSli|null} [windowsBased] ServiceLevelIndicator windowsBased */ - Service.prototype.custom = null; /** - * Service appEngine. - * @member {google.monitoring.v3.Service.IAppEngine|null|undefined} appEngine - * @memberof google.monitoring.v3.Service - * @instance + * Constructs a new ServiceLevelIndicator. + * @memberof google.monitoring.v3 + * @classdesc Represents a ServiceLevelIndicator. + * @implements IServiceLevelIndicator + * @constructor + * @param {google.monitoring.v3.IServiceLevelIndicator=} [properties] Properties to set */ - Service.prototype.appEngine = null; + function ServiceLevelIndicator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Service cloudEndpoints. - * @member {google.monitoring.v3.Service.ICloudEndpoints|null|undefined} cloudEndpoints - * @memberof google.monitoring.v3.Service + * ServiceLevelIndicator basicSli. + * @member {google.monitoring.v3.IBasicSli|null|undefined} basicSli + * @memberof google.monitoring.v3.ServiceLevelIndicator * @instance */ - Service.prototype.cloudEndpoints = null; + ServiceLevelIndicator.prototype.basicSli = null; /** - * Service clusterIstio. - * @member {google.monitoring.v3.Service.IClusterIstio|null|undefined} clusterIstio - * @memberof google.monitoring.v3.Service + * ServiceLevelIndicator requestBased. + * @member {google.monitoring.v3.IRequestBasedSli|null|undefined} requestBased + * @memberof google.monitoring.v3.ServiceLevelIndicator * @instance */ - Service.prototype.clusterIstio = null; + ServiceLevelIndicator.prototype.requestBased = null; /** - * Service telemetry. - * @member {google.monitoring.v3.Service.ITelemetry|null|undefined} telemetry - * @memberof google.monitoring.v3.Service + * ServiceLevelIndicator windowsBased. + * @member {google.monitoring.v3.IWindowsBasedSli|null|undefined} windowsBased + * @memberof google.monitoring.v3.ServiceLevelIndicator * @instance */ - Service.prototype.telemetry = null; + ServiceLevelIndicator.prototype.windowsBased = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Service identifier. - * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|undefined} identifier - * @memberof google.monitoring.v3.Service + * ServiceLevelIndicator type. + * @member {"basicSli"|"requestBased"|"windowsBased"|undefined} type + * @memberof google.monitoring.v3.ServiceLevelIndicator * @instance */ - Object.defineProperty(Service.prototype, "identifier", { - get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio"]), + Object.defineProperty(ServiceLevelIndicator.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["basicSli", "requestBased", "windowsBased"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Service instance using the specified properties. + * Creates a new ServiceLevelIndicator instance using the specified properties. * @function create - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static - * @param {google.monitoring.v3.IService=} [properties] Properties to set - * @returns {google.monitoring.v3.Service} Service instance + * @param {google.monitoring.v3.IServiceLevelIndicator=} [properties] Properties to set + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator instance */ - Service.create = function create(properties) { - return new Service(properties); + ServiceLevelIndicator.create = function create(properties) { + return new ServiceLevelIndicator(properties); }; /** - * Encodes the specified Service message. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * Encodes the specified ServiceLevelIndicator message. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static - * @param {google.monitoring.v3.IService} message Service message or plain object to encode + * @param {google.monitoring.v3.IServiceLevelIndicator} message ServiceLevelIndicator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encode = function encode(message, writer) { + ServiceLevelIndicator.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.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.custom != null && message.hasOwnProperty("custom")) - $root.google.monitoring.v3.Service.Custom.encode(message.custom, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appEngine != null && message.hasOwnProperty("appEngine")) - $root.google.monitoring.v3.Service.AppEngine.encode(message.appEngine, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) - $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) - $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.telemetry != null && message.hasOwnProperty("telemetry")) - $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.requestBased != null && message.hasOwnProperty("requestBased")) + $root.google.monitoring.v3.RequestBasedSli.encode(message.requestBased, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) + $root.google.monitoring.v3.WindowsBasedSli.encode(message.windowsBased, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.basicSli != null && message.hasOwnProperty("basicSli")) + $root.google.monitoring.v3.BasicSli.encode(message.basicSli, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Service message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.verify|verify} messages. + * Encodes the specified ServiceLevelIndicator message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static - * @param {google.monitoring.v3.IService} message Service message or plain object to encode + * @param {google.monitoring.v3.IServiceLevelIndicator} message ServiceLevelIndicator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Service.encodeDelimited = function encodeDelimited(message, writer) { + ServiceLevelIndicator.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Service message from the specified reader or buffer. + * Decodes a ServiceLevelIndicator message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Service} Service + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decode = function decode(reader, length) { + ServiceLevelIndicator.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ServiceLevelIndicator(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.basicSli = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + break; case 1: - message.name = reader.string(); + message.requestBased = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); break; case 2: - message.displayName = reader.string(); - break; - case 6: - message.custom = $root.google.monitoring.v3.Service.Custom.decode(reader, reader.uint32()); - break; - case 7: - message.appEngine = $root.google.monitoring.v3.Service.AppEngine.decode(reader, reader.uint32()); - break; - case 8: - message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.decode(reader, reader.uint32()); - break; - case 9: - message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.decode(reader, reader.uint32()); - break; - case 13: - message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); + message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -18841,265 +17724,575 @@ }; /** - * Decodes a Service message from the specified reader or buffer, length delimited. + * Decodes a ServiceLevelIndicator message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Service} Service + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Service.decodeDelimited = function decodeDelimited(reader) { + ServiceLevelIndicator.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Service message. + * Verifies a ServiceLevelIndicator message. * @function verify - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Service.verify = function verify(message) { + ServiceLevelIndicator.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.custom != null && message.hasOwnProperty("custom")) { - properties.identifier = 1; - { - var error = $root.google.monitoring.v3.Service.Custom.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.appEngine != null && message.hasOwnProperty("appEngine")) { - if (properties.identifier === 1) - return "identifier: multiple values"; - properties.identifier = 1; + if (message.basicSli != null && message.hasOwnProperty("basicSli")) { + properties.type = 1; { - var error = $root.google.monitoring.v3.Service.AppEngine.verify(message.appEngine); + var error = $root.google.monitoring.v3.BasicSli.verify(message.basicSli); if (error) - return "appEngine." + error; + return "basicSli." + error; } } - if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) { - if (properties.identifier === 1) - return "identifier: multiple values"; - properties.identifier = 1; + if (message.requestBased != null && message.hasOwnProperty("requestBased")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; { - var error = $root.google.monitoring.v3.Service.CloudEndpoints.verify(message.cloudEndpoints); + var error = $root.google.monitoring.v3.RequestBasedSli.verify(message.requestBased); if (error) - return "cloudEndpoints." + error; + return "requestBased." + error; } } - if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) { - if (properties.identifier === 1) - return "identifier: multiple values"; - properties.identifier = 1; + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; { - var error = $root.google.monitoring.v3.Service.ClusterIstio.verify(message.clusterIstio); + var error = $root.google.monitoring.v3.WindowsBasedSli.verify(message.windowsBased); if (error) - return "clusterIstio." + error; + return "windowsBased." + error; } } - if (message.telemetry != null && message.hasOwnProperty("telemetry")) { - var error = $root.google.monitoring.v3.Service.Telemetry.verify(message.telemetry); - if (error) - return "telemetry." + error; - } return null; }; /** - * Creates a Service message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceLevelIndicator message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Service} Service + * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator */ - Service.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Service) + ServiceLevelIndicator.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ServiceLevelIndicator) return object; - var message = new $root.google.monitoring.v3.Service(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.monitoring.v3.Service.custom: object expected"); - message.custom = $root.google.monitoring.v3.Service.Custom.fromObject(object.custom); - } - if (object.appEngine != null) { - if (typeof object.appEngine !== "object") - throw TypeError(".google.monitoring.v3.Service.appEngine: object expected"); - message.appEngine = $root.google.monitoring.v3.Service.AppEngine.fromObject(object.appEngine); - } - if (object.cloudEndpoints != null) { - if (typeof object.cloudEndpoints !== "object") - throw TypeError(".google.monitoring.v3.Service.cloudEndpoints: object expected"); - message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.fromObject(object.cloudEndpoints); + var message = new $root.google.monitoring.v3.ServiceLevelIndicator(); + if (object.basicSli != null) { + if (typeof object.basicSli !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.basicSli: object expected"); + message.basicSli = $root.google.monitoring.v3.BasicSli.fromObject(object.basicSli); } - if (object.clusterIstio != null) { - if (typeof object.clusterIstio !== "object") - throw TypeError(".google.monitoring.v3.Service.clusterIstio: object expected"); - message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.fromObject(object.clusterIstio); + if (object.requestBased != null) { + if (typeof object.requestBased !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.requestBased: object expected"); + message.requestBased = $root.google.monitoring.v3.RequestBasedSli.fromObject(object.requestBased); } - if (object.telemetry != null) { - if (typeof object.telemetry !== "object") - throw TypeError(".google.monitoring.v3.Service.telemetry: object expected"); - message.telemetry = $root.google.monitoring.v3.Service.Telemetry.fromObject(object.telemetry); + if (object.windowsBased != null) { + if (typeof object.windowsBased !== "object") + throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.windowsBased: object expected"); + message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.fromObject(object.windowsBased); } return message; }; /** - * Creates a plain object from a Service message. Also converts values to other types if specified. + * Creates a plain object from a ServiceLevelIndicator message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @static - * @param {google.monitoring.v3.Service} message Service + * @param {google.monitoring.v3.ServiceLevelIndicator} message ServiceLevelIndicator * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Service.toObject = function toObject(message, options) { + ServiceLevelIndicator.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.telemetry = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.monitoring.v3.Service.Custom.toObject(message.custom, options); - if (options.oneofs) - object.identifier = "custom"; - } - if (message.appEngine != null && message.hasOwnProperty("appEngine")) { - object.appEngine = $root.google.monitoring.v3.Service.AppEngine.toObject(message.appEngine, options); + if (message.requestBased != null && message.hasOwnProperty("requestBased")) { + object.requestBased = $root.google.monitoring.v3.RequestBasedSli.toObject(message.requestBased, options); if (options.oneofs) - object.identifier = "appEngine"; + object.type = "requestBased"; } - if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) { - object.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.toObject(message.cloudEndpoints, options); + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) { + object.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.toObject(message.windowsBased, options); if (options.oneofs) - object.identifier = "cloudEndpoints"; + object.type = "windowsBased"; } - if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) { - object.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.toObject(message.clusterIstio, options); + if (message.basicSli != null && message.hasOwnProperty("basicSli")) { + object.basicSli = $root.google.monitoring.v3.BasicSli.toObject(message.basicSli, options); if (options.oneofs) - object.identifier = "clusterIstio"; + object.type = "basicSli"; } - if (message.telemetry != null && message.hasOwnProperty("telemetry")) - object.telemetry = $root.google.monitoring.v3.Service.Telemetry.toObject(message.telemetry, options); return object; }; /** - * Converts this Service to JSON. + * Converts this ServiceLevelIndicator to JSON. * @function toJSON - * @memberof google.monitoring.v3.Service + * @memberof google.monitoring.v3.ServiceLevelIndicator * @instance * @returns {Object.} JSON object */ - Service.prototype.toJSON = function toJSON() { + ServiceLevelIndicator.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Service.Custom = (function() { - - /** - * Properties of a Custom. - * @memberof google.monitoring.v3.Service - * @interface ICustom - */ + return ServiceLevelIndicator; + })(); - /** - * Constructs a new Custom. - * @memberof google.monitoring.v3.Service - * @classdesc Represents a Custom. - * @implements ICustom - * @constructor - * @param {google.monitoring.v3.Service.ICustom=} [properties] Properties to set - */ - function Custom(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3.BasicSli = (function() { - /** - * Creates a new Custom instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.Service.Custom - * @static - * @param {google.monitoring.v3.Service.ICustom=} [properties] Properties to set - * @returns {google.monitoring.v3.Service.Custom} Custom instance - */ - Custom.create = function create(properties) { - return new Custom(properties); - }; + /** + * Properties of a BasicSli. + * @memberof google.monitoring.v3 + * @interface IBasicSli + * @property {Array.|null} [method] BasicSli method + * @property {Array.|null} [location] BasicSli location + * @property {Array.|null} [version] BasicSli version + * @property {google.monitoring.v3.BasicSli.IAvailabilityCriteria|null} [availability] BasicSli availability + * @property {google.monitoring.v3.BasicSli.ILatencyCriteria|null} [latency] BasicSli latency + */ - /** - * Encodes the specified Custom message. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.Service.Custom - * @static - * @param {google.monitoring.v3.Service.ICustom} message Custom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Custom.encode = function encode(message, writer) { - if (!writer) + /** + * Constructs a new BasicSli. + * @memberof google.monitoring.v3 + * @classdesc Represents a BasicSli. + * @implements IBasicSli + * @constructor + * @param {google.monitoring.v3.IBasicSli=} [properties] Properties to set + */ + function BasicSli(properties) { + this.method = []; + this.location = []; + this.version = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BasicSli method. + * @member {Array.} method + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.method = $util.emptyArray; + + /** + * BasicSli location. + * @member {Array.} location + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.location = $util.emptyArray; + + /** + * BasicSli version. + * @member {Array.} version + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.version = $util.emptyArray; + + /** + * BasicSli availability. + * @member {google.monitoring.v3.BasicSli.IAvailabilityCriteria|null|undefined} availability + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.availability = null; + + /** + * BasicSli latency. + * @member {google.monitoring.v3.BasicSli.ILatencyCriteria|null|undefined} latency + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + BasicSli.prototype.latency = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BasicSli sliCriteria. + * @member {"availability"|"latency"|undefined} sliCriteria + * @memberof google.monitoring.v3.BasicSli + * @instance + */ + Object.defineProperty(BasicSli.prototype, "sliCriteria", { + get: $util.oneOfGetter($oneOfFields = ["availability", "latency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BasicSli instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.IBasicSli=} [properties] Properties to set + * @returns {google.monitoring.v3.BasicSli} BasicSli instance + */ + BasicSli.create = function create(properties) { + return new BasicSli(properties); + }; + + /** + * Encodes the specified BasicSli message. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.IBasicSli} message BasicSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicSli.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.availability != null && message.hasOwnProperty("availability")) + $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.encode(message.availability, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.latency != null && message.hasOwnProperty("latency")) + $root.google.monitoring.v3.BasicSli.LatencyCriteria.encode(message.latency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.method[i]); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.location[i]); + if (message.version != null && message.version.length) + for (var i = 0; i < message.version.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.version[i]); + return writer; + }; + + /** + * Encodes the specified BasicSli message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.IBasicSli} message BasicSli message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicSli.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BasicSli message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.BasicSli} BasicSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicSli.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push(reader.string()); + break; + case 8: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push(reader.string()); + break; + case 9: + if (!(message.version && message.version.length)) + message.version = []; + message.version.push(reader.string()); + break; + case 2: + message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.decode(reader, reader.uint32()); + break; + case 3: + message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BasicSli message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.BasicSli} BasicSli + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicSli.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BasicSli message. + * @function verify + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BasicSli.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + 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) + if (!$util.isString(message.method[i])) + return "method: string[] 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) + if (!$util.isString(message.location[i])) + return "location: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) { + if (!Array.isArray(message.version)) + return "version: array expected"; + for (var i = 0; i < message.version.length; ++i) + if (!$util.isString(message.version[i])) + return "version: string[] expected"; + } + if (message.availability != null && message.hasOwnProperty("availability")) { + properties.sliCriteria = 1; + { + var error = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.verify(message.availability); + if (error) + return "availability." + error; + } + } + if (message.latency != null && message.hasOwnProperty("latency")) { + if (properties.sliCriteria === 1) + return "sliCriteria: multiple values"; + properties.sliCriteria = 1; + { + var error = $root.google.monitoring.v3.BasicSli.LatencyCriteria.verify(message.latency); + if (error) + return "latency." + error; + } + } + return null; + }; + + /** + * Creates a BasicSli message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.BasicSli} BasicSli + */ + BasicSli.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.BasicSli) + return object; + var message = new $root.google.monitoring.v3.BasicSli(); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.monitoring.v3.BasicSli.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) + message.method[i] = String(object.method[i]); + } + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.monitoring.v3.BasicSli.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) + message.location[i] = String(object.location[i]); + } + if (object.version) { + if (!Array.isArray(object.version)) + throw TypeError(".google.monitoring.v3.BasicSli.version: array expected"); + message.version = []; + for (var i = 0; i < object.version.length; ++i) + message.version[i] = String(object.version[i]); + } + if (object.availability != null) { + if (typeof object.availability !== "object") + throw TypeError(".google.monitoring.v3.BasicSli.availability: object expected"); + message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.fromObject(object.availability); + } + if (object.latency != null) { + if (typeof object.latency !== "object") + throw TypeError(".google.monitoring.v3.BasicSli.latency: object expected"); + message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.fromObject(object.latency); + } + return message; + }; + + /** + * Creates a plain object from a BasicSli message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {google.monitoring.v3.BasicSli} message BasicSli + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BasicSli.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.method = []; + object.location = []; + object.version = []; + } + if (message.availability != null && message.hasOwnProperty("availability")) { + object.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.toObject(message.availability, options); + if (options.oneofs) + object.sliCriteria = "availability"; + } + if (message.latency != null && message.hasOwnProperty("latency")) { + object.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.toObject(message.latency, options); + if (options.oneofs) + object.sliCriteria = "latency"; + } + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = message.method[j]; + } + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = message.location[j]; + } + if (message.version && message.version.length) { + object.version = []; + for (var j = 0; j < message.version.length; ++j) + object.version[j] = message.version[j]; + } + return object; + }; + + /** + * Converts this BasicSli to JSON. + * @function toJSON + * @memberof google.monitoring.v3.BasicSli + * @instance + * @returns {Object.} JSON object + */ + BasicSli.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BasicSli.AvailabilityCriteria = (function() { + + /** + * Properties of an AvailabilityCriteria. + * @memberof google.monitoring.v3.BasicSli + * @interface IAvailabilityCriteria + */ + + /** + * Constructs a new AvailabilityCriteria. + * @memberof google.monitoring.v3.BasicSli + * @classdesc Represents an AvailabilityCriteria. + * @implements IAvailabilityCriteria + * @constructor + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria=} [properties] Properties to set + */ + function AvailabilityCriteria(properties) { + if (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 AvailabilityCriteria instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria=} [properties] Properties to set + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria instance + */ + AvailabilityCriteria.create = function create(properties) { + return new AvailabilityCriteria(properties); + }; + + /** + * Encodes the specified AvailabilityCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria} message AvailabilityCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvailabilityCriteria.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified Custom message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Custom.verify|verify} messages. + * Encodes the specified AvailabilityCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @static - * @param {google.monitoring.v3.Service.ICustom} message Custom message or plain object to encode + * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria} message AvailabilityCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Custom.encodeDelimited = function encodeDelimited(message, writer) { + AvailabilityCriteria.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Custom message from the specified reader or buffer. + * Decodes an AvailabilityCriteria message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Service.Custom} Custom + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Custom.decode = function decode(reader, length) { + AvailabilityCriteria.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.Custom(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli.AvailabilityCriteria(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -19112,94 +18305,94 @@ }; /** - * Decodes a Custom message from the specified reader or buffer, length delimited. + * Decodes an AvailabilityCriteria message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Service.Custom} Custom + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Custom.decodeDelimited = function decodeDelimited(reader) { + AvailabilityCriteria.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Custom message. + * Verifies an AvailabilityCriteria message. * @function verify - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Custom.verify = function verify(message) { + AvailabilityCriteria.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a Custom message from a plain object. Also converts values to their respective internal types. + * Creates an AvailabilityCriteria message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Service.Custom} Custom + * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria */ - Custom.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Service.Custom) + AvailabilityCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.BasicSli.AvailabilityCriteria) return object; - return new $root.google.monitoring.v3.Service.Custom(); + return new $root.google.monitoring.v3.BasicSli.AvailabilityCriteria(); }; /** - * Creates a plain object from a Custom message. Also converts values to other types if specified. + * Creates a plain object from an AvailabilityCriteria message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @static - * @param {google.monitoring.v3.Service.Custom} message Custom + * @param {google.monitoring.v3.BasicSli.AvailabilityCriteria} message AvailabilityCriteria * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Custom.toObject = function toObject() { + AvailabilityCriteria.toObject = function toObject() { return {}; }; /** - * Converts this Custom to JSON. + * Converts this AvailabilityCriteria to JSON. * @function toJSON - * @memberof google.monitoring.v3.Service.Custom + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria * @instance * @returns {Object.} JSON object */ - Custom.prototype.toJSON = function toJSON() { + AvailabilityCriteria.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Custom; + return AvailabilityCriteria; })(); - Service.AppEngine = (function() { + BasicSli.LatencyCriteria = (function() { /** - * Properties of an AppEngine. - * @memberof google.monitoring.v3.Service - * @interface IAppEngine - * @property {string|null} [moduleId] AppEngine moduleId + * Properties of a LatencyCriteria. + * @memberof google.monitoring.v3.BasicSli + * @interface ILatencyCriteria + * @property {google.protobuf.IDuration|null} [threshold] LatencyCriteria threshold */ /** - * Constructs a new AppEngine. - * @memberof google.monitoring.v3.Service - * @classdesc Represents an AppEngine. - * @implements IAppEngine + * Constructs a new LatencyCriteria. + * @memberof google.monitoring.v3.BasicSli + * @classdesc Represents a LatencyCriteria. + * @implements ILatencyCriteria * @constructor - * @param {google.monitoring.v3.Service.IAppEngine=} [properties] Properties to set + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria=} [properties] Properties to set */ - function AppEngine(properties) { + function LatencyCriteria(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19207,75 +18400,75 @@ } /** - * AppEngine moduleId. - * @member {string} moduleId - * @memberof google.monitoring.v3.Service.AppEngine + * LatencyCriteria threshold. + * @member {google.protobuf.IDuration|null|undefined} threshold + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @instance */ - AppEngine.prototype.moduleId = ""; + LatencyCriteria.prototype.threshold = null; /** - * Creates a new AppEngine instance using the specified properties. + * Creates a new LatencyCriteria instance using the specified properties. * @function create - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static - * @param {google.monitoring.v3.Service.IAppEngine=} [properties] Properties to set - * @returns {google.monitoring.v3.Service.AppEngine} AppEngine instance + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria=} [properties] Properties to set + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria instance */ - AppEngine.create = function create(properties) { - return new AppEngine(properties); + LatencyCriteria.create = function create(properties) { + return new LatencyCriteria(properties); }; /** - * Encodes the specified AppEngine message. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * Encodes the specified LatencyCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static - * @param {google.monitoring.v3.Service.IAppEngine} message AppEngine message or plain object to encode + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria} message LatencyCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppEngine.encode = function encode(message, writer) { + LatencyCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.moduleId != null && message.hasOwnProperty("moduleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.moduleId); + if (message.threshold != null && message.hasOwnProperty("threshold")) + $root.google.protobuf.Duration.encode(message.threshold, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AppEngine message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.AppEngine.verify|verify} messages. + * Encodes the specified LatencyCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static - * @param {google.monitoring.v3.Service.IAppEngine} message AppEngine message or plain object to encode + * @param {google.monitoring.v3.BasicSli.ILatencyCriteria} message LatencyCriteria message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AppEngine.encodeDelimited = function encodeDelimited(message, writer) { + LatencyCriteria.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AppEngine message from the specified reader or buffer. + * Decodes a LatencyCriteria message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppEngine.decode = function decode(reader, length) { + LatencyCriteria.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.AppEngine(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli.LatencyCriteria(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.moduleId = reader.string(); + case 3: + message.threshold = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -19286,743 +18479,326 @@ }; /** - * Decodes an AppEngine message from the specified reader or buffer, length delimited. + * Decodes a LatencyCriteria message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AppEngine.decodeDelimited = function decodeDelimited(reader) { + LatencyCriteria.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AppEngine message. + * Verifies a LatencyCriteria message. * @function verify - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AppEngine.verify = function verify(message) { + LatencyCriteria.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.moduleId != null && message.hasOwnProperty("moduleId")) - if (!$util.isString(message.moduleId)) - return "moduleId: string expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) { + var error = $root.google.protobuf.Duration.verify(message.threshold); + if (error) + return "threshold." + error; + } return null; }; /** - * Creates an AppEngine message from a plain object. Also converts values to their respective internal types. + * Creates a LatencyCriteria message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Service.AppEngine} AppEngine + * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria */ - AppEngine.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Service.AppEngine) + LatencyCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.BasicSli.LatencyCriteria) return object; - var message = new $root.google.monitoring.v3.Service.AppEngine(); - if (object.moduleId != null) - message.moduleId = String(object.moduleId); + var message = new $root.google.monitoring.v3.BasicSli.LatencyCriteria(); + if (object.threshold != null) { + if (typeof object.threshold !== "object") + throw TypeError(".google.monitoring.v3.BasicSli.LatencyCriteria.threshold: object expected"); + message.threshold = $root.google.protobuf.Duration.fromObject(object.threshold); + } return message; }; /** - * Creates a plain object from an AppEngine message. Also converts values to other types if specified. + * Creates a plain object from a LatencyCriteria message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @static - * @param {google.monitoring.v3.Service.AppEngine} message AppEngine + * @param {google.monitoring.v3.BasicSli.LatencyCriteria} message LatencyCriteria * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AppEngine.toObject = function toObject(message, options) { + LatencyCriteria.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.moduleId = ""; - if (message.moduleId != null && message.hasOwnProperty("moduleId")) - object.moduleId = message.moduleId; + object.threshold = null; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = $root.google.protobuf.Duration.toObject(message.threshold, options); return object; }; /** - * Converts this AppEngine to JSON. + * Converts this LatencyCriteria to JSON. * @function toJSON - * @memberof google.monitoring.v3.Service.AppEngine + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria * @instance * @returns {Object.} JSON object */ - AppEngine.prototype.toJSON = function toJSON() { + LatencyCriteria.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AppEngine; + return LatencyCriteria; })(); - Service.CloudEndpoints = (function() { - - /** - * Properties of a CloudEndpoints. - * @memberof google.monitoring.v3.Service - * @interface ICloudEndpoints - * @property {string|null} [service] CloudEndpoints service - */ - - /** - * Constructs a new CloudEndpoints. - * @memberof google.monitoring.v3.Service - * @classdesc Represents a CloudEndpoints. - * @implements ICloudEndpoints - * @constructor - * @param {google.monitoring.v3.Service.ICloudEndpoints=} [properties] Properties to set - */ - function CloudEndpoints(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudEndpoints service. - * @member {string} service - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @instance - */ - CloudEndpoints.prototype.service = ""; + return BasicSli; + })(); - /** - * Creates a new CloudEndpoints instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {google.monitoring.v3.Service.ICloudEndpoints=} [properties] Properties to set - * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints instance - */ - CloudEndpoints.create = function create(properties) { - return new CloudEndpoints(properties); - }; + v3.Range = (function() { - /** - * Encodes the specified CloudEndpoints message. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {google.monitoring.v3.Service.ICloudEndpoints} message CloudEndpoints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudEndpoints.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && message.hasOwnProperty("service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - return writer; - }; + /** + * Properties of a Range. + * @memberof google.monitoring.v3 + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ - /** - * Encodes the specified CloudEndpoints message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.CloudEndpoints.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {google.monitoring.v3.Service.ICloudEndpoints} message CloudEndpoints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudEndpoints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new Range. + * @memberof google.monitoring.v3 + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.monitoring.v3.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]]; + } - /** - * Decodes a CloudEndpoints message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudEndpoints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.CloudEndpoints(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.service = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Range min. + * @member {number} min + * @memberof google.monitoring.v3.Range + * @instance + */ + Range.prototype.min = 0; - /** - * Decodes a CloudEndpoints message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudEndpoints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Range max. + * @member {number} max + * @memberof google.monitoring.v3.Range + * @instance + */ + Range.prototype.max = 0; - /** - * Verifies a CloudEndpoints message. - * @function verify - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudEndpoints.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - return null; - }; + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.IRange=} [properties] Properties to set + * @returns {google.monitoring.v3.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; - /** - * Creates a CloudEndpoints message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Service.CloudEndpoints} CloudEndpoints - */ - CloudEndpoints.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Service.CloudEndpoints) - return object; - var message = new $root.google.monitoring.v3.Service.CloudEndpoints(); - if (object.service != null) - message.service = String(object.service); - return message; - }; + /** + * Encodes the specified Range message. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.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; + }; - /** - * Creates a plain object from a CloudEndpoints message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @static - * @param {google.monitoring.v3.Service.CloudEndpoints} message CloudEndpoints - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudEndpoints.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - return object; - }; + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.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(); + }; - /** - * Converts this CloudEndpoints to JSON. - * @function toJSON - * @memberof google.monitoring.v3.Service.CloudEndpoints - * @instance - * @returns {Object.} JSON object - */ - CloudEndpoints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.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.monitoring.v3.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; + }; - return CloudEndpoints; - })(); + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.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()); + }; - Service.ClusterIstio = (function() { + /** + * Verifies a Range message. + * @function verify + * @memberof google.monitoring.v3.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; + }; - /** - * Properties of a ClusterIstio. - * @memberof google.monitoring.v3.Service - * @interface IClusterIstio - * @property {string|null} [location] ClusterIstio location - * @property {string|null} [clusterName] ClusterIstio clusterName - * @property {string|null} [serviceNamespace] ClusterIstio serviceNamespace - * @property {string|null} [serviceName] ClusterIstio serviceName - */ + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Range + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Range) + return object; + var message = new $root.google.monitoring.v3.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; - /** - * Constructs a new ClusterIstio. - * @memberof google.monitoring.v3.Service - * @classdesc Represents a ClusterIstio. - * @implements IClusterIstio - * @constructor - * @param {google.monitoring.v3.Service.IClusterIstio=} [properties] Properties to set - */ - function ClusterIstio(properties) { - if (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 Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Range + * @static + * @param {google.monitoring.v3.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; + }; - /** - * ClusterIstio location. - * @member {string} location - * @memberof google.monitoring.v3.Service.ClusterIstio - * @instance - */ - ClusterIstio.prototype.location = ""; + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ClusterIstio clusterName. - * @member {string} clusterName - * @memberof google.monitoring.v3.Service.ClusterIstio - * @instance - */ - ClusterIstio.prototype.clusterName = ""; + return Range; + })(); - /** - * ClusterIstio serviceNamespace. - * @member {string} serviceNamespace - * @memberof google.monitoring.v3.Service.ClusterIstio - * @instance - */ - ClusterIstio.prototype.serviceNamespace = ""; + v3.RequestBasedSli = (function() { - /** - * ClusterIstio serviceName. - * @member {string} serviceName - * @memberof google.monitoring.v3.Service.ClusterIstio - * @instance - */ - ClusterIstio.prototype.serviceName = ""; - - /** - * Creates a new ClusterIstio instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {google.monitoring.v3.Service.IClusterIstio=} [properties] Properties to set - * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio instance - */ - ClusterIstio.create = function create(properties) { - return new ClusterIstio(properties); - }; - - /** - * Encodes the specified ClusterIstio message. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {google.monitoring.v3.Service.IClusterIstio} message ClusterIstio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterIstio.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.hasOwnProperty("location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.clusterName != null && message.hasOwnProperty("clusterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterName); - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); - return writer; - }; - - /** - * Encodes the specified ClusterIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.ClusterIstio.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {google.monitoring.v3.Service.IClusterIstio} message ClusterIstio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterIstio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterIstio message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterIstio.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.ClusterIstio(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - message.clusterName = reader.string(); - break; - case 3: - message.serviceNamespace = reader.string(); - break; - case 4: - message.serviceName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterIstio message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterIstio.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterIstio message. - * @function verify - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterIstio.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.clusterName != null && message.hasOwnProperty("clusterName")) - if (!$util.isString(message.clusterName)) - return "clusterName: string expected"; - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) - if (!$util.isString(message.serviceNamespace)) - return "serviceNamespace: string expected"; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - if (!$util.isString(message.serviceName)) - return "serviceName: string expected"; - return null; - }; - - /** - * Creates a ClusterIstio message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Service.ClusterIstio} ClusterIstio - */ - ClusterIstio.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Service.ClusterIstio) - return object; - var message = new $root.google.monitoring.v3.Service.ClusterIstio(); - if (object.location != null) - message.location = String(object.location); - if (object.clusterName != null) - message.clusterName = String(object.clusterName); - if (object.serviceNamespace != null) - message.serviceNamespace = String(object.serviceNamespace); - if (object.serviceName != null) - message.serviceName = String(object.serviceName); - return message; - }; - - /** - * Creates a plain object from a ClusterIstio message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.Service.ClusterIstio - * @static - * @param {google.monitoring.v3.Service.ClusterIstio} message ClusterIstio - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterIstio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = ""; - object.clusterName = ""; - object.serviceNamespace = ""; - object.serviceName = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.clusterName != null && message.hasOwnProperty("clusterName")) - object.clusterName = message.clusterName; - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) - object.serviceNamespace = message.serviceNamespace; - if (message.serviceName != null && message.hasOwnProperty("serviceName")) - object.serviceName = message.serviceName; - return object; - }; - - /** - * Converts this ClusterIstio to JSON. - * @function toJSON - * @memberof google.monitoring.v3.Service.ClusterIstio - * @instance - * @returns {Object.} JSON object - */ - ClusterIstio.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClusterIstio; - })(); - - Service.Telemetry = (function() { - - /** - * Properties of a Telemetry. - * @memberof google.monitoring.v3.Service - * @interface ITelemetry - * @property {string|null} [resourceName] Telemetry resourceName - */ - - /** - * Constructs a new Telemetry. - * @memberof google.monitoring.v3.Service - * @classdesc Represents a Telemetry. - * @implements ITelemetry - * @constructor - * @param {google.monitoring.v3.Service.ITelemetry=} [properties] Properties to set - */ - function Telemetry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Telemetry resourceName. - * @member {string} resourceName - * @memberof google.monitoring.v3.Service.Telemetry - * @instance - */ - Telemetry.prototype.resourceName = ""; - - /** - * Creates a new Telemetry instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {google.monitoring.v3.Service.ITelemetry=} [properties] Properties to set - * @returns {google.monitoring.v3.Service.Telemetry} Telemetry instance - */ - Telemetry.create = function create(properties) { - return new Telemetry(properties); - }; - - /** - * Encodes the specified Telemetry message. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {google.monitoring.v3.Service.ITelemetry} message Telemetry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Telemetry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); - return writer; - }; - - /** - * Encodes the specified Telemetry message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.Telemetry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {google.monitoring.v3.Service.ITelemetry} message Telemetry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Telemetry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Telemetry message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Service.Telemetry} Telemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Telemetry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.Telemetry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.resourceName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Telemetry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Service.Telemetry} Telemetry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Telemetry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Telemetry message. - * @function verify - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Telemetry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - return null; - }; - - /** - * Creates a Telemetry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Service.Telemetry} Telemetry - */ - Telemetry.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Service.Telemetry) - return object; - var message = new $root.google.monitoring.v3.Service.Telemetry(); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - return message; - }; - - /** - * Creates a plain object from a Telemetry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.Service.Telemetry - * @static - * @param {google.monitoring.v3.Service.Telemetry} message Telemetry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Telemetry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.resourceName = ""; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - return object; - }; - - /** - * Converts this Telemetry to JSON. - * @function toJSON - * @memberof google.monitoring.v3.Service.Telemetry - * @instance - * @returns {Object.} JSON object - */ - Telemetry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Telemetry; - })(); - - return Service; - })(); - - v3.ServiceLevelObjective = (function() { + /** + * Properties of a RequestBasedSli. + * @memberof google.monitoring.v3 + * @interface IRequestBasedSli + * @property {google.monitoring.v3.ITimeSeriesRatio|null} [goodTotalRatio] RequestBasedSli goodTotalRatio + * @property {google.monitoring.v3.IDistributionCut|null} [distributionCut] RequestBasedSli distributionCut + */ /** - * Properties of a ServiceLevelObjective. - * @memberof google.monitoring.v3 - * @interface IServiceLevelObjective - * @property {string|null} [name] ServiceLevelObjective name - * @property {string|null} [displayName] ServiceLevelObjective displayName - * @property {google.monitoring.v3.IServiceLevelIndicator|null} [serviceLevelIndicator] ServiceLevelObjective serviceLevelIndicator - * @property {number|null} [goal] ServiceLevelObjective goal - * @property {google.protobuf.IDuration|null} [rollingPeriod] ServiceLevelObjective rollingPeriod - * @property {google.type.CalendarPeriod|null} [calendarPeriod] ServiceLevelObjective calendarPeriod - */ - - /** - * Constructs a new ServiceLevelObjective. + * Constructs a new RequestBasedSli. * @memberof google.monitoring.v3 - * @classdesc Represents a ServiceLevelObjective. - * @implements IServiceLevelObjective + * @classdesc Represents a RequestBasedSli. + * @implements IRequestBasedSli * @constructor - * @param {google.monitoring.v3.IServiceLevelObjective=} [properties] Properties to set + * @param {google.monitoring.v3.IRequestBasedSli=} [properties] Properties to set */ - function ServiceLevelObjective(properties) { + function RequestBasedSli(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20030,154 +18806,102 @@ } /** - * ServiceLevelObjective name. - * @member {string} name - * @memberof google.monitoring.v3.ServiceLevelObjective - * @instance - */ - ServiceLevelObjective.prototype.name = ""; - - /** - * ServiceLevelObjective displayName. - * @member {string} displayName - * @memberof google.monitoring.v3.ServiceLevelObjective - * @instance - */ - ServiceLevelObjective.prototype.displayName = ""; - - /** - * ServiceLevelObjective serviceLevelIndicator. - * @member {google.monitoring.v3.IServiceLevelIndicator|null|undefined} serviceLevelIndicator - * @memberof google.monitoring.v3.ServiceLevelObjective - * @instance - */ - ServiceLevelObjective.prototype.serviceLevelIndicator = null; - - /** - * ServiceLevelObjective goal. - * @member {number} goal - * @memberof google.monitoring.v3.ServiceLevelObjective - * @instance - */ - ServiceLevelObjective.prototype.goal = 0; - - /** - * ServiceLevelObjective rollingPeriod. - * @member {google.protobuf.IDuration|null|undefined} rollingPeriod - * @memberof google.monitoring.v3.ServiceLevelObjective + * RequestBasedSli goodTotalRatio. + * @member {google.monitoring.v3.ITimeSeriesRatio|null|undefined} goodTotalRatio + * @memberof google.monitoring.v3.RequestBasedSli * @instance */ - ServiceLevelObjective.prototype.rollingPeriod = null; + RequestBasedSli.prototype.goodTotalRatio = null; /** - * ServiceLevelObjective calendarPeriod. - * @member {google.type.CalendarPeriod} calendarPeriod - * @memberof google.monitoring.v3.ServiceLevelObjective + * RequestBasedSli distributionCut. + * @member {google.monitoring.v3.IDistributionCut|null|undefined} distributionCut + * @memberof google.monitoring.v3.RequestBasedSli * @instance */ - ServiceLevelObjective.prototype.calendarPeriod = 0; + RequestBasedSli.prototype.distributionCut = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ServiceLevelObjective period. - * @member {"rollingPeriod"|"calendarPeriod"|undefined} period - * @memberof google.monitoring.v3.ServiceLevelObjective + * RequestBasedSli method. + * @member {"goodTotalRatio"|"distributionCut"|undefined} method + * @memberof google.monitoring.v3.RequestBasedSli * @instance */ - Object.defineProperty(ServiceLevelObjective.prototype, "period", { - get: $util.oneOfGetter($oneOfFields = ["rollingPeriod", "calendarPeriod"]), + Object.defineProperty(RequestBasedSli.prototype, "method", { + get: $util.oneOfGetter($oneOfFields = ["goodTotalRatio", "distributionCut"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ServiceLevelObjective instance using the specified properties. + * Creates a new RequestBasedSli instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static - * @param {google.monitoring.v3.IServiceLevelObjective=} [properties] Properties to set - * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective instance + * @param {google.monitoring.v3.IRequestBasedSli=} [properties] Properties to set + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli instance */ - ServiceLevelObjective.create = function create(properties) { - return new ServiceLevelObjective(properties); + RequestBasedSli.create = function create(properties) { + return new RequestBasedSli(properties); }; /** - * Encodes the specified ServiceLevelObjective message. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * Encodes the specified RequestBasedSli message. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static - * @param {google.monitoring.v3.IServiceLevelObjective} message ServiceLevelObjective message or plain object to encode + * @param {google.monitoring.v3.IRequestBasedSli} message RequestBasedSli message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceLevelObjective.encode = function encode(message, writer) { + RequestBasedSli.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.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) - $root.google.monitoring.v3.ServiceLevelIndicator.encode(message.serviceLevelIndicator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.goal != null && message.hasOwnProperty("goal")) - writer.uint32(/* id 4, wireType 1 =*/33).double(message.goal); - if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) - $root.google.protobuf.Duration.encode(message.rollingPeriod, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.calendarPeriod); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) + $root.google.monitoring.v3.TimeSeriesRatio.encode(message.goodTotalRatio, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) + $root.google.monitoring.v3.DistributionCut.encode(message.distributionCut, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceLevelObjective message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelObjective.verify|verify} messages. + * Encodes the specified RequestBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static - * @param {google.monitoring.v3.IServiceLevelObjective} message ServiceLevelObjective message or plain object to encode + * @param {google.monitoring.v3.IRequestBasedSli} message RequestBasedSli message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceLevelObjective.encodeDelimited = function encodeDelimited(message, writer) { + RequestBasedSli.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceLevelObjective message from the specified reader or buffer. + * Decodes a RequestBasedSli message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceLevelObjective.decode = function decode(reader, length) { + RequestBasedSli.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ServiceLevelObjective(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.RequestBasedSli(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 11: - message.displayName = reader.string(); + message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.decode(reader, reader.uint32()); break; case 3: - message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.decode(reader, reader.uint32()); - break; - case 4: - message.goal = reader.double(); - break; - case 5: - message.rollingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.calendarPeriod = reader.int32(); + message.distributionCut = $root.google.monitoring.v3.DistributionCut.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20188,231 +18912,139 @@ }; /** - * Decodes a ServiceLevelObjective message from the specified reader or buffer, length delimited. + * Decodes a RequestBasedSli message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceLevelObjective.decodeDelimited = function decodeDelimited(reader) { + RequestBasedSli.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceLevelObjective message. + * Verifies a RequestBasedSli message. * @function verify - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceLevelObjective.verify = function verify(message) { + RequestBasedSli.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) { - var error = $root.google.monitoring.v3.ServiceLevelIndicator.verify(message.serviceLevelIndicator); - if (error) - return "serviceLevelIndicator." + error; - } - if (message.goal != null && message.hasOwnProperty("goal")) - if (typeof message.goal !== "number") - return "goal: number expected"; - if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) { - properties.period = 1; + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) { + properties.method = 1; { - var error = $root.google.protobuf.Duration.verify(message.rollingPeriod); + var error = $root.google.monitoring.v3.TimeSeriesRatio.verify(message.goodTotalRatio); if (error) - return "rollingPeriod." + error; + return "goodTotalRatio." + error; } } - if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { - if (properties.period === 1) - return "period: multiple values"; - properties.period = 1; - switch (message.calendarPeriod) { - default: - return "calendarPeriod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) { + if (properties.method === 1) + return "method: multiple values"; + properties.method = 1; + { + var error = $root.google.monitoring.v3.DistributionCut.verify(message.distributionCut); + if (error) + return "distributionCut." + error; } } return null; }; /** - * Creates a ServiceLevelObjective message from a plain object. Also converts values to their respective internal types. + * Creates a RequestBasedSli message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ServiceLevelObjective} ServiceLevelObjective + * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli */ - ServiceLevelObjective.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ServiceLevelObjective) + RequestBasedSli.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.RequestBasedSli) return object; - var message = new $root.google.monitoring.v3.ServiceLevelObjective(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.serviceLevelIndicator != null) { - if (typeof object.serviceLevelIndicator !== "object") - throw TypeError(".google.monitoring.v3.ServiceLevelObjective.serviceLevelIndicator: object expected"); - message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.fromObject(object.serviceLevelIndicator); - } - if (object.goal != null) - message.goal = Number(object.goal); - if (object.rollingPeriod != null) { - if (typeof object.rollingPeriod !== "object") - throw TypeError(".google.monitoring.v3.ServiceLevelObjective.rollingPeriod: object expected"); - message.rollingPeriod = $root.google.protobuf.Duration.fromObject(object.rollingPeriod); + var message = new $root.google.monitoring.v3.RequestBasedSli(); + if (object.goodTotalRatio != null) { + if (typeof object.goodTotalRatio !== "object") + throw TypeError(".google.monitoring.v3.RequestBasedSli.goodTotalRatio: object expected"); + message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.fromObject(object.goodTotalRatio); } - switch (object.calendarPeriod) { - case "CALENDAR_PERIOD_UNSPECIFIED": - case 0: - message.calendarPeriod = 0; - break; - case "DAY": - case 1: - message.calendarPeriod = 1; - break; - case "WEEK": - case 2: - message.calendarPeriod = 2; - break; - case "FORTNIGHT": - case 3: - message.calendarPeriod = 3; - break; - case "MONTH": - case 4: - message.calendarPeriod = 4; - break; - case "QUARTER": - case 5: - message.calendarPeriod = 5; - break; - case "HALF": - case 6: - message.calendarPeriod = 6; - break; - case "YEAR": - case 7: - message.calendarPeriod = 7; - break; + if (object.distributionCut != null) { + if (typeof object.distributionCut !== "object") + throw TypeError(".google.monitoring.v3.RequestBasedSli.distributionCut: object expected"); + message.distributionCut = $root.google.monitoring.v3.DistributionCut.fromObject(object.distributionCut); } return message; }; /** - * Creates a plain object from a ServiceLevelObjective message. Also converts values to other types if specified. + * Creates a plain object from a RequestBasedSli message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @static - * @param {google.monitoring.v3.ServiceLevelObjective} message ServiceLevelObjective + * @param {google.monitoring.v3.RequestBasedSli} message RequestBasedSli * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceLevelObjective.toObject = function toObject(message, options) { + RequestBasedSli.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.serviceLevelIndicator = null; - object.goal = 0; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) - object.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.toObject(message.serviceLevelIndicator, options); - if (message.goal != null && message.hasOwnProperty("goal")) - object.goal = options.json && !isFinite(message.goal) ? String(message.goal) : message.goal; - if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) { - object.rollingPeriod = $root.google.protobuf.Duration.toObject(message.rollingPeriod, options); + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) { + object.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.toObject(message.goodTotalRatio, options); if (options.oneofs) - object.period = "rollingPeriod"; + object.method = "goodTotalRatio"; } - if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { - object.calendarPeriod = options.enums === String ? $root.google.type.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) { + object.distributionCut = $root.google.monitoring.v3.DistributionCut.toObject(message.distributionCut, options); if (options.oneofs) - object.period = "calendarPeriod"; + object.method = "distributionCut"; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this ServiceLevelObjective to JSON. + * Converts this RequestBasedSli to JSON. * @function toJSON - * @memberof google.monitoring.v3.ServiceLevelObjective + * @memberof google.monitoring.v3.RequestBasedSli * @instance * @returns {Object.} JSON object */ - ServiceLevelObjective.prototype.toJSON = function toJSON() { + RequestBasedSli.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * View enum. - * @name google.monitoring.v3.ServiceLevelObjective.View - * @enum {string} - * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value - * @property {number} FULL=2 FULL value - * @property {number} EXPLICIT=1 EXPLICIT value - */ - ServiceLevelObjective.View = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VIEW_UNSPECIFIED"] = 0; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[1] = "EXPLICIT"] = 1; - return values; - })(); - - return ServiceLevelObjective; + return RequestBasedSli; })(); - v3.ServiceLevelIndicator = (function() { + v3.TimeSeriesRatio = (function() { /** - * Properties of a ServiceLevelIndicator. + * Properties of a TimeSeriesRatio. * @memberof google.monitoring.v3 - * @interface IServiceLevelIndicator - * @property {google.monitoring.v3.IBasicSli|null} [basicSli] ServiceLevelIndicator basicSli - * @property {google.monitoring.v3.IRequestBasedSli|null} [requestBased] ServiceLevelIndicator requestBased - * @property {google.monitoring.v3.IWindowsBasedSli|null} [windowsBased] ServiceLevelIndicator windowsBased + * @interface ITimeSeriesRatio + * @property {string|null} [goodServiceFilter] TimeSeriesRatio goodServiceFilter + * @property {string|null} [badServiceFilter] TimeSeriesRatio badServiceFilter + * @property {string|null} [totalServiceFilter] TimeSeriesRatio totalServiceFilter */ /** - * Constructs a new ServiceLevelIndicator. + * Constructs a new TimeSeriesRatio. * @memberof google.monitoring.v3 - * @classdesc Represents a ServiceLevelIndicator. - * @implements IServiceLevelIndicator + * @classdesc Represents a TimeSeriesRatio. + * @implements ITimeSeriesRatio * @constructor - * @param {google.monitoring.v3.IServiceLevelIndicator=} [properties] Properties to set + * @param {google.monitoring.v3.ITimeSeriesRatio=} [properties] Properties to set */ - function ServiceLevelIndicator(properties) { + function TimeSeriesRatio(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20420,115 +19052,101 @@ } /** - * ServiceLevelIndicator basicSli. - * @member {google.monitoring.v3.IBasicSli|null|undefined} basicSli - * @memberof google.monitoring.v3.ServiceLevelIndicator - * @instance - */ - ServiceLevelIndicator.prototype.basicSli = null; - - /** - * ServiceLevelIndicator requestBased. - * @member {google.monitoring.v3.IRequestBasedSli|null|undefined} requestBased - * @memberof google.monitoring.v3.ServiceLevelIndicator + * TimeSeriesRatio goodServiceFilter. + * @member {string} goodServiceFilter + * @memberof google.monitoring.v3.TimeSeriesRatio * @instance */ - ServiceLevelIndicator.prototype.requestBased = null; + TimeSeriesRatio.prototype.goodServiceFilter = ""; /** - * ServiceLevelIndicator windowsBased. - * @member {google.monitoring.v3.IWindowsBasedSli|null|undefined} windowsBased - * @memberof google.monitoring.v3.ServiceLevelIndicator + * TimeSeriesRatio badServiceFilter. + * @member {string} badServiceFilter + * @memberof google.monitoring.v3.TimeSeriesRatio * @instance */ - ServiceLevelIndicator.prototype.windowsBased = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TimeSeriesRatio.prototype.badServiceFilter = ""; /** - * ServiceLevelIndicator type. - * @member {"basicSli"|"requestBased"|"windowsBased"|undefined} type - * @memberof google.monitoring.v3.ServiceLevelIndicator + * TimeSeriesRatio totalServiceFilter. + * @member {string} totalServiceFilter + * @memberof google.monitoring.v3.TimeSeriesRatio * @instance */ - Object.defineProperty(ServiceLevelIndicator.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["basicSli", "requestBased", "windowsBased"]), - set: $util.oneOfSetter($oneOfFields) - }); + TimeSeriesRatio.prototype.totalServiceFilter = ""; /** - * Creates a new ServiceLevelIndicator instance using the specified properties. + * Creates a new TimeSeriesRatio instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static - * @param {google.monitoring.v3.IServiceLevelIndicator=} [properties] Properties to set - * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator instance + * @param {google.monitoring.v3.ITimeSeriesRatio=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio instance */ - ServiceLevelIndicator.create = function create(properties) { - return new ServiceLevelIndicator(properties); + TimeSeriesRatio.create = function create(properties) { + return new TimeSeriesRatio(properties); }; /** - * Encodes the specified ServiceLevelIndicator message. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * Encodes the specified TimeSeriesRatio message. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static - * @param {google.monitoring.v3.IServiceLevelIndicator} message ServiceLevelIndicator message or plain object to encode + * @param {google.monitoring.v3.ITimeSeriesRatio} message TimeSeriesRatio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceLevelIndicator.encode = function encode(message, writer) { + TimeSeriesRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestBased != null && message.hasOwnProperty("requestBased")) - $root.google.monitoring.v3.RequestBasedSli.encode(message.requestBased, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) - $root.google.monitoring.v3.WindowsBasedSli.encode(message.windowsBased, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.basicSli != null && message.hasOwnProperty("basicSli")) - $root.google.monitoring.v3.BasicSli.encode(message.basicSli, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.goodServiceFilter); + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.badServiceFilter); + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.totalServiceFilter); return writer; }; /** - * Encodes the specified ServiceLevelIndicator message, length delimited. Does not implicitly {@link google.monitoring.v3.ServiceLevelIndicator.verify|verify} messages. + * Encodes the specified TimeSeriesRatio message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static - * @param {google.monitoring.v3.IServiceLevelIndicator} message ServiceLevelIndicator message or plain object to encode + * @param {google.monitoring.v3.ITimeSeriesRatio} message TimeSeriesRatio message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceLevelIndicator.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesRatio.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceLevelIndicator message from the specified reader or buffer. + * Decodes a TimeSeriesRatio message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceLevelIndicator.decode = function decode(reader, length) { + TimeSeriesRatio.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ServiceLevelIndicator(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesRatio(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 4: - message.basicSli = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + message.goodServiceFilter = reader.string(); break; - case 1: - message.requestBased = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); + case 5: + message.badServiceFilter = reader.string(); break; - case 2: - message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.decode(reader, reader.uint32()); + case 6: + message.totalServiceFilter = reader.string(); break; default: reader.skipType(tag & 7); @@ -20539,164 +19157,125 @@ }; /** - * Decodes a ServiceLevelIndicator message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesRatio message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceLevelIndicator.decodeDelimited = function decodeDelimited(reader) { + TimeSeriesRatio.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceLevelIndicator message. + * Verifies a TimeSeriesRatio message. * @function verify - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceLevelIndicator.verify = function verify(message) { + TimeSeriesRatio.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.basicSli != null && message.hasOwnProperty("basicSli")) { - properties.type = 1; - { - var error = $root.google.monitoring.v3.BasicSli.verify(message.basicSli); - if (error) - return "basicSli." + error; - } - } - if (message.requestBased != null && message.hasOwnProperty("requestBased")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.monitoring.v3.RequestBasedSli.verify(message.requestBased); - if (error) - return "requestBased." + error; - } - } - if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.monitoring.v3.WindowsBasedSli.verify(message.windowsBased); - if (error) - return "windowsBased." + error; - } - } + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + if (!$util.isString(message.goodServiceFilter)) + return "goodServiceFilter: string expected"; + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + if (!$util.isString(message.badServiceFilter)) + return "badServiceFilter: string expected"; + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + if (!$util.isString(message.totalServiceFilter)) + return "totalServiceFilter: string expected"; return null; }; /** - * Creates a ServiceLevelIndicator message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesRatio message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ServiceLevelIndicator} ServiceLevelIndicator + * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio */ - ServiceLevelIndicator.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ServiceLevelIndicator) + TimeSeriesRatio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeriesRatio) return object; - var message = new $root.google.monitoring.v3.ServiceLevelIndicator(); - if (object.basicSli != null) { - if (typeof object.basicSli !== "object") - throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.basicSli: object expected"); - message.basicSli = $root.google.monitoring.v3.BasicSli.fromObject(object.basicSli); - } - if (object.requestBased != null) { - if (typeof object.requestBased !== "object") - throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.requestBased: object expected"); - message.requestBased = $root.google.monitoring.v3.RequestBasedSli.fromObject(object.requestBased); - } - if (object.windowsBased != null) { - if (typeof object.windowsBased !== "object") - throw TypeError(".google.monitoring.v3.ServiceLevelIndicator.windowsBased: object expected"); - message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.fromObject(object.windowsBased); - } + var message = new $root.google.monitoring.v3.TimeSeriesRatio(); + if (object.goodServiceFilter != null) + message.goodServiceFilter = String(object.goodServiceFilter); + if (object.badServiceFilter != null) + message.badServiceFilter = String(object.badServiceFilter); + if (object.totalServiceFilter != null) + message.totalServiceFilter = String(object.totalServiceFilter); return message; }; /** - * Creates a plain object from a ServiceLevelIndicator message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeriesRatio message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @static - * @param {google.monitoring.v3.ServiceLevelIndicator} message ServiceLevelIndicator + * @param {google.monitoring.v3.TimeSeriesRatio} message TimeSeriesRatio * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceLevelIndicator.toObject = function toObject(message, options) { + TimeSeriesRatio.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.requestBased != null && message.hasOwnProperty("requestBased")) { - object.requestBased = $root.google.monitoring.v3.RequestBasedSli.toObject(message.requestBased, options); - if (options.oneofs) - object.type = "requestBased"; - } - if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) { - object.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.toObject(message.windowsBased, options); - if (options.oneofs) - object.type = "windowsBased"; - } - if (message.basicSli != null && message.hasOwnProperty("basicSli")) { - object.basicSli = $root.google.monitoring.v3.BasicSli.toObject(message.basicSli, options); - if (options.oneofs) - object.type = "basicSli"; + if (options.defaults) { + object.goodServiceFilter = ""; + object.badServiceFilter = ""; + object.totalServiceFilter = ""; } + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + object.goodServiceFilter = message.goodServiceFilter; + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + object.badServiceFilter = message.badServiceFilter; + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + object.totalServiceFilter = message.totalServiceFilter; return object; }; /** - * Converts this ServiceLevelIndicator to JSON. + * Converts this TimeSeriesRatio to JSON. * @function toJSON - * @memberof google.monitoring.v3.ServiceLevelIndicator + * @memberof google.monitoring.v3.TimeSeriesRatio * @instance * @returns {Object.} JSON object */ - ServiceLevelIndicator.prototype.toJSON = function toJSON() { + TimeSeriesRatio.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceLevelIndicator; + return TimeSeriesRatio; })(); - v3.BasicSli = (function() { + v3.DistributionCut = (function() { /** - * Properties of a BasicSli. + * Properties of a DistributionCut. * @memberof google.monitoring.v3 - * @interface IBasicSli - * @property {Array.|null} [method] BasicSli method - * @property {Array.|null} [location] BasicSli location - * @property {Array.|null} [version] BasicSli version - * @property {google.monitoring.v3.BasicSli.IAvailabilityCriteria|null} [availability] BasicSli availability - * @property {google.monitoring.v3.BasicSli.ILatencyCriteria|null} [latency] BasicSli latency + * @interface IDistributionCut + * @property {string|null} [distributionFilter] DistributionCut distributionFilter + * @property {google.monitoring.v3.IRange|null} [range] DistributionCut range */ /** - * Constructs a new BasicSli. + * Constructs a new DistributionCut. * @memberof google.monitoring.v3 - * @classdesc Represents a BasicSli. - * @implements IBasicSli + * @classdesc Represents a DistributionCut. + * @implements IDistributionCut * @constructor - * @param {google.monitoring.v3.IBasicSli=} [properties] Properties to set + * @param {google.monitoring.v3.IDistributionCut=} [properties] Properties to set */ - function BasicSli(properties) { - this.method = []; - this.location = []; - this.version = []; + function DistributionCut(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20704,150 +19283,359 @@ } /** - * BasicSli method. - * @member {Array.} method - * @memberof google.monitoring.v3.BasicSli + * DistributionCut distributionFilter. + * @member {string} distributionFilter + * @memberof google.monitoring.v3.DistributionCut * @instance */ - BasicSli.prototype.method = $util.emptyArray; + DistributionCut.prototype.distributionFilter = ""; /** - * BasicSli location. - * @member {Array.} location - * @memberof google.monitoring.v3.BasicSli + * DistributionCut range. + * @member {google.monitoring.v3.IRange|null|undefined} range + * @memberof google.monitoring.v3.DistributionCut * @instance */ - BasicSli.prototype.location = $util.emptyArray; + DistributionCut.prototype.range = null; /** - * BasicSli version. - * @member {Array.} version - * @memberof google.monitoring.v3.BasicSli - * @instance + * Creates a new DistributionCut instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.IDistributionCut=} [properties] Properties to set + * @returns {google.monitoring.v3.DistributionCut} DistributionCut instance */ - BasicSli.prototype.version = $util.emptyArray; + DistributionCut.create = function create(properties) { + return new DistributionCut(properties); + }; /** - * BasicSli availability. - * @member {google.monitoring.v3.BasicSli.IAvailabilityCriteria|null|undefined} availability - * @memberof google.monitoring.v3.BasicSli + * Encodes the specified DistributionCut message. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.IDistributionCut} message DistributionCut message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DistributionCut.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.distributionFilter); + if (message.range != null && message.hasOwnProperty("range")) + $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DistributionCut message, length delimited. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.IDistributionCut} message DistributionCut message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DistributionCut.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DistributionCut message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DistributionCut.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DistributionCut(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.distributionFilter = reader.string(); + break; + case 5: + message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DistributionCut message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DistributionCut.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DistributionCut message. + * @function verify + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DistributionCut.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + if (!$util.isString(message.distributionFilter)) + return "distributionFilter: string expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.monitoring.v3.Range.verify(message.range); + if (error) + return "range." + error; + } + return null; + }; + + /** + * Creates a DistributionCut message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DistributionCut} DistributionCut + */ + DistributionCut.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DistributionCut) + return object; + var message = new $root.google.monitoring.v3.DistributionCut(); + if (object.distributionFilter != null) + message.distributionFilter = String(object.distributionFilter); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.monitoring.v3.DistributionCut.range: object expected"); + message.range = $root.google.monitoring.v3.Range.fromObject(object.range); + } + return message; + }; + + /** + * Creates a plain object from a DistributionCut message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {google.monitoring.v3.DistributionCut} message DistributionCut + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DistributionCut.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.distributionFilter = ""; + object.range = null; + } + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + object.distributionFilter = message.distributionFilter; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.monitoring.v3.Range.toObject(message.range, options); + return object; + }; + + /** + * Converts this DistributionCut to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DistributionCut * @instance + * @returns {Object.} JSON object */ - BasicSli.prototype.availability = null; + DistributionCut.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DistributionCut; + })(); + + v3.WindowsBasedSli = (function() { /** - * BasicSli latency. - * @member {google.monitoring.v3.BasicSli.ILatencyCriteria|null|undefined} latency - * @memberof google.monitoring.v3.BasicSli + * Properties of a WindowsBasedSli. + * @memberof google.monitoring.v3 + * @interface IWindowsBasedSli + * @property {string|null} [goodBadMetricFilter] WindowsBasedSli goodBadMetricFilter + * @property {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null} [goodTotalRatioThreshold] WindowsBasedSli goodTotalRatioThreshold + * @property {google.monitoring.v3.WindowsBasedSli.IMetricRange|null} [metricMeanInRange] WindowsBasedSli metricMeanInRange + * @property {google.monitoring.v3.WindowsBasedSli.IMetricRange|null} [metricSumInRange] WindowsBasedSli metricSumInRange + * @property {google.protobuf.IDuration|null} [windowPeriod] WindowsBasedSli windowPeriod + */ + + /** + * Constructs a new WindowsBasedSli. + * @memberof google.monitoring.v3 + * @classdesc Represents a WindowsBasedSli. + * @implements IWindowsBasedSli + * @constructor + * @param {google.monitoring.v3.IWindowsBasedSli=} [properties] Properties to set + */ + function WindowsBasedSli(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WindowsBasedSli goodBadMetricFilter. + * @member {string} goodBadMetricFilter + * @memberof google.monitoring.v3.WindowsBasedSli * @instance */ - BasicSli.prototype.latency = null; + WindowsBasedSli.prototype.goodBadMetricFilter = ""; + + /** + * WindowsBasedSli goodTotalRatioThreshold. + * @member {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null|undefined} goodTotalRatioThreshold + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.goodTotalRatioThreshold = null; + + /** + * WindowsBasedSli metricMeanInRange. + * @member {google.monitoring.v3.WindowsBasedSli.IMetricRange|null|undefined} metricMeanInRange + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.metricMeanInRange = null; + + /** + * WindowsBasedSli metricSumInRange. + * @member {google.monitoring.v3.WindowsBasedSli.IMetricRange|null|undefined} metricSumInRange + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.metricSumInRange = null; + + /** + * WindowsBasedSli windowPeriod. + * @member {google.protobuf.IDuration|null|undefined} windowPeriod + * @memberof google.monitoring.v3.WindowsBasedSli + * @instance + */ + WindowsBasedSli.prototype.windowPeriod = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * BasicSli sliCriteria. - * @member {"availability"|"latency"|undefined} sliCriteria - * @memberof google.monitoring.v3.BasicSli + * WindowsBasedSli windowCriterion. + * @member {"goodBadMetricFilter"|"goodTotalRatioThreshold"|"metricMeanInRange"|"metricSumInRange"|undefined} windowCriterion + * @memberof google.monitoring.v3.WindowsBasedSli * @instance */ - Object.defineProperty(BasicSli.prototype, "sliCriteria", { - get: $util.oneOfGetter($oneOfFields = ["availability", "latency"]), + Object.defineProperty(WindowsBasedSli.prototype, "windowCriterion", { + get: $util.oneOfGetter($oneOfFields = ["goodBadMetricFilter", "goodTotalRatioThreshold", "metricMeanInRange", "metricSumInRange"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new BasicSli instance using the specified properties. + * Creates a new WindowsBasedSli instance using the specified properties. * @function create - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static - * @param {google.monitoring.v3.IBasicSli=} [properties] Properties to set - * @returns {google.monitoring.v3.BasicSli} BasicSli instance + * @param {google.monitoring.v3.IWindowsBasedSli=} [properties] Properties to set + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli instance */ - BasicSli.create = function create(properties) { - return new BasicSli(properties); + WindowsBasedSli.create = function create(properties) { + return new WindowsBasedSli(properties); }; /** - * Encodes the specified BasicSli message. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * Encodes the specified WindowsBasedSli message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static - * @param {google.monitoring.v3.IBasicSli} message BasicSli message or plain object to encode + * @param {google.monitoring.v3.IWindowsBasedSli} message WindowsBasedSli message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BasicSli.encode = function encode(message, writer) { + WindowsBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.availability != null && message.hasOwnProperty("availability")) - $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.encode(message.availability, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.latency != null && message.hasOwnProperty("latency")) - $root.google.monitoring.v3.BasicSli.LatencyCriteria.encode(message.latency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.method[i]); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.location[i]); - if (message.version != null && message.version.length) - for (var i = 0; i < message.version.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.version[i]); + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) + $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.encode(message.goodTotalRatioThreshold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) + $root.google.protobuf.Duration.encode(message.windowPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.goodBadMetricFilter); + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) + $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricMeanInRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) + $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricSumInRange, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified BasicSli message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.verify|verify} messages. + * Encodes the specified WindowsBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static - * @param {google.monitoring.v3.IBasicSli} message BasicSli message or plain object to encode + * @param {google.monitoring.v3.IWindowsBasedSli} message WindowsBasedSli message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BasicSli.encodeDelimited = function encodeDelimited(message, writer) { + WindowsBasedSli.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BasicSli message from the specified reader or buffer. + * Decodes a WindowsBasedSli message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.BasicSli} BasicSli + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BasicSli.decode = function decode(reader, length) { + WindowsBasedSli.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push(reader.string()); + case 5: + message.goodBadMetricFilter = reader.string(); break; - case 8: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push(reader.string()); + case 2: + message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.decode(reader, reader.uint32()); break; - case 9: - if (!(message.version && message.version.length)) - message.version = []; - message.version.push(reader.string()); + case 6: + message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); break; - case 2: - message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.decode(reader, reader.uint32()); + case 7: + message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); break; - case 3: - message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.decode(reader, reader.uint32()); + case 4: + message.windowPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -20858,195 +19646,184 @@ }; /** - * Decodes a BasicSli message from the specified reader or buffer, length delimited. + * Decodes a WindowsBasedSli message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.BasicSli} BasicSli + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BasicSli.decodeDelimited = function decodeDelimited(reader) { + WindowsBasedSli.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BasicSli message. + * Verifies a WindowsBasedSli message. * @function verify - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BasicSli.verify = function verify(message) { + WindowsBasedSli.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - 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) - if (!$util.isString(message.method[i])) - return "method: string[] 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) - if (!$util.isString(message.location[i])) - return "location: string[] expected"; + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) { + properties.windowCriterion = 1; + if (!$util.isString(message.goodBadMetricFilter)) + return "goodBadMetricFilter: string expected"; } - if (message.version != null && message.hasOwnProperty("version")) { - if (!Array.isArray(message.version)) - return "version: array expected"; - for (var i = 0; i < message.version.length; ++i) - if (!$util.isString(message.version[i])) - return "version: string[] expected"; + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) { + if (properties.windowCriterion === 1) + return "windowCriterion: multiple values"; + properties.windowCriterion = 1; + { + var error = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify(message.goodTotalRatioThreshold); + if (error) + return "goodTotalRatioThreshold." + error; + } } - if (message.availability != null && message.hasOwnProperty("availability")) { - properties.sliCriteria = 1; + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) { + if (properties.windowCriterion === 1) + return "windowCriterion: multiple values"; + properties.windowCriterion = 1; { - var error = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.verify(message.availability); + var error = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.verify(message.metricMeanInRange); if (error) - return "availability." + error; + return "metricMeanInRange." + error; } } - if (message.latency != null && message.hasOwnProperty("latency")) { - if (properties.sliCriteria === 1) - return "sliCriteria: multiple values"; - properties.sliCriteria = 1; + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) { + if (properties.windowCriterion === 1) + return "windowCriterion: multiple values"; + properties.windowCriterion = 1; { - var error = $root.google.monitoring.v3.BasicSli.LatencyCriteria.verify(message.latency); + var error = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.verify(message.metricSumInRange); if (error) - return "latency." + error; + return "metricSumInRange." + error; } } + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.windowPeriod); + if (error) + return "windowPeriod." + error; + } return null; }; /** - * Creates a BasicSli message from a plain object. Also converts values to their respective internal types. + * Creates a WindowsBasedSli message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.BasicSli} BasicSli + * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli */ - BasicSli.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.BasicSli) + WindowsBasedSli.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.WindowsBasedSli) return object; - var message = new $root.google.monitoring.v3.BasicSli(); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.monitoring.v3.BasicSli.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) - message.method[i] = String(object.method[i]); - } - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.monitoring.v3.BasicSli.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) - message.location[i] = String(object.location[i]); + var message = new $root.google.monitoring.v3.WindowsBasedSli(); + if (object.goodBadMetricFilter != null) + message.goodBadMetricFilter = String(object.goodBadMetricFilter); + if (object.goodTotalRatioThreshold != null) { + if (typeof object.goodTotalRatioThreshold !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.goodTotalRatioThreshold: object expected"); + message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.fromObject(object.goodTotalRatioThreshold); } - if (object.version) { - if (!Array.isArray(object.version)) - throw TypeError(".google.monitoring.v3.BasicSli.version: array expected"); - message.version = []; - for (var i = 0; i < object.version.length; ++i) - message.version[i] = String(object.version[i]); + if (object.metricMeanInRange != null) { + if (typeof object.metricMeanInRange !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.metricMeanInRange: object expected"); + message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.fromObject(object.metricMeanInRange); } - if (object.availability != null) { - if (typeof object.availability !== "object") - throw TypeError(".google.monitoring.v3.BasicSli.availability: object expected"); - message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.fromObject(object.availability); + if (object.metricSumInRange != null) { + if (typeof object.metricSumInRange !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.metricSumInRange: object expected"); + message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.fromObject(object.metricSumInRange); } - if (object.latency != null) { - if (typeof object.latency !== "object") - throw TypeError(".google.monitoring.v3.BasicSli.latency: object expected"); - message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.fromObject(object.latency); + if (object.windowPeriod != null) { + if (typeof object.windowPeriod !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.windowPeriod: object expected"); + message.windowPeriod = $root.google.protobuf.Duration.fromObject(object.windowPeriod); } return message; }; /** - * Creates a plain object from a BasicSli message. Also converts values to other types if specified. + * Creates a plain object from a WindowsBasedSli message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @static - * @param {google.monitoring.v3.BasicSli} message BasicSli + * @param {google.monitoring.v3.WindowsBasedSli} message WindowsBasedSli * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BasicSli.toObject = function toObject(message, options) { + WindowsBasedSli.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.method = []; - object.location = []; - object.version = []; - } - if (message.availability != null && message.hasOwnProperty("availability")) { - object.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.toObject(message.availability, options); + if (options.defaults) + object.windowPeriod = null; + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) { + object.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.toObject(message.goodTotalRatioThreshold, options); if (options.oneofs) - object.sliCriteria = "availability"; + object.windowCriterion = "goodTotalRatioThreshold"; } - if (message.latency != null && message.hasOwnProperty("latency")) { - object.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.toObject(message.latency, options); + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) + object.windowPeriod = $root.google.protobuf.Duration.toObject(message.windowPeriod, options); + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) { + object.goodBadMetricFilter = message.goodBadMetricFilter; if (options.oneofs) - object.sliCriteria = "latency"; - } - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = message.method[j]; + object.windowCriterion = "goodBadMetricFilter"; } - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = message.location[j]; + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) { + object.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.toObject(message.metricMeanInRange, options); + if (options.oneofs) + object.windowCriterion = "metricMeanInRange"; } - if (message.version && message.version.length) { - object.version = []; - for (var j = 0; j < message.version.length; ++j) - object.version[j] = message.version[j]; + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) { + object.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.toObject(message.metricSumInRange, options); + if (options.oneofs) + object.windowCriterion = "metricSumInRange"; } return object; }; /** - * Converts this BasicSli to JSON. + * Converts this WindowsBasedSli to JSON. * @function toJSON - * @memberof google.monitoring.v3.BasicSli + * @memberof google.monitoring.v3.WindowsBasedSli * @instance * @returns {Object.} JSON object */ - BasicSli.prototype.toJSON = function toJSON() { + WindowsBasedSli.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BasicSli.AvailabilityCriteria = (function() { + WindowsBasedSli.PerformanceThreshold = (function() { /** - * Properties of an AvailabilityCriteria. - * @memberof google.monitoring.v3.BasicSli - * @interface IAvailabilityCriteria + * Properties of a PerformanceThreshold. + * @memberof google.monitoring.v3.WindowsBasedSli + * @interface IPerformanceThreshold + * @property {google.monitoring.v3.IRequestBasedSli|null} [performance] PerformanceThreshold performance + * @property {google.monitoring.v3.IBasicSli|null} [basicSliPerformance] PerformanceThreshold basicSliPerformance + * @property {number|null} [threshold] PerformanceThreshold threshold */ /** - * Constructs a new AvailabilityCriteria. - * @memberof google.monitoring.v3.BasicSli - * @classdesc Represents an AvailabilityCriteria. - * @implements IAvailabilityCriteria + * Constructs a new PerformanceThreshold. + * @memberof google.monitoring.v3.WindowsBasedSli + * @classdesc Represents a PerformanceThreshold. + * @implements IPerformanceThreshold * @constructor - * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria=} [properties] Properties to set + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold=} [properties] Properties to set */ - function AvailabilityCriteria(properties) { + function PerformanceThreshold(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21054,63 +19831,116 @@ } /** - * Creates a new AvailabilityCriteria instance using the specified properties. + * PerformanceThreshold performance. + * @member {google.monitoring.v3.IRequestBasedSli|null|undefined} performance + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + PerformanceThreshold.prototype.performance = null; + + /** + * PerformanceThreshold basicSliPerformance. + * @member {google.monitoring.v3.IBasicSli|null|undefined} basicSliPerformance + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + PerformanceThreshold.prototype.basicSliPerformance = null; + + /** + * PerformanceThreshold threshold. + * @member {number} threshold + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + PerformanceThreshold.prototype.threshold = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PerformanceThreshold type. + * @member {"performance"|"basicSliPerformance"|undefined} type + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @instance + */ + Object.defineProperty(PerformanceThreshold.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["performance", "basicSliPerformance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PerformanceThreshold instance using the specified properties. * @function create - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static - * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria=} [properties] Properties to set - * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria instance + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold=} [properties] Properties to set + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold instance */ - AvailabilityCriteria.create = function create(properties) { - return new AvailabilityCriteria(properties); + PerformanceThreshold.create = function create(properties) { + return new PerformanceThreshold(properties); }; /** - * Encodes the specified AvailabilityCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * Encodes the specified PerformanceThreshold message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static - * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria} message AvailabilityCriteria message or plain object to encode + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold} message PerformanceThreshold message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AvailabilityCriteria.encode = function encode(message, writer) { + PerformanceThreshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.performance != null && message.hasOwnProperty("performance")) + $root.google.monitoring.v3.RequestBasedSli.encode(message.performance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.threshold != null && message.hasOwnProperty("threshold")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.threshold); + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) + $root.google.monitoring.v3.BasicSli.encode(message.basicSliPerformance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AvailabilityCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.AvailabilityCriteria.verify|verify} messages. + * Encodes the specified PerformanceThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static - * @param {google.monitoring.v3.BasicSli.IAvailabilityCriteria} message AvailabilityCriteria message or plain object to encode + * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold} message PerformanceThreshold message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AvailabilityCriteria.encodeDelimited = function encodeDelimited(message, writer) { + PerformanceThreshold.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AvailabilityCriteria message from the specified reader or buffer. + * Decodes a PerformanceThreshold message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AvailabilityCriteria.decode = function decode(reader, length) { + PerformanceThreshold.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli.AvailabilityCriteria(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.performance = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); + break; + case 3: + message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + break; + case 2: + message.threshold = reader.double(); + break; default: reader.skipType(tag & 7); break; @@ -21120,94 +19950,147 @@ }; /** - * Decodes an AvailabilityCriteria message from the specified reader or buffer, length delimited. + * Decodes a PerformanceThreshold message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AvailabilityCriteria.decodeDelimited = function decodeDelimited(reader) { + PerformanceThreshold.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AvailabilityCriteria message. + * Verifies a PerformanceThreshold message. * @function verify - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AvailabilityCriteria.verify = function verify(message) { + PerformanceThreshold.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.performance != null && message.hasOwnProperty("performance")) { + properties.type = 1; + { + var error = $root.google.monitoring.v3.RequestBasedSli.verify(message.performance); + if (error) + return "performance." + error; + } + } + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.monitoring.v3.BasicSli.verify(message.basicSliPerformance); + if (error) + return "basicSliPerformance." + error; + } + } + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (typeof message.threshold !== "number") + return "threshold: number expected"; return null; }; /** - * Creates an AvailabilityCriteria message from a plain object. Also converts values to their respective internal types. + * Creates a PerformanceThreshold message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.BasicSli.AvailabilityCriteria} AvailabilityCriteria + * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold */ - AvailabilityCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.BasicSli.AvailabilityCriteria) + PerformanceThreshold.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold) return object; - return new $root.google.monitoring.v3.BasicSli.AvailabilityCriteria(); + var message = new $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold(); + if (object.performance != null) { + if (typeof object.performance !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.performance: object expected"); + message.performance = $root.google.monitoring.v3.RequestBasedSli.fromObject(object.performance); + } + if (object.basicSliPerformance != null) { + if (typeof object.basicSliPerformance !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.basicSliPerformance: object expected"); + message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.fromObject(object.basicSliPerformance); + } + if (object.threshold != null) + message.threshold = Number(object.threshold); + return message; }; /** - * Creates a plain object from an AvailabilityCriteria message. Also converts values to other types if specified. + * Creates a plain object from a PerformanceThreshold message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @static - * @param {google.monitoring.v3.BasicSli.AvailabilityCriteria} message AvailabilityCriteria + * @param {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} message PerformanceThreshold * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AvailabilityCriteria.toObject = function toObject() { - return {}; + PerformanceThreshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.threshold = 0; + if (message.performance != null && message.hasOwnProperty("performance")) { + object.performance = $root.google.monitoring.v3.RequestBasedSli.toObject(message.performance, options); + if (options.oneofs) + object.type = "performance"; + } + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) { + object.basicSliPerformance = $root.google.monitoring.v3.BasicSli.toObject(message.basicSliPerformance, options); + if (options.oneofs) + object.type = "basicSliPerformance"; + } + return object; }; /** - * Converts this AvailabilityCriteria to JSON. + * Converts this PerformanceThreshold to JSON. * @function toJSON - * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold * @instance * @returns {Object.} JSON object */ - AvailabilityCriteria.prototype.toJSON = function toJSON() { + PerformanceThreshold.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AvailabilityCriteria; + return PerformanceThreshold; })(); - BasicSli.LatencyCriteria = (function() { + WindowsBasedSli.MetricRange = (function() { /** - * Properties of a LatencyCriteria. - * @memberof google.monitoring.v3.BasicSli - * @interface ILatencyCriteria - * @property {google.protobuf.IDuration|null} [threshold] LatencyCriteria threshold + * Properties of a MetricRange. + * @memberof google.monitoring.v3.WindowsBasedSli + * @interface IMetricRange + * @property {string|null} [timeSeries] MetricRange timeSeries + * @property {google.monitoring.v3.IRange|null} [range] MetricRange range */ /** - * Constructs a new LatencyCriteria. - * @memberof google.monitoring.v3.BasicSli - * @classdesc Represents a LatencyCriteria. - * @implements ILatencyCriteria + * Constructs a new MetricRange. + * @memberof google.monitoring.v3.WindowsBasedSli + * @classdesc Represents a MetricRange. + * @implements IMetricRange * @constructor - * @param {google.monitoring.v3.BasicSli.ILatencyCriteria=} [properties] Properties to set + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange=} [properties] Properties to set */ - function LatencyCriteria(properties) { + function MetricRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21215,75 +20098,88 @@ } /** - * LatencyCriteria threshold. - * @member {google.protobuf.IDuration|null|undefined} threshold - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * MetricRange timeSeries. + * @member {string} timeSeries + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @instance */ - LatencyCriteria.prototype.threshold = null; + MetricRange.prototype.timeSeries = ""; /** - * Creates a new LatencyCriteria instance using the specified properties. + * MetricRange range. + * @member {google.monitoring.v3.IRange|null|undefined} range + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @instance + */ + MetricRange.prototype.range = null; + + /** + * Creates a new MetricRange instance using the specified properties. * @function create - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static - * @param {google.monitoring.v3.BasicSli.ILatencyCriteria=} [properties] Properties to set - * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria instance + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange=} [properties] Properties to set + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange instance */ - LatencyCriteria.create = function create(properties) { - return new LatencyCriteria(properties); + MetricRange.create = function create(properties) { + return new MetricRange(properties); }; /** - * Encodes the specified LatencyCriteria message. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * Encodes the specified MetricRange message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static - * @param {google.monitoring.v3.BasicSli.ILatencyCriteria} message LatencyCriteria message or plain object to encode + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange} message MetricRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LatencyCriteria.encode = function encode(message, writer) { + MetricRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threshold != null && message.hasOwnProperty("threshold")) - $root.google.protobuf.Duration.encode(message.threshold, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeSeries); + if (message.range != null && message.hasOwnProperty("range")) + $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified LatencyCriteria message, length delimited. Does not implicitly {@link google.monitoring.v3.BasicSli.LatencyCriteria.verify|verify} messages. + * Encodes the specified MetricRange message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static - * @param {google.monitoring.v3.BasicSli.ILatencyCriteria} message LatencyCriteria message or plain object to encode + * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange} message MetricRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LatencyCriteria.encodeDelimited = function encodeDelimited(message, writer) { + MetricRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LatencyCriteria message from the specified reader or buffer. + * Decodes a MetricRange message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LatencyCriteria.decode = function decode(reader, length) { + MetricRange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.BasicSli.LatencyCriteria(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli.MetricRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.threshold = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 1: + message.timeSeries = reader.string(); + break; + case 4: + message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21294,326 +20190,491 @@ }; /** - * Decodes a LatencyCriteria message from the specified reader or buffer, length delimited. + * Decodes a MetricRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LatencyCriteria.decodeDelimited = function decodeDelimited(reader) { + MetricRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LatencyCriteria message. + * Verifies a MetricRange message. * @function verify - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LatencyCriteria.verify = function verify(message) { + MetricRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) { - var error = $root.google.protobuf.Duration.verify(message.threshold); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + if (!$util.isString(message.timeSeries)) + return "timeSeries: string expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.monitoring.v3.Range.verify(message.range); if (error) - return "threshold." + error; + return "range." + error; } return null; }; /** - * Creates a LatencyCriteria message from a plain object. Also converts values to their respective internal types. + * Creates a MetricRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.BasicSli.LatencyCriteria} LatencyCriteria + * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange */ - LatencyCriteria.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.BasicSli.LatencyCriteria) + MetricRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.WindowsBasedSli.MetricRange) return object; - var message = new $root.google.monitoring.v3.BasicSli.LatencyCriteria(); - if (object.threshold != null) { - if (typeof object.threshold !== "object") - throw TypeError(".google.monitoring.v3.BasicSli.LatencyCriteria.threshold: object expected"); - message.threshold = $root.google.protobuf.Duration.fromObject(object.threshold); + var message = new $root.google.monitoring.v3.WindowsBasedSli.MetricRange(); + if (object.timeSeries != null) + message.timeSeries = String(object.timeSeries); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.monitoring.v3.WindowsBasedSli.MetricRange.range: object expected"); + message.range = $root.google.monitoring.v3.Range.fromObject(object.range); } return message; }; /** - * Creates a plain object from a LatencyCriteria message. Also converts values to other types if specified. + * Creates a plain object from a MetricRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @static - * @param {google.monitoring.v3.BasicSli.LatencyCriteria} message LatencyCriteria + * @param {google.monitoring.v3.WindowsBasedSli.MetricRange} message MetricRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LatencyCriteria.toObject = function toObject(message, options) { + MetricRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.threshold = null; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = $root.google.protobuf.Duration.toObject(message.threshold, options); + if (options.defaults) { + object.timeSeries = ""; + object.range = null; + } + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + object.timeSeries = message.timeSeries; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.monitoring.v3.Range.toObject(message.range, options); return object; }; /** - * Converts this LatencyCriteria to JSON. + * Converts this MetricRange to JSON. * @function toJSON - * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange * @instance * @returns {Object.} JSON object */ - LatencyCriteria.prototype.toJSON = function toJSON() { + MetricRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LatencyCriteria; + return MetricRange; })(); - return BasicSli; + return WindowsBasedSli; })(); - v3.Range = (function() { + v3.ServiceMonitoringService = (function() { /** - * Properties of a Range. + * Constructs a new ServiceMonitoringService service. * @memberof google.monitoring.v3 - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max + * @classdesc Represents a ServiceMonitoringService + * @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 ServiceMonitoringService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ServiceMonitoringService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ServiceMonitoringService; /** - * Constructs a new Range. - * @memberof google.monitoring.v3 - * @classdesc Represents a Range. - * @implements IRange - * @constructor - * @param {google.monitoring.v3.IRange=} [properties] Properties to set + * Creates new ServiceMonitoringService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.ServiceMonitoringService + * @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 {ServiceMonitoringService} RPC service. Useful where requests and/or responses are streamed. */ - 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]]; - } + ServiceMonitoringService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Range min. - * @member {number} min - * @memberof google.monitoring.v3.Range + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef CreateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Service} [response] Service + */ + + /** + * Calls CreateService. + * @function createService + * @memberof google.monitoring.v3.ServiceMonitoringService * @instance + * @param {google.monitoring.v3.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.CreateServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 */ - Range.prototype.min = 0; + Object.defineProperty(ServiceMonitoringService.prototype.createService = function createService(request, callback) { + return this.rpcCall(createService, $root.google.monitoring.v3.CreateServiceRequest, $root.google.monitoring.v3.Service, request, callback); + }, "name", { value: "CreateService" }); /** - * Range max. - * @member {number} max - * @memberof google.monitoring.v3.Range + * Calls CreateService. + * @function createService + * @memberof google.monitoring.v3.ServiceMonitoringService * @instance + * @param {google.monitoring.v3.ICreateServiceRequest} request CreateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Range.prototype.max = 0; /** - * Creates a new Range instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.Range - * @static - * @param {google.monitoring.v3.IRange=} [properties] Properties to set - * @returns {google.monitoring.v3.Range} Range instance + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef GetServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Service} [response] Service */ - Range.create = function create(properties) { - return new Range(properties); - }; /** - * Encodes the specified Range message. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.Range - * @static - * @param {google.monitoring.v3.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetService. + * @function getService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceRequest} request GetServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.GetServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(ServiceMonitoringService.prototype.getService = function getService(request, callback) { + return this.rpcCall(getService, $root.google.monitoring.v3.GetServiceRequest, $root.google.monitoring.v3.Service, request, callback); + }, "name", { value: "GetService" }); /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.monitoring.v3.Range.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.Range - * @static - * @param {google.monitoring.v3.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetService. + * @function getService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceRequest} request GetServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.monitoring.v3.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.Range} Range - * @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.monitoring.v3.ServiceMonitoringService#listServices}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef ListServicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListServicesResponse} [response] ListServicesResponse */ - 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.monitoring.v3.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.monitoring.v3.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListServices. + * @function listServices + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServicesRequest} request ListServicesRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.ListServicesCallback} callback Node-style callback called with the error, if any, and ListServicesResponse + * @returns {undefined} + * @variation 1 */ - Range.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(ServiceMonitoringService.prototype.listServices = function listServices(request, callback) { + return this.rpcCall(listServices, $root.google.monitoring.v3.ListServicesRequest, $root.google.monitoring.v3.ListServicesResponse, request, callback); + }, "name", { value: "ListServices" }); /** - * Verifies a Range message. - * @function verify - * @memberof google.monitoring.v3.Range - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListServices. + * @function listServices + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServicesRequest} request ListServicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.monitoring.v3.Range - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.Range} Range + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef UpdateServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.Service} [response] Service */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.Range) - return object; - var message = new $root.google.monitoring.v3.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.monitoring.v3.Range - * @static - * @param {google.monitoring.v3.Range} message Range - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateService. + * @function updateService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.UpdateServiceCallback} callback Node-style callback called with the error, if any, and Service + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(ServiceMonitoringService.prototype.updateService = function updateService(request, callback) { + return this.rpcCall(updateService, $root.google.monitoring.v3.UpdateServiceRequest, $root.google.monitoring.v3.Service, request, callback); + }, "name", { value: "UpdateService" }); /** - * Converts this Range to JSON. - * @function toJSON - * @memberof google.monitoring.v3.Range + * Calls UpdateService. + * @function updateService + * @memberof google.monitoring.v3.ServiceMonitoringService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IUpdateServiceRequest} request UpdateServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Range.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return Range; + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef DeleteServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.DeleteServiceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.deleteService = function deleteService(request, callback) { + return this.rpcCall(deleteService, $root.google.monitoring.v3.DeleteServiceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteService" }); + + /** + * Calls DeleteService. + * @function deleteService + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceRequest} request DeleteServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef CreateServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + */ + + /** + * Calls CreateServiceLevelObjective. + * @function createServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} request CreateServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.CreateServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.createServiceLevelObjective = function createServiceLevelObjective(request, callback) { + return this.rpcCall(createServiceLevelObjective, $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); + }, "name", { value: "CreateServiceLevelObjective" }); + + /** + * Calls CreateServiceLevelObjective. + * @function createServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} request CreateServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef GetServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + */ + + /** + * Calls GetServiceLevelObjective. + * @function getServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} request GetServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.getServiceLevelObjective = function getServiceLevelObjective(request, callback) { + return this.rpcCall(getServiceLevelObjective, $root.google.monitoring.v3.GetServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); + }, "name", { value: "GetServiceLevelObjective" }); + + /** + * Calls GetServiceLevelObjective. + * @function getServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} request GetServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef ListServiceLevelObjectivesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListServiceLevelObjectivesResponse} [response] ListServiceLevelObjectivesResponse + */ + + /** + * Calls ListServiceLevelObjectives. + * @function listServiceLevelObjectives + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} request ListServiceLevelObjectivesRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectivesCallback} callback Node-style callback called with the error, if any, and ListServiceLevelObjectivesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.listServiceLevelObjectives = function listServiceLevelObjectives(request, callback) { + return this.rpcCall(listServiceLevelObjectives, $root.google.monitoring.v3.ListServiceLevelObjectivesRequest, $root.google.monitoring.v3.ListServiceLevelObjectivesResponse, request, callback); + }, "name", { value: "ListServiceLevelObjectives" }); + + /** + * Calls ListServiceLevelObjectives. + * @function listServiceLevelObjectives + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} request ListServiceLevelObjectivesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef UpdateServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ServiceLevelObjective} [response] ServiceLevelObjective + */ + + /** + * Calls UpdateServiceLevelObjective. + * @function updateServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} request UpdateServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.UpdateServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and ServiceLevelObjective + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.updateServiceLevelObjective = function updateServiceLevelObjective(request, callback) { + return this.rpcCall(updateServiceLevelObjective, $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest, $root.google.monitoring.v3.ServiceLevelObjective, request, callback); + }, "name", { value: "UpdateServiceLevelObjective" }); + + /** + * Calls UpdateServiceLevelObjective. + * @function updateServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} request UpdateServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. + * @memberof google.monitoring.v3.ServiceMonitoringService + * @typedef DeleteServiceLevelObjectiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteServiceLevelObjective. + * @function deleteServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} request DeleteServiceLevelObjectiveRequest message or plain object + * @param {google.monitoring.v3.ServiceMonitoringService.DeleteServiceLevelObjectiveCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ServiceMonitoringService.prototype.deleteServiceLevelObjective = function deleteServiceLevelObjective(request, callback) { + return this.rpcCall(deleteServiceLevelObjective, $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteServiceLevelObjective" }); + + /** + * Calls DeleteServiceLevelObjective. + * @function deleteServiceLevelObjective + * @memberof google.monitoring.v3.ServiceMonitoringService + * @instance + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} request DeleteServiceLevelObjectiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ServiceMonitoringService; })(); - v3.RequestBasedSli = (function() { + v3.CreateServiceRequest = (function() { /** - * Properties of a RequestBasedSli. + * Properties of a CreateServiceRequest. * @memberof google.monitoring.v3 - * @interface IRequestBasedSli - * @property {google.monitoring.v3.ITimeSeriesRatio|null} [goodTotalRatio] RequestBasedSli goodTotalRatio - * @property {google.monitoring.v3.IDistributionCut|null} [distributionCut] RequestBasedSli distributionCut + * @interface ICreateServiceRequest + * @property {string|null} [parent] CreateServiceRequest parent + * @property {string|null} [serviceId] CreateServiceRequest serviceId + * @property {google.monitoring.v3.IService|null} [service] CreateServiceRequest service */ /** - * Constructs a new RequestBasedSli. + * Constructs a new CreateServiceRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a RequestBasedSli. - * @implements IRequestBasedSli + * @classdesc Represents a CreateServiceRequest. + * @implements ICreateServiceRequest * @constructor - * @param {google.monitoring.v3.IRequestBasedSli=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateServiceRequest=} [properties] Properties to set */ - function RequestBasedSli(properties) { + function CreateServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21621,102 +20682,101 @@ } /** - * RequestBasedSli goodTotalRatio. - * @member {google.monitoring.v3.ITimeSeriesRatio|null|undefined} goodTotalRatio - * @memberof google.monitoring.v3.RequestBasedSli + * CreateServiceRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.CreateServiceRequest * @instance */ - RequestBasedSli.prototype.goodTotalRatio = null; + CreateServiceRequest.prototype.parent = ""; /** - * RequestBasedSli distributionCut. - * @member {google.monitoring.v3.IDistributionCut|null|undefined} distributionCut - * @memberof google.monitoring.v3.RequestBasedSli + * CreateServiceRequest serviceId. + * @member {string} serviceId + * @memberof google.monitoring.v3.CreateServiceRequest * @instance */ - RequestBasedSli.prototype.distributionCut = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateServiceRequest.prototype.serviceId = ""; /** - * RequestBasedSli method. - * @member {"goodTotalRatio"|"distributionCut"|undefined} method - * @memberof google.monitoring.v3.RequestBasedSli + * CreateServiceRequest service. + * @member {google.monitoring.v3.IService|null|undefined} service + * @memberof google.monitoring.v3.CreateServiceRequest * @instance */ - Object.defineProperty(RequestBasedSli.prototype, "method", { - get: $util.oneOfGetter($oneOfFields = ["goodTotalRatio", "distributionCut"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateServiceRequest.prototype.service = null; /** - * Creates a new RequestBasedSli instance using the specified properties. + * Creates a new CreateServiceRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static - * @param {google.monitoring.v3.IRequestBasedSli=} [properties] Properties to set - * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli instance + * @param {google.monitoring.v3.ICreateServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest instance */ - RequestBasedSli.create = function create(properties) { - return new RequestBasedSli(properties); + CreateServiceRequest.create = function create(properties) { + return new CreateServiceRequest(properties); }; /** - * Encodes the specified RequestBasedSli message. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * Encodes the specified CreateServiceRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static - * @param {google.monitoring.v3.IRequestBasedSli} message RequestBasedSli message or plain object to encode + * @param {google.monitoring.v3.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestBasedSli.encode = function encode(message, writer) { + CreateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) - $root.google.monitoring.v3.TimeSeriesRatio.encode(message.goodTotalRatio, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) - $root.google.monitoring.v3.DistributionCut.encode(message.distributionCut, 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.service != null && message.hasOwnProperty("service")) + $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceId); return writer; }; /** - * Encodes the specified RequestBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.RequestBasedSli.verify|verify} messages. + * Encodes the specified CreateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static - * @param {google.monitoring.v3.IRequestBasedSli} message RequestBasedSli message or plain object to encode + * @param {google.monitoring.v3.ICreateServiceRequest} message CreateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestBasedSli.encodeDelimited = function encodeDelimited(message, writer) { + CreateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestBasedSli message from the specified reader or buffer. + * Decodes a CreateServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestBasedSli.decode = function decode(reader, length) { + CreateServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.RequestBasedSli(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 3: - message.distributionCut = $root.google.monitoring.v3.DistributionCut.decode(reader, reader.uint32()); + message.serviceId = reader.string(); + break; + case 2: + message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -21727,139 +20787,129 @@ }; /** - * Decodes a RequestBasedSli message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestBasedSli.decodeDelimited = function decodeDelimited(reader) { + CreateServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RequestBasedSli message. + * Verifies a CreateServiceRequest message. * @function verify - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RequestBasedSli.verify = function verify(message) { + CreateServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) { - properties.method = 1; - { - var error = $root.google.monitoring.v3.TimeSeriesRatio.verify(message.goodTotalRatio); - if (error) - return "goodTotalRatio." + error; - } - } - if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) { - if (properties.method === 1) - return "method: multiple values"; - properties.method = 1; - { - var error = $root.google.monitoring.v3.DistributionCut.verify(message.distributionCut); - if (error) - return "distributionCut." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (!$util.isString(message.serviceId)) + return "serviceId: string expected"; + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.monitoring.v3.Service.verify(message.service); + if (error) + return "service." + error; } return null; }; /** - * Creates a RequestBasedSli message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.RequestBasedSli} RequestBasedSli + * @returns {google.monitoring.v3.CreateServiceRequest} CreateServiceRequest */ - RequestBasedSli.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.RequestBasedSli) + CreateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateServiceRequest) return object; - var message = new $root.google.monitoring.v3.RequestBasedSli(); - if (object.goodTotalRatio != null) { - if (typeof object.goodTotalRatio !== "object") - throw TypeError(".google.monitoring.v3.RequestBasedSli.goodTotalRatio: object expected"); - message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.fromObject(object.goodTotalRatio); - } - if (object.distributionCut != null) { - if (typeof object.distributionCut !== "object") - throw TypeError(".google.monitoring.v3.RequestBasedSli.distributionCut: object expected"); - message.distributionCut = $root.google.monitoring.v3.DistributionCut.fromObject(object.distributionCut); + var message = new $root.google.monitoring.v3.CreateServiceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.serviceId != null) + message.serviceId = String(object.serviceId); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.monitoring.v3.CreateServiceRequest.service: object expected"); + message.service = $root.google.monitoring.v3.Service.fromObject(object.service); } return message; }; /** - * Creates a plain object from a RequestBasedSli message. Also converts values to other types if specified. + * Creates a plain object from a CreateServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @static - * @param {google.monitoring.v3.RequestBasedSli} message RequestBasedSli + * @param {google.monitoring.v3.CreateServiceRequest} message CreateServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RequestBasedSli.toObject = function toObject(message, options) { + CreateServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) { - object.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.toObject(message.goodTotalRatio, options); - if (options.oneofs) - object.method = "goodTotalRatio"; - } - if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) { - object.distributionCut = $root.google.monitoring.v3.DistributionCut.toObject(message.distributionCut, options); - if (options.oneofs) - object.method = "distributionCut"; + if (options.defaults) { + object.parent = ""; + object.service = null; + object.serviceId = ""; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.monitoring.v3.Service.toObject(message.service, options); + if (message.serviceId != null && message.hasOwnProperty("serviceId")) + object.serviceId = message.serviceId; return object; }; /** - * Converts this RequestBasedSli to JSON. + * Converts this CreateServiceRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.RequestBasedSli + * @memberof google.monitoring.v3.CreateServiceRequest * @instance * @returns {Object.} JSON object */ - RequestBasedSli.prototype.toJSON = function toJSON() { + CreateServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RequestBasedSli; + return CreateServiceRequest; })(); - v3.TimeSeriesRatio = (function() { + v3.GetServiceRequest = (function() { /** - * Properties of a TimeSeriesRatio. + * Properties of a GetServiceRequest. * @memberof google.monitoring.v3 - * @interface ITimeSeriesRatio - * @property {string|null} [goodServiceFilter] TimeSeriesRatio goodServiceFilter - * @property {string|null} [badServiceFilter] TimeSeriesRatio badServiceFilter - * @property {string|null} [totalServiceFilter] TimeSeriesRatio totalServiceFilter + * @interface IGetServiceRequest + * @property {string|null} [name] GetServiceRequest name */ /** - * Constructs a new TimeSeriesRatio. + * Constructs a new GetServiceRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a TimeSeriesRatio. - * @implements ITimeSeriesRatio + * @classdesc Represents a GetServiceRequest. + * @implements IGetServiceRequest * @constructor - * @param {google.monitoring.v3.ITimeSeriesRatio=} [properties] Properties to set + * @param {google.monitoring.v3.IGetServiceRequest=} [properties] Properties to set */ - function TimeSeriesRatio(properties) { + function GetServiceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21867,101 +20917,75 @@ } /** - * TimeSeriesRatio goodServiceFilter. - * @member {string} goodServiceFilter - * @memberof google.monitoring.v3.TimeSeriesRatio - * @instance - */ - TimeSeriesRatio.prototype.goodServiceFilter = ""; - - /** - * TimeSeriesRatio badServiceFilter. - * @member {string} badServiceFilter - * @memberof google.monitoring.v3.TimeSeriesRatio - * @instance - */ - TimeSeriesRatio.prototype.badServiceFilter = ""; - - /** - * TimeSeriesRatio totalServiceFilter. - * @member {string} totalServiceFilter - * @memberof google.monitoring.v3.TimeSeriesRatio + * GetServiceRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetServiceRequest * @instance */ - TimeSeriesRatio.prototype.totalServiceFilter = ""; + GetServiceRequest.prototype.name = ""; /** - * Creates a new TimeSeriesRatio instance using the specified properties. + * Creates a new GetServiceRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static - * @param {google.monitoring.v3.ITimeSeriesRatio=} [properties] Properties to set - * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio instance + * @param {google.monitoring.v3.IGetServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest instance */ - TimeSeriesRatio.create = function create(properties) { - return new TimeSeriesRatio(properties); + GetServiceRequest.create = function create(properties) { + return new GetServiceRequest(properties); }; /** - * Encodes the specified TimeSeriesRatio message. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * Encodes the specified GetServiceRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static - * @param {google.monitoring.v3.ITimeSeriesRatio} message TimeSeriesRatio message or plain object to encode + * @param {google.monitoring.v3.IGetServiceRequest} message GetServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesRatio.encode = function encode(message, writer) { + GetServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.goodServiceFilter); - if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.badServiceFilter); - if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.totalServiceFilter); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified TimeSeriesRatio message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesRatio.verify|verify} messages. + * Encodes the specified GetServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static - * @param {google.monitoring.v3.ITimeSeriesRatio} message TimeSeriesRatio message or plain object to encode + * @param {google.monitoring.v3.IGetServiceRequest} message GetServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSeriesRatio.encodeDelimited = function encodeDelimited(message, writer) { + GetServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSeriesRatio message from the specified reader or buffer. + * Decodes a GetServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesRatio.decode = function decode(reader, length) { + GetServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesRatio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.goodServiceFilter = reader.string(); - break; - case 5: - message.badServiceFilter = reader.string(); - break; - case 6: - message.totalServiceFilter = reader.string(); + case 1: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -21972,125 +20996,110 @@ }; /** - * Decodes a TimeSeriesRatio message from the specified reader or buffer, length delimited. + * Decodes a GetServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSeriesRatio.decodeDelimited = function decodeDelimited(reader) { + GetServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSeriesRatio message. + * Verifies a GetServiceRequest message. * @function verify - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSeriesRatio.verify = function verify(message) { + GetServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) - if (!$util.isString(message.goodServiceFilter)) - return "goodServiceFilter: string expected"; - if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) - if (!$util.isString(message.badServiceFilter)) - return "badServiceFilter: string expected"; - if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) - if (!$util.isString(message.totalServiceFilter)) - return "totalServiceFilter: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a TimeSeriesRatio message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.TimeSeriesRatio} TimeSeriesRatio + * @returns {google.monitoring.v3.GetServiceRequest} GetServiceRequest */ - TimeSeriesRatio.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.TimeSeriesRatio) + GetServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetServiceRequest) return object; - var message = new $root.google.monitoring.v3.TimeSeriesRatio(); - if (object.goodServiceFilter != null) - message.goodServiceFilter = String(object.goodServiceFilter); - if (object.badServiceFilter != null) - message.badServiceFilter = String(object.badServiceFilter); - if (object.totalServiceFilter != null) - message.totalServiceFilter = String(object.totalServiceFilter); + var message = new $root.google.monitoring.v3.GetServiceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a TimeSeriesRatio message. Also converts values to other types if specified. + * Creates a plain object from a GetServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @static - * @param {google.monitoring.v3.TimeSeriesRatio} message TimeSeriesRatio + * @param {google.monitoring.v3.GetServiceRequest} message GetServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSeriesRatio.toObject = function toObject(message, options) { + GetServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.goodServiceFilter = ""; - object.badServiceFilter = ""; - object.totalServiceFilter = ""; - } - if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) - object.goodServiceFilter = message.goodServiceFilter; - if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) - object.badServiceFilter = message.badServiceFilter; - if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) - object.totalServiceFilter = message.totalServiceFilter; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this TimeSeriesRatio to JSON. + * Converts this GetServiceRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.TimeSeriesRatio + * @memberof google.monitoring.v3.GetServiceRequest * @instance * @returns {Object.} JSON object */ - TimeSeriesRatio.prototype.toJSON = function toJSON() { + GetServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeSeriesRatio; + return GetServiceRequest; })(); - v3.DistributionCut = (function() { + v3.ListServicesRequest = (function() { /** - * Properties of a DistributionCut. + * Properties of a ListServicesRequest. * @memberof google.monitoring.v3 - * @interface IDistributionCut - * @property {string|null} [distributionFilter] DistributionCut distributionFilter - * @property {google.monitoring.v3.IRange|null} [range] DistributionCut range + * @interface IListServicesRequest + * @property {string|null} [parent] ListServicesRequest parent + * @property {string|null} [filter] ListServicesRequest filter + * @property {number|null} [pageSize] ListServicesRequest pageSize + * @property {string|null} [pageToken] ListServicesRequest pageToken */ /** - * Constructs a new DistributionCut. + * Constructs a new ListServicesRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a DistributionCut. - * @implements IDistributionCut + * @classdesc Represents a ListServicesRequest. + * @implements IListServicesRequest * @constructor - * @param {google.monitoring.v3.IDistributionCut=} [properties] Properties to set + * @param {google.monitoring.v3.IListServicesRequest=} [properties] Properties to set */ - function DistributionCut(properties) { + function ListServicesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22098,88 +21107,114 @@ } /** - * DistributionCut distributionFilter. - * @member {string} distributionFilter - * @memberof google.monitoring.v3.DistributionCut + * ListServicesRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.ListServicesRequest * @instance */ - DistributionCut.prototype.distributionFilter = ""; + ListServicesRequest.prototype.parent = ""; /** - * DistributionCut range. - * @member {google.monitoring.v3.IRange|null|undefined} range - * @memberof google.monitoring.v3.DistributionCut + * ListServicesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListServicesRequest * @instance */ - DistributionCut.prototype.range = null; + ListServicesRequest.prototype.filter = ""; /** - * Creates a new DistributionCut instance using the specified properties. + * ListServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageSize = 0; + + /** + * ListServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListServicesRequest + * @instance + */ + ListServicesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListServicesRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static - * @param {google.monitoring.v3.IDistributionCut=} [properties] Properties to set - * @returns {google.monitoring.v3.DistributionCut} DistributionCut instance + * @param {google.monitoring.v3.IListServicesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest instance */ - DistributionCut.create = function create(properties) { - return new DistributionCut(properties); + ListServicesRequest.create = function create(properties) { + return new ListServicesRequest(properties); }; /** - * Encodes the specified DistributionCut message. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * Encodes the specified ListServicesRequest message. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static - * @param {google.monitoring.v3.IDistributionCut} message DistributionCut message or plain object to encode + * @param {google.monitoring.v3.IListServicesRequest} message ListServicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DistributionCut.encode = function encode(message, writer) { + ListServicesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.distributionFilter); - if (message.range != null && message.hasOwnProperty("range")) - $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified DistributionCut message, length delimited. Does not implicitly {@link google.monitoring.v3.DistributionCut.verify|verify} messages. + * Encodes the specified ListServicesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static - * @param {google.monitoring.v3.IDistributionCut} message DistributionCut message or plain object to encode + * @param {google.monitoring.v3.IListServicesRequest} message ListServicesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DistributionCut.encodeDelimited = function encodeDelimited(message, writer) { + ListServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DistributionCut message from the specified reader or buffer. + * Decodes a ListServicesRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DistributionCut.decode = function decode(reader, length) { + ListServicesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DistributionCut(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServicesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.distributionFilter = reader.string(); + case 1: + message.parent = reader.string(); break; - case 5: - message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -22190,125 +21225,134 @@ }; /** - * Decodes a DistributionCut message from the specified reader or buffer, length delimited. + * Decodes a ListServicesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DistributionCut.decodeDelimited = function decodeDelimited(reader) { + ListServicesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DistributionCut message. + * Verifies a ListServicesRequest message. * @function verify - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DistributionCut.verify = function verify(message) { + ListServicesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) - if (!$util.isString(message.distributionFilter)) - return "distributionFilter: string expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.monitoring.v3.Range.verify(message.range); - if (error) - return "range." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: 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 DistributionCut message from a plain object. Also converts values to their respective internal types. + * Creates a ListServicesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DistributionCut} DistributionCut + * @returns {google.monitoring.v3.ListServicesRequest} ListServicesRequest */ - DistributionCut.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DistributionCut) + ListServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServicesRequest) return object; - var message = new $root.google.monitoring.v3.DistributionCut(); - if (object.distributionFilter != null) - message.distributionFilter = String(object.distributionFilter); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.monitoring.v3.DistributionCut.range: object expected"); - message.range = $root.google.monitoring.v3.Range.fromObject(object.range); - } + var message = new $root.google.monitoring.v3.ListServicesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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; }; /** - * Creates a plain object from a DistributionCut message. Also converts values to other types if specified. + * Creates a plain object from a ListServicesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @static - * @param {google.monitoring.v3.DistributionCut} message DistributionCut + * @param {google.monitoring.v3.ListServicesRequest} message ListServicesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DistributionCut.toObject = function toObject(message, options) { + ListServicesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.distributionFilter = ""; - object.range = null; + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) - object.distributionFilter = message.distributionFilter; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.monitoring.v3.Range.toObject(message.range, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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; return object; }; /** - * Converts this DistributionCut to JSON. + * Converts this ListServicesRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.DistributionCut + * @memberof google.monitoring.v3.ListServicesRequest * @instance * @returns {Object.} JSON object */ - DistributionCut.prototype.toJSON = function toJSON() { + ListServicesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DistributionCut; + return ListServicesRequest; })(); - v3.WindowsBasedSli = (function() { + v3.ListServicesResponse = (function() { /** - * Properties of a WindowsBasedSli. + * Properties of a ListServicesResponse. * @memberof google.monitoring.v3 - * @interface IWindowsBasedSli - * @property {string|null} [goodBadMetricFilter] WindowsBasedSli goodBadMetricFilter - * @property {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null} [goodTotalRatioThreshold] WindowsBasedSli goodTotalRatioThreshold - * @property {google.monitoring.v3.WindowsBasedSli.IMetricRange|null} [metricMeanInRange] WindowsBasedSli metricMeanInRange - * @property {google.monitoring.v3.WindowsBasedSli.IMetricRange|null} [metricSumInRange] WindowsBasedSli metricSumInRange - * @property {google.protobuf.IDuration|null} [windowPeriod] WindowsBasedSli windowPeriod + * @interface IListServicesResponse + * @property {Array.|null} [services] ListServicesResponse services + * @property {string|null} [nextPageToken] ListServicesResponse nextPageToken */ /** - * Constructs a new WindowsBasedSli. + * Constructs a new ListServicesResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a WindowsBasedSli. - * @implements IWindowsBasedSli + * @classdesc Represents a ListServicesResponse. + * @implements IListServicesResponse * @constructor - * @param {google.monitoring.v3.IWindowsBasedSli=} [properties] Properties to set + * @param {google.monitoring.v3.IListServicesResponse=} [properties] Properties to set */ - function WindowsBasedSli(properties) { + function ListServicesResponse(properties) { + this.services = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22316,141 +21360,318 @@ } /** - * WindowsBasedSli goodBadMetricFilter. - * @member {string} goodBadMetricFilter - * @memberof google.monitoring.v3.WindowsBasedSli + * ListServicesResponse services. + * @member {Array.} services + * @memberof google.monitoring.v3.ListServicesResponse * @instance */ - WindowsBasedSli.prototype.goodBadMetricFilter = ""; + ListServicesResponse.prototype.services = $util.emptyArray; /** - * WindowsBasedSli goodTotalRatioThreshold. - * @member {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null|undefined} goodTotalRatioThreshold - * @memberof google.monitoring.v3.WindowsBasedSli + * ListServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListServicesResponse * @instance */ - WindowsBasedSli.prototype.goodTotalRatioThreshold = null; + ListServicesResponse.prototype.nextPageToken = ""; /** - * WindowsBasedSli metricMeanInRange. - * @member {google.monitoring.v3.WindowsBasedSli.IMetricRange|null|undefined} metricMeanInRange - * @memberof google.monitoring.v3.WindowsBasedSli - * @instance + * Creates a new ListServicesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.IListServicesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse instance */ - WindowsBasedSli.prototype.metricMeanInRange = null; + ListServicesResponse.create = function create(properties) { + return new ListServicesResponse(properties); + }; /** - * WindowsBasedSli metricSumInRange. - * @member {google.monitoring.v3.WindowsBasedSli.IMetricRange|null|undefined} metricSumInRange - * @memberof google.monitoring.v3.WindowsBasedSli - * @instance + * Encodes the specified ListServicesResponse message. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - WindowsBasedSli.prototype.metricSumInRange = null; + ListServicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.services != null && message.services.length) + for (var i = 0; i < message.services.length; ++i) + $root.google.monitoring.v3.Service.encode(message.services[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; + }; /** - * WindowsBasedSli windowPeriod. - * @member {google.protobuf.IDuration|null|undefined} windowPeriod - * @memberof google.monitoring.v3.WindowsBasedSli + * Encodes the specified ListServicesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.IListServicesResponse} message ListServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.monitoring.v3.Service.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServicesResponse message. + * @function verify + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.services != null && message.hasOwnProperty("services")) { + if (!Array.isArray(message.services)) + return "services: array expected"; + for (var i = 0; i < message.services.length; ++i) { + var error = $root.google.monitoring.v3.Service.verify(message.services[i]); + if (error) + return "services." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListServicesResponse} ListServicesResponse + */ + ListServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServicesResponse) + return object; + var message = new $root.google.monitoring.v3.ListServicesResponse(); + if (object.services) { + if (!Array.isArray(object.services)) + throw TypeError(".google.monitoring.v3.ListServicesResponse.services: array expected"); + message.services = []; + for (var i = 0; i < object.services.length; ++i) { + if (typeof object.services[i] !== "object") + throw TypeError(".google.monitoring.v3.ListServicesResponse.services: object expected"); + message.services[i] = $root.google.monitoring.v3.Service.fromObject(object.services[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {google.monitoring.v3.ListServicesResponse} message ListServicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.services = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.services && message.services.length) { + object.services = []; + for (var j = 0; j < message.services.length; ++j) + object.services[j] = $root.google.monitoring.v3.Service.toObject(message.services[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServicesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListServicesResponse * @instance + * @returns {Object.} JSON object */ - WindowsBasedSli.prototype.windowPeriod = null; + ListServicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return ListServicesResponse; + })(); + + v3.UpdateServiceRequest = (function() { /** - * WindowsBasedSli windowCriterion. - * @member {"goodBadMetricFilter"|"goodTotalRatioThreshold"|"metricMeanInRange"|"metricSumInRange"|undefined} windowCriterion - * @memberof google.monitoring.v3.WindowsBasedSli + * Properties of an UpdateServiceRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateServiceRequest + * @property {google.monitoring.v3.IService|null} [service] UpdateServiceRequest service + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceRequest updateMask + */ + + /** + * Constructs a new UpdateServiceRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateServiceRequest. + * @implements IUpdateServiceRequest + * @constructor + * @param {google.monitoring.v3.IUpdateServiceRequest=} [properties] Properties to set + */ + function UpdateServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateServiceRequest service. + * @member {google.monitoring.v3.IService|null|undefined} service + * @memberof google.monitoring.v3.UpdateServiceRequest * @instance */ - Object.defineProperty(WindowsBasedSli.prototype, "windowCriterion", { - get: $util.oneOfGetter($oneOfFields = ["goodBadMetricFilter", "goodTotalRatioThreshold", "metricMeanInRange", "metricSumInRange"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateServiceRequest.prototype.service = null; /** - * Creates a new WindowsBasedSli instance using the specified properties. + * UpdateServiceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateServiceRequest + * @instance + */ + UpdateServiceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateServiceRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static - * @param {google.monitoring.v3.IWindowsBasedSli=} [properties] Properties to set - * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli instance + * @param {google.monitoring.v3.IUpdateServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest instance */ - WindowsBasedSli.create = function create(properties) { - return new WindowsBasedSli(properties); + UpdateServiceRequest.create = function create(properties) { + return new UpdateServiceRequest(properties); }; /** - * Encodes the specified WindowsBasedSli message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * Encodes the specified UpdateServiceRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static - * @param {google.monitoring.v3.IWindowsBasedSli} message WindowsBasedSli message or plain object to encode + * @param {google.monitoring.v3.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsBasedSli.encode = function encode(message, writer) { + UpdateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) - $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.encode(message.goodTotalRatioThreshold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) - $root.google.protobuf.Duration.encode(message.windowPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.goodBadMetricFilter); - if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) - $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricMeanInRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) - $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricSumInRange, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.service != null && message.hasOwnProperty("service")) + $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified WindowsBasedSli message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.verify|verify} messages. + * Encodes the specified UpdateServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static - * @param {google.monitoring.v3.IWindowsBasedSli} message WindowsBasedSli message or plain object to encode + * @param {google.monitoring.v3.IUpdateServiceRequest} message UpdateServiceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WindowsBasedSli.encodeDelimited = function encodeDelimited(message, writer) { + UpdateServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WindowsBasedSli message from the specified reader or buffer. + * Decodes an UpdateServiceRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsBasedSli.decode = function decode(reader, length) { + UpdateServiceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateServiceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.goodBadMetricFilter = reader.string(); + case 1: + message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); break; case 2: - message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.decode(reader, reader.uint32()); - break; - case 6: - message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); - break; - case 7: - message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); - break; - case 4: - message.windowPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -22461,994 +21682,406 @@ }; /** - * Decodes a WindowsBasedSli message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WindowsBasedSli.decodeDelimited = function decodeDelimited(reader) { + UpdateServiceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WindowsBasedSli message. + * Verifies an UpdateServiceRequest message. * @function verify - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WindowsBasedSli.verify = function verify(message) { + UpdateServiceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) { - properties.windowCriterion = 1; - if (!$util.isString(message.goodBadMetricFilter)) - return "goodBadMetricFilter: string expected"; - } - if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) { - if (properties.windowCriterion === 1) - return "windowCriterion: multiple values"; - properties.windowCriterion = 1; - { - var error = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify(message.goodTotalRatioThreshold); - if (error) - return "goodTotalRatioThreshold." + error; - } - } - if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) { - if (properties.windowCriterion === 1) - return "windowCriterion: multiple values"; - properties.windowCriterion = 1; - { - var error = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.verify(message.metricMeanInRange); - if (error) - return "metricMeanInRange." + error; - } - } - if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) { - if (properties.windowCriterion === 1) - return "windowCriterion: multiple values"; - properties.windowCriterion = 1; - { - var error = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.verify(message.metricSumInRange); - if (error) - return "metricSumInRange." + error; - } + if (message.service != null && message.hasOwnProperty("service")) { + var error = $root.google.monitoring.v3.Service.verify(message.service); + if (error) + return "service." + error; } - if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) { - var error = $root.google.protobuf.Duration.verify(message.windowPeriod); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "windowPeriod." + error; + return "updateMask." + error; } return null; }; /** - * Creates a WindowsBasedSli message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateServiceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.WindowsBasedSli} WindowsBasedSli + * @returns {google.monitoring.v3.UpdateServiceRequest} UpdateServiceRequest */ - WindowsBasedSli.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.WindowsBasedSli) + UpdateServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateServiceRequest) return object; - var message = new $root.google.monitoring.v3.WindowsBasedSli(); - if (object.goodBadMetricFilter != null) - message.goodBadMetricFilter = String(object.goodBadMetricFilter); - if (object.goodTotalRatioThreshold != null) { - if (typeof object.goodTotalRatioThreshold !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.goodTotalRatioThreshold: object expected"); - message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.fromObject(object.goodTotalRatioThreshold); - } - if (object.metricMeanInRange != null) { - if (typeof object.metricMeanInRange !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.metricMeanInRange: object expected"); - message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.fromObject(object.metricMeanInRange); - } - if (object.metricSumInRange != null) { - if (typeof object.metricSumInRange !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.metricSumInRange: object expected"); - message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.fromObject(object.metricSumInRange); + var message = new $root.google.monitoring.v3.UpdateServiceRequest(); + if (object.service != null) { + if (typeof object.service !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceRequest.service: object expected"); + message.service = $root.google.monitoring.v3.Service.fromObject(object.service); } - if (object.windowPeriod != null) { - if (typeof object.windowPeriod !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.windowPeriod: object expected"); - message.windowPeriod = $root.google.protobuf.Duration.fromObject(object.windowPeriod); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a WindowsBasedSli message. Also converts values to other types if specified. + * Creates a plain object from an UpdateServiceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @static - * @param {google.monitoring.v3.WindowsBasedSli} message WindowsBasedSli + * @param {google.monitoring.v3.UpdateServiceRequest} message UpdateServiceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WindowsBasedSli.toObject = function toObject(message, options) { + UpdateServiceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.windowPeriod = null; - if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) { - object.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.toObject(message.goodTotalRatioThreshold, options); - if (options.oneofs) - object.windowCriterion = "goodTotalRatioThreshold"; - } - if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) - object.windowPeriod = $root.google.protobuf.Duration.toObject(message.windowPeriod, options); - if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) { - object.goodBadMetricFilter = message.goodBadMetricFilter; - if (options.oneofs) - object.windowCriterion = "goodBadMetricFilter"; - } - if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) { - object.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.toObject(message.metricMeanInRange, options); - if (options.oneofs) - object.windowCriterion = "metricMeanInRange"; - } - if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) { - object.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.toObject(message.metricSumInRange, options); - if (options.oneofs) - object.windowCriterion = "metricSumInRange"; + if (options.defaults) { + object.service = null; + object.updateMask = null; } + if (message.service != null && message.hasOwnProperty("service")) + object.service = $root.google.monitoring.v3.Service.toObject(message.service, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this WindowsBasedSli to JSON. + * Converts this UpdateServiceRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.WindowsBasedSli + * @memberof google.monitoring.v3.UpdateServiceRequest * @instance * @returns {Object.} JSON object */ - WindowsBasedSli.prototype.toJSON = function toJSON() { + UpdateServiceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - WindowsBasedSli.PerformanceThreshold = (function() { - - /** - * Properties of a PerformanceThreshold. - * @memberof google.monitoring.v3.WindowsBasedSli - * @interface IPerformanceThreshold - * @property {google.monitoring.v3.IRequestBasedSli|null} [performance] PerformanceThreshold performance - * @property {google.monitoring.v3.IBasicSli|null} [basicSliPerformance] PerformanceThreshold basicSliPerformance - * @property {number|null} [threshold] PerformanceThreshold threshold - */ - - /** - * Constructs a new PerformanceThreshold. - * @memberof google.monitoring.v3.WindowsBasedSli - * @classdesc Represents a PerformanceThreshold. - * @implements IPerformanceThreshold - * @constructor - * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold=} [properties] Properties to set - */ - function PerformanceThreshold(properties) { - if (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 UpdateServiceRequest; + })(); - /** - * PerformanceThreshold performance. - * @member {google.monitoring.v3.IRequestBasedSli|null|undefined} performance - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @instance - */ - PerformanceThreshold.prototype.performance = null; + v3.DeleteServiceRequest = (function() { - /** - * PerformanceThreshold basicSliPerformance. - * @member {google.monitoring.v3.IBasicSli|null|undefined} basicSliPerformance - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @instance - */ - PerformanceThreshold.prototype.basicSliPerformance = null; + /** + * Properties of a DeleteServiceRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteServiceRequest + * @property {string|null} [name] DeleteServiceRequest name + */ - /** - * PerformanceThreshold threshold. - * @member {number} threshold - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @instance - */ - PerformanceThreshold.prototype.threshold = 0; + /** + * Constructs a new DeleteServiceRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteServiceRequest. + * @implements IDeleteServiceRequest + * @constructor + * @param {google.monitoring.v3.IDeleteServiceRequest=} [properties] Properties to set + */ + function DeleteServiceRequest(properties) { + if (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; + /** + * DeleteServiceRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteServiceRequest + * @instance + */ + DeleteServiceRequest.prototype.name = ""; - /** - * PerformanceThreshold type. - * @member {"performance"|"basicSliPerformance"|undefined} type - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @instance - */ - Object.defineProperty(PerformanceThreshold.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["performance", "basicSliPerformance"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a new DeleteServiceRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest instance + */ + DeleteServiceRequest.create = function create(properties) { + return new DeleteServiceRequest(properties); + }; - /** - * Creates a new PerformanceThreshold instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold=} [properties] Properties to set - * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold instance - */ - PerformanceThreshold.create = function create(properties) { - return new PerformanceThreshold(properties); - }; - - /** - * Encodes the specified PerformanceThreshold message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold} message PerformanceThreshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PerformanceThreshold.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.performance != null && message.hasOwnProperty("performance")) - $root.google.monitoring.v3.RequestBasedSli.encode(message.performance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.threshold != null && message.hasOwnProperty("threshold")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.threshold); - if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) - $root.google.monitoring.v3.BasicSli.encode(message.basicSliPerformance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DeleteServiceRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.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 PerformanceThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold} message PerformanceThreshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PerformanceThreshold.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteServiceRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.IDeleteServiceRequest} message DeleteServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PerformanceThreshold message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PerformanceThreshold.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.performance = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); - break; - case 3: - message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); - break; - case 2: - message.threshold = reader.double(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteServiceRequest(); + 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 PerformanceThreshold message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PerformanceThreshold.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a PerformanceThreshold message. - * @function verify - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PerformanceThreshold.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.performance != null && message.hasOwnProperty("performance")) { - properties.type = 1; - { - var error = $root.google.monitoring.v3.RequestBasedSli.verify(message.performance); - if (error) - return "performance." + error; - } - } - if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.monitoring.v3.BasicSli.verify(message.basicSliPerformance); - if (error) - return "basicSliPerformance." + error; - } - } - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (typeof message.threshold !== "number") - return "threshold: number expected"; - return null; - }; + /** + * Decodes a DeleteServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a PerformanceThreshold message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} PerformanceThreshold - */ - PerformanceThreshold.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold) - return object; - var message = new $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold(); - if (object.performance != null) { - if (typeof object.performance !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.performance: object expected"); - message.performance = $root.google.monitoring.v3.RequestBasedSli.fromObject(object.performance); - } - if (object.basicSliPerformance != null) { - if (typeof object.basicSliPerformance !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.basicSliPerformance: object expected"); - message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.fromObject(object.basicSliPerformance); - } - if (object.threshold != null) - message.threshold = Number(object.threshold); - return message; - }; + /** + * Verifies a DeleteServiceRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServiceRequest.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 plain object from a PerformanceThreshold message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @static - * @param {google.monitoring.v3.WindowsBasedSli.PerformanceThreshold} message PerformanceThreshold - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PerformanceThreshold.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.threshold = 0; - if (message.performance != null && message.hasOwnProperty("performance")) { - object.performance = $root.google.monitoring.v3.RequestBasedSli.toObject(message.performance, options); - if (options.oneofs) - object.type = "performance"; - } - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; - if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) { - object.basicSliPerformance = $root.google.monitoring.v3.BasicSli.toObject(message.basicSliPerformance, options); - if (options.oneofs) - object.type = "basicSliPerformance"; - } + /** + * Creates a DeleteServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteServiceRequest} DeleteServiceRequest + */ + DeleteServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteServiceRequest) return object; - }; + var message = new $root.google.monitoring.v3.DeleteServiceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this PerformanceThreshold to JSON. - * @function toJSON - * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - * @instance - * @returns {Object.} JSON object - */ - PerformanceThreshold.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeleteServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {google.monitoring.v3.DeleteServiceRequest} message DeleteServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServiceRequest.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 PerformanceThreshold; - })(); + /** + * Converts this DeleteServiceRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteServiceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - WindowsBasedSli.MetricRange = (function() { + return DeleteServiceRequest; + })(); - /** - * Properties of a MetricRange. - * @memberof google.monitoring.v3.WindowsBasedSli - * @interface IMetricRange - * @property {string|null} [timeSeries] MetricRange timeSeries - * @property {google.monitoring.v3.IRange|null} [range] MetricRange range - */ + v3.CreateServiceLevelObjectiveRequest = (function() { - /** - * Constructs a new MetricRange. - * @memberof google.monitoring.v3.WindowsBasedSli - * @classdesc Represents a MetricRange. - * @implements IMetricRange - * @constructor - * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange=} [properties] Properties to set - */ - function MetricRange(properties) { - if (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 CreateServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @interface ICreateServiceLevelObjectiveRequest + * @property {string|null} [parent] CreateServiceLevelObjectiveRequest parent + * @property {string|null} [serviceLevelObjectiveId] CreateServiceLevelObjectiveRequest serviceLevelObjectiveId + * @property {google.monitoring.v3.IServiceLevelObjective|null} [serviceLevelObjective] CreateServiceLevelObjectiveRequest serviceLevelObjective + */ - /** - * MetricRange timeSeries. - * @member {string} timeSeries - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @instance - */ - MetricRange.prototype.timeSeries = ""; + /** + * Constructs a new CreateServiceLevelObjectiveRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateServiceLevelObjectiveRequest. + * @implements ICreateServiceLevelObjectiveRequest + * @constructor + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest=} [properties] Properties to set + */ + function CreateServiceLevelObjectiveRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * MetricRange range. - * @member {google.monitoring.v3.IRange|null|undefined} range - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @instance - */ - MetricRange.prototype.range = null; + /** + * CreateServiceLevelObjectiveRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + */ + CreateServiceLevelObjectiveRequest.prototype.parent = ""; - /** - * Creates a new MetricRange instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange=} [properties] Properties to set - * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange instance - */ - MetricRange.create = function create(properties) { - return new MetricRange(properties); - }; + /** + * CreateServiceLevelObjectiveRequest serviceLevelObjectiveId. + * @member {string} serviceLevelObjectiveId + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + */ + CreateServiceLevelObjectiveRequest.prototype.serviceLevelObjectiveId = ""; - /** - * Encodes the specified MetricRange message. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange} message MetricRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeSeries); - if (message.range != null && message.hasOwnProperty("range")) - $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * CreateServiceLevelObjectiveRequest serviceLevelObjective. + * @member {google.monitoring.v3.IServiceLevelObjective|null|undefined} serviceLevelObjective + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @instance + */ + CreateServiceLevelObjectiveRequest.prototype.serviceLevelObjective = null; - /** - * Encodes the specified MetricRange message, length delimited. Does not implicitly {@link google.monitoring.v3.WindowsBasedSli.MetricRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {google.monitoring.v3.WindowsBasedSli.IMetricRange} message MetricRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new CreateServiceLevelObjectiveRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest instance + */ + CreateServiceLevelObjectiveRequest.create = function create(properties) { + return new CreateServiceLevelObjectiveRequest(properties); + }; - /** - * Decodes a MetricRange message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.WindowsBasedSli.MetricRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timeSeries = reader.string(); - break; - case 4: - message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricRange message. - * @function verify - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - if (!$util.isString(message.timeSeries)) - return "timeSeries: string expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.monitoring.v3.Range.verify(message.range); - if (error) - return "range." + error; - } - return null; - }; - - /** - * Creates a MetricRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.WindowsBasedSli.MetricRange} MetricRange - */ - MetricRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.WindowsBasedSli.MetricRange) - return object; - var message = new $root.google.monitoring.v3.WindowsBasedSli.MetricRange(); - if (object.timeSeries != null) - message.timeSeries = String(object.timeSeries); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.monitoring.v3.WindowsBasedSli.MetricRange.range: object expected"); - message.range = $root.google.monitoring.v3.Range.fromObject(object.range); - } - return message; - }; - - /** - * Creates a plain object from a MetricRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @static - * @param {google.monitoring.v3.WindowsBasedSli.MetricRange} message MetricRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timeSeries = ""; - object.range = null; - } - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - object.timeSeries = message.timeSeries; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.monitoring.v3.Range.toObject(message.range, options); - return object; - }; - - /** - * Converts this MetricRange to JSON. - * @function toJSON - * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange - * @instance - * @returns {Object.} JSON object - */ - MetricRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MetricRange; - })(); - - return WindowsBasedSli; - })(); - - v3.UptimeCheckService = (function() { - - /** - * Constructs a new UptimeCheckService service. - * @memberof google.monitoring.v3 - * @classdesc Represents an UptimeCheckService - * @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 UptimeCheckService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (UptimeCheckService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UptimeCheckService; - - /** - * Creates new UptimeCheckService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.UptimeCheckService - * @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 {UptimeCheckService} RPC service. Useful where requests and/or responses are streamed. - */ - UptimeCheckService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. - * @memberof google.monitoring.v3.UptimeCheckService - * @typedef ListUptimeCheckConfigsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListUptimeCheckConfigsResponse} [response] ListUptimeCheckConfigsResponse - */ - - /** - * Calls ListUptimeCheckConfigs. - * @function listUptimeCheckConfigs - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} request ListUptimeCheckConfigsRequest message or plain object - * @param {google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigsCallback} callback Node-style callback called with the error, if any, and ListUptimeCheckConfigsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UptimeCheckService.prototype.listUptimeCheckConfigs = function listUptimeCheckConfigs(request, callback) { - return this.rpcCall(listUptimeCheckConfigs, $root.google.monitoring.v3.ListUptimeCheckConfigsRequest, $root.google.monitoring.v3.ListUptimeCheckConfigsResponse, request, callback); - }, "name", { value: "ListUptimeCheckConfigs" }); - - /** - * Calls ListUptimeCheckConfigs. - * @function listUptimeCheckConfigs - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} request ListUptimeCheckConfigsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. - * @memberof google.monitoring.v3.UptimeCheckService - * @typedef GetUptimeCheckConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig - */ - - /** - * Calls GetUptimeCheckConfig. - * @function getUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} request GetUptimeCheckConfigRequest message or plain object - * @param {google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UptimeCheckService.prototype.getUptimeCheckConfig = function getUptimeCheckConfig(request, callback) { - return this.rpcCall(getUptimeCheckConfig, $root.google.monitoring.v3.GetUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); - }, "name", { value: "GetUptimeCheckConfig" }); - - /** - * Calls GetUptimeCheckConfig. - * @function getUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} request GetUptimeCheckConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. - * @memberof google.monitoring.v3.UptimeCheckService - * @typedef CreateUptimeCheckConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig - */ - - /** - * Calls CreateUptimeCheckConfig. - * @function createUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} request CreateUptimeCheckConfigRequest message or plain object - * @param {google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UptimeCheckService.prototype.createUptimeCheckConfig = function createUptimeCheckConfig(request, callback) { - return this.rpcCall(createUptimeCheckConfig, $root.google.monitoring.v3.CreateUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); - }, "name", { value: "CreateUptimeCheckConfig" }); - - /** - * Calls CreateUptimeCheckConfig. - * @function createUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} request CreateUptimeCheckConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. - * @memberof google.monitoring.v3.UptimeCheckService - * @typedef UpdateUptimeCheckConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig - */ - - /** - * Calls UpdateUptimeCheckConfig. - * @function updateUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} request UpdateUptimeCheckConfigRequest message or plain object - * @param {google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UptimeCheckService.prototype.updateUptimeCheckConfig = function updateUptimeCheckConfig(request, callback) { - return this.rpcCall(updateUptimeCheckConfig, $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); - }, "name", { value: "UpdateUptimeCheckConfig" }); - - /** - * Calls UpdateUptimeCheckConfig. - * @function updateUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} request UpdateUptimeCheckConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. - * @memberof google.monitoring.v3.UptimeCheckService - * @typedef DeleteUptimeCheckConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteUptimeCheckConfig. - * @function deleteUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} request DeleteUptimeCheckConfigRequest message or plain object - * @param {google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UptimeCheckService.prototype.deleteUptimeCheckConfig = function deleteUptimeCheckConfig(request, callback) { - return this.rpcCall(deleteUptimeCheckConfig, $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteUptimeCheckConfig" }); - - /** - * Calls DeleteUptimeCheckConfig. - * @function deleteUptimeCheckConfig - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} request DeleteUptimeCheckConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. - * @memberof google.monitoring.v3.UptimeCheckService - * @typedef ListUptimeCheckIpsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListUptimeCheckIpsResponse} [response] ListUptimeCheckIpsResponse - */ - - /** - * Calls ListUptimeCheckIps. - * @function listUptimeCheckIps - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} request ListUptimeCheckIpsRequest message or plain object - * @param {google.monitoring.v3.UptimeCheckService.ListUptimeCheckIpsCallback} callback Node-style callback called with the error, if any, and ListUptimeCheckIpsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(UptimeCheckService.prototype.listUptimeCheckIps = function listUptimeCheckIps(request, callback) { - return this.rpcCall(listUptimeCheckIps, $root.google.monitoring.v3.ListUptimeCheckIpsRequest, $root.google.monitoring.v3.ListUptimeCheckIpsResponse, request, callback); - }, "name", { value: "ListUptimeCheckIps" }); - - /** - * Calls ListUptimeCheckIps. - * @function listUptimeCheckIps - * @memberof google.monitoring.v3.UptimeCheckService - * @instance - * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} request ListUptimeCheckIpsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return UptimeCheckService; - })(); - - v3.ListUptimeCheckConfigsRequest = (function() { - - /** - * Properties of a ListUptimeCheckConfigsRequest. - * @memberof google.monitoring.v3 - * @interface IListUptimeCheckConfigsRequest - * @property {string|null} [parent] ListUptimeCheckConfigsRequest parent - * @property {number|null} [pageSize] ListUptimeCheckConfigsRequest pageSize - * @property {string|null} [pageToken] ListUptimeCheckConfigsRequest pageToken - */ - - /** - * Constructs a new ListUptimeCheckConfigsRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListUptimeCheckConfigsRequest. - * @implements IListUptimeCheckConfigsRequest - * @constructor - * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest=} [properties] Properties to set - */ - function ListUptimeCheckConfigsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUptimeCheckConfigsRequest parent. - * @member {string} parent - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest - * @instance - */ - ListUptimeCheckConfigsRequest.prototype.parent = ""; - - /** - * ListUptimeCheckConfigsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest - * @instance - */ - ListUptimeCheckConfigsRequest.prototype.pageSize = 0; - - /** - * ListUptimeCheckConfigsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest - * @instance - */ - ListUptimeCheckConfigsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUptimeCheckConfigsRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest - * @static - * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest instance - */ - ListUptimeCheckConfigsRequest.create = function create(properties) { - return new ListUptimeCheckConfigsRequest(properties); - }; - - /** - * Encodes the specified ListUptimeCheckConfigsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest - * @static - * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUptimeCheckConfigsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; + /** + * Encodes the specified CreateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServiceLevelObjectiveRequest.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.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceLevelObjectiveId); + return writer; + }; /** - * Encodes the specified ListUptimeCheckConfigsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * Encodes the specified CreateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateServiceLevelObjectiveRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest message or plain object to encode + * @param {google.monitoring.v3.ICreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListUptimeCheckConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer. + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListUptimeCheckConfigsRequest.decode = function decode(reader, length) { + CreateServiceLevelObjectiveRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckConfigsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -23456,10 +22089,10 @@ message.parent = reader.string(); break; case 3: - message.pageSize = reader.int32(); + message.serviceLevelObjectiveId = reader.string(); break; - case 4: - message.pageToken = reader.string(); + case 2: + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -23470,127 +22103,130 @@ }; /** - * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListUptimeCheckConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListUptimeCheckConfigsRequest message. + * Verifies a CreateServiceLevelObjectiveRequest message. * @function verify - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListUptimeCheckConfigsRequest.verify = function verify(message) { + CreateServiceLevelObjectiveRequest.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.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + if (!$util.isString(message.serviceLevelObjectiveId)) + return "serviceLevelObjectiveId: string expected"; + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) { + var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjective); + if (error) + return "serviceLevelObjective." + error; + } return null; }; /** - * Creates a ListUptimeCheckConfigsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @returns {google.monitoring.v3.CreateServiceLevelObjectiveRequest} CreateServiceLevelObjectiveRequest */ - ListUptimeCheckConfigsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListUptimeCheckConfigsRequest) + CreateServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest) return object; - var message = new $root.google.monitoring.v3.ListUptimeCheckConfigsRequest(); + var message = new $root.google.monitoring.v3.CreateServiceLevelObjectiveRequest(); 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.serviceLevelObjectiveId != null) + message.serviceLevelObjectiveId = String(object.serviceLevelObjectiveId); + if (object.serviceLevelObjective != null) { + if (typeof object.serviceLevelObjective !== "object") + throw TypeError(".google.monitoring.v3.CreateServiceLevelObjectiveRequest.serviceLevelObjective: object expected"); + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjective); + } return message; }; /** - * Creates a plain object from a ListUptimeCheckConfigsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateServiceLevelObjectiveRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.ListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest + * @param {google.monitoring.v3.CreateServiceLevelObjectiveRequest} message CreateServiceLevelObjectiveRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListUptimeCheckConfigsRequest.toObject = function toObject(message, options) { + CreateServiceLevelObjectiveRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.serviceLevelObjective = null; + object.serviceLevelObjectiveId = ""; } 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.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + object.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjective, options); + if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + object.serviceLevelObjectiveId = message.serviceLevelObjectiveId; return object; }; /** - * Converts this ListUptimeCheckConfigsRequest to JSON. + * Converts this CreateServiceLevelObjectiveRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest * @instance * @returns {Object.} JSON object */ - ListUptimeCheckConfigsRequest.prototype.toJSON = function toJSON() { + CreateServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListUptimeCheckConfigsRequest; + return CreateServiceLevelObjectiveRequest; })(); - v3.ListUptimeCheckConfigsResponse = (function() { + v3.GetServiceLevelObjectiveRequest = (function() { /** - * Properties of a ListUptimeCheckConfigsResponse. + * Properties of a GetServiceLevelObjectiveRequest. * @memberof google.monitoring.v3 - * @interface IListUptimeCheckConfigsResponse - * @property {Array.|null} [uptimeCheckConfigs] ListUptimeCheckConfigsResponse uptimeCheckConfigs - * @property {string|null} [nextPageToken] ListUptimeCheckConfigsResponse nextPageToken - * @property {number|null} [totalSize] ListUptimeCheckConfigsResponse totalSize + * @interface IGetServiceLevelObjectiveRequest + * @property {string|null} [name] GetServiceLevelObjectiveRequest name + * @property {google.monitoring.v3.ServiceLevelObjective.View|null} [view] GetServiceLevelObjectiveRequest view */ /** - * Constructs a new ListUptimeCheckConfigsResponse. + * Constructs a new GetServiceLevelObjectiveRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListUptimeCheckConfigsResponse. - * @implements IListUptimeCheckConfigsResponse + * @classdesc Represents a GetServiceLevelObjectiveRequest. + * @implements IGetServiceLevelObjectiveRequest * @constructor - * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse=} [properties] Properties to set + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest=} [properties] Properties to set */ - function ListUptimeCheckConfigsResponse(properties) { - this.uptimeCheckConfigs = []; + function GetServiceLevelObjectiveRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23598,104 +22234,88 @@ } /** - * ListUptimeCheckConfigsResponse uptimeCheckConfigs. - * @member {Array.} uptimeCheckConfigs - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse - * @instance - */ - ListUptimeCheckConfigsResponse.prototype.uptimeCheckConfigs = $util.emptyArray; - - /** - * ListUptimeCheckConfigsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * GetServiceLevelObjectiveRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @instance */ - ListUptimeCheckConfigsResponse.prototype.nextPageToken = ""; + GetServiceLevelObjectiveRequest.prototype.name = ""; /** - * ListUptimeCheckConfigsResponse totalSize. - * @member {number} totalSize - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * GetServiceLevelObjectiveRequest view. + * @member {google.monitoring.v3.ServiceLevelObjective.View} view + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @instance */ - ListUptimeCheckConfigsResponse.prototype.totalSize = 0; + GetServiceLevelObjectiveRequest.prototype.view = 0; /** - * Creates a new ListUptimeCheckConfigsResponse instance using the specified properties. + * Creates a new GetServiceLevelObjectiveRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse instance + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest instance */ - ListUptimeCheckConfigsResponse.create = function create(properties) { - return new ListUptimeCheckConfigsResponse(properties); + GetServiceLevelObjectiveRequest.create = function create(properties) { + return new GetServiceLevelObjectiveRequest(properties); }; /** - * Encodes the specified ListUptimeCheckConfigsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * Encodes the specified GetServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse message or plain object to encode + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListUptimeCheckConfigsResponse.encode = function encode(message, writer) { + GetServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uptimeCheckConfigs != null && message.uptimeCheckConfigs.length) - for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) - $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfigs[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.totalSize != null && message.hasOwnProperty("totalSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified ListUptimeCheckConfigsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * Encodes the specified GetServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetServiceLevelObjectiveRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse message or plain object to encode + * @param {google.monitoring.v3.IGetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListUptimeCheckConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer. + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListUptimeCheckConfigsResponse.decode = function decode(reader, length) { + GetServiceLevelObjectiveRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckConfigsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetServiceLevelObjectiveRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.uptimeCheckConfigs && message.uptimeCheckConfigs.length)) - message.uptimeCheckConfigs = []; - message.uptimeCheckConfigs.push($root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32())); + message.name = reader.string(); break; case 2: - message.nextPageToken = reader.string(); - break; - case 3: - message.totalSize = reader.int32(); + message.view = reader.int32(); break; default: reader.skipType(tag & 7); @@ -23706,142 +22326,138 @@ }; /** - * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListUptimeCheckConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + GetServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListUptimeCheckConfigsResponse message. + * Verifies a GetServiceLevelObjectiveRequest message. * @function verify - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListUptimeCheckConfigsResponse.verify = function verify(message) { + GetServiceLevelObjectiveRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uptimeCheckConfigs != null && message.hasOwnProperty("uptimeCheckConfigs")) { - if (!Array.isArray(message.uptimeCheckConfigs)) - return "uptimeCheckConfigs: array expected"; - for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) { - var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfigs[i]); - if (error) - return "uptimeCheckConfigs." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 2: + case 1: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - if (!$util.isInteger(message.totalSize)) - return "totalSize: integer expected"; return null; }; /** - * Creates a ListUptimeCheckConfigsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @returns {google.monitoring.v3.GetServiceLevelObjectiveRequest} GetServiceLevelObjectiveRequest */ - ListUptimeCheckConfigsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListUptimeCheckConfigsResponse) + GetServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetServiceLevelObjectiveRequest) return object; - var message = new $root.google.monitoring.v3.ListUptimeCheckConfigsResponse(); - if (object.uptimeCheckConfigs) { - if (!Array.isArray(object.uptimeCheckConfigs)) - throw TypeError(".google.monitoring.v3.ListUptimeCheckConfigsResponse.uptimeCheckConfigs: array expected"); - message.uptimeCheckConfigs = []; - for (var i = 0; i < object.uptimeCheckConfigs.length; ++i) { - if (typeof object.uptimeCheckConfigs[i] !== "object") - throw TypeError(".google.monitoring.v3.ListUptimeCheckConfigsResponse.uptimeCheckConfigs: object expected"); - message.uptimeCheckConfigs[i] = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfigs[i]); - } + var message = new $root.google.monitoring.v3.GetServiceLevelObjectiveRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + case "VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "EXPLICIT": + case 1: + message.view = 1; + break; } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.totalSize != null) - message.totalSize = object.totalSize | 0; return message; }; /** - * Creates a plain object from a ListUptimeCheckConfigsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetServiceLevelObjectiveRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.ListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse + * @param {google.monitoring.v3.GetServiceLevelObjectiveRequest} message GetServiceLevelObjectiveRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListUptimeCheckConfigsResponse.toObject = function toObject(message, options) { + GetServiceLevelObjectiveRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uptimeCheckConfigs = []; if (options.defaults) { - object.nextPageToken = ""; - object.totalSize = 0; - } - if (message.uptimeCheckConfigs && message.uptimeCheckConfigs.length) { - object.uptimeCheckConfigs = []; - for (var j = 0; j < message.uptimeCheckConfigs.length; ++j) - object.uptimeCheckConfigs[j] = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfigs[j], options); + object.name = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.totalSize != null && message.hasOwnProperty("totalSize")) - object.totalSize = message.totalSize; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; return object; }; /** - * Converts this ListUptimeCheckConfigsResponse to JSON. + * Converts this GetServiceLevelObjectiveRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest * @instance * @returns {Object.} JSON object */ - ListUptimeCheckConfigsResponse.prototype.toJSON = function toJSON() { + GetServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListUptimeCheckConfigsResponse; + return GetServiceLevelObjectiveRequest; })(); - v3.GetUptimeCheckConfigRequest = (function() { + v3.ListServiceLevelObjectivesRequest = (function() { /** - * Properties of a GetUptimeCheckConfigRequest. + * Properties of a ListServiceLevelObjectivesRequest. * @memberof google.monitoring.v3 - * @interface IGetUptimeCheckConfigRequest - * @property {string|null} [name] GetUptimeCheckConfigRequest name + * @interface IListServiceLevelObjectivesRequest + * @property {string|null} [parent] ListServiceLevelObjectivesRequest parent + * @property {string|null} [filter] ListServiceLevelObjectivesRequest filter + * @property {number|null} [pageSize] ListServiceLevelObjectivesRequest pageSize + * @property {string|null} [pageToken] ListServiceLevelObjectivesRequest pageToken + * @property {google.monitoring.v3.ServiceLevelObjective.View|null} [view] ListServiceLevelObjectivesRequest view */ /** - * Constructs a new GetUptimeCheckConfigRequest. + * Constructs a new ListServiceLevelObjectivesRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a GetUptimeCheckConfigRequest. - * @implements IGetUptimeCheckConfigRequest + * @classdesc Represents a ListServiceLevelObjectivesRequest. + * @implements IListServiceLevelObjectivesRequest * @constructor - * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest=} [properties] Properties to set */ - function GetUptimeCheckConfigRequest(properties) { + function ListServiceLevelObjectivesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23849,75 +22465,127 @@ } /** - * GetUptimeCheckConfigRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * ListServiceLevelObjectivesRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @instance */ - GetUptimeCheckConfigRequest.prototype.name = ""; + ListServiceLevelObjectivesRequest.prototype.parent = ""; /** - * Creates a new GetUptimeCheckConfigRequest instance using the specified properties. + * ListServiceLevelObjectivesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.filter = ""; + + /** + * ListServiceLevelObjectivesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.pageSize = 0; + + /** + * ListServiceLevelObjectivesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.pageToken = ""; + + /** + * ListServiceLevelObjectivesRequest view. + * @member {google.monitoring.v3.ServiceLevelObjective.View} view + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @instance + */ + ListServiceLevelObjectivesRequest.prototype.view = 0; + + /** + * Creates a new ListServiceLevelObjectivesRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static - * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest instance + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest instance */ - GetUptimeCheckConfigRequest.create = function create(properties) { - return new GetUptimeCheckConfigRequest(properties); + ListServiceLevelObjectivesRequest.create = function create(properties) { + return new ListServiceLevelObjectivesRequest(properties); }; /** - * Encodes the specified GetUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified ListServiceLevelObjectivesRequest message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static - * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetUptimeCheckConfigRequest.encode = function encode(message, writer) { + ListServiceLevelObjectivesRequest.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.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); return writer; }; /** - * Encodes the specified GetUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified ListServiceLevelObjectivesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static - * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListServiceLevelObjectivesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer. + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetUptimeCheckConfigRequest.decode = function decode(reader, length) { + ListServiceLevelObjectivesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetUptimeCheckConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServiceLevelObjectivesRequest(); 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.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + case 5: + message.view = reader.int32(); break; default: reader.skipType(tag & 7); @@ -23928,108 +22596,160 @@ }; /** - * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListServiceLevelObjectivesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListServiceLevelObjectivesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetUptimeCheckConfigRequest message. + * Verifies a ListServiceLevelObjectivesRequest message. * @function verify - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetUptimeCheckConfigRequest.verify = function verify(message) { + ListServiceLevelObjectivesRequest.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.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 2: + case 1: + break; + } return null; }; /** - * Creates a GetUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListServiceLevelObjectivesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @returns {google.monitoring.v3.ListServiceLevelObjectivesRequest} ListServiceLevelObjectivesRequest */ - GetUptimeCheckConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetUptimeCheckConfigRequest) + ListServiceLevelObjectivesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServiceLevelObjectivesRequest) return object; - var message = new $root.google.monitoring.v3.GetUptimeCheckConfigRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.monitoring.v3.ListServiceLevelObjectivesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + 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); + switch (object.view) { + case "VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "EXPLICIT": + case 1: + message.view = 1; + break; + } return message; }; /** - * Creates a plain object from a GetUptimeCheckConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListServiceLevelObjectivesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @static - * @param {google.monitoring.v3.GetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest + * @param {google.monitoring.v3.ListServiceLevelObjectivesRequest} message ListServiceLevelObjectivesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetUptimeCheckConfigRequest.toObject = function toObject(message, options) { + ListServiceLevelObjectivesRequest.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.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.view = options.enums === String ? "VIEW_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + 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.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; return object; }; /** - * Converts this GetUptimeCheckConfigRequest to JSON. + * Converts this ListServiceLevelObjectivesRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest * @instance * @returns {Object.} JSON object */ - GetUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + ListServiceLevelObjectivesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetUptimeCheckConfigRequest; + return ListServiceLevelObjectivesRequest; })(); - v3.CreateUptimeCheckConfigRequest = (function() { + v3.ListServiceLevelObjectivesResponse = (function() { /** - * Properties of a CreateUptimeCheckConfigRequest. + * Properties of a ListServiceLevelObjectivesResponse. * @memberof google.monitoring.v3 - * @interface ICreateUptimeCheckConfigRequest - * @property {string|null} [parent] CreateUptimeCheckConfigRequest parent - * @property {google.monitoring.v3.IUptimeCheckConfig|null} [uptimeCheckConfig] CreateUptimeCheckConfigRequest uptimeCheckConfig + * @interface IListServiceLevelObjectivesResponse + * @property {Array.|null} [serviceLevelObjectives] ListServiceLevelObjectivesResponse serviceLevelObjectives + * @property {string|null} [nextPageToken] ListServiceLevelObjectivesResponse nextPageToken */ /** - * Constructs a new CreateUptimeCheckConfigRequest. + * Constructs a new ListServiceLevelObjectivesResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateUptimeCheckConfigRequest. - * @implements ICreateUptimeCheckConfigRequest + * @classdesc Represents a ListServiceLevelObjectivesResponse. + * @implements IListServiceLevelObjectivesResponse * @constructor - * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse=} [properties] Properties to set */ - function CreateUptimeCheckConfigRequest(properties) { + function ListServiceLevelObjectivesResponse(properties) { + this.serviceLevelObjectives = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24037,88 +22757,91 @@ } /** - * CreateUptimeCheckConfigRequest parent. - * @member {string} parent - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * ListServiceLevelObjectivesResponse serviceLevelObjectives. + * @member {Array.} serviceLevelObjectives + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @instance */ - CreateUptimeCheckConfigRequest.prototype.parent = ""; + ListServiceLevelObjectivesResponse.prototype.serviceLevelObjectives = $util.emptyArray; /** - * CreateUptimeCheckConfigRequest uptimeCheckConfig. - * @member {google.monitoring.v3.IUptimeCheckConfig|null|undefined} uptimeCheckConfig - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * ListServiceLevelObjectivesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @instance */ - CreateUptimeCheckConfigRequest.prototype.uptimeCheckConfig = null; + ListServiceLevelObjectivesResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateUptimeCheckConfigRequest instance using the specified properties. + * Creates a new ListServiceLevelObjectivesResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static - * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest instance + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse instance */ - CreateUptimeCheckConfigRequest.create = function create(properties) { - return new CreateUptimeCheckConfigRequest(properties); + ListServiceLevelObjectivesResponse.create = function create(properties) { + return new ListServiceLevelObjectivesResponse(properties); }; /** - * Encodes the specified CreateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified ListServiceLevelObjectivesResponse message. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static - * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateUptimeCheckConfigRequest.encode = function encode(message, writer) { + ListServiceLevelObjectivesResponse.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) - $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serviceLevelObjectives != null && message.serviceLevelObjectives.length) + for (var i = 0; i < message.serviceLevelObjectives.length; ++i) + $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjectives[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 CreateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified ListServiceLevelObjectivesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListServiceLevelObjectivesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static - * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListServiceLevelObjectivesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer. + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateUptimeCheckConfigRequest.decode = function decode(reader, length) { + ListServiceLevelObjectivesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateUptimeCheckConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListServiceLevelObjectivesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.serviceLevelObjectives && message.serviceLevelObjectives.length)) + message.serviceLevelObjectives = []; + message.serviceLevelObjectives.push($root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32())); break; case 2: - message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -24129,122 +22852,134 @@ }; /** - * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a ListServiceLevelObjectivesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + ListServiceLevelObjectivesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateUptimeCheckConfigRequest message. + * Verifies a ListServiceLevelObjectivesResponse message. * @function verify - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateUptimeCheckConfigRequest.verify = function verify(message) { + ListServiceLevelObjectivesResponse.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) { - var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfig); - if (error) - return "uptimeCheckConfig." + error; + if (message.serviceLevelObjectives != null && message.hasOwnProperty("serviceLevelObjectives")) { + if (!Array.isArray(message.serviceLevelObjectives)) + return "serviceLevelObjectives: array expected"; + for (var i = 0; i < message.serviceLevelObjectives.length; ++i) { + var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjectives[i]); + if (error) + return "serviceLevelObjectives." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListServiceLevelObjectivesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @returns {google.monitoring.v3.ListServiceLevelObjectivesResponse} ListServiceLevelObjectivesResponse */ - CreateUptimeCheckConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateUptimeCheckConfigRequest) + ListServiceLevelObjectivesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListServiceLevelObjectivesResponse) return object; - var message = new $root.google.monitoring.v3.CreateUptimeCheckConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.uptimeCheckConfig != null) { - if (typeof object.uptimeCheckConfig !== "object") - throw TypeError(".google.monitoring.v3.CreateUptimeCheckConfigRequest.uptimeCheckConfig: object expected"); - message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfig); + var message = new $root.google.monitoring.v3.ListServiceLevelObjectivesResponse(); + if (object.serviceLevelObjectives) { + if (!Array.isArray(object.serviceLevelObjectives)) + throw TypeError(".google.monitoring.v3.ListServiceLevelObjectivesResponse.serviceLevelObjectives: array expected"); + message.serviceLevelObjectives = []; + for (var i = 0; i < object.serviceLevelObjectives.length; ++i) { + if (typeof object.serviceLevelObjectives[i] !== "object") + throw TypeError(".google.monitoring.v3.ListServiceLevelObjectivesResponse.serviceLevelObjectives: object expected"); + message.serviceLevelObjectives[i] = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjectives[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListServiceLevelObjectivesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @static - * @param {google.monitoring.v3.CreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest + * @param {google.monitoring.v3.ListServiceLevelObjectivesResponse} message ListServiceLevelObjectivesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateUptimeCheckConfigRequest.toObject = function toObject(message, options) { + ListServiceLevelObjectivesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.uptimeCheckConfig = null; + if (options.arrays || options.defaults) + object.serviceLevelObjectives = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.serviceLevelObjectives && message.serviceLevelObjectives.length) { + object.serviceLevelObjectives = []; + for (var j = 0; j < message.serviceLevelObjectives.length; ++j) + object.serviceLevelObjectives[j] = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjectives[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) - object.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfig, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateUptimeCheckConfigRequest to JSON. + * Converts this ListServiceLevelObjectivesResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse * @instance * @returns {Object.} JSON object */ - CreateUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + ListServiceLevelObjectivesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateUptimeCheckConfigRequest; + return ListServiceLevelObjectivesResponse; })(); - v3.UpdateUptimeCheckConfigRequest = (function() { + v3.UpdateServiceLevelObjectiveRequest = (function() { /** - * Properties of an UpdateUptimeCheckConfigRequest. + * Properties of an UpdateServiceLevelObjectiveRequest. * @memberof google.monitoring.v3 - * @interface IUpdateUptimeCheckConfigRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUptimeCheckConfigRequest updateMask - * @property {google.monitoring.v3.IUptimeCheckConfig|null} [uptimeCheckConfig] UpdateUptimeCheckConfigRequest uptimeCheckConfig + * @interface IUpdateServiceLevelObjectiveRequest + * @property {google.monitoring.v3.IServiceLevelObjective|null} [serviceLevelObjective] UpdateServiceLevelObjectiveRequest serviceLevelObjective + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServiceLevelObjectiveRequest updateMask */ /** - * Constructs a new UpdateUptimeCheckConfigRequest. + * Constructs a new UpdateServiceLevelObjectiveRequest. * @memberof google.monitoring.v3 - * @classdesc Represents an UpdateUptimeCheckConfigRequest. - * @implements IUpdateUptimeCheckConfigRequest + * @classdesc Represents an UpdateServiceLevelObjectiveRequest. + * @implements IUpdateServiceLevelObjectiveRequest * @constructor - * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest=} [properties] Properties to set */ - function UpdateUptimeCheckConfigRequest(properties) { + function UpdateServiceLevelObjectiveRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24252,89 +22987,89 @@ } /** - * UpdateUptimeCheckConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * UpdateServiceLevelObjectiveRequest serviceLevelObjective. + * @member {google.monitoring.v3.IServiceLevelObjective|null|undefined} serviceLevelObjective + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @instance */ - UpdateUptimeCheckConfigRequest.prototype.updateMask = null; + UpdateServiceLevelObjectiveRequest.prototype.serviceLevelObjective = null; /** - * UpdateUptimeCheckConfigRequest uptimeCheckConfig. - * @member {google.monitoring.v3.IUptimeCheckConfig|null|undefined} uptimeCheckConfig - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * UpdateServiceLevelObjectiveRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @instance */ - UpdateUptimeCheckConfigRequest.prototype.uptimeCheckConfig = null; + UpdateServiceLevelObjectiveRequest.prototype.updateMask = null; /** - * Creates a new UpdateUptimeCheckConfigRequest instance using the specified properties. + * Creates a new UpdateServiceLevelObjectiveRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest instance + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest instance */ - UpdateUptimeCheckConfigRequest.create = function create(properties) { - return new UpdateUptimeCheckConfigRequest(properties); + UpdateServiceLevelObjectiveRequest.create = function create(properties) { + return new UpdateServiceLevelObjectiveRequest(properties); }; /** - * Encodes the specified UpdateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified UpdateServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateUptimeCheckConfigRequest.encode = function encode(message, writer) { + UpdateServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) - $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified UpdateServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateServiceLevelObjectiveRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IUpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer. + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateUptimeCheckConfigRequest.decode = function decode(reader, length) { + UpdateServiceLevelObjectiveRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); + break; case 2: message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; - case 3: - message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -24344,126 +23079,126 @@ }; /** - * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateUptimeCheckConfigRequest message. + * Verifies an UpdateServiceLevelObjectiveRequest message. * @function verify - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateUptimeCheckConfigRequest.verify = function verify(message) { + UpdateServiceLevelObjectiveRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) { + var error = $root.google.monitoring.v3.ServiceLevelObjective.verify(message.serviceLevelObjective); + if (error) + return "serviceLevelObjective." + error; + } if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) return "updateMask." + error; } - if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) { - var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfig); - if (error) - return "uptimeCheckConfig." + error; - } return null; }; /** - * Creates an UpdateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest + * @returns {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} UpdateServiceLevelObjectiveRequest */ - UpdateUptimeCheckConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest) + UpdateServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest) return object; - var message = new $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest(); + var message = new $root.google.monitoring.v3.UpdateServiceLevelObjectiveRequest(); + if (object.serviceLevelObjective != null) { + if (typeof object.serviceLevelObjective !== "object") + throw TypeError(".google.monitoring.v3.UpdateServiceLevelObjectiveRequest.serviceLevelObjective: object expected"); + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.fromObject(object.serviceLevelObjective); + } if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.monitoring.v3.UpdateUptimeCheckConfigRequest.updateMask: object expected"); + throw TypeError(".google.monitoring.v3.UpdateServiceLevelObjectiveRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.uptimeCheckConfig != null) { - if (typeof object.uptimeCheckConfig !== "object") - throw TypeError(".google.monitoring.v3.UpdateUptimeCheckConfigRequest.uptimeCheckConfig: object expected"); - message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfig); - } return message; }; /** - * Creates a plain object from an UpdateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateServiceLevelObjectiveRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.UpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest + * @param {google.monitoring.v3.UpdateServiceLevelObjectiveRequest} message UpdateServiceLevelObjectiveRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateUptimeCheckConfigRequest.toObject = function toObject(message, options) { + UpdateServiceLevelObjectiveRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.serviceLevelObjective = null; object.updateMask = null; - object.uptimeCheckConfig = null; } + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + object.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.toObject(message.serviceLevelObjective, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) - object.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfig, options); return object; }; /** - * Converts this UpdateUptimeCheckConfigRequest to JSON. + * Converts this UpdateServiceLevelObjectiveRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest * @instance * @returns {Object.} JSON object */ - UpdateUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + UpdateServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateUptimeCheckConfigRequest; + return UpdateServiceLevelObjectiveRequest; })(); - v3.DeleteUptimeCheckConfigRequest = (function() { + v3.DeleteServiceLevelObjectiveRequest = (function() { /** - * Properties of a DeleteUptimeCheckConfigRequest. + * Properties of a DeleteServiceLevelObjectiveRequest. * @memberof google.monitoring.v3 - * @interface IDeleteUptimeCheckConfigRequest - * @property {string|null} [name] DeleteUptimeCheckConfigRequest name + * @interface IDeleteServiceLevelObjectiveRequest + * @property {string|null} [name] DeleteServiceLevelObjectiveRequest name */ /** - * Constructs a new DeleteUptimeCheckConfigRequest. + * Constructs a new DeleteServiceLevelObjectiveRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteUptimeCheckConfigRequest. - * @implements IDeleteUptimeCheckConfigRequest + * @classdesc Represents a DeleteServiceLevelObjectiveRequest. + * @implements IDeleteServiceLevelObjectiveRequest * @constructor - * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest=} [properties] Properties to set */ - function DeleteUptimeCheckConfigRequest(properties) { + function DeleteServiceLevelObjectiveRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24471,35 +23206,35 @@ } /** - * DeleteUptimeCheckConfigRequest name. + * DeleteServiceLevelObjectiveRequest name. * @member {string} name - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @instance */ - DeleteUptimeCheckConfigRequest.prototype.name = ""; + DeleteServiceLevelObjectiveRequest.prototype.name = ""; /** - * Creates a new DeleteUptimeCheckConfigRequest instance using the specified properties. + * Creates a new DeleteServiceLevelObjectiveRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest instance + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest instance */ - DeleteUptimeCheckConfigRequest.create = function create(properties) { - return new DeleteUptimeCheckConfigRequest(properties); + DeleteServiceLevelObjectiveRequest.create = function create(properties) { + return new DeleteServiceLevelObjectiveRequest(properties); }; /** - * Encodes the specified DeleteUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified DeleteServiceLevelObjectiveRequest message. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteUptimeCheckConfigRequest.encode = function encode(message, writer) { + DeleteServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -24508,33 +23243,33 @@ }; /** - * Encodes the specified DeleteUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * Encodes the specified DeleteServiceLevelObjectiveRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteServiceLevelObjectiveRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param {google.monitoring.v3.IDeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteServiceLevelObjectiveRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer. + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteUptimeCheckConfigRequest.decode = function decode(reader, length) { + DeleteServiceLevelObjectiveRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -24550,30 +23285,30 @@ }; /** - * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteServiceLevelObjectiveRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteServiceLevelObjectiveRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteUptimeCheckConfigRequest message. + * Verifies a DeleteServiceLevelObjectiveRequest message. * @function verify - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteUptimeCheckConfigRequest.verify = function verify(message) { + DeleteServiceLevelObjectiveRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -24583,32 +23318,32 @@ }; /** - * Creates a DeleteUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteServiceLevelObjectiveRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @returns {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} DeleteServiceLevelObjectiveRequest */ - DeleteUptimeCheckConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest) + DeleteServiceLevelObjectiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest) return object; - var message = new $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest(); + var message = new $root.google.monitoring.v3.DeleteServiceLevelObjectiveRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteUptimeCheckConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteServiceLevelObjectiveRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @static - * @param {google.monitoring.v3.DeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest + * @param {google.monitoring.v3.DeleteServiceLevelObjectiveRequest} message DeleteServiceLevelObjectiveRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteUptimeCheckConfigRequest.toObject = function toObject(message, options) { + DeleteServiceLevelObjectiveRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -24620,38 +23355,37 @@ }; /** - * Converts this DeleteUptimeCheckConfigRequest to JSON. + * Converts this DeleteServiceLevelObjectiveRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest * @instance * @returns {Object.} JSON object */ - DeleteUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + DeleteServiceLevelObjectiveRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteUptimeCheckConfigRequest; + return DeleteServiceLevelObjectiveRequest; })(); - v3.ListUptimeCheckIpsRequest = (function() { + v3.SpanContext = (function() { /** - * Properties of a ListUptimeCheckIpsRequest. + * Properties of a SpanContext. * @memberof google.monitoring.v3 - * @interface IListUptimeCheckIpsRequest - * @property {number|null} [pageSize] ListUptimeCheckIpsRequest pageSize - * @property {string|null} [pageToken] ListUptimeCheckIpsRequest pageToken + * @interface ISpanContext + * @property {string|null} [spanName] SpanContext spanName */ /** - * Constructs a new ListUptimeCheckIpsRequest. + * Constructs a new SpanContext. * @memberof google.monitoring.v3 - * @classdesc Represents a ListUptimeCheckIpsRequest. - * @implements IListUptimeCheckIpsRequest + * @classdesc Represents a SpanContext. + * @implements ISpanContext * @constructor - * @param {google.monitoring.v3.IListUptimeCheckIpsRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ISpanContext=} [properties] Properties to set */ - function ListUptimeCheckIpsRequest(properties) { + function SpanContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24659,88 +23393,75 @@ } /** - * ListUptimeCheckIpsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest - * @instance - */ - ListUptimeCheckIpsRequest.prototype.pageSize = 0; - - /** - * ListUptimeCheckIpsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * SpanContext spanName. + * @member {string} spanName + * @memberof google.monitoring.v3.SpanContext * @instance */ - ListUptimeCheckIpsRequest.prototype.pageToken = ""; + SpanContext.prototype.spanName = ""; /** - * Creates a new ListUptimeCheckIpsRequest instance using the specified properties. + * Creates a new SpanContext instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static - * @param {google.monitoring.v3.IListUptimeCheckIpsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest instance + * @param {google.monitoring.v3.ISpanContext=} [properties] Properties to set + * @returns {google.monitoring.v3.SpanContext} SpanContext instance */ - ListUptimeCheckIpsRequest.create = function create(properties) { - return new ListUptimeCheckIpsRequest(properties); + SpanContext.create = function create(properties) { + return new SpanContext(properties); }; /** - * Encodes the specified ListUptimeCheckIpsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * Encodes the specified SpanContext message. Does not implicitly {@link google.monitoring.v3.SpanContext.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static - * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest message or plain object to encode + * @param {google.monitoring.v3.ISpanContext} message SpanContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListUptimeCheckIpsRequest.encode = function encode(message, writer) { + SpanContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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.spanName != null && message.hasOwnProperty("spanName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanName); return writer; }; /** - * Encodes the specified ListUptimeCheckIpsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. + * Encodes the specified SpanContext message, length delimited. Does not implicitly {@link google.monitoring.v3.SpanContext.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static - * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest message or plain object to encode + * @param {google.monitoring.v3.ISpanContext} message SpanContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListUptimeCheckIpsRequest.encodeDelimited = function encodeDelimited(message, writer) { + SpanContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer. + * Decodes a SpanContext message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest + * @returns {google.monitoring.v3.SpanContext} SpanContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListUptimeCheckIpsRequest.decode = function decode(reader, length) { + SpanContext.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckIpsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.SpanContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); + case 1: + message.spanName = reader.string(); break; default: reader.skipType(tag & 7); @@ -24751,341 +23472,121 @@ }; /** - * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer, length delimited. + * Decodes a SpanContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest + * @returns {google.monitoring.v3.SpanContext} SpanContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListUptimeCheckIpsRequest.decodeDelimited = function decodeDelimited(reader) { + SpanContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListUptimeCheckIpsRequest message. + * Verifies a SpanContext message. * @function verify - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListUptimeCheckIpsRequest.verify = function verify(message) { + SpanContext.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.spanName != null && message.hasOwnProperty("spanName")) + if (!$util.isString(message.spanName)) + return "spanName: string expected"; return null; }; /** - * Creates a ListUptimeCheckIpsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SpanContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest + * @returns {google.monitoring.v3.SpanContext} SpanContext */ - ListUptimeCheckIpsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListUptimeCheckIpsRequest) + SpanContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.SpanContext) return object; - var message = new $root.google.monitoring.v3.ListUptimeCheckIpsRequest(); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.monitoring.v3.SpanContext(); + if (object.spanName != null) + message.spanName = String(object.spanName); return message; }; /** - * Creates a plain object from a ListUptimeCheckIpsRequest message. Also converts values to other types if specified. + * Creates a plain object from a SpanContext message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @static - * @param {google.monitoring.v3.ListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest + * @param {google.monitoring.v3.SpanContext} message SpanContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListUptimeCheckIpsRequest.toObject = function toObject(message, options) { + SpanContext.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.spanName = ""; + if (message.spanName != null && message.hasOwnProperty("spanName")) + object.spanName = message.spanName; return object; }; /** - * Converts this ListUptimeCheckIpsRequest to JSON. + * Converts this SpanContext to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @memberof google.monitoring.v3.SpanContext * @instance * @returns {Object.} JSON object */ - ListUptimeCheckIpsRequest.prototype.toJSON = function toJSON() { + SpanContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListUptimeCheckIpsRequest; + return SpanContext; })(); - v3.ListUptimeCheckIpsResponse = (function() { + /** + * UptimeCheckRegion enum. + * @name google.monitoring.v3.UptimeCheckRegion + * @enum {string} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} USA=1 USA value + * @property {number} EUROPE=2 EUROPE value + * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value + * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + */ + v3.UptimeCheckRegion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USA"] = 1; + values[valuesById[2] = "EUROPE"] = 2; + values[valuesById[3] = "SOUTH_AMERICA"] = 3; + values[valuesById[4] = "ASIA_PACIFIC"] = 4; + return values; + })(); + + v3.InternalChecker = (function() { /** - * Properties of a ListUptimeCheckIpsResponse. + * Properties of an InternalChecker. * @memberof google.monitoring.v3 - * @interface IListUptimeCheckIpsResponse - * @property {Array.|null} [uptimeCheckIps] ListUptimeCheckIpsResponse uptimeCheckIps - * @property {string|null} [nextPageToken] ListUptimeCheckIpsResponse nextPageToken - */ - - /** - * Constructs a new ListUptimeCheckIpsResponse. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListUptimeCheckIpsResponse. - * @implements IListUptimeCheckIpsResponse - * @constructor - * @param {google.monitoring.v3.IListUptimeCheckIpsResponse=} [properties] Properties to set - */ - function ListUptimeCheckIpsResponse(properties) { - this.uptimeCheckIps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUptimeCheckIpsResponse uptimeCheckIps. - * @member {Array.} uptimeCheckIps - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @instance - */ - ListUptimeCheckIpsResponse.prototype.uptimeCheckIps = $util.emptyArray; - - /** - * ListUptimeCheckIpsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @instance - */ - ListUptimeCheckIpsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUptimeCheckIpsResponse instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {google.monitoring.v3.IListUptimeCheckIpsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse instance - */ - ListUptimeCheckIpsResponse.create = function create(properties) { - return new ListUptimeCheckIpsResponse(properties); - }; - - /** - * Encodes the specified ListUptimeCheckIpsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {google.monitoring.v3.IListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUptimeCheckIpsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uptimeCheckIps != null && message.uptimeCheckIps.length) - for (var i = 0; i < message.uptimeCheckIps.length; ++i) - $root.google.monitoring.v3.UptimeCheckIp.encode(message.uptimeCheckIps[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 ListUptimeCheckIpsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {google.monitoring.v3.IListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUptimeCheckIpsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUptimeCheckIpsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckIpsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.uptimeCheckIps && message.uptimeCheckIps.length)) - message.uptimeCheckIps = []; - message.uptimeCheckIps.push($root.google.monitoring.v3.UptimeCheckIp.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUptimeCheckIpsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUptimeCheckIpsResponse message. - * @function verify - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUptimeCheckIpsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uptimeCheckIps != null && message.hasOwnProperty("uptimeCheckIps")) { - if (!Array.isArray(message.uptimeCheckIps)) - return "uptimeCheckIps: array expected"; - for (var i = 0; i < message.uptimeCheckIps.length; ++i) { - var error = $root.google.monitoring.v3.UptimeCheckIp.verify(message.uptimeCheckIps[i]); - if (error) - return "uptimeCheckIps." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUptimeCheckIpsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse - */ - ListUptimeCheckIpsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListUptimeCheckIpsResponse) - return object; - var message = new $root.google.monitoring.v3.ListUptimeCheckIpsResponse(); - if (object.uptimeCheckIps) { - if (!Array.isArray(object.uptimeCheckIps)) - throw TypeError(".google.monitoring.v3.ListUptimeCheckIpsResponse.uptimeCheckIps: array expected"); - message.uptimeCheckIps = []; - for (var i = 0; i < object.uptimeCheckIps.length; ++i) { - if (typeof object.uptimeCheckIps[i] !== "object") - throw TypeError(".google.monitoring.v3.ListUptimeCheckIpsResponse.uptimeCheckIps: object expected"); - message.uptimeCheckIps[i] = $root.google.monitoring.v3.UptimeCheckIp.fromObject(object.uptimeCheckIps[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUptimeCheckIpsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @static - * @param {google.monitoring.v3.ListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUptimeCheckIpsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uptimeCheckIps = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.uptimeCheckIps && message.uptimeCheckIps.length) { - object.uptimeCheckIps = []; - for (var j = 0; j < message.uptimeCheckIps.length; ++j) - object.uptimeCheckIps[j] = $root.google.monitoring.v3.UptimeCheckIp.toObject(message.uptimeCheckIps[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUptimeCheckIpsResponse to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse - * @instance - * @returns {Object.} JSON object - */ - ListUptimeCheckIpsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListUptimeCheckIpsResponse; - })(); - - v3.InternalChecker = (function() { - - /** - * Properties of an InternalChecker. - * @memberof google.monitoring.v3 - * @interface IInternalChecker - * @property {string|null} [name] InternalChecker name - * @property {string|null} [displayName] InternalChecker displayName - * @property {string|null} [network] InternalChecker network - * @property {string|null} [gcpZone] InternalChecker gcpZone - * @property {string|null} [peerProjectId] InternalChecker peerProjectId - * @property {google.monitoring.v3.InternalChecker.State|null} [state] InternalChecker state + * @interface IInternalChecker + * @property {string|null} [name] InternalChecker name + * @property {string|null} [displayName] InternalChecker displayName + * @property {string|null} [network] InternalChecker network + * @property {string|null} [gcpZone] InternalChecker gcpZone + * @property {string|null} [peerProjectId] InternalChecker peerProjectId + * @property {google.monitoring.v3.InternalChecker.State|null} [state] InternalChecker state */ /** @@ -27245,22 +25746,18 @@ })(); /** - * UptimeCheckRegion enum. - * @name google.monitoring.v3.UptimeCheckRegion + * GroupResourceType enum. + * @name google.monitoring.v3.GroupResourceType * @enum {string} - * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value - * @property {number} USA=1 USA value - * @property {number} EUROPE=2 EUROPE value - * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value - * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value */ - v3.UptimeCheckRegion = (function() { + v3.GroupResourceType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USA"] = 1; - values[valuesById[2] = "EUROPE"] = 2; - values[valuesById[3] = "SOUTH_AMERICA"] = 3; - values[valuesById[4] = "ASIA_PACIFIC"] = 4; + values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "AWS_ELB_LOAD_BALANCER"] = 2; return values; })(); @@ -27524,2028 +26021,1235 @@ return UptimeCheckIp; })(); - /** - * GroupResourceType enum. - * @name google.monitoring.v3.GroupResourceType - * @enum {string} - * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value - */ - v3.GroupResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "AWS_ELB_LOAD_BALANCER"] = 2; - return values; - })(); + v3.UptimeCheckService = (function() { - return v3; - })(); + /** + * Constructs a new UptimeCheckService service. + * @memberof google.monitoring.v3 + * @classdesc Represents an UptimeCheckService + * @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 UptimeCheckService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - return monitoring; - })(); + (UptimeCheckService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UptimeCheckService; - google.api = (function() { + /** + * Creates new UptimeCheckService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.UptimeCheckService + * @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 {UptimeCheckService} RPC service. Useful where requests and/or responses are streamed. + */ + UptimeCheckService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef ListUptimeCheckConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListUptimeCheckConfigsResponse} [response] ListUptimeCheckConfigsResponse + */ - api.Http = (function() { + /** + * Calls ListUptimeCheckConfigs. + * @function listUptimeCheckConfigs + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} request ListUptimeCheckConfigsRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.ListUptimeCheckConfigsCallback} callback Node-style callback called with the error, if any, and ListUptimeCheckConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.listUptimeCheckConfigs = function listUptimeCheckConfigs(request, callback) { + return this.rpcCall(listUptimeCheckConfigs, $root.google.monitoring.v3.ListUptimeCheckConfigsRequest, $root.google.monitoring.v3.ListUptimeCheckConfigsResponse, request, callback); + }, "name", { value: "ListUptimeCheckConfigs" }); - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * Calls ListUptimeCheckConfigs. + * @function listUptimeCheckConfigs + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} request ListUptimeCheckConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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]]; - } + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef GetUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig + */ - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + /** + * Calls GetUptimeCheckConfig. + * @function getUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} request GetUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.GetUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.getUptimeCheckConfig = function getUptimeCheckConfig(request, callback) { + return this.rpcCall(getUptimeCheckConfig, $root.google.monitoring.v3.GetUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); + }, "name", { value: "GetUptimeCheckConfig" }); - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * Calls GetUptimeCheckConfig. + * @function getUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} request GetUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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); - }; + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef CreateUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig + */ - /** - * 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; - }; + /** + * Calls CreateUptimeCheckConfig. + * @function createUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} request CreateUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.CreateUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.createUptimeCheckConfig = function createUptimeCheckConfig(request, callback) { + return this.rpcCall(createUptimeCheckConfig, $root.google.monitoring.v3.CreateUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); + }, "name", { value: "CreateUptimeCheckConfig" }); - /** - * 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(); - }; + /** + * Calls CreateUptimeCheckConfig. + * @function createUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} request CreateUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef UpdateUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.UptimeCheckConfig} [response] UptimeCheckConfig + */ - /** - * 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()); - }; + /** + * Calls UpdateUptimeCheckConfig. + * @function updateUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} request UpdateUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.UpdateUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and UptimeCheckConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.updateUptimeCheckConfig = function updateUptimeCheckConfig(request, callback) { + return this.rpcCall(updateUptimeCheckConfig, $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest, $root.google.monitoring.v3.UptimeCheckConfig, request, callback); + }, "name", { value: "UpdateUptimeCheckConfig" }); - /** - * 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; - }; + /** + * Calls UpdateUptimeCheckConfig. + * @function updateUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} request UpdateUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef DeleteUptimeCheckConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * 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; - }; + /** + * Calls DeleteUptimeCheckConfig. + * @function deleteUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} request DeleteUptimeCheckConfigRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.DeleteUptimeCheckConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.deleteUptimeCheckConfig = function deleteUptimeCheckConfig(request, callback) { + return this.rpcCall(deleteUptimeCheckConfig, $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUptimeCheckConfig" }); - /** - * 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); - }; + /** + * Calls DeleteUptimeCheckConfig. + * @function deleteUptimeCheckConfig + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} request DeleteUptimeCheckConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return Http; - })(); + /** + * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. + * @memberof google.monitoring.v3.UptimeCheckService + * @typedef ListUptimeCheckIpsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListUptimeCheckIpsResponse} [response] ListUptimeCheckIpsResponse + */ - api.HttpRule = (function() { + /** + * Calls ListUptimeCheckIps. + * @function listUptimeCheckIps + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} request ListUptimeCheckIpsRequest message or plain object + * @param {google.monitoring.v3.UptimeCheckService.ListUptimeCheckIpsCallback} callback Node-style callback called with the error, if any, and ListUptimeCheckIpsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(UptimeCheckService.prototype.listUptimeCheckIps = function listUptimeCheckIps(request, callback) { + return this.rpcCall(listUptimeCheckIps, $root.google.monitoring.v3.ListUptimeCheckIpsRequest, $root.google.monitoring.v3.ListUptimeCheckIpsResponse, request, callback); + }, "name", { value: "ListUptimeCheckIps" }); - /** - * 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 - */ + /** + * Calls ListUptimeCheckIps. + * @function listUptimeCheckIps + * @memberof google.monitoring.v3.UptimeCheckService + * @instance + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} request ListUptimeCheckIpsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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 UptimeCheckService; + })(); - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + v3.ListUptimeCheckConfigsRequest = (function() { - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; + /** + * Properties of a ListUptimeCheckConfigsRequest. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckConfigsRequest + * @property {string|null} [parent] ListUptimeCheckConfigsRequest parent + * @property {number|null} [pageSize] ListUptimeCheckConfigsRequest pageSize + * @property {string|null} [pageToken] ListUptimeCheckConfigsRequest pageToken + */ - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; + /** + * Constructs a new ListUptimeCheckConfigsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckConfigsRequest. + * @implements IListUptimeCheckConfigsRequest + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest=} [properties] Properties to set + */ + function ListUptimeCheckConfigsRequest(properties) { + if (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} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; + /** + * ListUptimeCheckConfigsRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + */ + ListUptimeCheckConfigsRequest.prototype.parent = ""; - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; + /** + * ListUptimeCheckConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + */ + ListUptimeCheckConfigsRequest.prototype.pageSize = 0; - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = ""; + /** + * ListUptimeCheckConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + */ + ListUptimeCheckConfigsRequest.prototype.pageToken = ""; - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + /** + * Creates a new ListUptimeCheckConfigsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest instance + */ + ListUptimeCheckConfigsRequest.create = function create(properties) { + return new ListUptimeCheckConfigsRequest(properties); + }; - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Encodes the specified ListUptimeCheckConfigsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * Encodes the specified ListUptimeCheckConfigsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes a ListUptimeCheckConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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) - }); + /** + * Verifies a ListUptimeCheckConfigsRequest message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckConfigsRequest.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 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 ListUptimeCheckConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckConfigsRequest} ListUptimeCheckConfigsRequest + */ + ListUptimeCheckConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckConfigsRequest) + return object; + var message = new $root.google.monitoring.v3.ListUptimeCheckConfigsRequest(); + 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; + }; - /** - * 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; - }; + /** + * Creates a plain object from a ListUptimeCheckConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {google.monitoring.v3.ListUptimeCheckConfigsRequest} message ListUptimeCheckConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckConfigsRequest.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; + }; - /** - * 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(); - }; + /** + * Converts this ListUptimeCheckConfigsRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + return ListUptimeCheckConfigsRequest; + })(); - /** - * 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()); - }; + v3.ListUptimeCheckConfigsResponse = (function() { - /** - * 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; - } + /** + * Properties of a ListUptimeCheckConfigsResponse. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckConfigsResponse + * @property {Array.|null} [uptimeCheckConfigs] ListUptimeCheckConfigsResponse uptimeCheckConfigs + * @property {string|null} [nextPageToken] ListUptimeCheckConfigsResponse nextPageToken + * @property {number|null} [totalSize] ListUptimeCheckConfigsResponse totalSize + */ + + /** + * Constructs a new ListUptimeCheckConfigsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckConfigsResponse. + * @implements IListUptimeCheckConfigsResponse + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse=} [properties] Properties to set + */ + function ListUptimeCheckConfigsResponse(properties) { + this.uptimeCheckConfigs = []; + if (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; - }; - - /** - * 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); - }; + /** + * ListUptimeCheckConfigsResponse uptimeCheckConfigs. + * @member {Array.} uptimeCheckConfigs + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + */ + ListUptimeCheckConfigsResponse.prototype.uptimeCheckConfigs = $util.emptyArray; - return HttpRule; - })(); + /** + * ListUptimeCheckConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + */ + ListUptimeCheckConfigsResponse.prototype.nextPageToken = ""; - api.CustomHttpPattern = (function() { + /** + * ListUptimeCheckConfigsResponse totalSize. + * @member {number} totalSize + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + */ + ListUptimeCheckConfigsResponse.prototype.totalSize = 0; - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ + /** + * Creates a new ListUptimeCheckConfigsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse instance + */ + ListUptimeCheckConfigsResponse.create = function create(properties) { + return new ListUptimeCheckConfigsResponse(properties); + }; - /** - * 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 ListUptimeCheckConfigsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uptimeCheckConfigs != null && message.uptimeCheckConfigs.length) + for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) + $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfigs[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.totalSize != null && message.hasOwnProperty("totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + return writer; + }; - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; + /** + * Encodes the specified ListUptimeCheckConfigsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uptimeCheckConfigs && message.uptimeCheckConfigs.length)) + message.uptimeCheckConfigs = []; + message.uptimeCheckConfigs.push($root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + message.totalSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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); - }; + /** + * Decodes a ListUptimeCheckConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; - }; + /** + * Verifies a ListUptimeCheckConfigsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uptimeCheckConfigs != null && message.hasOwnProperty("uptimeCheckConfigs")) { + if (!Array.isArray(message.uptimeCheckConfigs)) + return "uptimeCheckConfigs: array expected"; + for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfigs[i]); + if (error) + return "uptimeCheckConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + return null; + }; - /** - * 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(); - }; + /** + * Creates a ListUptimeCheckConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckConfigsResponse} ListUptimeCheckConfigsResponse + */ + ListUptimeCheckConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckConfigsResponse) + return object; + var message = new $root.google.monitoring.v3.ListUptimeCheckConfigsResponse(); + if (object.uptimeCheckConfigs) { + if (!Array.isArray(object.uptimeCheckConfigs)) + throw TypeError(".google.monitoring.v3.ListUptimeCheckConfigsResponse.uptimeCheckConfigs: array expected"); + message.uptimeCheckConfigs = []; + for (var i = 0; i < object.uptimeCheckConfigs.length; ++i) { + if (typeof object.uptimeCheckConfigs[i] !== "object") + throw TypeError(".google.monitoring.v3.ListUptimeCheckConfigsResponse.uptimeCheckConfigs: object expected"); + message.uptimeCheckConfigs[i] = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + return message; + }; - /** - * 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; + /** + * Creates a plain object from a ListUptimeCheckConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {google.monitoring.v3.ListUptimeCheckConfigsResponse} message ListUptimeCheckConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uptimeCheckConfigs = []; + if (options.defaults) { + object.nextPageToken = ""; + object.totalSize = 0; } - } - return message; - }; + if (message.uptimeCheckConfigs && message.uptimeCheckConfigs.length) { + object.uptimeCheckConfigs = []; + for (var j = 0; j < message.uptimeCheckConfigs.length; ++j) + object.uptimeCheckConfigs[j] = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + 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 ListUptimeCheckConfigsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckConfigsResponse.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 ListUptimeCheckConfigsResponse; + })(); - /** - * 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; - }; + v3.GetUptimeCheckConfigRequest = (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 GetUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface IGetUptimeCheckConfigRequest + * @property {string|null} [name] GetUptimeCheckConfigRequest name + */ - /** - * 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; - })(); + /** + * Constructs a new GetUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a GetUptimeCheckConfigRequest. + * @implements IGetUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest=} [properties] Properties to set + */ + function GetUptimeCheckConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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; - })(); + /** + * GetUptimeCheckConfigRequest name. + * @member {string} name + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @instance + */ + GetUptimeCheckConfigRequest.prototype.name = ""; - api.ResourceDescriptor = (function() { + /** + * Creates a new GetUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest instance + */ + GetUptimeCheckConfigRequest.create = function create(properties) { + return new GetUptimeCheckConfigRequest(properties); + }; - /** - * 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 - */ + /** + * Encodes the specified GetUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUptimeCheckConfigRequest.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; + }; - /** - * 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]]; - } + /** + * Encodes the specified GetUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IGetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetUptimeCheckConfigRequest(); + 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; + }; - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Decodes a GetUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Verifies a GetUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUptimeCheckConfigRequest.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; + }; - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Creates a GetUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.GetUptimeCheckConfigRequest} GetUptimeCheckConfigRequest + */ + GetUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.GetUptimeCheckConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Creates a plain object from a GetUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.GetUptimeCheckConfigRequest} message GetUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUptimeCheckConfigRequest.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; + }; - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Converts this GetUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return GetUptimeCheckConfigRequest; + })(); - /** - * 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; - }; + v3.CreateUptimeCheckConfigRequest = (function() { - /** - * 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(); - }; + /** + * Properties of a CreateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface ICreateUptimeCheckConfigRequest + * @property {string|null} [parent] CreateUptimeCheckConfigRequest parent + * @property {google.monitoring.v3.IUptimeCheckConfig|null} [uptimeCheckConfig] CreateUptimeCheckConfigRequest uptimeCheckConfig + */ - /** - * 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; - } + /** + * Constructs a new CreateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateUptimeCheckConfigRequest. + * @implements ICreateUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest=} [properties] Properties to set + */ + function CreateUptimeCheckConfigRequest(properties) { + if (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 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()); - }; + /** + * CreateUptimeCheckConfigRequest parent. + * @member {string} parent + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @instance + */ + CreateUptimeCheckConfigRequest.prototype.parent = ""; - /** - * 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; - }; + /** + * CreateUptimeCheckConfigRequest uptimeCheckConfig. + * @member {google.monitoring.v3.IUptimeCheckConfig|null|undefined} uptimeCheckConfig + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @instance + */ + CreateUptimeCheckConfigRequest.prototype.uptimeCheckConfig = 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 new CreateUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest instance + */ + CreateUptimeCheckConfigRequest.create = function create(properties) { + return new CreateUptimeCheckConfigRequest(properties); + }; - /** - * 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); - }; + /** + * Encodes the specified CreateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUptimeCheckConfigRequest.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * 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; - })(); + /** + * Encodes the specified CreateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.ICreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return ResourceDescriptor; - })(); + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateUptimeCheckConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - api.ResourceReference = (function() { + /** + * Decodes a CreateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ + /** + * Verifies a CreateUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUptimeCheckConfigRequest.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfig); + if (error) + return "uptimeCheckConfig." + error; + } + return null; + }; - /** - * 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]]; - } + /** + * Creates a CreateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateUptimeCheckConfigRequest} CreateUptimeCheckConfigRequest + */ + CreateUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.CreateUptimeCheckConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.uptimeCheckConfig != null) { + if (typeof object.uptimeCheckConfig !== "object") + throw TypeError(".google.monitoring.v3.CreateUptimeCheckConfigRequest.uptimeCheckConfig: object expected"); + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfig); + } + return message; + }; - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; + /** + * Creates a plain object from a CreateUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.CreateUptimeCheckConfigRequest} message CreateUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUptimeCheckConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.uptimeCheckConfig = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + object.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfig, options); + return object; + }; - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; + /** + * Converts this CreateUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - }; + return CreateUptimeCheckConfigRequest; + })(); - /** - * 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; - }; + v3.UpdateUptimeCheckConfigRequest = (function() { - /** - * 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(); - }; + /** + * Properties of an UpdateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface IUpdateUptimeCheckConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateUptimeCheckConfigRequest updateMask + * @property {google.monitoring.v3.IUptimeCheckConfig|null} [uptimeCheckConfig] UpdateUptimeCheckConfigRequest uptimeCheckConfig + */ - /** - * 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; - } + /** + * Constructs a new UpdateUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents an UpdateUptimeCheckConfigRequest. + * @implements IUpdateUptimeCheckConfigRequest + * @constructor + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest=} [properties] Properties to set + */ + function UpdateUptimeCheckConfigRequest(properties) { + if (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 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; - }; + /** + * UpdateUptimeCheckConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @instance + */ + UpdateUptimeCheckConfigRequest.prototype.updateMask = null; - /** - * 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); - }; + /** + * UpdateUptimeCheckConfigRequest uptimeCheckConfig. + * @member {google.monitoring.v3.IUptimeCheckConfig|null|undefined} uptimeCheckConfig + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @instance + */ + UpdateUptimeCheckConfigRequest.prototype.uptimeCheckConfig = null; - return ResourceReference; - })(); + /** + * Creates a new UpdateUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest instance + */ + UpdateUptimeCheckConfigRequest.create = function create(properties) { + return new UpdateUptimeCheckConfigRequest(properties); + }; - api.Distribution = (function() { + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUptimeCheckConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * 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(); - }; + /** + * Encodes the specified UpdateUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.UpdateUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IUpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Decodes a Range message from the specified reader or buffer. + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.Range + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest * @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.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest * @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) { + UpdateUptimeCheckConfigRequest.decode = function 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.monitoring.v3.UpdateUptimeCheckConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.min = reader.double(); - break; case 2: - message.max = reader.double(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -29556,118 +27260,126 @@ }; /** - * Decodes a Range message from the specified reader or buffer, length delimited. + * Decodes an UpdateUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.Range + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest * @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) { + UpdateUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Range message. + * Verifies an UpdateUptimeCheckConfigRequest message. * @function verify - * @memberof google.api.Distribution.Range + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest * @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) { + UpdateUptimeCheckConfigRequest.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.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) { + var error = $root.google.monitoring.v3.UptimeCheckConfig.verify(message.uptimeCheckConfig); + if (error) + return "uptimeCheckConfig." + error; + } return null; }; /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.Range + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range + * @returns {google.monitoring.v3.UpdateUptimeCheckConfigRequest} UpdateUptimeCheckConfigRequest */ - 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); + UpdateUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.UpdateUptimeCheckConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.monitoring.v3.UpdateUptimeCheckConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.uptimeCheckConfig != null) { + if (typeof object.uptimeCheckConfig !== "object") + throw TypeError(".google.monitoring.v3.UpdateUptimeCheckConfigRequest.uptimeCheckConfig: object expected"); + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.fromObject(object.uptimeCheckConfig); + } return message; }; /** - * Creates a plain object from a Range message. Also converts values to other types if specified. + * Creates a plain object from an UpdateUptimeCheckConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.Range + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest * @static - * @param {google.api.Distribution.Range} message Range + * @param {google.monitoring.v3.UpdateUptimeCheckConfigRequest} message UpdateUptimeCheckConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Range.toObject = function toObject(message, options) { + UpdateUptimeCheckConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.min = 0; - object.max = 0; + object.updateMask = null; + object.uptimeCheckConfig = null; } - 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.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + object.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.toObject(message.uptimeCheckConfig, options); return object; }; /** - * Converts this Range to JSON. + * Converts this UpdateUptimeCheckConfigRequest to JSON. * @function toJSON - * @memberof google.api.Distribution.Range + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest * @instance * @returns {Object.} JSON object */ - Range.prototype.toJSON = function toJSON() { + UpdateUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Range; + return UpdateUptimeCheckConfigRequest; })(); - Distribution.BucketOptions = (function() { + v3.DeleteUptimeCheckConfigRequest = (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 DeleteUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @interface IDeleteUptimeCheckConfigRequest + * @property {string|null} [name] DeleteUptimeCheckConfigRequest name */ /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions + * Constructs a new DeleteUptimeCheckConfigRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a DeleteUptimeCheckConfigRequest. + * @implements IDeleteUptimeCheckConfigRequest * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest=} [properties] Properties to set */ - function BucketOptions(properties) { + function DeleteUptimeCheckConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29675,115 +27387,276 @@ } /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions + * DeleteUptimeCheckConfigRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest * @instance */ - BucketOptions.prototype.linearBuckets = null; + DeleteUptimeCheckConfigRequest.prototype.name = ""; /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance + * Creates a new DeleteUptimeCheckConfigRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest instance */ - BucketOptions.prototype.exponentialBuckets = null; + DeleteUptimeCheckConfigRequest.create = function create(properties) { + return new DeleteUptimeCheckConfigRequest(properties); + }; /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions + * Encodes the specified DeleteUptimeCheckConfigRequest message. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUptimeCheckConfigRequest.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 DeleteUptimeCheckConfigRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteUptimeCheckConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.IDeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUptimeCheckConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUptimeCheckConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUptimeCheckConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest(); + 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 DeleteUptimeCheckConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUptimeCheckConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUptimeCheckConfigRequest message. + * @function verify + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUptimeCheckConfigRequest.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 DeleteUptimeCheckConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.DeleteUptimeCheckConfigRequest} DeleteUptimeCheckConfigRequest + */ + DeleteUptimeCheckConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest) + return object; + var message = new $root.google.monitoring.v3.DeleteUptimeCheckConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUptimeCheckConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {google.monitoring.v3.DeleteUptimeCheckConfigRequest} message DeleteUptimeCheckConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUptimeCheckConfigRequest.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 DeleteUptimeCheckConfigRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest * @instance + * @returns {Object.} JSON object */ - BucketOptions.prototype.explicitBuckets = null; + DeleteUptimeCheckConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return DeleteUptimeCheckConfigRequest; + })(); + + v3.ListUptimeCheckIpsRequest = (function() { /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions + * Properties of a ListUptimeCheckIpsRequest. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckIpsRequest + * @property {number|null} [pageSize] ListUptimeCheckIpsRequest pageSize + * @property {string|null} [pageToken] ListUptimeCheckIpsRequest pageToken + */ + + /** + * Constructs a new ListUptimeCheckIpsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckIpsRequest. + * @implements IListUptimeCheckIpsRequest + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest=} [properties] Properties to set + */ + function ListUptimeCheckIpsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUptimeCheckIpsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @instance */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListUptimeCheckIpsRequest.prototype.pageSize = 0; /** - * Creates a new BucketOptions instance using the specified properties. + * ListUptimeCheckIpsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @instance + */ + ListUptimeCheckIpsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUptimeCheckIpsRequest instance using the specified properties. * @function create - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest instance */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); + ListUptimeCheckIpsRequest.create = function create(properties) { + return new ListUptimeCheckIpsRequest(properties); }; /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified ListUptimeCheckIpsRequest message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. * @function encode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BucketOptions.encode = function encode(message, writer) { + ListUptimeCheckIpsRequest.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.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 BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * Encodes the specified ListUptimeCheckIpsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {google.monitoring.v3.IListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + ListUptimeCheckIpsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BucketOptions message from the specified reader or buffer. + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer. * @function decode - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @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.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest * @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) { + ListUptimeCheckIpsRequest.decode = function 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.monitoring.v3.ListUptimeCheckIpsRequest(); 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()); + message.pageSize = reader.int32(); break; case 3: - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -29794,1074 +27667,3651 @@ }; /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * Decodes a ListUptimeCheckIpsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest * @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) { + ListUptimeCheckIpsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BucketOptions message. + * Verifies a ListUptimeCheckIpsRequest message. * @function verify - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @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) { + ListUptimeCheckIpsRequest.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.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 BucketOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ListUptimeCheckIpsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @static * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @returns {google.monitoring.v3.ListUptimeCheckIpsRequest} ListUptimeCheckIpsRequest */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) + ListUptimeCheckIpsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckIpsRequest) 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.monitoring.v3.ListUptimeCheckIpsRequest(); + 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 BucketOptions message. Also converts values to other types if specified. + * Creates a plain object from a ListUptimeCheckIpsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {google.monitoring.v3.ListUptimeCheckIpsRequest} message ListUptimeCheckIpsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BucketOptions.toObject = function toObject(message, options) { + ListUptimeCheckIpsRequest.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"; + 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 BucketOptions to JSON. + * Converts this ListUptimeCheckIpsRequest to JSON. * @function toJSON - * @memberof google.api.Distribution.BucketOptions + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest * @instance * @returns {Object.} JSON object */ - BucketOptions.prototype.toJSON = function toJSON() { + ListUptimeCheckIpsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BucketOptions.Linear = (function() { + return ListUptimeCheckIpsRequest; + })(); - /** - * 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 - */ + v3.ListUptimeCheckIpsResponse = (function() { - /** - * 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]]; - } + /** + * Properties of a ListUptimeCheckIpsResponse. + * @memberof google.monitoring.v3 + * @interface IListUptimeCheckIpsResponse + * @property {Array.|null} [uptimeCheckIps] ListUptimeCheckIpsResponse uptimeCheckIps + * @property {string|null} [nextPageToken] ListUptimeCheckIpsResponse nextPageToken + */ - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; + /** + * Constructs a new ListUptimeCheckIpsResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListUptimeCheckIpsResponse. + * @implements IListUptimeCheckIpsResponse + * @constructor + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse=} [properties] Properties to set + */ + function ListUptimeCheckIpsResponse(properties) { + this.uptimeCheckIps = []; + if (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 width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; + /** + * ListUptimeCheckIpsResponse uptimeCheckIps. + * @member {Array.} uptimeCheckIps + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @instance + */ + ListUptimeCheckIpsResponse.prototype.uptimeCheckIps = $util.emptyArray; - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; + /** + * ListUptimeCheckIpsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @instance + */ + ListUptimeCheckIpsResponse.prototype.nextPageToken = ""; - /** - * 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); - }; + /** + * Creates a new ListUptimeCheckIpsResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse instance + */ + ListUptimeCheckIpsResponse.create = function create(properties) { + return new ListUptimeCheckIpsResponse(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 ListUptimeCheckIpsResponse message. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckIpsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uptimeCheckIps != null && message.uptimeCheckIps.length) + for (var i = 0; i < message.uptimeCheckIps.length; ++i) + $root.google.monitoring.v3.UptimeCheckIp.encode(message.uptimeCheckIps[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 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 ListUptimeCheckIpsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListUptimeCheckIpsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.IListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUptimeCheckIpsResponse.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; - } + /** + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckIpsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListUptimeCheckIpsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.uptimeCheckIps && message.uptimeCheckIps.length)) + message.uptimeCheckIps = []; + message.uptimeCheckIps.push($root.google.monitoring.v3.UptimeCheckIp.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + 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; - }; + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a ListUptimeCheckIpsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUptimeCheckIpsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; + /** + * Verifies a ListUptimeCheckIpsResponse message. + * @function verify + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUptimeCheckIpsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uptimeCheckIps != null && message.hasOwnProperty("uptimeCheckIps")) { + if (!Array.isArray(message.uptimeCheckIps)) + return "uptimeCheckIps: array expected"; + for (var i = 0; i < message.uptimeCheckIps.length; ++i) { + var error = $root.google.monitoring.v3.UptimeCheckIp.verify(message.uptimeCheckIps[i]); + if (error) + return "uptimeCheckIps." + error; } - 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; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUptimeCheckIpsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListUptimeCheckIpsResponse} ListUptimeCheckIpsResponse + */ + ListUptimeCheckIpsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListUptimeCheckIpsResponse) return object; - }; + var message = new $root.google.monitoring.v3.ListUptimeCheckIpsResponse(); + if (object.uptimeCheckIps) { + if (!Array.isArray(object.uptimeCheckIps)) + throw TypeError(".google.monitoring.v3.ListUptimeCheckIpsResponse.uptimeCheckIps: array expected"); + message.uptimeCheckIps = []; + for (var i = 0; i < object.uptimeCheckIps.length; ++i) { + if (typeof object.uptimeCheckIps[i] !== "object") + throw TypeError(".google.monitoring.v3.ListUptimeCheckIpsResponse.uptimeCheckIps: object expected"); + message.uptimeCheckIps[i] = $root.google.monitoring.v3.UptimeCheckIp.fromObject(object.uptimeCheckIps[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + 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 ListUptimeCheckIpsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {google.monitoring.v3.ListUptimeCheckIpsResponse} message ListUptimeCheckIpsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUptimeCheckIpsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uptimeCheckIps = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.uptimeCheckIps && message.uptimeCheckIps.length) { + object.uptimeCheckIps = []; + for (var j = 0; j < message.uptimeCheckIps.length; ++j) + object.uptimeCheckIps[j] = $root.google.monitoring.v3.UptimeCheckIp.toObject(message.uptimeCheckIps[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return Linear; - })(); + /** + * Converts this ListUptimeCheckIpsResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUptimeCheckIpsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - BucketOptions.Exponential = (function() { + return ListUptimeCheckIpsResponse; + })(); - /** - * 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 - */ + return v3; + })(); - /** - * 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 monitoring; + })(); - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; + google.api = (function() { - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; + api.ResourceDescriptor = (function() { - /** - * 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); - }; + /** + * 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 + */ - /** - * 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; - }; + /** + * 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]]; + } - /** - * 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(); - }; + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; - /** - * 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()); - }; + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; - /** - * 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; - }; + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; - /** - * 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; - }; + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; - /** - * 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; - }; + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; - /** - * 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); - }; + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; - return Exponential; - })(); + /** + * 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); + }; - BucketOptions.Explicit = (function() { + /** + * 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; + }; - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ + /** + * 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(); + }; - /** - * 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]]; + /** + * 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; + }; - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; + /** + * 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()); + }; - /** - * 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); - }; + /** + * 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; + }; - /** - * 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; - }; + /** + * 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; + }; - /** - * 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 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; + }; - /** - * 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; - }; + /** + * 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); + }; - /** - * 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 + /** + * 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.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 && 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 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 && 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.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + Explicit.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 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.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]]; + } - /** - * 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; - }; + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; - /** - * 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; - }; + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; - /** - * 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); - }; + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; - return Explicit; - })(); + /** + * 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; + }; - return BucketOptions; - })(); + /** + * 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); + }; - Distribution.Exemplar = (function() { + return HttpRule; + })(); - /** - * 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 - */ + api.CustomHttpPattern = (function() { - /** - * 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]]; - } + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ - /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.value = 0; + /** + * 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]]; + } - /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.timestamp = null; + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; - /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.attachments = $util.emptyArray; + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 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; - } + /** + * 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 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()); - }; + } + return message; + }; - /** - * 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; - }; + /** + * 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 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; - }; + /** + * 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 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); - } + /** + * 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; + }; - /** - * 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 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; + }; - return Exemplar; - })(); + /** + * 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 Distribution; + return CustomHttpPattern; + })(); + + /** + * 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.MonitoredResourceDescriptor = (function() { @@ -38237,8 +38687,8 @@ * @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 + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior */ /** @@ -38315,20 +38765,20 @@ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** * Creates a new FieldOptions instance using the specified properties. @@ -38434,6 +38884,9 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; + case 1055: + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; case 1052: if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) message[".google.api.fieldBehavior"] = []; @@ -38444,9 +38897,6 @@ } 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; @@ -38521,6 +38971,11 @@ return "uninterpretedOption." + error; } } + 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; + } if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; @@ -38537,11 +38992,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; }; @@ -38603,6 +39053,11 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + 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"]); + } if (object[".google.api.fieldBehavior"]) { if (!Array.isArray(object[".google.api.fieldBehavior"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); @@ -38636,11 +39091,6 @@ 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; }; @@ -44079,369 +44529,6 @@ return BytesValue; })(); - 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.Struct = (function() { /** @@ -45242,6 +45329,369 @@ return ListValue; })(); + 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; + })(); + return protobuf; })(); diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 22bbef149f8..e8c542d299c 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -17,156 +17,11 @@ "(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN" }, "nested": { - "AlertPolicyService": { + "AlertPolicy": { "options": { - "(google.api.default_host)": "monitoring.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + "(google.api.resource).type": "monitoring.googleapis.com/AlertPolicy", + "(google.api.resource).pattern": "*" }, - "methods": { - "ListAlertPolicies": { - "requestType": "ListAlertPoliciesRequest", - "responseType": "ListAlertPoliciesResponse", - "options": { - "(google.api.http).get": "/v3/{name=projects/*}/alertPolicies", - "(google.api.method_signature)": "name" - } - }, - "GetAlertPolicy": { - "requestType": "GetAlertPolicyRequest", - "responseType": "AlertPolicy", - "options": { - "(google.api.http).get": "/v3/{name=projects/*/alertPolicies/*}", - "(google.api.method_signature)": "name" - } - }, - "CreateAlertPolicy": { - "requestType": "CreateAlertPolicyRequest", - "responseType": "AlertPolicy", - "options": { - "(google.api.http).post": "/v3/{name=projects/*}/alertPolicies", - "(google.api.http).body": "alert_policy", - "(google.api.method_signature)": "name,alert_policy" - } - }, - "DeleteAlertPolicy": { - "requestType": "DeleteAlertPolicyRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v3/{name=projects/*/alertPolicies/*}", - "(google.api.method_signature)": "name" - } - }, - "UpdateAlertPolicy": { - "requestType": "UpdateAlertPolicyRequest", - "responseType": "AlertPolicy", - "options": { - "(google.api.http).patch": "/v3/{alert_policy.name=projects/*/alertPolicies/*}", - "(google.api.http).body": "alert_policy", - "(google.api.method_signature)": "update_mask,alert_policy" - } - } - } - }, - "CreateAlertPolicyRequest": { - "fields": { - "name": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/AlertPolicy" - } - }, - "alertPolicy": { - "type": "AlertPolicy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetAlertPolicyRequest": { - "fields": { - "name": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "monitoring.googleapis.com/AlertPolicy" - } - } - } - }, - "ListAlertPoliciesRequest": { - "fields": { - "name": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/AlertPolicy" - } - }, - "filter": { - "type": "string", - "id": 5 - }, - "orderBy": { - "type": "string", - "id": 6 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListAlertPoliciesResponse": { - "fields": { - "alertPolicies": { - "rule": "repeated", - "type": "AlertPolicy", - "id": 3 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UpdateAlertPolicyRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - }, - "alertPolicy": { - "type": "AlertPolicy", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteAlertPolicyRequest": { - "fields": { - "name": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "monitoring.googleapis.com/AlertPolicy" - } - } - } - }, - "AlertPolicy": { "fields": { "name": { "type": "string", @@ -230,6 +85,10 @@ } }, "Condition": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/AlertPolicyCondition", + "(google.api.resource).pattern": "*" + }, "oneofs": { "condition": { "oneof": [ @@ -492,109 +351,295 @@ } } }, - "GroupService": { + "AlertPolicyService": { "options": { "(google.api.default_host)": "monitoring.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" }, "methods": { - "ListGroups": { - "requestType": "ListGroupsRequest", - "responseType": "ListGroupsResponse", + "ListAlertPolicies": { + "requestType": "ListAlertPoliciesRequest", + "responseType": "ListAlertPoliciesResponse", "options": { - "(google.api.http).get": "/v3/{name=projects/*}/groups", + "(google.api.http).get": "/v3/{name=projects/*}/alertPolicies", "(google.api.method_signature)": "name" } }, - "GetGroup": { - "requestType": "GetGroupRequest", - "responseType": "Group", + "GetAlertPolicy": { + "requestType": "GetAlertPolicyRequest", + "responseType": "AlertPolicy", "options": { - "(google.api.http).get": "/v3/{name=projects/*/groups/*}", + "(google.api.http).get": "/v3/{name=projects/*/alertPolicies/*}", "(google.api.method_signature)": "name" } }, - "CreateGroup": { - "requestType": "CreateGroupRequest", - "responseType": "Group", - "options": { - "(google.api.http).post": "/v3/{name=projects/*}/groups", - "(google.api.http).body": "group", - "(google.api.method_signature)": "name,group" - } - }, - "UpdateGroup": { - "requestType": "UpdateGroupRequest", - "responseType": "Group", + "CreateAlertPolicy": { + "requestType": "CreateAlertPolicyRequest", + "responseType": "AlertPolicy", "options": { - "(google.api.http).put": "/v3/{group.name=projects/*/groups/*}", - "(google.api.http).body": "group", - "(google.api.method_signature)": "group" + "(google.api.http).post": "/v3/{name=projects/*}/alertPolicies", + "(google.api.http).body": "alert_policy", + "(google.api.method_signature)": "name,alert_policy" } }, - "DeleteGroup": { - "requestType": "DeleteGroupRequest", + "DeleteAlertPolicy": { + "requestType": "DeleteAlertPolicyRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v3/{name=projects/*/groups/*}", + "(google.api.http).delete": "/v3/{name=projects/*/alertPolicies/*}", "(google.api.method_signature)": "name" } }, - "ListGroupMembers": { - "requestType": "ListGroupMembersRequest", - "responseType": "ListGroupMembersResponse", + "UpdateAlertPolicy": { + "requestType": "UpdateAlertPolicyRequest", + "responseType": "AlertPolicy", "options": { - "(google.api.http).get": "/v3/{name=projects/*/groups/*}/members", - "(google.api.method_signature)": "name" + "(google.api.http).patch": "/v3/{alert_policy.name=projects/*/alertPolicies/*}", + "(google.api.http).body": "alert_policy", + "(google.api.method_signature)": "update_mask,alert_policy" } } } }, - "ListGroupsRequest": { - "oneofs": { - "filter": { - "oneof": [ - "childrenOfGroup", - "ancestorsOfGroup", - "descendantsOfGroup" - ] - } - }, + "CreateAlertPolicyRequest": { "fields": { "name": { "type": "string", - "id": 7, + "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/Group" + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/AlertPolicy" } }, - "childrenOfGroup": { - "type": "string", + "alertPolicy": { + "type": "AlertPolicy", "id": 2, "options": { - "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + "(google.api.field_behavior)": "REQUIRED" } - }, - "ancestorsOfGroup": { + } + } + }, + "GetAlertPolicyRequest": { + "fields": { + "name": { "type": "string", "id": 3, "options": { - "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/AlertPolicy" } - }, - "descendantsOfGroup": { + } + } + }, + "ListAlertPoliciesRequest": { + "fields": { + "name": { "type": "string", "id": 4, "options": { - "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/AlertPolicy" } }, - "pageSize": { - "type": "int32", + "filter": { + "type": "string", "id": 5 }, - "pageToken": { + "orderBy": { + "type": "string", + "id": 6 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListAlertPoliciesResponse": { + "fields": { + "alertPolicies": { + "rule": "repeated", + "type": "AlertPolicy", + "id": 3 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateAlertPolicyRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "alertPolicy": { + "type": "AlertPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteAlertPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/AlertPolicy" + } + } + } + }, + "DroppedLabels": { + "fields": { + "label": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "Group": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/Group", + "(google.api.resource).pattern": "*" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "parentName": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 5 + }, + "isCluster": { + "type": "bool", + "id": 6 + } + } + }, + "GroupService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, + "methods": { + "ListGroups": { + "requestType": "ListGroupsRequest", + "responseType": "ListGroupsResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*}/groups", + "(google.api.method_signature)": "name" + } + }, + "GetGroup": { + "requestType": "GetGroupRequest", + "responseType": "Group", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/groups/*}", + "(google.api.method_signature)": "name" + } + }, + "CreateGroup": { + "requestType": "CreateGroupRequest", + "responseType": "Group", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/groups", + "(google.api.http).body": "group", + "(google.api.method_signature)": "name,group" + } + }, + "UpdateGroup": { + "requestType": "UpdateGroupRequest", + "responseType": "Group", + "options": { + "(google.api.http).put": "/v3/{group.name=projects/*/groups/*}", + "(google.api.http).body": "group", + "(google.api.method_signature)": "group" + } + }, + "DeleteGroup": { + "requestType": "DeleteGroupRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/groups/*}", + "(google.api.method_signature)": "name" + } + }, + "ListGroupMembers": { + "requestType": "ListGroupMembersRequest", + "responseType": "ListGroupMembersResponse", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/groups/*}/members", + "(google.api.method_signature)": "name" + } + } + } + }, + "ListGroupsRequest": { + "oneofs": { + "filter": { + "oneof": [ + "childrenOfGroup", + "ancestorsOfGroup", + "descendantsOfGroup" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/Group" + } + }, + "childrenOfGroup": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } + }, + "ancestorsOfGroup": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } + }, + "descendantsOfGroup": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "monitoring.googleapis.com/Group" + } + }, + "pageSize": { + "type": "int32", + "id": 5 + }, + "pageToken": { "type": "string", "id": 6 } @@ -724,27 +769,44 @@ } } }, - "Group": { + "Point": { "fields": { - "name": { - "type": "string", + "interval": { + "type": "TimeInterval", "id": 1 }, - "displayName": { - "type": "string", + "value": { + "type": "TypedValue", "id": 2 + } + } + }, + "TimeSeries": { + "fields": { + "metric": { + "type": "google.api.Metric", + "id": 1 }, - "parentName": { - "type": "string", + "resource": { + "type": "google.api.MonitoredResource", + "id": 2 + }, + "metadata": { + "type": "google.api.MonitoredResourceMetadata", + "id": 7 + }, + "metricKind": { + "type": "google.api.MetricDescriptor.MetricKind", "id": 3 }, - "filter": { - "type": "string", - "id": 5 + "valueType": { + "type": "google.api.MetricDescriptor.ValueType", + "id": 4 }, - "isCluster": { - "type": "bool", - "id": 6 + "points": { + "rule": "repeated", + "type": "Point", + "id": 5 } } }, @@ -958,7 +1020,7 @@ "id": 10, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/TimeSeries" + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" } }, "filter": { @@ -1033,7 +1095,7 @@ "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/TimeSeries" + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" } }, "timeSeries": { @@ -1095,44 +1157,95 @@ } } }, - "Point": { + "NotificationChannelDescriptor": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/NotificationChannelDescriptor", + "(google.api.resource).pattern": "*" + }, "fields": { - "interval": { - "type": "TimeInterval", + "name": { + "type": "string", + "id": 6 + }, + "type": { + "type": "string", "id": 1 }, - "value": { - "type": "TypedValue", + "displayName": { + "type": "string", "id": 2 - } - } - }, - "TimeSeries": { - "fields": { - "metric": { - "type": "google.api.Metric", - "id": 1 }, - "resource": { - "type": "google.api.MonitoredResource", - "id": 2 + "description": { + "type": "string", + "id": 3 }, - "metadata": { - "type": "google.api.MonitoredResourceMetadata", + "labels": { + "rule": "repeated", + "type": "google.api.LabelDescriptor", + "id": 4 + }, + "supportedTiers": { + "rule": "repeated", + "type": "ServiceTier", + "id": 5, + "options": { + "deprecated": true + } + }, + "launchStage": { + "type": "google.api.LaunchStage", "id": 7 + } + } + }, + "NotificationChannel": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/NotificationChannel", + "(google.api.resource).pattern": "*" + }, + "fields": { + "type": { + "type": "string", + "id": 1 }, - "metricKind": { - "type": "google.api.MetricDescriptor.MetricKind", + "name": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", "id": 3 }, - "valueType": { - "type": "google.api.MetricDescriptor.ValueType", + "description": { + "type": "string", "id": 4 }, - "points": { - "rule": "repeated", - "type": "Point", + "labels": { + "keyType": "string", + "type": "string", "id": 5 + }, + "userLabels": { + "keyType": "string", + "type": "string", + "id": 8 + }, + "verificationStatus": { + "type": "VerificationStatus", + "id": 9 + }, + "enabled": { + "type": "google.protobuf.BoolValue", + "id": 11 + } + }, + "nested": { + "VerificationStatus": { + "values": { + "VERIFICATION_STATUS_UNSPECIFIED": 0, + "UNVERIFIED": 1, + "VERIFIED": 2 + } } } }, @@ -1436,13 +1549,23 @@ } } }, - "NotificationChannelDescriptor": { + "Service": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/Service", + "(google.api.resource).pattern": "*" + }, + "oneofs": { + "identifier": { + "oneof": [ + "custom", + "appEngine", + "cloudEndpoints", + "clusterIstio" + ] + } + }, "fields": { "name": { - "type": "string", - "id": 6 - }, - "type": { "type": "string", "id": 1 }, @@ -1450,94 +1573,354 @@ "type": "string", "id": 2 }, - "description": { - "type": "string", - "id": 3 + "custom": { + "type": "Custom", + "id": 6 }, - "labels": { - "rule": "repeated", - "type": "google.api.LabelDescriptor", - "id": 4 + "appEngine": { + "type": "AppEngine", + "id": 7 }, - "supportedTiers": { - "rule": "repeated", - "type": "ServiceTier", - "id": 5, - "options": { - "deprecated": true + "cloudEndpoints": { + "type": "CloudEndpoints", + "id": 8 + }, + "clusterIstio": { + "type": "ClusterIstio", + "id": 9 + }, + "telemetry": { + "type": "Telemetry", + "id": 13 + } + }, + "nested": { + "Custom": { + "fields": {} + }, + "AppEngine": { + "fields": { + "moduleId": { + "type": "string", + "id": 1 + } + } + }, + "CloudEndpoints": { + "fields": { + "service": { + "type": "string", + "id": 1 + } + } + }, + "ClusterIstio": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "clusterName": { + "type": "string", + "id": 2 + }, + "serviceNamespace": { + "type": "string", + "id": 3 + }, + "serviceName": { + "type": "string", + "id": 4 + } + } + }, + "Telemetry": { + "fields": { + "resourceName": { + "type": "string", + "id": 1 + } } } } }, - "NotificationChannel": { + "ServiceLevelObjective": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/ServiceLevelObjective", + "(google.api.resource).pattern": "*", + "(google.api.resource).history": "ORIGINALLY_SINGLE_PATTERN" + }, + "oneofs": { + "period": { + "oneof": [ + "rollingPeriod", + "calendarPeriod" + ] + } + }, "fields": { - "type": { - "type": "string", - "id": 1 - }, "name": { "type": "string", - "id": 6 + "id": 1 }, "displayName": { "type": "string", + "id": 11 + }, + "serviceLevelIndicator": { + "type": "ServiceLevelIndicator", "id": 3 }, - "description": { - "type": "string", + "goal": { + "type": "double", "id": 4 }, - "labels": { - "keyType": "string", - "type": "string", + "rollingPeriod": { + "type": "google.protobuf.Duration", "id": 5 }, - "userLabels": { - "keyType": "string", - "type": "string", - "id": 8 - }, - "verificationStatus": { - "type": "VerificationStatus", - "id": 9 - }, - "enabled": { - "type": "google.protobuf.BoolValue", - "id": 11 + "calendarPeriod": { + "type": "google.type.CalendarPeriod", + "id": 6 } }, "nested": { - "VerificationStatus": { + "View": { "values": { - "VERIFICATION_STATUS_UNSPECIFIED": 0, - "UNVERIFIED": 1, - "VERIFIED": 2 + "VIEW_UNSPECIFIED": 0, + "FULL": 2, + "EXPLICIT": 1 } } } }, - "ServiceMonitoringService": { - "options": { - "(google.api.default_host)": "monitoring.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + "ServiceLevelIndicator": { + "oneofs": { + "type": { + "oneof": [ + "basicSli", + "requestBased", + "windowsBased" + ] + } }, - "methods": { - "CreateService": { - "requestType": "CreateServiceRequest", - "responseType": "Service", - "options": { - "(google.api.http).post": "/v3/{parent=*/*}/services", - "(google.api.http).body": "service", - "(google.api.method_signature)": "parent,service" - } - }, - "GetService": { - "requestType": "GetServiceRequest", - "responseType": "Service", - "options": { - "(google.api.http).get": "/v3/{name=*/*/services/*}", - "(google.api.method_signature)": "name" - } + "fields": { + "basicSli": { + "type": "BasicSli", + "id": 4 + }, + "requestBased": { + "type": "RequestBasedSli", + "id": 1 + }, + "windowsBased": { + "type": "WindowsBasedSli", + "id": 2 + } + } + }, + "BasicSli": { + "oneofs": { + "sliCriteria": { + "oneof": [ + "availability", + "latency" + ] + } + }, + "fields": { + "method": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "location": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "version": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "availability": { + "type": "AvailabilityCriteria", + "id": 2 + }, + "latency": { + "type": "LatencyCriteria", + "id": 3 + } + }, + "nested": { + "AvailabilityCriteria": { + "fields": {} + }, + "LatencyCriteria": { + "fields": { + "threshold": { + "type": "google.protobuf.Duration", + "id": 3 + } + } + } + } + }, + "Range": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "RequestBasedSli": { + "oneofs": { + "method": { + "oneof": [ + "goodTotalRatio", + "distributionCut" + ] + } + }, + "fields": { + "goodTotalRatio": { + "type": "TimeSeriesRatio", + "id": 1 + }, + "distributionCut": { + "type": "DistributionCut", + "id": 3 + } + } + }, + "TimeSeriesRatio": { + "fields": { + "goodServiceFilter": { + "type": "string", + "id": 4 + }, + "badServiceFilter": { + "type": "string", + "id": 5 + }, + "totalServiceFilter": { + "type": "string", + "id": 6 + } + } + }, + "DistributionCut": { + "fields": { + "distributionFilter": { + "type": "string", + "id": 4 + }, + "range": { + "type": "Range", + "id": 5 + } + } + }, + "WindowsBasedSli": { + "oneofs": { + "windowCriterion": { + "oneof": [ + "goodBadMetricFilter", + "goodTotalRatioThreshold", + "metricMeanInRange", + "metricSumInRange" + ] + } + }, + "fields": { + "goodBadMetricFilter": { + "type": "string", + "id": 5 + }, + "goodTotalRatioThreshold": { + "type": "PerformanceThreshold", + "id": 2 + }, + "metricMeanInRange": { + "type": "MetricRange", + "id": 6 + }, + "metricSumInRange": { + "type": "MetricRange", + "id": 7 + }, + "windowPeriod": { + "type": "google.protobuf.Duration", + "id": 4 + } + }, + "nested": { + "PerformanceThreshold": { + "oneofs": { + "type": { + "oneof": [ + "performance", + "basicSliPerformance" + ] + } + }, + "fields": { + "performance": { + "type": "RequestBasedSli", + "id": 1 + }, + "basicSliPerformance": { + "type": "BasicSli", + "id": 3 + }, + "threshold": { + "type": "double", + "id": 2 + } + } + }, + "MetricRange": { + "fields": { + "timeSeries": { + "type": "string", + "id": 1 + }, + "range": { + "type": "Range", + "id": 4 + } + } + } + } + }, + "ServiceMonitoringService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, + "methods": { + "CreateService": { + "requestType": "CreateServiceRequest", + "responseType": "Service", + "options": { + "(google.api.http).post": "/v3/{parent=*/*}/services", + "(google.api.http).body": "service", + "(google.api.method_signature)": "parent,service" + } + }, + "GetService": { + "requestType": "GetServiceRequest", + "responseType": "Service", + "options": { + "(google.api.http).get": "/v3/{name=*/*/services/*}", + "(google.api.method_signature)": "name" + } }, "ListServices": { "requestType": "ListServicesRequest", @@ -1814,16 +2197,26 @@ } } }, - "Service": { - "oneofs": { - "identifier": { - "oneof": [ - "custom", - "appEngine", - "cloudEndpoints", - "clusterIstio" - ] + "SpanContext": { + "fields": { + "spanName": { + "type": "string", + "id": 1 } + } + }, + "UptimeCheckRegion": { + "values": { + "REGION_UNSPECIFIED": 0, + "USA": 1, + "EUROPE": 2, + "SOUTH_AMERICA": 3, + "ASIA_PACIFIC": 4 + } + }, + "InternalChecker": { + "options": { + "deprecated": true }, "fields": { "name": { @@ -1834,531 +2227,20 @@ "type": "string", "id": 2 }, - "custom": { - "type": "Custom", + "network": { + "type": "string", + "id": 3 + }, + "gcpZone": { + "type": "string", + "id": 4 + }, + "peerProjectId": { + "type": "string", "id": 6 }, - "appEngine": { - "type": "AppEngine", - "id": 7 - }, - "cloudEndpoints": { - "type": "CloudEndpoints", - "id": 8 - }, - "clusterIstio": { - "type": "ClusterIstio", - "id": 9 - }, - "telemetry": { - "type": "Telemetry", - "id": 13 - } - }, - "nested": { - "Custom": { - "fields": {} - }, - "AppEngine": { - "fields": { - "moduleId": { - "type": "string", - "id": 1 - } - } - }, - "CloudEndpoints": { - "fields": { - "service": { - "type": "string", - "id": 1 - } - } - }, - "ClusterIstio": { - "fields": { - "location": { - "type": "string", - "id": 1 - }, - "clusterName": { - "type": "string", - "id": 2 - }, - "serviceNamespace": { - "type": "string", - "id": 3 - }, - "serviceName": { - "type": "string", - "id": 4 - } - } - }, - "Telemetry": { - "fields": { - "resourceName": { - "type": "string", - "id": 1 - } - } - } - } - }, - "ServiceLevelObjective": { - "oneofs": { - "period": { - "oneof": [ - "rollingPeriod", - "calendarPeriod" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 11 - }, - "serviceLevelIndicator": { - "type": "ServiceLevelIndicator", - "id": 3 - }, - "goal": { - "type": "double", - "id": 4 - }, - "rollingPeriod": { - "type": "google.protobuf.Duration", - "id": 5 - }, - "calendarPeriod": { - "type": "google.type.CalendarPeriod", - "id": 6 - } - }, - "nested": { - "View": { - "values": { - "VIEW_UNSPECIFIED": 0, - "FULL": 2, - "EXPLICIT": 1 - } - } - } - }, - "ServiceLevelIndicator": { - "oneofs": { - "type": { - "oneof": [ - "basicSli", - "requestBased", - "windowsBased" - ] - } - }, - "fields": { - "basicSli": { - "type": "BasicSli", - "id": 4 - }, - "requestBased": { - "type": "RequestBasedSli", - "id": 1 - }, - "windowsBased": { - "type": "WindowsBasedSli", - "id": 2 - } - } - }, - "BasicSli": { - "oneofs": { - "sliCriteria": { - "oneof": [ - "availability", - "latency" - ] - } - }, - "fields": { - "method": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "location": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "version": { - "rule": "repeated", - "type": "string", - "id": 9 - }, - "availability": { - "type": "AvailabilityCriteria", - "id": 2 - }, - "latency": { - "type": "LatencyCriteria", - "id": 3 - } - }, - "nested": { - "AvailabilityCriteria": { - "fields": {} - }, - "LatencyCriteria": { - "fields": { - "threshold": { - "type": "google.protobuf.Duration", - "id": 3 - } - } - } - } - }, - "Range": { - "fields": { - "min": { - "type": "double", - "id": 1 - }, - "max": { - "type": "double", - "id": 2 - } - } - }, - "RequestBasedSli": { - "oneofs": { - "method": { - "oneof": [ - "goodTotalRatio", - "distributionCut" - ] - } - }, - "fields": { - "goodTotalRatio": { - "type": "TimeSeriesRatio", - "id": 1 - }, - "distributionCut": { - "type": "DistributionCut", - "id": 3 - } - } - }, - "TimeSeriesRatio": { - "fields": { - "goodServiceFilter": { - "type": "string", - "id": 4 - }, - "badServiceFilter": { - "type": "string", - "id": 5 - }, - "totalServiceFilter": { - "type": "string", - "id": 6 - } - } - }, - "DistributionCut": { - "fields": { - "distributionFilter": { - "type": "string", - "id": 4 - }, - "range": { - "type": "Range", - "id": 5 - } - } - }, - "WindowsBasedSli": { - "oneofs": { - "windowCriterion": { - "oneof": [ - "goodBadMetricFilter", - "goodTotalRatioThreshold", - "metricMeanInRange", - "metricSumInRange" - ] - } - }, - "fields": { - "goodBadMetricFilter": { - "type": "string", - "id": 5 - }, - "goodTotalRatioThreshold": { - "type": "PerformanceThreshold", - "id": 2 - }, - "metricMeanInRange": { - "type": "MetricRange", - "id": 6 - }, - "metricSumInRange": { - "type": "MetricRange", - "id": 7 - }, - "windowPeriod": { - "type": "google.protobuf.Duration", - "id": 4 - } - }, - "nested": { - "PerformanceThreshold": { - "oneofs": { - "type": { - "oneof": [ - "performance", - "basicSliPerformance" - ] - } - }, - "fields": { - "performance": { - "type": "RequestBasedSli", - "id": 1 - }, - "basicSliPerformance": { - "type": "BasicSli", - "id": 3 - }, - "threshold": { - "type": "double", - "id": 2 - } - } - }, - "MetricRange": { - "fields": { - "timeSeries": { - "type": "string", - "id": 1 - }, - "range": { - "type": "Range", - "id": 4 - } - } - } - } - }, - "UptimeCheckService": { - "options": { - "(google.api.default_host)": "monitoring.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" - }, - "methods": { - "ListUptimeCheckConfigs": { - "requestType": "ListUptimeCheckConfigsRequest", - "responseType": "ListUptimeCheckConfigsResponse", - "options": { - "(google.api.http).get": "/v3/{parent=projects/*}/uptimeCheckConfigs", - "(google.api.method_signature)": "parent" - } - }, - "GetUptimeCheckConfig": { - "requestType": "GetUptimeCheckConfigRequest", - "responseType": "UptimeCheckConfig", - "options": { - "(google.api.http).get": "/v3/{name=projects/*/uptimeCheckConfigs/*}", - "(google.api.method_signature)": "name" - } - }, - "CreateUptimeCheckConfig": { - "requestType": "CreateUptimeCheckConfigRequest", - "responseType": "UptimeCheckConfig", - "options": { - "(google.api.http).post": "/v3/{parent=projects/*}/uptimeCheckConfigs", - "(google.api.http).body": "uptime_check_config", - "(google.api.method_signature)": "parent,uptime_check_config" - } - }, - "UpdateUptimeCheckConfig": { - "requestType": "UpdateUptimeCheckConfigRequest", - "responseType": "UptimeCheckConfig", - "options": { - "(google.api.http).patch": "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}", - "(google.api.http).body": "uptime_check_config", - "(google.api.method_signature)": "uptime_check_config" - } - }, - "DeleteUptimeCheckConfig": { - "requestType": "DeleteUptimeCheckConfigRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}", - "(google.api.method_signature)": "name" - } - }, - "ListUptimeCheckIps": { - "requestType": "ListUptimeCheckIpsRequest", - "responseType": "ListUptimeCheckIpsResponse", - "options": { - "(google.api.http).get": "/v3/uptimeCheckIps" - } - } - } - }, - "ListUptimeCheckConfigsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/UptimeCheckConfig" - } - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListUptimeCheckConfigsResponse": { - "fields": { - "uptimeCheckConfigs": { - "rule": "repeated", - "type": "UptimeCheckConfig", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "totalSize": { - "type": "int32", - "id": 3 - } - } - }, - "GetUptimeCheckConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "monitoring.googleapis.com/UptimeCheckConfig" - } - } - } - }, - "CreateUptimeCheckConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "monitoring.googleapis.com/UptimeCheckConfig" - } - }, - "uptimeCheckConfig": { - "type": "UptimeCheckConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateUptimeCheckConfigRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - }, - "uptimeCheckConfig": { - "type": "UptimeCheckConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteUptimeCheckConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "monitoring.googleapis.com/UptimeCheckConfig" - } - } - } - }, - "ListUptimeCheckIpsRequest": { - "fields": { - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListUptimeCheckIpsResponse": { - "fields": { - "uptimeCheckIps": { - "rule": "repeated", - "type": "UptimeCheckIp", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "InternalChecker": { - "options": { - "deprecated": true - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "network": { - "type": "string", - "id": 3 - }, - "gcpZone": { - "type": "string", - "id": 4 - }, - "peerProjectId": { - "type": "string", - "id": 6 - }, - "state": { - "type": "State", + "state": { + "type": "State", "id": 7 } }, @@ -2373,6 +2255,10 @@ } }, "UptimeCheckConfig": { + "options": { + "(google.api.resource).type": "monitoring.googleapis.com/UptimeCheckConfig", + "(google.api.resource).pattern": "*" + }, "oneofs": { "resource": { "oneof": [ @@ -2539,13 +2425,11 @@ } } }, - "UptimeCheckRegion": { + "GroupResourceType": { "values": { - "REGION_UNSPECIFIED": 0, - "USA": 1, - "EUROPE": 2, - "SOUTH_AMERICA": 3, - "ASIA_PACIFIC": 4 + "RESOURCE_TYPE_UNSPECIFIED": 0, + "INSTANCE": 1, + "AWS_ELB_LOAD_BALANCER": 2 } }, "UptimeCheckIp": { @@ -2564,146 +2448,197 @@ } } }, - "GroupResourceType": { - "values": { - "RESOURCE_TYPE_UNSPECIFIED": 0, - "INSTANCE": 1, - "AWS_ELB_LOAD_BALANCER": 2 + "UptimeCheckService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, + "methods": { + "ListUptimeCheckConfigs": { + "requestType": "ListUptimeCheckConfigsRequest", + "responseType": "ListUptimeCheckConfigsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=projects/*}/uptimeCheckConfigs", + "(google.api.method_signature)": "parent" + } + }, + "GetUptimeCheckConfig": { + "requestType": "GetUptimeCheckConfigRequest", + "responseType": "UptimeCheckConfig", + "options": { + "(google.api.http).get": "/v3/{name=projects/*/uptimeCheckConfigs/*}", + "(google.api.method_signature)": "name" + } + }, + "CreateUptimeCheckConfig": { + "requestType": "CreateUptimeCheckConfigRequest", + "responseType": "UptimeCheckConfig", + "options": { + "(google.api.http).post": "/v3/{parent=projects/*}/uptimeCheckConfigs", + "(google.api.http).body": "uptime_check_config", + "(google.api.method_signature)": "parent,uptime_check_config" + } + }, + "UpdateUptimeCheckConfig": { + "requestType": "UpdateUptimeCheckConfigRequest", + "responseType": "UptimeCheckConfig", + "options": { + "(google.api.http).patch": "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}", + "(google.api.http).body": "uptime_check_config", + "(google.api.method_signature)": "uptime_check_config" + } + }, + "DeleteUptimeCheckConfig": { + "requestType": "DeleteUptimeCheckConfigRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}", + "(google.api.method_signature)": "name" + } + }, + "ListUptimeCheckIps": { + "requestType": "ListUptimeCheckIpsRequest", + "responseType": "ListUptimeCheckIpsResponse", + "options": { + "(google.api.http).get": "/v3/uptimeCheckIps" + } + } } - } - } - } - } - }, - "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 + "ListUptimeCheckConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/UptimeCheckConfig" + } + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } }, - "patch": { - "type": "string", - "id": 6 + "ListUptimeCheckConfigsResponse": { + "fields": { + "uptimeCheckConfigs": { + "rule": "repeated", + "type": "UptimeCheckConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 3 + } + } }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 + "GetUptimeCheckConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/UptimeCheckConfig" + } + } + } }, - "body": { - "type": "string", - "id": 7 + "CreateUptimeCheckConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/UptimeCheckConfig" + } + }, + "uptimeCheckConfig": { + "type": "UptimeCheckConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } }, - "responseBody": { - "type": "string", - "id": 12 + "UpdateUptimeCheckConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "uptimeCheckConfig": { + "type": "UptimeCheckConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 + "DeleteUptimeCheckConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "monitoring.googleapis.com/UptimeCheckConfig" + } + } + } }, - "path": { - "type": "string", - "id": 2 + "ListUptimeCheckIpsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListUptimeCheckIpsResponse": { + "fields": { + "uptimeCheckIps": { + "rule": "repeated", + "type": "UptimeCheckIp", + "id": 1 + }, + "nextPageToken": { + "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" - }, - "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 - } - }, + } + } + }, + "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" + }, + "nested": { "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2903,6 +2838,125 @@ } } }, + "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", + "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 + } + }, "MonitoredResourceDescriptor": { "fields": { "name": { @@ -4092,18 +4146,6 @@ } } }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, "Struct": { "fields": { "fields": { @@ -4166,6 +4208,18 @@ "id": 1 } } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } } } }, diff --git a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml b/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml deleted file mode 100644 index 282535f55f6..00000000000 --- a/packages/google-cloud-monitoring/smoke-test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - no-console: off diff --git a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js deleted file mode 100644 index 085f31334bd..00000000000 --- a/packages/google-cloud-monitoring/smoke-test/metric_service_smoke_test.js +++ /dev/null @@ -1,98 +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 {describe, it} = require('mocha'); - -describe('MetricServiceSmokeTest', () => { - 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 using promises', done => { - const monitoring = require('../src'); - - const client = new monitoring.v3.MetricServiceClient({ - // optional auth parameters. - }); - - // Iterate over all elements. - const formattedName = client.projectPath(projectId); - - client - .listMonitoredResourceDescriptors({name: formattedName}) - .then(responses => { - const resources = responses[0]; - for (const resource of resources) { - console.log(resource); - } - }) - .then(done) - .catch(done); - }); - - it('successfully makes a call to the service using callbacks', done => { - const monitoring = require('../src'); - - const client = new monitoring.v3.MetricServiceClient({ - // optional auth parameters. - }); - - // Or obtain the paged response. - const formattedName = client.projectPath(projectId); - - 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) { - console.log(resource); - } - if (nextRequest) { - // Fetch the next page. - return client - .listMonitoredResourceDescriptors(nextRequest, options) - .then(callback); - } - }; - client - .listMonitoredResourceDescriptors({name: formattedName}, options) - .then(callback) - .then(done) - .catch(done); - }); - - it('successfully makes a call to the service using streaming', done => { - const monitoring = require('../src'); - - const client = new monitoring.v3.MetricServiceClient({ - // optional auth parameters. - }); - - const formattedName = client.projectPath(projectId); - client - .listMonitoredResourceDescriptorsStream({name: formattedName}) - .on('data', element => { - console.log(element); - }) - .on('error', done) - .on('end', done); - }); -}); diff --git a/packages/google-cloud-monitoring/src/browser.js b/packages/google-cloud-monitoring/src/browser.js deleted file mode 100644 index 68dc62d25d6..00000000000 --- a/packages/google-cloud-monitoring/src/browser.js +++ /dev/null @@ -1,21 +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'; - -// Set a flag that we are running in a browser bundle. -global.isBrowser = true; - -// Re-export all exports from ./index.js. -module.exports = require('./index'); diff --git a/packages/google-cloud-monitoring/src/index.js b/packages/google-cloud-monitoring/src/index.js deleted file mode 100644 index 828a9aadba0..00000000000 --- a/packages/google-cloud-monitoring/src/index.js +++ /dev/null @@ -1,117 +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. - -/** - * @namespace google - */ -/** - * @namespace google.monitoring - */ -/** - * @namespace google.monitoring.v3 - */ -/** - * @namespace google.protobuf - */ -/** - * @namespace google.rpc - */ -/** - * @namespace google.api - */ - -'use strict'; - -// Import the clients for each version supported by this package. -const gapic = Object.freeze({ - v3: require('./v3'), -}); - -/** - * The `@google-cloud/monitoring` package has the following named exports: - * - * - `AlertPolicyServiceClient` - Reference to - * {@link v3.AlertPolicyServiceClient} - * - `GroupServiceClient` - Reference to - * {@link v3.GroupServiceClient} - * - `MetricServiceClient` - Reference to - * {@link v3.MetricServiceClient} - * - `NotificationChannelServiceClient` - Reference to - * {@link v3.NotificationChannelServiceClient} - * - `UptimeCheckServiceClient` - Reference to - * {@link v3.UptimeCheckServiceClient} - * - `v3` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `AlertPolicyServiceClient` - Reference to - * {@link v3.AlertPolicyServiceClient} - * - `GroupServiceClient` - Reference to - * {@link v3.GroupServiceClient} - * - `MetricServiceClient` - Reference to - * {@link v3.MetricServiceClient} - * - `NotificationChannelServiceClient` - Reference to - * {@link v3.NotificationChannelServiceClient} - * - `UptimeCheckServiceClient` - Reference to - * {@link v3.UptimeCheckServiceClient} - * - * @module {object} @google-cloud/monitoring - * @alias nodejs-monitoring - * - * @example Install the client library with npm: - * npm install --save @google-cloud/monitoring - * - * @example Import the client library: - * const monitoring = require('@google-cloud/monitoring'); - * - * @example Create a client that uses Application Default Credentials (ADC): - * const client = new monitoring.AlertPolicyServiceClient(); - * - * @example Create a client with explicit credentials: - * const client = new monitoring.AlertPolicyServiceClient({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json', - * }); - */ - -/** - * @type {object} - * @property {constructor} AlertPolicyServiceClient - * Reference to {@link v3.AlertPolicyServiceClient} - * @property {constructor} GroupServiceClient - * Reference to {@link v3.GroupServiceClient} - * @property {constructor} MetricServiceClient - * Reference to {@link v3.MetricServiceClient} - * @property {constructor} NotificationChannelServiceClient - * Reference to {@link v3.NotificationChannelServiceClient} - * @property {constructor} UptimeCheckServiceClient - * Reference to {@link v3.UptimeCheckServiceClient} - */ -module.exports = gapic.v3; - -/** - * @type {object} - * @property {constructor} AlertPolicyServiceClient - * Reference to {@link v3.AlertPolicyServiceClient} - * @property {constructor} GroupServiceClient - * Reference to {@link v3.GroupServiceClient} - * @property {constructor} MetricServiceClient - * Reference to {@link v3.MetricServiceClient} - * @property {constructor} NotificationChannelServiceClient - * Reference to {@link v3.NotificationChannelServiceClient} - * @property {constructor} UptimeCheckServiceClient - * Reference to {@link v3.UptimeCheckServiceClient} - */ -module.exports.v3 = gapic.v3; - -// Alias `module.exports` as `module.exports.default`, for future-proofing. -module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts new file mode 100644 index 00000000000..dec2488733b --- /dev/null +++ b/packages/google-cloud-monitoring/src/index.ts @@ -0,0 +1,45 @@ +// 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. +// +// ** 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 v3 from './v3'; +const AlertPolicyServiceClient = v3.AlertPolicyServiceClient; +const GroupServiceClient = v3.GroupServiceClient; +const MetricServiceClient = v3.MetricServiceClient; +const NotificationChannelServiceClient = v3.NotificationChannelServiceClient; +const ServiceMonitoringServiceClient = v3.ServiceMonitoringServiceClient; +const UptimeCheckServiceClient = v3.UptimeCheckServiceClient; +export { + v3, + AlertPolicyServiceClient, + GroupServiceClient, + MetricServiceClient, + NotificationChannelServiceClient, + ServiceMonitoringServiceClient, + UptimeCheckServiceClient, +}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default { + v3, + AlertPolicyServiceClient, + GroupServiceClient, + MetricServiceClient, + NotificationChannelServiceClient, + ServiceMonitoringServiceClient, + UptimeCheckServiceClient, +}; diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js deleted file mode 100644 index d3464b2be85..00000000000 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.js +++ /dev/null @@ -1,836 +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('./alert_policy_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * The AlertPolicyService API is used to manage (list, create, delete, - * edit) alert policies in Stackdriver Monitoring. An alerting policy is - * a description of the conditions under which some aspect of your - * system is considered to be "unhealthy" and the ways to notify - * people or services about this state. In addition to using this API, alert - * policies can also be managed through - * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs/), - * which can be reached by clicking the "Monitoring" tab in - * [Cloud Console](https://console.cloud.google.com/). - * - * @class - * @memberof v3 - */ -class AlertPolicyServiceClient { - /** - * Construct an instance of AlertPolicyServiceClient. - * - * @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 = { - alertPolicyPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/alertPolicies/{alert_policy}' - ), - alertPolicyConditionPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - 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 = { - listAlertPolicies: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'alertPolicies' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.AlertPolicyService', - 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.monitoring.v3.AlertPolicyService. - const alertPolicyServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.monitoring.v3.AlertPolicyService') - : protos.google.monitoring.v3.AlertPolicyService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const alertPolicyServiceStubMethods = [ - 'listAlertPolicies', - 'getAlertPolicy', - 'createAlertPolicy', - 'deleteAlertPolicy', - 'updateAlertPolicy', - ]; - for (const methodName of alertPolicyServiceStubMethods) { - const innerCallPromise = alertPolicyServiceStub.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 'monitoring.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'monitoring.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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.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 the existing alerting policies for the project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project whose alert policies are to be listed. The format is - * - * projects/[PROJECT_ID] - * - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * GetAlertPolicy - * operation, instead. - * @param {string} [request.filter] - * If provided, this field specifies the criteria that must be met by - * alert policies to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @param {string} [request.orderBy] - * A comma-separated list of fields by which to sort the result. Supports - * the same set of field references as the `filter` field. Entries can be - * prefixed with a minus sign to sort by the field in descending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * - * 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 [ListAlertPoliciesResponse]{@link google.monitoring.v3.ListAlertPoliciesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} 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 [ListAlertPoliciesResponse]{@link google.monitoring.v3.ListAlertPoliciesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.AlertPolicyServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * - * client.listAlertPolicies({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = 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.listAlertPolicies(nextRequest, options).then(callback); - * } - * } - * client.listAlertPolicies({name: formattedName}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listAlertPolicies(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.listAlertPolicies(request, options, callback); - } - - /** - * Equivalent to {@link listAlertPolicies}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listAlertPolicies} 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.name - * Required. The project whose alert policies are to be listed. The format is - * - * projects/[PROJECT_ID] - * - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * GetAlertPolicy - * operation, instead. - * @param {string} [request.filter] - * If provided, this field specifies the criteria that must be met by - * alert policies to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @param {string} [request.orderBy] - * A comma-separated list of fields by which to sort the result. Supports - * the same set of field references as the `filter` field. Entries can be - * prefixed with a minus sign to sort by the field in descending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.AlertPolicyServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * client.listAlertPoliciesStream({name: formattedName}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listAlertPoliciesStream(request, options) { - options = options || {}; - - return this._descriptors.page.listAlertPolicies.createStream( - this._innerApiCalls.listAlertPolicies, - request, - options - ); - } - - /** - * Gets a single alerting policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The alerting policy to retrieve. The format is - * - * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.AlertPolicyServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - * client.getAlertPolicy({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getAlertPolicy(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.getAlertPolicy(request, options, callback); - } - - /** - * Creates a new alerting policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project in which to create the alerting policy. The format is - * `projects/[PROJECT_ID]`. - * - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. The alerting - * policy that is returned will have a name that contains a normalized - * representation of this name as a prefix but adds a suffix of the form - * `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. - * @param {Object} request.alertPolicy - * Required. The requested alerting policy. You should omit the `name` field in this - * policy. The name will be returned in the new policy, including - * a new [ALERT_POLICY_ID] value. - * - * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} - * @param {Object} [options] - * Optional parameters. You 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.AlertPolicyServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * const alertPolicy = {}; - * const request = { - * name: formattedName, - * alertPolicy: alertPolicy, - * }; - * client.createAlertPolicy(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createAlertPolicy(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.createAlertPolicy(request, options, callback); - } - - /** - * Deletes an alerting policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The alerting policy to delete. The format is: - * - * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - * - * For more information, see AlertPolicy. - * @param {Object} [options] - * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.AlertPolicyServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.alertPolicyPath('[PROJECT]', '[ALERT_POLICY]'); - * client.deleteAlertPolicy({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteAlertPolicy(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.deleteAlertPolicy(request, options, callback); - } - - /** - * Updates an alerting policy. You can either replace the entire policy with - * a new one or replace only certain fields in the current alerting policy by - * specifying the fields to be updated via `updateMask`. Returns the - * updated alerting policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.alertPolicy - * Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * - * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} - * @param {Object} [request.updateMask] - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * - * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.AlertPolicyServiceClient({ - * // optional auth parameters. - * }); - * - * const alertPolicy = {}; - * client.updateAlertPolicy({alertPolicy: alertPolicy}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateAlertPolicy(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({ - 'alert_policy.name': request.alertPolicy.name, - }); - - return this._innerApiCalls.updateAlertPolicy(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified alert_policy resource name string. - * - * @param {String} project - * @param {String} alertPolicy - * @returns {String} - */ - alertPolicyPath(project, alertPolicy) { - return this._pathTemplates.alertPolicyPathTemplate.render({ - project: project, - alert_policy: alertPolicy, - }); - } - - /** - * Return a fully-qualified alert_policy_condition resource name string. - * - * @param {String} project - * @param {String} alertPolicy - * @param {String} condition - * @returns {String} - */ - alertPolicyConditionPath(project, alertPolicy, condition) { - return this._pathTemplates.alertPolicyConditionPathTemplate.render({ - project: project, - alert_policy: alertPolicy, - condition: condition, - }); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the alertPolicyName from a alert_policy resource. - * - * @param {String} alertPolicyName - * A fully-qualified path representing a alert_policy resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromAlertPolicyName(alertPolicyName) { - return this._pathTemplates.alertPolicyPathTemplate.match(alertPolicyName) - .project; - } - - /** - * Parse the alertPolicyName from a alert_policy resource. - * - * @param {String} alertPolicyName - * A fully-qualified path representing a alert_policy resources. - * @returns {String} - A string representing the alert_policy. - */ - matchAlertPolicyFromAlertPolicyName(alertPolicyName) { - return this._pathTemplates.alertPolicyPathTemplate.match(alertPolicyName) - .alert_policy; - } - - /** - * Parse the alertPolicyConditionName from a alert_policy_condition resource. - * - * @param {String} alertPolicyConditionName - * A fully-qualified path representing a alert_policy_condition resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromAlertPolicyConditionName(alertPolicyConditionName) { - return this._pathTemplates.alertPolicyConditionPathTemplate.match( - alertPolicyConditionName - ).project; - } - - /** - * Parse the alertPolicyConditionName from a alert_policy_condition resource. - * - * @param {String} alertPolicyConditionName - * A fully-qualified path representing a alert_policy_condition resources. - * @returns {String} - A string representing the alert_policy. - */ - matchAlertPolicyFromAlertPolicyConditionName(alertPolicyConditionName) { - return this._pathTemplates.alertPolicyConditionPathTemplate.match( - alertPolicyConditionName - ).alert_policy; - } - - /** - * Parse the alertPolicyConditionName from a alert_policy_condition resource. - * - * @param {String} alertPolicyConditionName - * A fully-qualified path representing a alert_policy_condition resources. - * @returns {String} - A string representing the condition. - */ - matchConditionFromAlertPolicyConditionName(alertPolicyConditionName) { - return this._pathTemplates.alertPolicyConditionPathTemplate.match( - alertPolicyConditionName - ).condition; - } - - /** - * 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 = AlertPolicyServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts new file mode 100644 index 00000000000..55fed60328a --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -0,0 +1,2086 @@ +// 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. +// +// ** 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 './alert_policy_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The AlertPolicyService API is used to manage (list, create, delete, + * edit) alert policies in Stackdriver Monitoring. An alerting policy is + * a description of the conditions under which some aspect of your + * system is considered to be "unhealthy" and the ways to notify + * people or services about this state. In addition to using this API, alert + * policies can also be managed through + * [Stackdriver Monitoring](https://cloud.google.com/monitoring/docs/), + * which can be reached by clicking the "Monitoring" tab in + * [Cloud Console](https://console.cloud.google.com/). + * @class + * @memberof v3 + */ +export class AlertPolicyServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + alertPolicyServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AlertPolicyServiceClient. + * + * @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?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof AlertPolicyServiceClient; + 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. + const 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 AlertPolicyServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + 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 = { + folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listAlertPolicies: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'alertPolicies' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.AlertPolicyService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.v3.AlertPolicyService. + this.alertPolicyServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.v3.AlertPolicyService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.v3.AlertPolicyService, + 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 alertPolicyServiceStubMethods = [ + 'listAlertPolicies', + 'getAlertPolicy', + 'createAlertPolicy', + 'deleteAlertPolicy', + 'updateAlertPolicy', + ]; + + for (const methodName of alertPolicyServiceStubMethods) { + const innerCallPromise = this.alertPolicyServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + 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); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + getAlertPolicy( + request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, + {} | undefined + ] + >; + getAlertPolicy( + request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a single alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The alerting policy to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getAlertPolicy( + request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | 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 || '', + }); + return this._innerApiCalls.getAlertPolicy(request, options, callback); + } + createAlertPolicy( + request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, + {} | undefined + ] + >; + createAlertPolicy( + request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a new alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project in which to create the alerting policy. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. The alerting + * policy that is returned will have a name that contains a normalized + * representation of this name as a prefix but adds a suffix of the form + * `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * @param {google.monitoring.v3.AlertPolicy} request.alertPolicy + * Required. The requested alerting policy. You should omit the `name` field in this + * policy. The name will be returned in the new policy, including + * a new `[ALERT_POLICY_ID]` value. + * @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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createAlertPolicy( + request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + | protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | 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 || '', + }); + return this._innerApiCalls.createAlertPolicy(request, options, callback); + } + deleteAlertPolicy( + request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, + {} | undefined + ] + >; + deleteAlertPolicy( + request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes an alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The alerting policy to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * @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. + */ + deleteAlertPolicy( + request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | 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 || '', + }); + return this._innerApiCalls.deleteAlertPolicy(request, options, callback); + } + updateAlertPolicy( + request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, + {} | undefined + ] + >; + updateAlertPolicy( + request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates an alerting policy. You can either replace the entire policy with + * a new one or replace only certain fields in the current alerting policy by + * specifying the fields to be updated via `updateMask`. Returns the + * updated alerting policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * @param {google.monitoring.v3.AlertPolicy} request.alertPolicy + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateAlertPolicy( + request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + | protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy, + protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | 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({ + 'alert_policy.name': request.alertPolicy!.name || '', + }); + return this._innerApiCalls.updateAlertPolicy(request, options, callback); + } + + listAlertPolicies( + request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy[], + protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, + protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + ] + >; + listAlertPolicies( + request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy[], + protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, + protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + > + ): void; + /** + * Lists the existing alerting policies for the project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project whose alert policies are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by + * alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} request.orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of field references as the `filter` field. Entries can be + * prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {number} request.pageSize + * The maximum number of results to return in a single response. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. + * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} 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 [ListAlertPoliciesRequest]{@link google.monitoring.v3.ListAlertPoliciesRequest} + * 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 + * [ListAlertPoliciesResponse]{@link google.monitoring.v3.ListAlertPoliciesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listAlertPolicies( + request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IAlertPolicy[], + protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, + protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IAlertPolicy[], + protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, + protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IAlertPolicy[], + protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, + protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listAlertPolicies(request, options, callback); + } + + /** + * Equivalent to {@link listAlertPolicies}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listAlertPolicies} 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.name + * Required. The project whose alert policies are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by + * alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} request.orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of field references as the `filter` field. Entries can be + * prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {number} request.pageSize + * The maximum number of results to return in a single response. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} on 'data' event. + */ + listAlertPoliciesStream( + request?: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listAlertPolicies.createStream( + this._innerApiCalls.listAlertPolicies as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.render({ + folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this._pathTemplates.folderGroupPathTemplate.render({ + folder, + group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this._pathTemplates.folderNotificationChannelPathTemplate.render({ + folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this._pathTemplates.folderServicePathTemplate.render({ + folder, + service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization, + alert_policy: alertPolicy, + condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( + { + organization, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this._pathTemplates.organizationGroupPathTemplate.render({ + organization, + group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this._pathTemplates.organizationServicePathTemplate.render({ + organization, + service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( + { + organization, + uptime_check_config: uptimeCheckConfig, + } + ); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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 projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.render({ + project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ + project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this._pathTemplates.projectGroupPathTemplate.render({ + project, + group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this._pathTemplates.projectNotificationChannelPathTemplate.render({ + project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this._pathTemplates.projectServicePathTemplate.render({ + project, + service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.alertPolicyServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json index d6101ccaae8..437f8cf2861 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client_config.json @@ -2,46 +2,55 @@ "interfaces": { "google.monitoring.v3.AlertPolicyService": { "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 + }, + "71ca22c74d2828b200f9ff1cc285a8beb96cc2af": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "ListAlertPolicies": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "UpdateAlertPolicy": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json index 7e6fbb33ced..0534dc6a035 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json @@ -1,3 +1,18 @@ [ - "../../protos/google/monitoring/v3/alert_service.proto" + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", + "../../protos/google/monitoring/v3/uptime_service.proto" ] diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js deleted file mode 100644 index b7e06749ec5..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_distribution.js +++ /dev/null @@ -1,270 +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. - - /** - * 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 - * 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. - } - }, - - /** - * 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: type.googleapis.com/google.monitoring.v3.SpanContext - * - * 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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_label.js deleted file mode 100644 index 24d32531adc..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js deleted file mode 100644 index 7b324ed2d65..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_metric.js +++ /dev/null @@ -1,317 +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 - } -}; - -/** - * 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/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js b/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js deleted file mode 100644 index be4e189fc16..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/api/doc_monitored_resource.js +++ /dev/null @@ -1,136 +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. -}; - -/** - * 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/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js deleted file mode 100644 index b24f7f5d3ce..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert.js +++ /dev/null @@ -1,418 +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 the conditions under which some aspect of your system is - * considered to be "unhealthy" and the ways to notify people or services about - * this state. For an overview of alert policies, see - * [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/). - * - * @property {string} name - * Required if the policy exists. The resource name for this policy. The - * syntax is: - * - * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - * - * `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy - * is created. When calling the - * alertPolicies.create - * method, do not include the `name` field in the alerting policy passed as - * part of the request. - * - * @property {string} displayName - * A short name or phrase used to identify the policy in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple policies in the same project. The name is - * limited to 512 Unicode characters. - * - * @property {Object} documentation - * Documentation that is included with notifications and incidents related to - * this policy. Best practice is for the documentation to include information - * to help responders understand, mitigate, escalate, and correct the - * underlying problems detected by the alerting policy. Notification channels - * that have limited capacity might not show this documentation. - * - * This object should have the same structure as [Documentation]{@link google.monitoring.v3.Documentation} - * - * @property {Object.} userLabels - * User-supplied key/value data to be used for organizing and - * identifying the `AlertPolicy` objects. - * - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * @property {Object[]} conditions - * A list of conditions for the policy. The conditions are combined by AND or - * OR according to the `combiner` field. If the combined conditions evaluate - * to true, then an incident is created. A policy can have from one to six - * conditions. - * If |condition_time_series_uery_language| is present, it must be the only - * |condition|. - * - * This object should have the same structure as [Condition]{@link google.monitoring.v3.Condition} - * - * @property {number} combiner - * How to combine the results of multiple conditions to determine if an - * incident should be opened. - * If condition_time_series_query_language is present, this must be - * COMBINE_UNSPECIFIED. - * - * The number should be among the values of [ConditionCombinerType]{@link google.monitoring.v3.ConditionCombinerType} - * - * @property {Object} enabled - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * - * This object should have the same structure as [BoolValue]{@link google.protobuf.BoolValue} - * - * @property {Object} validity - * Read-only description of how the alert policy is invalid. OK if the alert - * policy is valid. If not OK, the alert policy will not generate incidents. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {string[]} notificationChannels - * Identifies the notification channels to which notifications should be sent - * when incidents are opened or closed or when new violations occur on - * an already opened incident. Each element of this array corresponds to - * the `name` field in each of the - * `NotificationChannel` - * objects that are returned from the [`ListNotificationChannels`] - * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * method. The syntax of the entries in this field is: - * - * projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] - * - * @property {Object} creationRecord - * A read-only record of the creation of the alerting policy. If provided - * in a call to create or update, this field will be ignored. - * - * This object should have the same structure as [MutationRecord]{@link google.monitoring.v3.MutationRecord} - * - * @property {Object} mutationRecord - * A read-only record of the most recent change to the alerting policy. If - * provided in a call to create or update, this field will be ignored. - * - * This object should have the same structure as [MutationRecord]{@link google.monitoring.v3.MutationRecord} - * - * @typedef AlertPolicy - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.AlertPolicy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} - */ -const AlertPolicy = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * A content string and a MIME type that describes the content string's - * format. - * - * @property {string} content - * The text of the documentation, interpreted according to `mime_type`. - * The content may not exceed 8,192 Unicode characters and may not exceed - * more than 10,240 bytes when encoded in UTF-8 format, whichever is - * smaller. - * - * @property {string} mimeType - * The format of the `content` field. Presently, only the value - * `"text/markdown"` is supported. See - * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. - * - * @typedef Documentation - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.AlertPolicy.Documentation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} - */ - Documentation: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * A condition is a true/false test that determines when an alerting policy - * should open an incident. If a condition evaluates to true, it signifies - * that something is wrong. - * - * @property {string} name - * Required if the condition exists. The unique resource name for this - * condition. Its syntax is: - * - * projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] - * - * `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the - * condition is created as part of a new or updated alerting policy. - * - * When calling the - * alertPolicies.create - * method, do not include the `name` field in the conditions of the - * requested alerting policy. Stackdriver Monitoring creates the - * condition identifiers and includes them in the new policy. - * - * When calling the - * alertPolicies.update - * method to update a policy, including a condition `name` causes the - * existing condition to be updated. Conditions without names are added to - * the updated policy. Existing conditions are deleted if they are not - * updated. - * - * Best practice is to preserve `[CONDITION_ID]` if you make only small - * changes, such as those to condition thresholds, durations, or trigger - * values. Otherwise, treat the change as a new condition and let the - * existing condition be deleted. - * - * @property {string} displayName - * A short name or phrase used to identify the condition in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple conditions in the same policy. - * - * @property {Object} conditionThreshold - * A condition that compares a time series against a threshold. - * - * This object should have the same structure as [MetricThreshold]{@link google.monitoring.v3.MetricThreshold} - * - * @property {Object} conditionAbsent - * A condition that checks that a time series continues to - * receive new data points. - * - * This object should have the same structure as [MetricAbsence]{@link google.monitoring.v3.MetricAbsence} - * - * @typedef Condition - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.AlertPolicy.Condition definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} - */ - Condition: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Specifies how many time series must fail a predicate to trigger a - * condition. If not specified, then a `{count: 1}` trigger is used. - * - * @property {number} count - * The absolute number of time series that must fail - * the predicate for the condition to be triggered. - * - * @property {number} percent - * The percentage of time series that must fail the - * predicate for the condition to be triggered. - * - * @typedef Trigger - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.AlertPolicy.Condition.Trigger definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} - */ - Trigger: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * A condition type that compares a collection of time series - * against a threshold. - * - * @property {string} filter - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - * call is useful to verify the time series that will be retrieved / - * processed) and must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * - * @property {Object[]} aggregations - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resrouces). Multiple aggregations - * are applied in the order specified. - * - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - * is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * - * @property {string} denominatorFilter - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that identifies a time - * series that should be used as the denominator of a ratio that will be - * compared with the threshold. If a `denominator_filter` is specified, - * the time series specified by the `filter` field will be used as the - * numerator. - * - * The filter must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * - * @property {Object[]} denominatorAggregations - * Specifies the alignment of data points in individual time series - * selected by `denominatorFilter` as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). - * - * When computing ratios, the `aggregations` and - * `denominator_aggregations` fields must use the same alignment period - * and produce time series that have the same periodicity and labels. - * - * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * - * @property {number} comparison - * The comparison to apply between the time series (indicated by `filter` - * and `aggregation`) and the threshold (indicated by `threshold_value`). - * The comparison is applied on each time series, with the time series - * on the left-hand side and the threshold on the right-hand side. - * - * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. - * - * The number should be among the values of [ComparisonType]{@link google.monitoring.v3.ComparisonType} - * - * @property {number} thresholdValue - * A value against which to compare the time series. - * - * @property {Object} duration - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} trigger - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * This object should have the same structure as [Trigger]{@link google.monitoring.v3.Trigger} - * - * @typedef MetricThreshold - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.AlertPolicy.Condition.MetricThreshold definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} - */ - MetricThreshold: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * A condition type that checks that monitored resources - * are reporting data. The configuration defines a metric and - * a set of monitored resources. The predicate is considered in violation - * when a time series for the specified metric of a monitored - * resource does not include any data in the specified `duration`. - * - * @property {string} filter - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - * call is useful to verify the time series that will be retrieved / - * processed) and must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * - * @property {Object[]} aggregations - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resrouces). Multiple aggregations - * are applied in the order specified. - * - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - * is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * - * @property {Object} duration - * The amount of time that a time series must fail to report new - * data to be considered failing. Currently, only values that - * are a multiple of a minute--e.g. 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. The `Duration.nanos` field is - * ignored. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} trigger - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`. - * - * This object should have the same structure as [Trigger]{@link google.monitoring.v3.Trigger} - * - * @typedef MetricAbsence - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.AlertPolicy.Condition.MetricAbsence definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert.proto} - */ - MetricAbsence: { - // This is for documentation. Actual contents will be loaded by gRPC. - } - }, - - /** - * Operators for combining conditions. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - ConditionCombinerType: { - - /** - * An unspecified combiner. - */ - COMBINE_UNSPECIFIED: 0, - - /** - * Combine conditions using the logical `AND` operator. An - * incident is created only if all conditions are met - * simultaneously. This combiner is satisfied if all conditions are - * met, even if they are met on completely different resources. - */ - AND: 1, - - /** - * Combine conditions using the logical `OR` operator. An incident - * is created if any of the listed conditions is met. - */ - OR: 2, - - /** - * Combine conditions using logical `AND` operator, but unlike the regular - * `AND` option, an incident is created only if all conditions are met - * simultaneously on at least one resource. - */ - AND_WITH_MATCHING_RESOURCE: 3 - } -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js deleted file mode 100644 index 470321ec7c6..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_alert_service.js +++ /dev/null @@ -1,188 +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 protocol for the `CreateAlertPolicy` request. - * - * @property {string} name - * Required. The project in which to create the alerting policy. The format is - * `projects/[PROJECT_ID]`. - * - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. The alerting - * policy that is returned will have a name that contains a normalized - * representation of this name as a prefix but adds a suffix of the form - * `/alertPolicies/[POLICY_ID]`, identifying the policy in the container. - * - * @property {Object} alertPolicy - * Required. The requested alerting policy. You should omit the `name` field in this - * policy. The name will be returned in the new policy, including - * a new [ALERT_POLICY_ID] value. - * - * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} - * - * @typedef CreateAlertPolicyRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} - */ -const CreateAlertPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `GetAlertPolicy` request. - * - * @property {string} name - * Required. The alerting policy to retrieve. The format is - * - * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - * - * @typedef GetAlertPolicyRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} - */ -const GetAlertPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `ListAlertPolicies` request. - * - * @property {string} name - * Required. The project whose alert policies are to be listed. The format is - * - * projects/[PROJECT_ID] - * - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * GetAlertPolicy - * operation, instead. - * - * @property {string} filter - * If provided, this field specifies the criteria that must be met by - * alert policies to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * @property {string} orderBy - * A comma-separated list of fields by which to sort the result. Supports - * the same set of field references as the `filter` field. Entries can be - * prefixed with a minus sign to sort by the field in descending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * @property {number} pageSize - * The maximum number of results to return in a single response. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * - * @typedef ListAlertPoliciesRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListAlertPoliciesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} - */ -const ListAlertPoliciesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `ListAlertPolicies` response. - * - * @property {Object[]} alertPolicies - * The returned alert policies. - * - * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} - * - * @property {string} nextPageToken - * If there might be more results than were returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @typedef ListAlertPoliciesResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListAlertPoliciesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} - */ -const ListAlertPoliciesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `UpdateAlertPolicy` request. - * - * @property {Object} updateMask - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @property {Object} alertPolicy - * Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * - * This object should have the same structure as [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} - * - * @typedef UpdateAlertPolicyRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UpdateAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} - */ -const UpdateAlertPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `DeleteAlertPolicy` request. - * - * @property {string} name - * Required. The alerting policy to delete. The format is: - * - * projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] - * - * For more information, see AlertPolicy. - * - * @typedef DeleteAlertPolicyRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteAlertPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/alert_service.proto} - */ -const DeleteAlertPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js deleted file mode 100644 index de50b3b985c..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_common.js +++ /dev/null @@ -1,603 +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 single strongly-typed value. - * - * @property {boolean} boolValue - * A Boolean value: `true` or `false`. - * - * @property {number} int64Value - * A 64-bit integer. Its range is approximately ±9.2x1018. - * - * @property {number} doubleValue - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately ±10±300 and it has 16 - * significant digits of precision. - * - * @property {string} stringValue - * A variable-length string value. - * - * @property {Object} distributionValue - * A distribution value. - * - * This object should have the same structure as [Distribution]{@link google.api.Distribution} - * - * @typedef TypedValue - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.TypedValue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} - */ -const TypedValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time. - * - * * For a `GAUGE` metric, the `startTime` value is technically optional; if - * no value is specified, the start time defaults to the value of the - * end time, and the interval represents a single point in time. If both - * start and end times are specified, they must be identical. Such an - * interval is valid only for `GAUGE` metrics, which are point-in-time - * measurements. - * - * * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier - * than the end time. - * - * * In all cases, the start time of the next interval must be - * at least a microsecond after the end time of the previous interval. - * Because the interval is closed, if the start time of a new interval - * is the same as the end time of the previous interval, data written - * at the new start time could overwrite data written at the previous - * end time. - * - * @property {Object} endTime - * Required. The end of the time interval. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} startTime - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef TimeInterval - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.TimeInterval definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} - */ -const TimeInterval = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Describes how to combine multiple time series to provide a different view of - * the data. Aggregation of time series is done in two steps. First, each time - * series in the set is _aligned_ to the same time interval boundaries, then the - * set of time series is optionally _reduced_ in number. - * - * Alignment consists of applying the `per_series_aligner` operation - * to each time series after its data has been divided into regular - * `alignment_period` time intervals. This process takes _all_ of the data - * points in an alignment period, applies a mathematical transformation such as - * averaging, minimum, maximum, delta, etc., and converts them into a single - * data point per period. - * - * Reduction is when the aligned and transformed time series can optionally be - * combined, reducing the number of time series through similar mathematical - * transformations. Reduction involves applying a `cross_series_reducer` to - * all the time series, optionally sorting the time series into subsets with - * `group_by_fields`, and applying the reducer to each subset. - * - * The raw time series data can contain a huge amount of information from - * multiple sources. Alignment and reduction transforms this mass of data into - * a more manageable and representative collection of data, for example "the - * 95% latency across the average of all tasks in a cluster". This - * representative data can be more easily graphed and comprehended, and the - * individual time series data is still available for later drilldown. For more - * details, see [Aggregating Time - * Series](https://cloud.google.com/monitoring/api/v3/metrics#aggregating_time_series). - * - * @property {Object} alignmentPeriod - * The `alignment_period` specifies a time interval, in seconds, that is used - * to divide the data in all the - * time series into consistent blocks of - * time. This will be done before the per-series aligner can be applied to - * the data. - * - * The value must be at least 60 seconds. If a per-series aligner other than - * `ALIGN_NONE` is specified, this field is required or an error is returned. - * If no per-series aligner is specified, or the aligner `ALIGN_NONE` is - * specified, then this field is ignored. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} perSeriesAligner - * An `Aligner` describes how to bring the data points in a single - * time series into temporal alignment. Except for `ALIGN_NONE`, all - * alignments cause all the data points in an `alignment_period` to be - * mathematically grouped together, resulting in a single data point for - * each `alignment_period` with end timestamp at the end of the period. - * - * Not all alignment operations may be applied to all time series. The valid - * choices depend on the `metric_kind` and `value_type` of the original time - * series. Alignment can change the `metric_kind` or the `value_type` of - * the time series. - * - * Time series data must be aligned in order to perform cross-time - * series reduction. If `cross_series_reducer` is specified, then - * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` - * and `alignment_period` must be specified; otherwise, an error is - * returned. - * - * The number should be among the values of [Aligner]{@link google.monitoring.v3.Aligner} - * - * @property {number} crossSeriesReducer - * The reduction operation to be used to combine time series into a single - * time series, where the value of each data point in the resulting series is - * a function of all the already aligned values in the input time series. - * - * Not all reducer operations can be applied to all time series. The valid - * choices depend on the `metric_kind` and the `value_type` of the original - * time series. Reduction can yield a time series with a different - * `metric_kind` or `value_type` than the input time series. - * - * Time series data must first be aligned (see `per_series_aligner`) in order - * to perform cross-time series reduction. If `cross_series_reducer` is - * specified, then `per_series_aligner` must be specified, and must not be - * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an - * error is returned. - * - * The number should be among the values of [Reducer]{@link google.monitoring.v3.Reducer} - * - * @property {string[]} groupByFields - * The set of fields to preserve when `cross_series_reducer` is - * specified. The `group_by_fields` determine how the time series are - * partitioned into subsets prior to applying the aggregation - * operation. Each subset contains time series that have the same - * value for each of the grouping fields. Each individual time - * series is a member of exactly one subset. The - * `cross_series_reducer` is applied to each subset of time series. - * It is not possible to reduce across different resource types, so - * this field implicitly contains `resource.type`. Fields not - * specified in `group_by_fields` are aggregated away. If - * `group_by_fields` is not specified and all the time series have - * the same resource type, then the time series are aggregated into - * a single output time series. If `cross_series_reducer` is not - * defined, this field is ignored. - * - * @typedef Aggregation - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Aggregation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/common.proto} - */ -const Aggregation = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The `Aligner` specifies the operation that will be applied to the data - * points in each alignment period in a time series. Except for - * `ALIGN_NONE`, which specifies that no operation be applied, each alignment - * operation replaces the set of data values in each alignment period with - * a single value: the result of applying the operation to the data values. - * An aligned time series has a single data value at the end of each - * `alignment_period`. - * - * An alignment operation can change the data type of the values, too. For - * example, if you apply a counting operation to boolean values, the data - * `value_type` in the original time series is `BOOLEAN`, but the `value_type` - * in the aligned result is `INT64`. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - Aligner: { - - /** - * No alignment. Raw data is returned. Not valid if cross-series reduction - * is requested. The `value_type` of the result is the same as the - * `value_type` of the input. - */ - ALIGN_NONE: 0, - - /** - * Align and convert to - * DELTA. - * The output is `delta = y1 - y0`. - * - * This alignment is valid for - * CUMULATIVE and - * `DELTA` metrics. If the selected alignment period results in periods - * with no data, then the aligned value for such a period is created by - * interpolation. The `value_type` of the aligned result is the same as - * the `value_type` of the input. - */ - ALIGN_DELTA: 1, - - /** - * Align and convert to a rate. The result is computed as - * `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". - * Think of this aligner as providing the slope of the line that passes - * through the value at the start and at the end of the `alignment_period`. - * - * This aligner is valid for `CUMULATIVE` - * and `DELTA` metrics with numeric values. If the selected alignment - * period results in periods with no data, then the aligned value for - * such a period is created by interpolation. The output is a `GAUGE` - * metric with `value_type` `DOUBLE`. - * - * If, by "rate", you mean "percentage change", see the - * `ALIGN_PERCENT_CHANGE` aligner instead. - */ - ALIGN_RATE: 2, - - /** - * Align by interpolating between adjacent points around the alignment - * period boundary. This aligner is valid for `GAUGE` metrics with - * numeric values. The `value_type` of the aligned result is the same as the - * `value_type` of the input. - */ - ALIGN_INTERPOLATE: 3, - - /** - * Align by moving the most recent data point before the end of the - * alignment period to the boundary at the end of the alignment - * period. This aligner is valid for `GAUGE` metrics. The `value_type` of - * the aligned result is the same as the `value_type` of the input. - */ - ALIGN_NEXT_OLDER: 4, - - /** - * Align the time series by returning the minimum value in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric values. The `value_type` of the aligned result is the same as - * the `value_type` of the input. - */ - ALIGN_MIN: 10, - - /** - * Align the time series by returning the maximum value in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric values. The `value_type` of the aligned result is the same as - * the `value_type` of the input. - */ - ALIGN_MAX: 11, - - /** - * Align the time series by returning the mean value in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric values. The `value_type` of the aligned result is `DOUBLE`. - */ - ALIGN_MEAN: 12, - - /** - * Align the time series by returning the number of values in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric or Boolean values. The `value_type` of the aligned result is - * `INT64`. - */ - ALIGN_COUNT: 13, - - /** - * Align the time series by returning the sum of the values in each - * alignment period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with numeric and distribution values. The `value_type` of the - * aligned result is the same as the `value_type` of the input. - */ - ALIGN_SUM: 14, - - /** - * Align the time series by returning the standard deviation of the values - * in each alignment period. This aligner is valid for `GAUGE` and - * `DELTA` metrics with numeric values. The `value_type` of the output is - * `DOUBLE`. - */ - ALIGN_STDDEV: 15, - - /** - * Align the time series by returning the number of `True` values in - * each alignment period. This aligner is valid for `GAUGE` metrics with - * Boolean values. The `value_type` of the output is `INT64`. - */ - ALIGN_COUNT_TRUE: 16, - - /** - * Align the time series by returning the number of `False` values in - * each alignment period. This aligner is valid for `GAUGE` metrics with - * Boolean values. The `value_type` of the output is `INT64`. - */ - ALIGN_COUNT_FALSE: 24, - - /** - * Align the time series by returning the ratio of the number of `True` - * values to the total number of values in each alignment period. This - * aligner is valid for `GAUGE` metrics with Boolean values. The output - * value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. - */ - ALIGN_FRACTION_TRUE: 17, - - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 99th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - */ - ALIGN_PERCENTILE_99: 18, - - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 95th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - */ - ALIGN_PERCENTILE_95: 19, - - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 50th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - */ - ALIGN_PERCENTILE_50: 20, - - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 5th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - */ - ALIGN_PERCENTILE_05: 21, - - /** - * Align and convert to a percentage change. This aligner is valid for - * `GAUGE` and `DELTA` metrics with numeric values. This alignment returns - * `((current - previous)/previous) * 100`, where the value of `previous` is - * determined based on the `alignment_period`. - * - * If the values of `current` and `previous` are both 0, then the returned - * value is 0. If only `previous` is 0, the returned value is infinity. - * - * A 10-minute moving mean is computed at each point of the alignment period - * prior to the above calculation to smooth the metric and prevent false - * positives from very short-lived spikes. The moving mean is only - * applicable for data whose values are `>= 0`. Any values `< 0` are - * treated as a missing datapoint, and are ignored. While `DELTA` - * metrics are accepted by this alignment, special care should be taken that - * the values for the metric will always be positive. The output is a - * `GAUGE` metric with `value_type` `DOUBLE`. - */ - ALIGN_PERCENT_CHANGE: 23 - }, - - /** - * A Reducer operation describes how to aggregate data points from multiple - * time series into a single time series, where the value of each data point - * in the resulting series is a function of all the already aligned values in - * the input time series. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - Reducer: { - - /** - * No cross-time series reduction. The output of the `Aligner` is - * returned. - */ - REDUCE_NONE: 0, - - /** - * Reduce by computing the mean value across time series for each - * alignment period. This reducer is valid for - * DELTA and - * GAUGE metrics with - * numeric or distribution values. The `value_type` of the output is - * DOUBLE. - */ - REDUCE_MEAN: 1, - - /** - * Reduce by computing the minimum value across time series for each - * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - * with numeric values. The `value_type` of the output is the same as the - * `value_type` of the input. - */ - REDUCE_MIN: 2, - - /** - * Reduce by computing the maximum value across time series for each - * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - * with numeric values. The `value_type` of the output is the same as the - * `value_type` of the input. - */ - REDUCE_MAX: 3, - - /** - * Reduce by computing the sum across time series for each - * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - * with numeric and distribution values. The `value_type` of the output is - * the same as the `value_type` of the input. - */ - REDUCE_SUM: 4, - - /** - * Reduce by computing the standard deviation across time series - * for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics with numeric or distribution values. The `value_type` - * of the output is `DOUBLE`. - */ - REDUCE_STDDEV: 5, - - /** - * Reduce by computing the number of data points across time series - * for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics of numeric, Boolean, distribution, and string - * `value_type`. The `value_type` of the output is `INT64`. - */ - REDUCE_COUNT: 6, - - /** - * Reduce by computing the number of `True`-valued data points across time - * series for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output - * is `INT64`. - */ - REDUCE_COUNT_TRUE: 7, - - /** - * Reduce by computing the number of `False`-valued data points across time - * series for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output - * is `INT64`. - */ - REDUCE_COUNT_FALSE: 15, - - /** - * Reduce by computing the ratio of the number of `True`-valued data points - * to the total number of data points for each alignment period. This - * reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. - * The output value is in the range [0.0, 1.0] and has `value_type` - * `DOUBLE`. - */ - REDUCE_FRACTION_TRUE: 8, - - /** - * Reduce by computing the [99th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - */ - REDUCE_PERCENTILE_99: 9, - - /** - * Reduce by computing the [95th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - */ - REDUCE_PERCENTILE_95: 10, - - /** - * Reduce by computing the [50th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - */ - REDUCE_PERCENTILE_50: 11, - - /** - * Reduce by computing the [5th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - */ - REDUCE_PERCENTILE_05: 12 - } -}; - -/** - * Specifies an ordering relationship on two arguments, called `left` and - * `right`. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ -const ComparisonType = { - - /** - * No ordering relationship is specified. - */ - COMPARISON_UNSPECIFIED: 0, - - /** - * True if the left argument is greater than the right argument. - */ - COMPARISON_GT: 1, - - /** - * True if the left argument is greater than or equal to the right argument. - */ - COMPARISON_GE: 2, - - /** - * True if the left argument is less than the right argument. - */ - COMPARISON_LT: 3, - - /** - * True if the left argument is less than or equal to the right argument. - */ - COMPARISON_LE: 4, - - /** - * True if the left argument is equal to the right argument. - */ - COMPARISON_EQ: 5, - - /** - * True if the left argument is not equal to the right argument. - */ - COMPARISON_NE: 6 -}; - -/** - * The tier of service for a Workspace. Please see the - * [service tiers - * documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more - * details. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ -const ServiceTier = { - - /** - * An invalid sentinel value, used to indicate that a tier has not - * been provided explicitly. - */ - SERVICE_TIER_UNSPECIFIED: 0, - - /** - * The Stackdriver Basic tier, a free tier of service that provides basic - * features, a moderate allotment of logs, and access to built-in metrics. - * A number of features are not available in this tier. For more details, - * see [the service tiers - * documentation](https://cloud.google.com/monitoring/workspaces/tiers). - */ - SERVICE_TIER_BASIC: 1, - - /** - * The Stackdriver Premium tier, a higher, more expensive tier of service - * that provides access to all Stackdriver features, lets you use Stackdriver - * with AWS accounts, and has a larger allotments for logs and metrics. For - * more details, see [the service tiers - * documentation](https://cloud.google.com/monitoring/workspaces/tiers). - */ - SERVICE_TIER_PREMIUM: 2 -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js deleted file mode 100644 index 2626b0f74da..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group.js +++ /dev/null @@ -1,75 +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 description of a dynamic collection of monitored resources. Each group - * has a filter that is matched against monitored resources and their associated - * metadata. If a group's filter matches an available monitored resource, then - * that resource is a member of that group. Groups can contain any number of - * monitored resources, and each monitored resource can be a member of any - * number of groups. - * - * Groups can be nested in parent-child hierarchies. The `parentName` field - * identifies an optional parent for each group. If a group has a parent, then - * the only monitored resources available to be matched by the group's filter - * are the resources contained in the parent group. In other words, a group - * contains the monitored resources that match its filter and the filters of all - * the group's ancestors. A group without a parent can contain any monitored - * resource. - * - * For example, consider an infrastructure running a set of instances with two - * user-defined tags: `"environment"` and `"role"`. A parent group has a filter, - * `environment="production"`. A child of that parent group has a filter, - * `role="transcoder"`. The parent group contains all instances in the - * production environment, regardless of their roles. The child group contains - * instances that have the transcoder role *and* are in the production - * environment. - * - * The monitored resources contained in a group can change at any moment, - * depending on what resources exist and what filters are associated with the - * group and its ancestors. - * - * @property {string} name - * Output only. The name of this group. The format is - * `"projects/{project_id_or_number}/groups/{group_id}"`. - * When creating a group, this field is ignored and a new name is created - * consisting of the project specified in the call to `CreateGroup` - * and a unique `{group_id}` that is generated automatically. - * - * @property {string} displayName - * A user-assigned name for this group, used only for display purposes. - * - * @property {string} parentName - * The name of the group's parent, if it has one. - * The format is `"projects/{project_id_or_number}/groups/{group_id}"`. - * For groups with no parent, `parentName` is the empty string, `""`. - * - * @property {string} filter - * The filter used to determine which monitored resources belong to this - * group. - * - * @property {boolean} isCluster - * If true, the members of this group are considered to be a cluster. - * The system can perform additional analysis on groups that are clusters. - * - * @typedef Group - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Group definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group.proto} - */ -const Group = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js deleted file mode 100644 index 7d9a40b30d2..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_group_service.js +++ /dev/null @@ -1,222 +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 `ListGroup` request. - * - * @property {string} name - * Required. The project whose groups are to be listed. The format is - * `"projects/{project_id_or_number}"`. - * - * @property {string} childrenOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups whose `parentName` field contains the group - * name. If no groups have this parent, the results are empty. - * - * @property {string} ancestorsOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * - * @property {string} descendantsOfGroup - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `childrenOfGroup` filter, and includes - * children-of-children, and so forth. - * - * @property {number} pageSize - * A positive number that is the maximum number of results to return. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @typedef ListGroupsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListGroupsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const ListGroupsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListGroups` response. - * - * @property {Object[]} group - * The groups that match the specified filters. - * - * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @typedef ListGroupsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListGroupsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const ListGroupsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetGroup` request. - * - * @property {string} name - * Required. The group to retrieve. The format is - * `"projects/{project_id_or_number}/groups/{group_id}"`. - * - * @typedef GetGroupRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const GetGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `CreateGroup` request. - * - * @property {string} name - * Required. The project in which to create the group. The format is - * `"projects/{project_id_or_number}"`. - * - * @property {Object} group - * Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. - * - * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * - * @property {boolean} validateOnly - * If true, validate this request but do not create the group. - * - * @typedef CreateGroupRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const CreateGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `UpdateGroup` request. - * - * @property {Object} group - * Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. - * - * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * - * @property {boolean} validateOnly - * If true, validate this request but do not update the existing group. - * - * @typedef UpdateGroupRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UpdateGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const UpdateGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `DeleteGroup` request. The default behavior is to be able to delete a - * single group without any descendants. - * - * @property {string} name - * Required. The group to delete. The format is - * `"projects/{project_id_or_number}/groups/{group_id}"`. - * - * @property {boolean} recursive - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default value is false. - * - * @typedef DeleteGroupRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteGroupRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const DeleteGroupRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListGroupMembers` request. - * - * @property {string} name - * Required. The group whose members are listed. The format is - * `"projects/{project_id_or_number}/groups/{group_id}"`. - * - * @property {number} pageSize - * A positive number that is the maximum number of results to return. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @property {string} filter - * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing - * the members to be returned. The filter may reference the type, labels, and - * metadata of monitored resources that comprise the group. - * For example, to return only resources representing Compute Engine VM - * instances, use this filter: - * - * resource.type = "gce_instance" - * - * @property {Object} interval - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * - * @typedef ListGroupMembersRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListGroupMembersRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const ListGroupMembersRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListGroupMembers` response. - * - * @property {Object[]} members - * A set of monitored resources in the group. - * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is - * set to a non-empty value. To see the additional results, use that value as - * `pageToken` in the next call to this method. - * - * @property {number} totalSize - * The total number of elements matching this request. - * - * @typedef ListGroupMembersResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListGroupMembersResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/group_service.proto} - */ -const ListGroupMembersResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js deleted file mode 100644 index db79df90acc..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric.js +++ /dev/null @@ -1,113 +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 single data point in a time series. - * - * @property {Object} interval - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time is optional, but if it is supplied, it must equal the - * end time. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying 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. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * - * @property {Object} value - * The value of the data point. - * - * This object should have the same structure as [TypedValue]{@link google.monitoring.v3.TypedValue} - * - * @typedef Point - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Point definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} - */ -const Point = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A collection of data points that describes the time-varying values - * of a metric. A time series is identified by a combination of a - * fully-specified monitored resource and a fully-specified metric. - * This type is used for both listing and creating time series. - * - * @property {Object} metric - * The associated metric. A fully-specified metric used to identify the time - * series. - * - * This object should have the same structure as [Metric]{@link google.api.Metric} - * - * @property {Object} resource - * The associated monitored resource. Custom metrics can use only certain - * monitored resource types in their time series data. - * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * - * @property {Object} metadata - * Output only. The associated monitored resource metadata. When reading a - * a timeseries, this field will include metadata labels that are explicitly - * named in the reduction. When creating a timeseries, this field is ignored. - * - * This object should have the same structure as [MonitoredResourceMetadata]{@link google.api.MonitoredResourceMetadata} - * - * @property {number} metricKind - * The metric kind of the time series. When listing time series, this metric - * kind might be different from the metric kind of the associated metric if - * this time series is an alignment or reduction of other time series. - * - * When creating a time series, this field is optional. If present, it must be - * the same as the metric kind of the associated metric. If the associated - * metric's descriptor must be auto-created, then this field specifies the - * metric kind of the new descriptor and must be either `GAUGE` (the default) - * or `CUMULATIVE`. - * - * The number should be among the values of [MetricKind]{@link google.api.MetricKind} - * - * @property {number} valueType - * The value type of the time series. When listing time series, this value - * type might be different from the value type of the associated metric if - * this time series is an alignment or reduction of other time series. - * - * When creating a time series, this field is optional. If present, it must be - * the same as the type of the data in the `points` field. - * - * The number should be among the values of [ValueType]{@link google.api.ValueType} - * - * @property {Object[]} points - * The data points of this time series. When listing time series, points are - * returned in reverse time order. - * - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * This object should have the same structure as [Point]{@link google.monitoring.v3.Point} - * - * @typedef TimeSeries - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.TimeSeries definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric.proto} - */ -const TimeSeries = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js deleted file mode 100644 index 7947a0f7ce7..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_metric_service.js +++ /dev/null @@ -1,332 +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 `ListMonitoredResourceDescriptors` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * - * @property {string} filter - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing - * the descriptors to be returned. The filter can reference - * the descriptor's type and labels. For example, the - * following filter returns only Google Compute Engine descriptors - * that have an `id` label: - * - * resource.type = starts_with("gce_") AND resource.label:id - * - * @property {number} pageSize - * A positive number that is the maximum number of results to return. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @typedef ListMonitoredResourceDescriptorsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListMonitoredResourceDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const ListMonitoredResourceDescriptorsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListMonitoredResourceDescriptors` response. - * - * @property {Object[]} resourceDescriptors - * The monitored resource descriptors that are available to this project - * and that match `filter`, if present. - * - * This object should have the same structure as [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @typedef ListMonitoredResourceDescriptorsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListMonitoredResourceDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const ListMonitoredResourceDescriptorsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetMonitoredResourceDescriptor` request. - * - * @property {string} name - * Required. The monitored resource descriptor to get. The format is - * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. - * The `{resource_type}` is a predefined type, such as - * `cloudsql_database`. - * - * @typedef GetMonitoredResourceDescriptorRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetMonitoredResourceDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const GetMonitoredResourceDescriptorRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListMetricDescriptors` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * - * @property {string} filter - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * - * metric.type = starts_with("custom.googleapis.com/") - * - * @property {number} pageSize - * A positive number that is the maximum number of results to return. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @typedef ListMetricDescriptorsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListMetricDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const ListMetricDescriptorsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListMetricDescriptors` response. - * - * @property {Object[]} metricDescriptors - * The metric descriptors that are available to the project - * and that match the value of `filter`, if present. - * - * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @typedef ListMetricDescriptorsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListMetricDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const ListMetricDescriptorsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetMetricDescriptor` request. - * - * @property {string} name - * Required. The metric descriptor on which to execute the request. The format is - * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - * An example value of `{metric_id}` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * - * @typedef GetMetricDescriptorRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const GetMetricDescriptorRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `CreateMetricDescriptor` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * - * @property {Object} metricDescriptor - * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. - * - * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} - * - * @typedef CreateMetricDescriptorRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const CreateMetricDescriptorRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `DeleteMetricDescriptor` request. - * - * @property {string} name - * Required. The metric descriptor on which to execute the request. The format is - * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - * An example of `{metric_id}` is: - * `"custom.googleapis.com/my_test_metric"`. - * - * @typedef DeleteMetricDescriptorRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteMetricDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const DeleteMetricDescriptorRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListTimeSeries` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is - * "projects/{project_id_or_number}". - * - * @property {string} filter - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time - * series should be returned. The filter must specify a single metric type, - * and can additionally specify metric labels and other information. For - * example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * - * @property {Object} interval - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * - * @property {Object} aggregation - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * - * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * - * @property {string} orderBy - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * - * @property {number} view - * Required. Specifies which information is returned about the time series. - * - * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} - * - * @property {number} pageSize - * A positive number that is the maximum number of results to return. If - * `page_size` is empty or more than 100,000 results, the effective - * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the - * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is - * the maximum number of `TimeSeries` returned. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @typedef ListTimeSeriesRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListTimeSeriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const ListTimeSeriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Controls which fields are returned by `ListTimeSeries`. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - TimeSeriesView: { - - /** - * Returns the identity of the metric(s), the time series, - * and the time series data. - */ - FULL: 0, - - /** - * Returns the identity of the metric and the time series resource, - * but not the time series data. - */ - HEADERS: 1 - } -}; - -/** - * The `ListTimeSeries` response. - * - * @property {Object[]} timeSeries - * One or more time series that match the filter included in the request. - * - * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @property {Object[]} executionErrors - * Query execution errors that may have caused the time series data returned - * to be incomplete. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @typedef ListTimeSeriesResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListTimeSeriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const ListTimeSeriesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `CreateTimeSeries` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * - * @property {Object[]} timeSeries - * Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * - * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} - * - * @typedef CreateTimeSeriesRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateTimeSeriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/metric_service.proto} - */ -const CreateTimeSeriesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js deleted file mode 100644 index 11849884b18..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_mutation_record.js +++ /dev/null @@ -1,35 +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 change made to a configuration. - * - * @property {Object} mutateTime - * When the change occurred. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {string} mutatedBy - * The email address of the user making the change. - * - * @typedef MutationRecord - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.MutationRecord definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/mutation_record.proto} - */ -const MutationRecord = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js deleted file mode 100644 index a1393ad9764..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification.js +++ /dev/null @@ -1,190 +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 notification channel. The descriptor includes - * the properties of the channel and the set of labels or fields that - * must be specified to configure channels of a given type. - * - * @property {string} name - * The full REST resource name for this descriptor. The syntax is: - * - * projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] - * - * In the above, `[TYPE]` is the value of the `type` field. - * - * @property {string} type - * The type of notification channel, such as "email", "sms", etc. - * Notification channel types are globally unique. - * - * @property {string} displayName - * A human-readable name for the notification channel type. This - * form of the name is suitable for a user interface. - * - * @property {string} description - * A human-readable description of the notification channel - * type. The description may include a description of the properties - * of the channel and pointers to external documentation. - * - * @property {Object[]} labels - * The set of labels that must be defined to identify a particular - * channel of the corresponding type. Each label includes a - * description for how that field should be populated. - * - * This object should have the same structure as [LabelDescriptor]{@link google.api.LabelDescriptor} - * - * @property {number[]} supportedTiers - * The tiers that support this notification channel; the project service tier - * must be one of the supported_tiers. - * - * The number should be among the values of [ServiceTier]{@link google.monitoring.v3.ServiceTier} - * - * @property {number} launchStage - * The product launch stage for channels of this type. - * - * The number should be among the values of [LaunchStage]{@link google.api.LaunchStage} - * - * @typedef NotificationChannelDescriptor - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.NotificationChannelDescriptor definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} - */ -const NotificationChannelDescriptor = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A `NotificationChannel` is a medium through which an alert is - * delivered when a policy violation is detected. Examples of channels - * include email, SMS, and third-party messaging applications. Fields - * containing sensitive information like authentication tokens or - * contact info are only partially populated on retrieval. - * - * @property {string} type - * The type of the notification channel. This field matches the - * value of the NotificationChannelDescriptor.type field. - * - * @property {string} name - * The full REST resource name for this channel. The syntax is: - * - * projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] - * - * The `[CHANNEL_ID]` is automatically assigned by the server on creation. - * - * @property {string} displayName - * An optional human-readable name for this notification channel. It is - * recommended that you specify a non-empty and unique name in order to - * make it easier to identify the channels in your project, though this is - * not enforced. The display name is limited to 512 Unicode characters. - * - * @property {string} description - * An optional human-readable description of this notification channel. This - * description may provide additional details, beyond the display - * name, for the channel. This may not exceed 1024 Unicode characters. - * - * @property {Object.} labels - * Configuration fields that define the channel and its behavior. The - * permissible and required labels are specified in the - * NotificationChannelDescriptor.labels of the - * `NotificationChannelDescriptor` corresponding to the `type` field. - * - * @property {Object.} userLabels - * User-supplied key/value data that does not need to conform to - * the corresponding `NotificationChannelDescriptor`'s schema, unlike - * the `labels` field. This field is intended to be used for organizing - * and identifying the `NotificationChannel` objects. - * - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * @property {number} verificationStatus - * Indicates whether this channel has been verified or not. On a - * `ListNotificationChannels` - * or - * `GetNotificationChannel` - * operation, this field is expected to be populated. - * - * If the value is `UNVERIFIED`, then it indicates that the channel is - * non-functioning (it both requires verification and lacks verification); - * otherwise, it is assumed that the channel works. - * - * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that - * the channel is of a type that does not require verification or that - * this specific channel has been exempted from verification because it was - * created prior to verification being required for channels of this type. - * - * This field cannot be modified using a standard - * `UpdateNotificationChannel` - * operation. To change the value of this field, you must call - * `VerifyNotificationChannel`. - * - * The number should be among the values of [VerificationStatus]{@link google.monitoring.v3.VerificationStatus} - * - * @property {Object} enabled - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * - * This object should have the same structure as [BoolValue]{@link google.protobuf.BoolValue} - * - * @typedef NotificationChannel - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.NotificationChannel definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification.proto} - */ -const NotificationChannel = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Indicates whether the channel has been verified or not. It is illegal - * to specify this field in a - * `CreateNotificationChannel` - * or an - * `UpdateNotificationChannel` - * operation. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - VerificationStatus: { - - /** - * Sentinel value used to indicate that the state is unknown, omitted, or - * is not applicable (as in the case of channels that neither support - * nor require verification in order to function). - */ - VERIFICATION_STATUS_UNSPECIFIED: 0, - - /** - * The channel has yet to be verified and requires verification to function. - * Note that this state also applies to the case where the verification - * process has been initiated by sending a verification code but where - * the verification code has not been submitted to complete the process. - */ - UNVERIFIED: 1, - - /** - * It has been proven that notifications can be received on this - * notification channel and that someone on the project has access - * to messages that are delivered to that channel. - */ - VERIFIED: 2 - } -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js deleted file mode 100644 index c45d834ae50..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_notification_service.js +++ /dev/null @@ -1,329 +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 `ListNotificationChannelDescriptors` request. - * - * @property {string} name - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * - * projects/[PROJECT_ID] - * - * Note that this names the parent container in which to look for the - * descriptors; to retrieve a single descriptor by name, use the - * GetNotificationChannelDescriptor - * operation, instead. - * - * @property {number} pageSize - * The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * @property {string} pageToken - * If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * @typedef ListNotificationChannelDescriptorsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListNotificationChannelDescriptorsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const ListNotificationChannelDescriptorsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListNotificationChannelDescriptors` response. - * - * @property {Object[]} channelDescriptors - * The monitored resource descriptors supported for the specified - * project, optionally filtered. - * - * This object should have the same structure as [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} - * - * @property {string} nextPageToken - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * @typedef ListNotificationChannelDescriptorsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListNotificationChannelDescriptorsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const ListNotificationChannelDescriptorsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetNotificationChannelDescriptor` response. - * - * @property {string} name - * Required. The channel type for which to execute the request. The format is - * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. - * - * @typedef GetNotificationChannelDescriptorRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetNotificationChannelDescriptorRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const GetNotificationChannelDescriptorRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `CreateNotificationChannel` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is: - * - * projects/[PROJECT_ID] - * - * Note that this names the container into which the channel will be - * written. This does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * - * @property {Object} notificationChannel - * Required. The definition of the `NotificationChannel` to create. - * - * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} - * - * @typedef CreateNotificationChannelRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const CreateNotificationChannelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListNotificationChannels` request. - * - * @property {string} name - * Required. The project on which to execute the request. The format is - * `projects/[PROJECT_ID]`. That is, this names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * `GetNotificationChannel` - * operation. - * - * @property {string} filter - * If provided, this field specifies the criteria that must be met by - * notification channels to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * @property {string} orderBy - * A comma-separated list of fields by which to sort the result. Supports - * the same set of fields as in `filter`. Entries can be prefixed with - * a minus sign to sort in descending rather than ascending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * @property {number} pageSize - * The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * @property {string} pageToken - * If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * @typedef ListNotificationChannelsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListNotificationChannelsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const ListNotificationChannelsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListNotificationChannels` response. - * - * @property {Object[]} notificationChannels - * The notification channels defined for the specified project. - * - * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} - * - * @property {string} nextPageToken - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * @typedef ListNotificationChannelsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListNotificationChannelsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const ListNotificationChannelsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetNotificationChannel` request. - * - * @property {string} name - * Required. The channel for which to execute the request. The format is - * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - * - * @typedef GetNotificationChannelRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const GetNotificationChannelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `UpdateNotificationChannel` request. - * - * @property {Object} updateMask - * The fields to update. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @property {Object} notificationChannel - * Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * - * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} - * - * @typedef UpdateNotificationChannelRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UpdateNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const UpdateNotificationChannelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `DeleteNotificationChannel` request. - * - * @property {string} name - * Required. The channel for which to execute the request. The format is - * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - * - * @property {boolean} force - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, channels that are still referenced by an existing - * alerting policy will fail to be deleted in a delete operation. - * - * @typedef DeleteNotificationChannelRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const DeleteNotificationChannelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `SendNotificationChannelVerificationCode` request. - * - * @property {string} name - * Required. The notification channel to which to send a verification code. - * - * @typedef SendNotificationChannelVerificationCodeRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.SendNotificationChannelVerificationCodeRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const SendNotificationChannelVerificationCodeRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetNotificationChannelVerificationCode` request. - * - * @property {string} name - * Required. The notification channel for which a verification code is to be generated - * and retrieved. This must name a channel that is already verified; if - * the specified channel is not verified, the request will fail. - * - * @property {Object} expireTime - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef GetNotificationChannelVerificationCodeRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetNotificationChannelVerificationCodeRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const GetNotificationChannelVerificationCodeRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetNotificationChannelVerificationCode` request. - * - * @property {string} code - * The verification code, which may be used to verify other channels - * that have an equivalent identity (i.e. other channels of the same - * type with the same fingerprint such as other email channels with - * the same email address or other sms channels with the same number). - * - * @property {Object} expireTime - * The expiration time associated with the code that was returned. If - * an expiration was provided in the request, this is the minimum of the - * requested expiration in the request and the max permitted expiration. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef GetNotificationChannelVerificationCodeResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetNotificationChannelVerificationCodeResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const GetNotificationChannelVerificationCodeResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `VerifyNotificationChannel` request. - * - * @property {string} name - * Required. The notification channel to verify. - * - * @property {string} code - * Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * - * @typedef VerifyNotificationChannelRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.VerifyNotificationChannelRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/notification_service.proto} - */ -const VerifyNotificationChannelRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js deleted file mode 100644 index cc56022008d..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service.js +++ /dev/null @@ -1,539 +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 `Service` is a discrete, autonomous, and network-accessible unit, designed - * to solve an individual concern - * ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In - * Stackdriver Monitoring, a `Service` acts as the root resource under which - * operational aspects of the service are accessible. - * - * @property {string} name - * Resource name for this Service. Of the form - * `projects/{project_id}/services/{service_id}`. - * - * @property {string} displayName - * Name used for UI elements listing this Service. - * - * @property {Object} custom - * Custom service type. - * - * This object should have the same structure as [Custom]{@link google.monitoring.v3.Custom} - * - * @property {Object} appEngine - * Type used for App Engine services. - * - * This object should have the same structure as [AppEngine]{@link google.monitoring.v3.AppEngine} - * - * @property {Object} cloudEndpoints - * Type used for Cloud Endpoints services. - * - * This object should have the same structure as [CloudEndpoints]{@link google.monitoring.v3.CloudEndpoints} - * - * @property {Object} clusterIstio - * Type used for Istio services that live in a Kubernetes cluster. - * - * This object should have the same structure as [ClusterIstio]{@link google.monitoring.v3.ClusterIstio} - * - * @property {Object} telemetry - * Configuration for how to query telemetry on a Service. - * - * This object should have the same structure as [Telemetry]{@link google.monitoring.v3.Telemetry} - * - * @typedef Service - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Service definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const Service = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Custom view of service telemetry. Currently a place-holder pending final - * design. - * @typedef Custom - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Service.Custom definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - Custom: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * App Engine service. Learn more at https://cloud.google.com/appengine. - * - * @property {string} moduleId - * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app - * - * @typedef AppEngine - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Service.AppEngine definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - AppEngine: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints. - * - * @property {string} service - * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api - * - * @typedef CloudEndpoints - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Service.CloudEndpoints definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - CloudEndpoints: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Istio service. Learn more at http://istio.io. - * - * @property {string} location - * The location of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `location` resource label in `k8s_cluster` - * resources. - * - * @property {string} clusterName - * The name of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `cluster_name` resource label in - * `k8s_cluster` resources. - * - * @property {string} serviceNamespace - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * @property {string} serviceName - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * @typedef ClusterIstio - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Service.ClusterIstio definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - ClusterIstio: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Configuration for how to query telemetry on a Service. - * - * @property {string} resourceName - * The full name of the resource that defines this service. Formatted as - * described in https://cloud.google.com/apis/design/resource_names. - * - * @typedef Telemetry - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Service.Telemetry definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - Telemetry: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * A Service-Level Objective (SLO) describes a level of desired good service. It - * consists of a service-level indicator (SLI), a performance goal, and a period - * over which the objective is to be evaluated against that goal. The SLO can - * use SLIs defined in a number of different manners. Typical SLOs might include - * "99% of requests in each rolling week have latency below 200 milliseconds" or - * "99.5% of requests in each calendar month return successfully." - * - * @property {string} name - * Resource name for this `ServiceLevelObjective`. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - * - * @property {string} displayName - * Name used for UI elements listing this SLO. - * - * @property {Object} serviceLevelIndicator - * The definition of good service, used to measure and calculate the quality - * of the `Service`'s performance with respect to a single aspect of service - * quality. - * - * This object should have the same structure as [ServiceLevelIndicator]{@link google.monitoring.v3.ServiceLevelIndicator} - * - * @property {number} goal - * The fraction of service that must be good in order for this objective to be - * met. `0 < goal <= 0.999`. - * - * @property {Object} rollingPeriod - * A rolling time period, semantically "in the past ``". - * Must be an integer multiple of 1 day no larger than 30 days. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} calendarPeriod - * A calendar period, semantically "since the start of the current - * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and - * `MONTH` are supported. - * - * The number should be among the values of [CalendarPeriod]{@link google.type.CalendarPeriod} - * - * @typedef ServiceLevelObjective - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ServiceLevelObjective definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const ServiceLevelObjective = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * `ServiceLevelObjective.View` determines what form of - * `ServiceLevelObjective` is returned from `GetServiceLevelObjective`, - * `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - View: { - - /** - * Same as FULL. - */ - VIEW_UNSPECIFIED: 0, - - /** - * Return the embedded `ServiceLevelIndicator` in the form in which it was - * defined. If it was defined using a `BasicSli`, return that `BasicSli`. - */ - FULL: 2, - - /** - * For `ServiceLevelIndicator`s using `BasicSli` articulation, instead - * return the `ServiceLevelIndicator` with its mode of computation fully - * spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using - * `RequestBasedSli` or `WindowsBasedSli`, return the - * `ServiceLevelIndicator` as it was provided. - */ - EXPLICIT: 1 - } -}; - -/** - * A Service-Level Indicator (SLI) describes the "performance" of a service. For - * some services, the SLI is well-defined. In such cases, the SLI can be - * described easily by referencing the well-known SLI and providing the needed - * parameters. Alternatively, a "custom" SLI can be defined with a query to the - * underlying metric store. An SLI is defined to be `good_service / - * total_service` over any queried time interval. The value of performance - * always falls into the range `0 <= performance <= 1`. A custom SLI describes - * how to compute this ratio, whether this is by dividing values from a pair of - * time series, cutting a `Distribution` into good and bad counts, or counting - * time windows in which the service complies with a criterion. For separation - * of concerns, a single Service-Level Indicator measures performance for only - * one aspect of service quality, such as fraction of successful queries or - * fast-enough queries. - * - * @property {Object} basicSli - * Basic SLI on a well-known service type. - * - * This object should have the same structure as [BasicSli]{@link google.monitoring.v3.BasicSli} - * - * @property {Object} requestBased - * Request-based SLIs - * - * This object should have the same structure as [RequestBasedSli]{@link google.monitoring.v3.RequestBasedSli} - * - * @property {Object} windowsBased - * Windows-based SLIs - * - * This object should have the same structure as [WindowsBasedSli]{@link google.monitoring.v3.WindowsBasedSli} - * - * @typedef ServiceLevelIndicator - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ServiceLevelIndicator definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const ServiceLevelIndicator = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * An SLI measuring performance on a well-known service type. Performance will - * be computed on the basis of pre-defined metrics. The type of the - * `service_resource` determines the metrics to use and the - * `service_resource.labels` and `metric_labels` are used to construct a - * monitoring filter to filter that metric down to just the data relevant to - * this service. - * - * @property {string[]} method - * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from - * other methods will not be used to calculate performance for this SLI. If - * omitted, this SLI applies to all the Service's methods. For service types - * that don't support breaking down by method, setting this field will result - * in an error. - * - * @property {string[]} location - * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry - * from other locations will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all locations in which the Service has - * activity. For service types that don't support breaking down by location, - * setting this field will result in an error. - * - * @property {string[]} version - * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry - * from other API versions will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all API versions. For service types - * that don't support breaking down by version, setting this field will result - * in an error. - * - * @property {Object} availability - * Good service is defined to be the count of requests made to this service - * that return successfully. - * - * This object should have the same structure as [AvailabilityCriteria]{@link google.monitoring.v3.AvailabilityCriteria} - * - * @property {Object} latency - * Good service is defined to be the count of requests made to this service - * that are fast enough with respect to `latency.threshold`. - * - * This object should have the same structure as [LatencyCriteria]{@link google.monitoring.v3.LatencyCriteria} - * - * @typedef BasicSli - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.BasicSli definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const BasicSli = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Future parameters for the availability SLI. - * @typedef AvailabilityCriteria - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.BasicSli.AvailabilityCriteria definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - AvailabilityCriteria: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Parameters for a latency threshold SLI. - * - * @property {Object} threshold - * Good service is defined to be the count of requests made to this service - * that return in no more than `threshold`. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @typedef LatencyCriteria - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.BasicSli.LatencyCriteria definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - LatencyCriteria: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * Range of numerical values, inclusive of `min` and exclusive of `max`. If the - * open range "< range.max" is desired, set `range.min = -infinity`. If the open - * range ">= range.min" is desired, set `range.max = infinity`. - * - * @property {number} min - * Range minimum. - * - * @property {number} max - * Range maximum. - * - * @typedef Range - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const Range = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Service Level Indicators for which atomic units of service are counted - * directly. - * - * @property {Object} goodTotalRatio - * `good_total_ratio` is used when the ratio of `good_service` to - * `total_service` is computed from two `TimeSeries`. - * - * This object should have the same structure as [TimeSeriesRatio]{@link google.monitoring.v3.TimeSeriesRatio} - * - * @property {Object} distributionCut - * `distribution_cut` is used when `good_service` is a count of values - * aggregated in a `Distribution` that fall into a good range. The - * `total_service` is the total count of all values aggregated in the - * `Distribution`. - * - * This object should have the same structure as [DistributionCut]{@link google.monitoring.v3.DistributionCut} - * - * @typedef RequestBasedSli - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.RequestBasedSli definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const RequestBasedSli = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the - * `good_service / total_service` ratio. The specified `TimeSeries` must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify - * exactly two of good, bad, and total, and the relationship `good_service + - * bad_service = total_service` will be assumed. - * - * @property {string} goodServiceFilter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying good service provided. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * @property {string} badServiceFilter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying bad service, either demanded service - * that was not provided or demanded service that was of inadequate quality. - * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have - * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * @property {string} totalServiceFilter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying total demanded service. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * @typedef TimeSeriesRatio - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.TimeSeriesRatio definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const TimeSeriesRatio = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A `DistributionCut` defines a `TimeSeries` and thresholds used for measuring - * good service and total service. The `TimeSeries` must have `ValueType = - * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. The - * computed `good_service` will be the count of values x in the `Distribution` - * such that `range.min <= x < range.max`. - * - * @property {string} distributionFilter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` aggregating values. Must have `ValueType = - * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * @property {Object} range - * Range of values considered "good." For a one-sided range, set one bound to - * an infinite value. - * - * This object should have the same structure as [Range]{@link google.monitoring.v3.Range} - * - * @typedef DistributionCut - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DistributionCut definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const DistributionCut = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A `WindowsBasedSli` defines `good_service` as the count of time windows for - * which the provided service was of good quality. Criteria for determining - * if service was good are embedded in the `window_criterion`. - * - * @property {string} goodBadMetricFilter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if - * any `true` values appear in the window. - * - * @property {Object} goodTotalRatioThreshold - * A window is good if its `performance` is high enough. - * - * This object should have the same structure as [PerformanceThreshold]{@link google.monitoring.v3.PerformanceThreshold} - * - * @property {Object} metricMeanInRange - * A window is good if the metric's value is in a good range, averaged - * across returned streams. - * - * This object should have the same structure as [MetricRange]{@link google.monitoring.v3.MetricRange} - * - * @property {Object} metricSumInRange - * A window is good if the metric's value is in a good range, summed across - * returned streams. - * - * This object should have the same structure as [MetricRange]{@link google.monitoring.v3.MetricRange} - * - * @property {Object} windowPeriod - * Duration over which window quality is evaluated. Must be an integer - * fraction of a day and at least `60s`. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @typedef WindowsBasedSli - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.WindowsBasedSli definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ -const WindowsBasedSli = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * A `PerformanceThreshold` is used when each window is good when that window - * has a sufficiently high `performance`. - * - * @property {Object} performance - * `RequestBasedSli` to evaluate to judge window quality. - * - * This object should have the same structure as [RequestBasedSli]{@link google.monitoring.v3.RequestBasedSli} - * - * @property {Object} basicSliPerformance - * `BasicSli` to evaluate to judge window quality. - * - * This object should have the same structure as [BasicSli]{@link google.monitoring.v3.BasicSli} - * - * @property {number} threshold - * If window `performance >= threshold`, the window is counted as good. - * - * @typedef PerformanceThreshold - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.WindowsBasedSli.PerformanceThreshold definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - PerformanceThreshold: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * A `MetricRange` is used when each window is good when the value x of a - * single `TimeSeries` satisfies `range.min <= x < range.max`. The provided - * `TimeSeries` must have `ValueType = INT64` or `ValueType = DOUBLE` and - * `MetricKind = GAUGE`. - * - * @property {string} timeSeries - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying the `TimeSeries` to use for evaluating window quality. - * - * @property {Object} range - * Range of values considered "good." For a one-sided range, set one bound - * to an infinite value. - * - * This object should have the same structure as [Range]{@link google.monitoring.v3.Range} - * - * @typedef MetricRange - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.WindowsBasedSli.MetricRange definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service.proto} - */ - MetricRange: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js deleted file mode 100644 index 0add0041cf3..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_service_service.js +++ /dev/null @@ -1,299 +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 `CreateService` request. - * - * @property {string} parent - * Required. Resource name of the parent workspace. - * Of the form `projects/{project_id}`. - * - * @property {string} serviceId - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern [a-z0-9\-]+ - * - * @property {Object} service - * Required. The `Service` to create. - * - * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} - * - * @typedef CreateServiceRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const CreateServiceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetService` request. - * - * @property {string} name - * Required. Resource name of the `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. - * - * @typedef GetServiceRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const GetServiceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListServices` request. - * - * @property {string} parent - * Required. Resource name of the parent `Workspace`. - * Of the form `projects/{project_id}`. - * - * @property {string} filter - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` - * - `cluster_istio.location` - * - `cluster_istio.cluster_name` - * - `cluster_istio.service_namespace` - * - `cluster_istio.service_name` - * - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". - * - * @property {number} pageSize - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @typedef ListServicesRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListServicesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const ListServicesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListServices` response. - * - * @property {Object[]} services - * The `Service`s matching the specified filter. - * - * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @typedef ListServicesResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListServicesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const ListServicesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `UpdateService` request. - * - * @property {Object} service - * Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * - * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} - * - * @property {Object} updateMask - * A set of field paths defining which fields to use for the update. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateServiceRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UpdateServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const UpdateServiceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `DeleteService` request. - * - * @property {string} name - * Required. Resource name of the `Service` to delete. - * Of the form `projects/{project_id}/services/{service_id}`. - * - * @typedef DeleteServiceRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteServiceRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const DeleteServiceRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `CreateServiceLevelObjective` request. - * - * @property {string} parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. - * - * @property {string} serviceLevelObjectiveId - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern [a-z0-9\-]+ - * - * @property {Object} serviceLevelObjective - * Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * - * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} - * - * @typedef CreateServiceLevelObjectiveRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const CreateServiceLevelObjectiveRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `GetServiceLevelObjective` request. - * - * @property {string} name - * Required. Resource name of the `ServiceLevelObjective` to get. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - * - * @property {number} view - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * The number should be among the values of [View]{@link google.monitoring.v3.View} - * - * @typedef GetServiceLevelObjectiveRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const GetServiceLevelObjectiveRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListServiceLevelObjectives` request. - * - * @property {string} parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. - * - * @property {string} filter - * A filter specifying what `ServiceLevelObjective`s to return. - * - * @property {number} pageSize - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * @property {number} view - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * The number should be among the values of [View]{@link google.monitoring.v3.View} - * - * @typedef ListServiceLevelObjectivesRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListServiceLevelObjectivesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const ListServiceLevelObjectivesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `ListServiceLevelObjectives` response. - * - * @property {Object[]} serviceLevelObjectives - * The `ServiceLevelObjective`s matching the specified filter. - * - * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} - * - * @property {string} nextPageToken - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `pageToken` in the next call to this method. - * - * @typedef ListServiceLevelObjectivesResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListServiceLevelObjectivesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const ListServiceLevelObjectivesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `UpdateServiceLevelObjective` request. - * - * @property {Object} serviceLevelObjective - * Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * - * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} - * - * @property {Object} updateMask - * A set of field paths defining which fields to use for the update. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateServiceLevelObjectiveRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UpdateServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const UpdateServiceLevelObjectiveRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The `DeleteServiceLevelObjective` request. - * - * @property {string} name - * Required. Resource name of the `ServiceLevelObjective` to delete. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - * - * @typedef DeleteServiceLevelObjectiveRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteServiceLevelObjectiveRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/service_service.proto} - */ -const DeleteServiceLevelObjectiveRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js deleted file mode 100644 index 4f171a93428..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime.js +++ /dev/null @@ -1,469 +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 internal checker allows Uptime checks to run on private/internal GCP - * resources. - * - * @property {string} name - * A unique resource name for this InternalChecker. The format is: - * - * `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. - * - * `[PROJECT_ID]` is the Stackdriver Workspace project for the - * Uptime check config associated with the internal checker. - * - * @property {string} displayName - * The checker's human-readable name. The display name - * should be unique within a Stackdriver Workspace in order to make it easier - * to identify; however, uniqueness is not enforced. - * - * @property {string} network - * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the - * internal resource lives (ex: "default"). - * - * @property {string} gcpZone - * The GCP zone the Uptime check should egress from. Only respected for - * internal Uptime checks, where internal_network is specified. - * - * @property {string} peerProjectId - * The GCP project ID where the internal checker lives. Not necessary - * the same as the Workspace project. - * - * @property {number} state - * The current operational state of the internal checker. - * - * The number should be among the values of [State]{@link google.monitoring.v3.State} - * - * @typedef InternalChecker - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.InternalChecker definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ -const InternalChecker = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Operational states for an internal checker. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - State: { - - /** - * An internal checker should never be in the unspecified state. - */ - UNSPECIFIED: 0, - - /** - * The checker is being created, provisioned, and configured. A checker in - * this state can be returned by `ListInternalCheckers` or - * `GetInternalChecker`, as well as by examining the [long running - * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) - * that created it. - */ - CREATING: 1, - - /** - * The checker is running and available for use. A checker in this state - * can be returned by `ListInternalCheckers` or `GetInternalChecker` as - * well as by examining the [long running - * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) - * that created it. - * If a checker is being torn down, it is neither visible nor usable, so - * there is no "deleting" or "down" state. - */ - RUNNING: 2 - } -}; - -/** - * This message configures which resources and services to monitor for - * availability. - * - * @property {string} name - * A unique resource name for this Uptime check configuration. The format is: - * - * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - * - * This field should be omitted when creating the Uptime check configuration; - * on create, the resource name is assigned by the server and included in the - * response. - * - * @property {string} displayName - * A human-friendly name for the Uptime check configuration. The display name - * should be unique within a Stackdriver Workspace in order to make it easier - * to identify; however, uniqueness is not enforced. Required. - * - * @property {Object} monitoredResource - * The [monitored - * resource](https://cloud.google.com/monitoring/api/resources) associated - * with the configuration. - * The following monitored resource types are supported for Uptime checks: - * `uptime_url`, - * `gce_instance`, - * `gae_app`, - * `aws_ec2_instance`, - * `aws_elb_load_balancer` - * - * This object should have the same structure as [MonitoredResource]{@link google.api.MonitoredResource} - * - * @property {Object} resourceGroup - * The group resource associated with the configuration. - * - * This object should have the same structure as [ResourceGroup]{@link google.monitoring.v3.ResourceGroup} - * - * @property {Object} httpCheck - * Contains information needed to make an HTTP or HTTPS check. - * - * This object should have the same structure as [HttpCheck]{@link google.monitoring.v3.HttpCheck} - * - * @property {Object} tcpCheck - * Contains information needed to make a TCP check. - * - * This object should have the same structure as [TcpCheck]{@link google.monitoring.v3.TcpCheck} - * - * @property {Object} period - * How often, in seconds, the Uptime check is performed. - * Currently, the only supported values are `60s` (1 minute), `300s` - * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - * defaults to `60s`. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} timeout - * The maximum amount of time to wait for the request to complete (must be - * between 1 and 60 seconds). Required. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object[]} contentMatchers - * The content that is expected to appear in the data returned by the target - * server against which the check is run. Currently, only the first entry - * in the `content_matchers` list is supported, and additional entries will - * be ignored. This field is optional and should only be specified if a - * content match is required as part of the/ Uptime check. - * - * This object should have the same structure as [ContentMatcher]{@link google.monitoring.v3.ContentMatcher} - * - * @property {number[]} selectedRegions - * The list of regions from which the check will be run. - * Some regions contain one location, and others contain more than one. - * If this field is specified, enough regions must be provided to include a - * minimum of 3 locations. Not specifying this field will result in Uptime - * checks running from all available regions. - * - * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} - * - * @property {boolean} isInternal - * If this is `true`, then checks are made only from the 'internal_checkers'. - * If it is `false`, then checks are made only from the 'selected_regions'. - * It is an error to provide 'selected_regions' when is_internal is `true`, - * or to provide 'internal_checkers' when is_internal is `false`. - * - * @property {Object[]} internalCheckers - * The internal checkers that this check will egress from. If `is_internal` is - * `true` and this list is empty, the check will egress from all the - * InternalCheckers configured for the project that owns this - * `UptimeCheckConfig`. - * - * This object should have the same structure as [InternalChecker]{@link google.monitoring.v3.InternalChecker} - * - * @typedef UptimeCheckConfig - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ -const UptimeCheckConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The resource submessage for group checks. It can be used instead of a - * monitored resource, when multiple resources are being monitored. - * - * @property {string} groupId - * The group of resources being monitored. Should be only the `[GROUP_ID]`, - * and not the full-path `projects/[PROJECT_ID]/groups/[GROUP_ID]`. - * - * @property {number} resourceType - * The resource type of the group members. - * - * The number should be among the values of [GroupResourceType]{@link google.monitoring.v3.GroupResourceType} - * - * @typedef ResourceGroup - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.ResourceGroup definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - ResourceGroup: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Information involved in an HTTP/HTTPS Uptime check request. - * - * @property {boolean} useSsl - * If `true`, use HTTPS instead of HTTP to run the check. - * - * @property {string} path - * Optional (defaults to "/"). The path to the page against which to run - * the check. Will be combined with the `host` (specified within the - * `monitored_resource`) and `port` to construct the full URL. If the - * provided path does not begin with "/", a "/" will be prepended - * automatically. - * - * @property {number} port - * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when - * `use_ssl` is `true`). The TCP port on the HTTP server against which to - * run the check. Will be combined with host (specified within the - * `monitored_resource`) and `path` to construct the full URL. - * - * @property {Object} authInfo - * The authentication information. Optional when creating an HTTP check; - * defaults to empty. - * - * This object should have the same structure as [BasicAuthentication]{@link google.monitoring.v3.BasicAuthentication} - * - * @property {boolean} maskHeaders - * Boolean specifiying whether to encrypt the header information. - * Encryption should be specified for any headers related to authentication - * that you do not wish to be seen when retrieving the configuration. The - * server will be responsible for encrypting the headers. - * On Get/List calls, if `mask_headers` is set to `true` then the headers - * will be obscured with `******.` - * - * @property {Object.} headers - * The list of headers to send as part of the Uptime check request. - * If two headers have the same key and different values, they should - * be entered as a single header, with the value being a comma-separated - * list of all the desired values as described at - * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). - * Entering two separate headers with the same key in a Create call will - * cause the first to be overwritten by the second. - * The maximum number of headers allowed is 100. - * - * @property {boolean} validateSsl - * Boolean specifying whether to include SSL certificate validation as a - * part of the Uptime check. Only applies to checks where - * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, - * setting `validate_ssl` to `true` has no effect. - * - * @typedef HttpCheck - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.HttpCheck definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - HttpCheck: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The authentication parameters to provide to the specified resource or - * URL that requires a username and password. Currently, only - * [Basic HTTP authentication](https://tools.ietf.org/html/rfc7617) is - * supported in Uptime checks. - * - * @property {string} username - * The username to use when authenticating with the HTTP server. - * - * @property {string} password - * The password to use when authenticating with the HTTP server. - * - * @typedef BasicAuthentication - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - BasicAuthentication: { - // This is for documentation. Actual contents will be loaded by gRPC. - } - }, - - /** - * Information required for a TCP Uptime check request. - * - * @property {number} port - * The TCP port on the server against which to run the check. Will be - * combined with host (specified within the `monitored_resource`) to - * construct the full URL. Required. - * - * @typedef TcpCheck - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.TcpCheck definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - TcpCheck: { - // This is for documentation. Actual contents will be loaded by gRPC. - }, - - /** - * Optional. Used to perform content matching. This allows matching based on - * substrings and regular expressions, together with their negations. Only the - * first 4 MB of an HTTP or HTTPS check's response (and the first - * 1 MB of a TCP check's response) are examined for purposes of content - * matching. - * - * @property {string} content - * String or regex content to match. Maximum 1024 bytes. An empty `content` - * string indicates no content matching is to be performed. - * - * @property {number} matcher - * The type of content matcher that will be applied to the server output, - * compared to the `content` string when the check is run. - * - * The number should be among the values of [ContentMatcherOption]{@link google.monitoring.v3.ContentMatcherOption} - * - * @typedef ContentMatcher - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckConfig.ContentMatcher definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ - ContentMatcher: { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Options to perform content matching. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ - ContentMatcherOption: { - - /** - * No content matcher type specified (maintained for backward - * compatibility, but deprecated for future use). - * Treated as `CONTAINS_STRING`. - */ - CONTENT_MATCHER_OPTION_UNSPECIFIED: 0, - - /** - * Selects substring matching. The match succeeds if the output contains - * the `content` string. This is the default value for checks without - * a `matcher` option, or where the value of `matcher` is - * `CONTENT_MATCHER_OPTION_UNSPECIFIED`. - */ - CONTAINS_STRING: 1, - - /** - * Selects negation of substring matching. The match succeeds if the - * output does _NOT_ contain the `content` string. - */ - NOT_CONTAINS_STRING: 2, - - /** - * Selects regular-expression matching. The match succeeds of the output - * matches the regular expression specified in the `content` string. - */ - MATCHES_REGEX: 3, - - /** - * Selects negation of regular-expression matching. The match succeeds if - * the output does _NOT_ match the regular expression specified in the - * `content` string. - */ - NOT_MATCHES_REGEX: 4 - } - } -}; - -/** - * Contains the region, location, and list of IP - * addresses where checkers in the location run from. - * - * @property {number} region - * A broad region category in which the IP address is located. - * - * The number should be among the values of [UptimeCheckRegion]{@link google.monitoring.v3.UptimeCheckRegion} - * - * @property {string} location - * A more specific location within the region that typically encodes - * a particular city/town/metro (and its containing state/province or country) - * within the broader umbrella region category. - * - * @property {string} ipAddress - * The IP address from which the Uptime check originates. This is a fully - * specified IP address (not an IP address range). Most IP addresses, as of - * this publication, are in IPv4 format; however, one should not rely on the - * IP addresses being in IPv4 format indefinitely, and should support - * interpreting this field in either IPv4 or IPv6 format. - * - * @typedef UptimeCheckIp - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UptimeCheckIp definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime.proto} - */ -const UptimeCheckIp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The supported resource types that can be used as values of - * `group_resource.resource_type`. - * `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. - * The resource types `gae_app` and `uptime_url` are not valid here because - * group checks on App Engine modules and URLs are not allowed. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ -const GroupResourceType = { - - /** - * Default value (not valid). - */ - RESOURCE_TYPE_UNSPECIFIED: 0, - - /** - * A group of instances from Google Cloud Platform (GCP) or - * Amazon Web Services (AWS). - */ - INSTANCE: 1, - - /** - * A group of Amazon ELB load balancers. - */ - AWS_ELB_LOAD_BALANCER: 2 -}; - -/** - * The regions from which an Uptime check can be run. - * - * @enum {number} - * @memberof google.monitoring.v3 - */ -const UptimeCheckRegion = { - - /** - * Default value if no region is specified. Will result in Uptime checks - * running from all regions. - */ - REGION_UNSPECIFIED: 0, - - /** - * Allows checks to run from locations within the United States of America. - */ - USA: 1, - - /** - * Allows checks to run from locations within the continent of Europe. - */ - EUROPE: 2, - - /** - * Allows checks to run from locations within the continent of South - * America. - */ - SOUTH_AMERICA: 3, - - /** - * Allows checks to run from locations within the Asia Pacific area (ex: - * Singapore). - */ - ASIA_PACIFIC: 4 -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js b/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js deleted file mode 100644 index 29457c29cc0..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/monitoring/v3/doc_uptime_service.js +++ /dev/null @@ -1,202 +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 protocol for the `ListUptimeCheckConfigs` request. - * - * @property {string} parent - * Required. The project whose Uptime check configurations are listed. The format - * is `projects/[PROJECT_ID]`. - * - * @property {number} pageSize - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * - * @typedef ListUptimeCheckConfigsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListUptimeCheckConfigsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const ListUptimeCheckConfigsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `ListUptimeCheckConfigs` response. - * - * @property {Object[]} uptimeCheckConfigs - * The returned Uptime check configurations. - * - * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * - * @property {string} nextPageToken - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * - * @property {number} totalSize - * The total number of Uptime check configurations for the project, - * irrespective of any pagination. - * - * @typedef ListUptimeCheckConfigsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListUptimeCheckConfigsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const ListUptimeCheckConfigsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `GetUptimeCheckConfig` request. - * - * @property {string} name - * Required. The Uptime check configuration to retrieve. The format - * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - * - * @typedef GetUptimeCheckConfigRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.GetUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const GetUptimeCheckConfigRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `CreateUptimeCheckConfig` request. - * - * @property {string} parent - * Required. The project in which to create the Uptime check. The format - * is `projects/[PROJECT_ID]`. - * - * @property {Object} uptimeCheckConfig - * Required. The new Uptime check configuration. - * - * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * - * @typedef CreateUptimeCheckConfigRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.CreateUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const CreateUptimeCheckConfigRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `UpdateUptimeCheckConfig` request. - * - * @property {Object} updateMask - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @property {Object} uptimeCheckConfig - * Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresonding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * - * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * - * @typedef UpdateUptimeCheckConfigRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.UpdateUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const UpdateUptimeCheckConfigRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `DeleteUptimeCheckConfig` request. - * - * @property {string} name - * Required. The Uptime check configuration to delete. The format - * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. - * - * @typedef DeleteUptimeCheckConfigRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.DeleteUptimeCheckConfigRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const DeleteUptimeCheckConfigRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `ListUptimeCheckIps` request. - * - * @property {number} pageSize - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * NOTE: this field is not yet implemented - * - * @property {string} pageToken - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * NOTE: this field is not yet implemented - * - * @typedef ListUptimeCheckIpsRequest - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListUptimeCheckIpsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const ListUptimeCheckIpsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The protocol for the `ListUptimeCheckIps` response. - * - * @property {Object[]} uptimeCheckIps - * The returned list of IP addresses (including region and location) that the - * checkers run from. - * - * This object should have the same structure as [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} - * - * @property {string} nextPageToken - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * NOTE: this field is not yet implemented - * - * @typedef ListUptimeCheckIpsResponse - * @memberof google.monitoring.v3 - * @see [google.monitoring.v3.ListUptimeCheckIpsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/monitoring/v3/uptime_service.proto} - */ -const ListUptimeCheckIpsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_any.js deleted file mode 100644 index 813682aa336..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_duration.js deleted file mode 100644 index bd4b4ee6067..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 1e3961d6609..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 59e745f36c2..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_struct.js deleted file mode 100644 index a143b9a6d2d..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index ad801cc9a10..00000000000 --- a/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js b/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js deleted file mode 100644 index 158af088ad6..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/protobuf/doc_wrappers.js +++ /dev/null @@ -1,32 +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. - -/** - * Wrapper message for `bool`. - * - * The JSON representation for `BoolValue` is JSON `true` and `false`. - * - * @property {boolean} value - * The bool value. - * - * @typedef BoolValue - * @memberof google.protobuf - * @see [google.protobuf.BoolValue definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto} - */ -const BoolValue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js b/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js deleted file mode 100644 index 750e0af7689..00000000000 --- a/packages/google-cloud-monitoring/src/v3/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,47 +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 `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). Each `Status` message contains - * three pieces of data: error code, error message, and error details. - * - * You can find out more about this error model and how to work with it in the - * [API Design Guide](https://cloud.google.com/apis/design/errors). - * - * @property {number} code - * The status code, which should be an enum value of google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.js b/packages/google-cloud-monitoring/src/v3/group_service_client.js deleted file mode 100644 index fd4b15582bf..00000000000 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.js +++ /dev/null @@ -1,933 +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('./group_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * The Group API lets you inspect and manage your - * [groups](https://cloud.google.com#google.monitoring.v3.Group). - * - * A group is a named filter that is used to identify - * a collection of monitored resources. Groups are typically used to - * mirror the physical and/or logical topology of the environment. - * Because group membership is computed dynamically, monitored - * resources that are started in the future are automatically placed - * in matching groups. By using a group to name monitored resources in, - * for example, an alert policy, the target of that alert policy is - * updated automatically as monitored resources are added and removed - * from the infrastructure. - * - * @class - * @memberof v3 - */ -class GroupServiceClient { - /** - * Construct an instance of GroupServiceClient. - * - * @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 = { - groupPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/groups/{group}' - ), - 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 = { - listGroups: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'group' - ), - listGroupMembers: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'members' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.GroupService', - 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.monitoring.v3.GroupService. - const groupServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.monitoring.v3.GroupService') - : protos.google.monitoring.v3.GroupService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const groupServiceStubMethods = [ - 'listGroups', - 'getGroup', - 'createGroup', - 'updateGroup', - 'deleteGroup', - 'listGroupMembers', - ]; - for (const methodName of groupServiceStubMethods) { - const innerCallPromise = groupServiceStub.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 'monitoring.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'monitoring.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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.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 the existing groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project whose groups are to be listed. The format is - * `"projects/{project_id_or_number}"`. - * @param {string} [request.childrenOfGroup] - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups whose `parentName` field contains the group - * name. If no groups have this parent, the results are empty. - * @param {string} [request.ancestorsOfGroup] - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * @param {string} [request.descendantsOfGroup] - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `childrenOfGroup` filter, and includes - * children-of-children, and so forth. - * @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 [Group]{@link google.monitoring.v3.Group}. - * - * 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 [ListGroupsResponse]{@link google.monitoring.v3.ListGroupsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Group]{@link google.monitoring.v3.Group}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Group]{@link google.monitoring.v3.Group} 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 [ListGroupsResponse]{@link google.monitoring.v3.ListGroupsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * - * client.listGroups({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = 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.listGroups(nextRequest, options).then(callback); - * } - * } - * client.listGroups({name: formattedName}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listGroups(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.listGroups(request, options, callback); - } - - /** - * Equivalent to {@link listGroups}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listGroups} 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.name - * Required. The project whose groups are to be listed. The format is - * `"projects/{project_id_or_number}"`. - * @param {string} [request.childrenOfGroup] - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups whose `parentName` field contains the group - * name. If no groups have this parent, the results are empty. - * @param {string} [request.ancestorsOfGroup] - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * @param {string} [request.descendantsOfGroup] - * A group name: `"projects/{project_id_or_number}/groups/{group_id}"`. - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `childrenOfGroup` filter, and includes - * children-of-children, and so forth. - * @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 [Group]{@link google.monitoring.v3.Group} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * client.listGroupsStream({name: formattedName}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listGroupsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listGroups.createStream( - this._innerApiCalls.listGroups, - request, - options - ); - } - - /** - * Gets a single group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The group to retrieve. The format is - * `"projects/{project_id_or_number}/groups/{group_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 [Group]{@link google.monitoring.v3.Group}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Group]{@link google.monitoring.v3.Group}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - * client.getGroup({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getGroup(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.getGroup(request, options, callback); - } - - /** - * Creates a new group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project in which to create the group. The format is - * `"projects/{project_id_or_number}"`. - * @param {Object} request.group - * Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. - * - * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * @param {boolean} [request.validateOnly] - * If true, validate this request but do not create the group. - * @param {Object} [options] - * Optional parameters. You 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 [Group]{@link google.monitoring.v3.Group}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Group]{@link google.monitoring.v3.Group}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * const group = {}; - * const request = { - * name: formattedName, - * group: group, - * }; - * client.createGroup(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createGroup(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.createGroup(request, options, callback); - } - - /** - * Updates an existing group. - * You can change any group attributes except `name`. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.group - * Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. - * - * This object should have the same structure as [Group]{@link google.monitoring.v3.Group} - * @param {boolean} [request.validateOnly] - * If true, validate this request but do not update the existing group. - * @param {Object} [options] - * Optional parameters. You 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 [Group]{@link google.monitoring.v3.Group}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Group]{@link google.monitoring.v3.Group}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * const group = {}; - * client.updateGroup({group: group}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateGroup(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({ - 'group.name': request.group.name, - }); - - return this._innerApiCalls.updateGroup(request, options, callback); - } - - /** - * Deletes an existing group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The group to delete. The format is - * `"projects/{project_id_or_number}/groups/{group_id}"`. - * @param {boolean} [request.recursive] - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default 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/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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - * client.deleteGroup({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteGroup(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.deleteGroup(request, options, callback); - } - - /** - * Lists the monitored resources that are members of a group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The group whose members are listed. The format is - * `"projects/{project_id_or_number}/groups/{group_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 {string} [request.filter] - * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing - * the members to be returned. The filter may reference the type, labels, and - * metadata of monitored resources that comprise the group. - * For example, to return only resources representing Compute Engine VM - * instances, use this filter: - * - * resource.type = "gce_instance" - * @param {Object} [request.interval] - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * @param {Object} [options] - * Optional parameters. You 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 [MonitoredResource]{@link google.api.MonitoredResource}. - * - * 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 [ListGroupMembersResponse]{@link google.monitoring.v3.ListGroupMembersResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [MonitoredResource]{@link google.api.MonitoredResource}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [MonitoredResource]{@link google.api.MonitoredResource} 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 [ListGroupMembersResponse]{@link google.monitoring.v3.ListGroupMembersResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - * - * client.listGroupMembers({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - * - * - * 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.listGroupMembers(nextRequest, options).then(callback); - * } - * } - * client.listGroupMembers({name: formattedName}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listGroupMembers(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.listGroupMembers(request, options, callback); - } - - /** - * Equivalent to {@link listGroupMembers}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listGroupMembers} 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.name - * Required. The group whose members are listed. The format is - * `"projects/{project_id_or_number}/groups/{group_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 {string} [request.filter] - * An optional [list filter](https://cloud.google.com/monitoring/api/learn_more#filtering) describing - * the members to be returned. The filter may reference the type, labels, and - * metadata of monitored resources that comprise the group. - * For example, to return only resources representing Compute Engine VM - * instances, use this filter: - * - * resource.type = "gce_instance" - * @param {Object} [request.interval] - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * @param {Object} [options] - * Optional parameters. You 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 [MonitoredResource]{@link google.api.MonitoredResource} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.GroupServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - * client.listGroupMembersStream({name: formattedName}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listGroupMembersStream(request, options) { - options = options || {}; - - return this._descriptors.page.listGroupMembers.createStream( - this._innerApiCalls.listGroupMembers, - request, - options - ); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified group resource name string. - * - * @param {String} project - * @param {String} group - * @returns {String} - */ - groupPath(project, group) { - return this._pathTemplates.groupPathTemplate.render({ - project: project, - group: group, - }); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the groupName from a group resource. - * - * @param {String} groupName - * A fully-qualified path representing a group resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromGroupName(groupName) { - return this._pathTemplates.groupPathTemplate.match(groupName).project; - } - - /** - * Parse the groupName from a group resource. - * - * @param {String} groupName - * A fully-qualified path representing a group resources. - * @returns {String} - A string representing the group. - */ - matchGroupFromGroupName(groupName) { - return this._pathTemplates.groupPathTemplate.match(groupName).group; - } - - /** - * 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 = GroupServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts new file mode 100644 index 00000000000..e1c372b0db1 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -0,0 +1,2244 @@ +// 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. +// +// ** 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 './group_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The Group API lets you inspect and manage your + * [groups](#google.monitoring.v3.Group). + * + * A group is a named filter that is used to identify + * a collection of monitored resources. Groups are typically used to + * mirror the physical and/or logical topology of the environment. + * Because group membership is computed dynamically, monitored + * resources that are started in the future are automatically placed + * in matching groups. By using a group to name monitored resources in, + * for example, an alert policy, the target of that alert policy is + * updated automatically as monitored resources are added and removed + * from the infrastructure. + * @class + * @memberof v3 + */ +export class GroupServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + groupServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of GroupServiceClient. + * + * @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?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof GroupServiceClient; + 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. + const 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 GroupServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + 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 = { + folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listGroups: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'group' + ), + listGroupMembers: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'members' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.GroupService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.v3.GroupService. + this.groupServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.v3.GroupService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.v3.GroupService, + 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 groupServiceStubMethods = [ + 'listGroups', + 'getGroup', + 'createGroup', + 'updateGroup', + 'deleteGroup', + 'listGroupMembers', + ]; + + for (const methodName of groupServiceStubMethods) { + const innerCallPromise = this.groupServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + 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); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + getGroup( + request: protosTypes.google.monitoring.v3.IGetGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, + {} | undefined + ] + >; + getGroup( + request: protosTypes.google.monitoring.v3.IGetGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a single group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The group to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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 [Group]{@link google.monitoring.v3.Group}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getGroup( + request: protosTypes.google.monitoring.v3.IGetGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IGetGroupRequest | 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 || '', + }); + return this._innerApiCalls.getGroup(request, options, callback); + } + createGroup( + request: protosTypes.google.monitoring.v3.ICreateGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, + {} | undefined + ] + >; + createGroup( + request: protosTypes.google.monitoring.v3.ICreateGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates a new group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project in which to create the group. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {google.monitoring.v3.Group} request.group + * Required. A group definition. It is an error to define the `name` field because + * the system assigns the name. + * @param {boolean} request.validateOnly + * If true, validate this request but do not create the group. + * @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 [Group]{@link google.monitoring.v3.Group}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createGroup( + request: protosTypes.google.monitoring.v3.ICreateGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.ICreateGroupRequest | 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 || '', + }); + return this._innerApiCalls.createGroup(request, options, callback); + } + updateGroup( + request: protosTypes.google.monitoring.v3.IUpdateGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, + {} | undefined + ] + >; + updateGroup( + request: protosTypes.google.monitoring.v3.IUpdateGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, + {} | undefined + > + ): void; + /** + * Updates an existing group. + * You can change any group attributes except `name`. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.monitoring.v3.Group} request.group + * Required. The new definition of the group. All fields of the existing group, + * excepting `name`, are replaced with the corresponding fields of this group. + * @param {boolean} request.validateOnly + * If true, validate this request but do not update the existing group. + * @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 [Group]{@link google.monitoring.v3.Group}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateGroup( + request: protosTypes.google.monitoring.v3.IUpdateGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup, + protosTypes.google.monitoring.v3.IUpdateGroupRequest | 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({ + 'group.name': request.group!.name || '', + }); + return this._innerApiCalls.updateGroup(request, options, callback); + } + deleteGroup( + request: protosTypes.google.monitoring.v3.IDeleteGroupRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, + {} | undefined + ] + >; + deleteGroup( + request: protosTypes.google.monitoring.v3.IDeleteGroupRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, + {} | undefined + > + ): void; + /** + * Deletes an existing group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The group to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param {boolean} request.recursive + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * @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. + */ + deleteGroup( + request: protosTypes.google.monitoring.v3.IDeleteGroupRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteGroupRequest | 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 || '', + }); + return this._innerApiCalls.deleteGroup(request, options, callback); + } + + listGroups( + request: protosTypes.google.monitoring.v3.IListGroupsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup[], + protosTypes.google.monitoring.v3.IListGroupsRequest | null, + protosTypes.google.monitoring.v3.IListGroupsResponse + ] + >; + listGroups( + request: protosTypes.google.monitoring.v3.IListGroupsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IGroup[], + protosTypes.google.monitoring.v3.IListGroupsRequest | null, + protosTypes.google.monitoring.v3.IListGroupsResponse + > + ): void; + /** + * Lists the existing groups. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project whose groups are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.childrenOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string} request.ancestorsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string} request.descendantsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [Group]{@link google.monitoring.v3.Group}. + * 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 [Group]{@link google.monitoring.v3.Group} 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 [ListGroupsRequest]{@link google.monitoring.v3.ListGroupsRequest} + * 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 + * [ListGroupsResponse]{@link google.monitoring.v3.ListGroupsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listGroups( + request: protosTypes.google.monitoring.v3.IListGroupsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IGroup[], + protosTypes.google.monitoring.v3.IListGroupsRequest | null, + protosTypes.google.monitoring.v3.IListGroupsResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IGroup[], + protosTypes.google.monitoring.v3.IListGroupsRequest | null, + protosTypes.google.monitoring.v3.IListGroupsResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IGroup[], + protosTypes.google.monitoring.v3.IListGroupsRequest | null, + protosTypes.google.monitoring.v3.IListGroupsResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listGroups(request, options, callback); + } + + /** + * Equivalent to {@link listGroups}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listGroups} 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.name + * Required. The project whose groups are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.childrenOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string} request.ancestorsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string} request.descendantsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [Group]{@link google.monitoring.v3.Group} on 'data' event. + */ + listGroupsStream( + request?: protosTypes.google.monitoring.v3.IListGroupsRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listGroups.createStream( + this._innerApiCalls.listGroups as gax.GaxCall, + request, + callSettings + ); + } + listGroupMembers( + request: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMonitoredResource[], + protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, + protosTypes.google.monitoring.v3.IListGroupMembersResponse + ] + >; + listGroupMembers( + request: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMonitoredResource[], + protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, + protosTypes.google.monitoring.v3.IListGroupMembersResponse + > + ): void; + /** + * Lists the monitored resources that are members of a group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The group whose members are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {string} request.filter + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * + * `resource.type = "gce_instance"` + * @param {google.monitoring.v3.TimeInterval} request.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * @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 [MonitoredResource]{@link google.api.MonitoredResource}. + * 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 [MonitoredResource]{@link google.api.MonitoredResource} 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 [ListGroupMembersRequest]{@link google.monitoring.v3.ListGroupMembersRequest} + * 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 + * [ListGroupMembersResponse]{@link google.monitoring.v3.ListGroupMembersResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listGroupMembers( + request: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMonitoredResource[], + protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, + protosTypes.google.monitoring.v3.IListGroupMembersResponse + >, + callback?: Callback< + protosTypes.google.api.IMonitoredResource[], + protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, + protosTypes.google.monitoring.v3.IListGroupMembersResponse + > + ): Promise< + [ + protosTypes.google.api.IMonitoredResource[], + protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, + protosTypes.google.monitoring.v3.IListGroupMembersResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listGroupMembers(request, options, callback); + } + + /** + * Equivalent to {@link listGroupMembers}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listGroupMembers} 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.name + * Required. The group whose members are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {string} request.filter + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * + * `resource.type = "gce_instance"` + * @param {google.monitoring.v3.TimeInterval} request.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * @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 [MonitoredResource]{@link google.api.MonitoredResource} on 'data' event. + */ + listGroupMembersStream( + request?: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listGroupMembers.createStream( + this._innerApiCalls.listGroupMembers as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.render({ + folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this._pathTemplates.folderGroupPathTemplate.render({ + folder, + group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this._pathTemplates.folderNotificationChannelPathTemplate.render({ + folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this._pathTemplates.folderServicePathTemplate.render({ + folder, + service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization, + alert_policy: alertPolicy, + condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( + { + organization, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this._pathTemplates.organizationGroupPathTemplate.render({ + organization, + group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this._pathTemplates.organizationServicePathTemplate.render({ + organization, + service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( + { + organization, + uptime_check_config: uptimeCheckConfig, + } + ); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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 projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.render({ + project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ + project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this._pathTemplates.projectGroupPathTemplate.render({ + project, + group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this._pathTemplates.projectNotificationChannelPathTemplate.render({ + project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this._pathTemplates.projectServicePathTemplate.render({ + project, + service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.groupServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json index a57878c2ece..72f178cbdb4 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_client_config.json @@ -2,53 +2,62 @@ "interfaces": { "google.monitoring.v3.GroupService": { "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 + }, + "71ca22c74d2828b200f9ff1cc285a8beb96cc2af": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "ListGroups": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "DeleteGroup": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListGroupMembers": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" } } } diff --git a/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json index 589717a46f4..0534dc6a035 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json @@ -1,3 +1,18 @@ [ - "../../protos/google/monitoring/v3/group_service.proto" + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", + "../../protos/google/monitoring/v3/uptime_service.proto" ] diff --git a/packages/google-cloud-monitoring/src/v3/index.js b/packages/google-cloud-monitoring/src/v3/index.js deleted file mode 100644 index e93937c9cec..00000000000 --- a/packages/google-cloud-monitoring/src/v3/index.js +++ /dev/null @@ -1,29 +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 AlertPolicyServiceClient = require('./alert_policy_service_client'); -const GroupServiceClient = require('./group_service_client'); -const MetricServiceClient = require('./metric_service_client'); -const NotificationChannelServiceClient = require('./notification_channel_service_client'); -const ServiceMonitoringServiceClient = require('./service_monitoring_service_client'); -const UptimeCheckServiceClient = require('./uptime_check_service_client'); - -module.exports.AlertPolicyServiceClient = AlertPolicyServiceClient; -module.exports.GroupServiceClient = GroupServiceClient; -module.exports.MetricServiceClient = MetricServiceClient; -module.exports.NotificationChannelServiceClient = NotificationChannelServiceClient; -module.exports.ServiceMonitoringServiceClient = ServiceMonitoringServiceClient; -module.exports.UptimeCheckServiceClient = UptimeCheckServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/index.ts b/packages/google-cloud-monitoring/src/v3/index.ts new file mode 100644 index 00000000000..137839b9018 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/index.ts @@ -0,0 +1,24 @@ +// 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. +// +// ** 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 {AlertPolicyServiceClient} from './alert_policy_service_client'; +export {GroupServiceClient} from './group_service_client'; +export {MetricServiceClient} from './metric_service_client'; +export {NotificationChannelServiceClient} from './notification_channel_service_client'; +export {ServiceMonitoringServiceClient} from './service_monitoring_service_client'; +export {UptimeCheckServiceClient} from './uptime_check_service_client'; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.js b/packages/google-cloud-monitoring/src/v3/metric_service_client.js deleted file mode 100644 index d6e8cfce1a5..00000000000 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.js +++ /dev/null @@ -1,1282 +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('./metric_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * Manages metric descriptors, monitored resource descriptors, and - * time series data. - * - * @class - * @memberof v3 - */ -class MetricServiceClient { - /** - * Construct an instance of MetricServiceClient. - * - * @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 = { - metricDescriptorPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/metricDescriptors/{metric_descriptor=**}' - ), - monitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' - ), - 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 = { - listMonitoredResourceDescriptors: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'resourceDescriptors' - ), - listMetricDescriptors: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'metricDescriptors' - ), - listTimeSeries: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'timeSeries' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.MetricService', - 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.monitoring.v3.MetricService. - const metricServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.monitoring.v3.MetricService') - : protos.google.monitoring.v3.MetricService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const metricServiceStubMethods = [ - 'listMonitoredResourceDescriptors', - 'getMonitoredResourceDescriptor', - 'listMetricDescriptors', - 'getMetricDescriptor', - 'createMetricDescriptor', - 'deleteMetricDescriptor', - 'listTimeSeries', - 'createTimeSeries', - ]; - for (const methodName of metricServiceStubMethods) { - const innerCallPromise = metricServiceStub.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 'monitoring.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'monitoring.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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.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 monitored resource descriptors that match a filter. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string} [request.filter] - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing - * the descriptors to be returned. The filter can reference - * the descriptor's type and labels. For example, the - * following filter returns only Google Compute Engine descriptors - * that have an `id` label: - * - * resource.type = starts_with("gce_") AND resource.label: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 [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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * - * client.listMonitoredResourceDescriptors({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = 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.listMonitoredResourceDescriptors(nextRequest, options).then(callback); - * } - * } - * client.listMonitoredResourceDescriptors({name: formattedName}, 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 || {}; - 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.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 {string} request.name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string} [request.filter] - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) describing - * the descriptors to be returned. The filter can reference - * the descriptor's type and labels. For example, the - * following filter returns only Google Compute Engine descriptors - * that have an `id` label: - * - * resource.type = starts_with("gce_") AND resource.label: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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * client.listMonitoredResourceDescriptorsStream({name: formattedName}) - * .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 - ); - } - - /** - * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The monitored resource descriptor to get. The format is - * `"projects/{project_id_or_number}/monitoredResourceDescriptors/{resource_type}"`. - * The `{resource_type}` is a predefined type, such as - * `cloudsql_database`. - * @param {Object} [options] - * Optional parameters. You 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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.monitoredResourceDescriptorPath('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); - * client.getMonitoredResourceDescriptor({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getMonitoredResourceDescriptor(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.getMonitoredResourceDescriptor( - request, - options, - callback - ); - } - - /** - * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string} [request.filter] - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * - * metric.type = starts_with("custom.googleapis.com/") - * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. - * - * 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 [ListMetricDescriptorsResponse]{@link google.monitoring.v3.ListMetricDescriptorsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [MetricDescriptor]{@link google.api.MetricDescriptor}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [MetricDescriptor]{@link google.api.MetricDescriptor} 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 [ListMetricDescriptorsResponse]{@link google.monitoring.v3.ListMetricDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * - * client.listMetricDescriptors({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = 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.listMetricDescriptors(nextRequest, options).then(callback); - * } - * } - * client.listMetricDescriptors({name: formattedName}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listMetricDescriptors(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.listMetricDescriptors( - request, - options, - callback - ); - } - - /** - * Equivalent to {@link listMetricDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listMetricDescriptors} 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.name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {string} [request.filter] - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * - * metric.type = starts_with("custom.googleapis.com/") - * @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 [MetricDescriptor]{@link google.api.MetricDescriptor} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * client.listMetricDescriptorsStream({name: formattedName}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listMetricDescriptorsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listMetricDescriptors.createStream( - this._innerApiCalls.listMetricDescriptors, - request, - options - ); - } - - /** - * Gets a single metric descriptor. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The metric descriptor on which to execute the request. The format is - * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - * An example value of `{metric_id}` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * @param {Object} [options] - * Optional parameters. You 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [MetricDescriptor]{@link google.api.MetricDescriptor}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); - * client.getMetricDescriptor({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getMetricDescriptor(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.getMetricDescriptor(request, options, callback); - } - - /** - * Creates a new metric descriptor. - * User-created metric descriptors define - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {Object} request.metricDescriptor - * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. - * - * This object should have the same structure as [MetricDescriptor]{@link google.api.MetricDescriptor} - * @param {Object} [options] - * Optional parameters. You 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [MetricDescriptor]{@link google.api.MetricDescriptor}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * const metricDescriptor = {}; - * const request = { - * name: formattedName, - * metricDescriptor: metricDescriptor, - * }; - * client.createMetricDescriptor(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createMetricDescriptor(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.createMetricDescriptor( - request, - options, - callback - ); - } - - /** - * Deletes a metric descriptor. Only user-created - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be deleted. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The metric descriptor on which to execute the request. The format is - * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. - * An example of `{metric_id}` is: - * `"custom.googleapis.com/my_test_metric"`. - * @param {Object} [options] - * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.metricDescriptorPath('[PROJECT]', '[METRIC_DESCRIPTOR]'); - * client.deleteMetricDescriptor({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteMetricDescriptor(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.deleteMetricDescriptor( - request, - options, - callback - ); - } - - /** - * Lists time series that match a filter. This method does not require a Stackdriver account. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is - * "projects/{project_id_or_number}". - * @param {string} request.filter - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time - * series should be returned. The filter must specify a single metric type, - * and can additionally specify metric labels and other information. For - * example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * @param {Object} request.interval - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * @param {number} request.view - * Required. Specifies which information is returned about the time series. - * - * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} - * @param {Object} [request.aggregation] - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * - * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * @param {string} [request.orderBy] - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * @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 [TimeSeries]{@link google.monitoring.v3.TimeSeries}. - * - * 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 [ListTimeSeriesResponse]{@link google.monitoring.v3.ListTimeSeriesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [TimeSeries]{@link google.monitoring.v3.TimeSeries}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [TimeSeries]{@link google.monitoring.v3.TimeSeries} 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 [ListTimeSeriesResponse]{@link google.monitoring.v3.ListTimeSeriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * const filter = ''; - * const interval = {}; - * const view = 'FULL'; - * const request = { - * name: formattedName, - * filter: filter, - * interval: interval, - * view: view, - * }; - * - * client.listTimeSeries(request) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = client.projectPath('[PROJECT]'); - * const filter = ''; - * const interval = {}; - * const view = 'FULL'; - * const request = { - * name: formattedName, - * filter: filter, - * interval: interval, - * view: view, - * }; - * - * - * 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.listTimeSeries(nextRequest, options).then(callback); - * } - * } - * client.listTimeSeries(request, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listTimeSeries(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.listTimeSeries(request, options, callback); - } - - /** - * Equivalent to {@link listTimeSeries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listTimeSeries} 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.name - * Required. The project on which to execute the request. The format is - * "projects/{project_id_or_number}". - * @param {string} request.filter - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies which time - * series should be returned. The filter must specify a single metric type, - * and can additionally specify metric labels and other information. For - * example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * @param {Object} request.interval - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. - * - * This object should have the same structure as [TimeInterval]{@link google.monitoring.v3.TimeInterval} - * @param {number} request.view - * Required. Specifies which information is returned about the time series. - * - * The number should be among the values of [TimeSeriesView]{@link google.monitoring.v3.TimeSeriesView} - * @param {Object} [request.aggregation] - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * - * This object should have the same structure as [Aggregation]{@link google.monitoring.v3.Aggregation} - * @param {string} [request.orderBy] - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * @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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * const filter = ''; - * const interval = {}; - * const view = 'FULL'; - * const request = { - * name: formattedName, - * filter: filter, - * interval: interval, - * view: view, - * }; - * client.listTimeSeriesStream(request) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listTimeSeriesStream(request, options) { - options = options || {}; - - return this._descriptors.page.listTimeSeries.createStream( - this._innerApiCalls.listTimeSeries, - request, - options - ); - } - - /** - * Creates or adds data to one or more time series. - * The response is empty if all time series in the request were written. - * If any time series could not be written, a corresponding failure message is - * included in the error response. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is - * `"projects/{project_id_or_number}"`. - * @param {Object[]} request.timeSeries - * Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * - * This object should have the same structure as [TimeSeries]{@link google.monitoring.v3.TimeSeries} - * @param {Object} [options] - * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.MetricServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * const timeSeries = []; - * const request = { - * name: formattedName, - * timeSeries: timeSeries, - * }; - * client.createTimeSeries(request).catch(err => { - * console.error(err); - * }); - */ - createTimeSeries(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.createTimeSeries(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified metric_descriptor resource name string. - * - * @param {String} project - * @param {String} metricDescriptor - * @returns {String} - */ - metricDescriptorPath(project, metricDescriptor) { - return this._pathTemplates.metricDescriptorPathTemplate.render({ - project: project, - metric_descriptor: metricDescriptor, - }); - } - - /** - * Return a fully-qualified monitored_resource_descriptor resource name string. - * - * @param {String} project - * @param {String} monitoredResourceDescriptor - * @returns {String} - */ - monitoredResourceDescriptorPath(project, monitoredResourceDescriptor) { - return this._pathTemplates.monitoredResourceDescriptorPathTemplate.render({ - project: project, - monitored_resource_descriptor: monitoredResourceDescriptor, - }); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the metricDescriptorName from a metric_descriptor resource. - * - * @param {String} metricDescriptorName - * A fully-qualified path representing a metric_descriptor resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromMetricDescriptorName(metricDescriptorName) { - return this._pathTemplates.metricDescriptorPathTemplate.match( - metricDescriptorName - ).project; - } - - /** - * Parse the metricDescriptorName from a metric_descriptor resource. - * - * @param {String} metricDescriptorName - * A fully-qualified path representing a metric_descriptor resources. - * @returns {String} - A string representing the metric_descriptor. - */ - matchMetricDescriptorFromMetricDescriptorName(metricDescriptorName) { - return this._pathTemplates.metricDescriptorPathTemplate.match( - metricDescriptorName - ).metric_descriptor; - } - - /** - * Parse the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. - * - * @param {String} monitoredResourceDescriptorName - * A fully-qualified path representing a monitored_resource_descriptor resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromMonitoredResourceDescriptorName( - monitoredResourceDescriptorName - ) { - return this._pathTemplates.monitoredResourceDescriptorPathTemplate.match( - monitoredResourceDescriptorName - ).project; - } - - /** - * Parse the monitoredResourceDescriptorName from a monitored_resource_descriptor resource. - * - * @param {String} monitoredResourceDescriptorName - * A fully-qualified path representing a monitored_resource_descriptor resources. - * @returns {String} - A string representing the monitored_resource_descriptor. - */ - matchMonitoredResourceDescriptorFromMonitoredResourceDescriptorName( - monitoredResourceDescriptorName - ) { - return this._pathTemplates.monitoredResourceDescriptorPathTemplate.match( - monitoredResourceDescriptorName - ).monitored_resource_descriptor; - } - - /** - * 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 = MetricServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts new file mode 100644 index 00000000000..5325f916ed2 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -0,0 +1,2831 @@ +// 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. +// +// ** 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 './metric_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * Manages metric descriptors, monitored resource descriptors, and + * time series data. + * @class + * @memberof v3 + */ +export class MetricServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + metricServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MetricServiceClient. + * + * @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?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof MetricServiceClient; + 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. + const 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 MetricServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + 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 = { + folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderMetricDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/metricDescriptors/{metric_descriptor=**}' + ), + folderMonitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), + folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationMetricDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/metricDescriptors/{metric_descriptor=**}' + ), + organizationMonitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), + organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectMetricDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/metricDescriptors/{metric_descriptor=**}' + ), + projectMonitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), + projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listMonitoredResourceDescriptors: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceDescriptors' + ), + listMetricDescriptors: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'metricDescriptors' + ), + listTimeSeries: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'timeSeries' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.MetricService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.v3.MetricService. + this.metricServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.v3.MetricService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.v3.MetricService, + 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 metricServiceStubMethods = [ + 'listMonitoredResourceDescriptors', + 'getMonitoredResourceDescriptor', + 'listMetricDescriptors', + 'getMetricDescriptor', + 'createMetricDescriptor', + 'deleteMetricDescriptor', + 'listTimeSeries', + 'createTimeSeries', + ]; + + for (const methodName of metricServiceStubMethods) { + const innerCallPromise = this.metricServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + 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); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + getMonitoredResourceDescriptor( + request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMonitoredResourceDescriptor, + ( + | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | undefined + ), + {} | undefined + ] + >; + getMonitoredResourceDescriptor( + request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMonitoredResourceDescriptor, + | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The monitored resource descriptor to get. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. + * @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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getMonitoredResourceDescriptor( + request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMonitoredResourceDescriptor, + | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.api.IMonitoredResourceDescriptor, + | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.api.IMonitoredResourceDescriptor, + ( + | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | 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 || '', + }); + return this._innerApiCalls.getMonitoredResourceDescriptor( + request, + options, + callback + ); + } + getMetricDescriptor( + request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMetricDescriptor, + protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, + {} | undefined + ] + >; + getMetricDescriptor( + request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMetricDescriptor, + protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a single metric descriptor. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The metric descriptor on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getMetricDescriptor( + request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMetricDescriptor, + | protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.api.IMetricDescriptor, + protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.api.IMetricDescriptor, + protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | 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 || '', + }); + return this._innerApiCalls.getMetricDescriptor(request, options, callback); + } + createMetricDescriptor( + request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMetricDescriptor, + ( + | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + | undefined + ), + {} | undefined + ] + >; + createMetricDescriptor( + request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMetricDescriptor, + | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a new metric descriptor. + * User-created metric descriptors define + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {google.api.MetricDescriptor} request.metricDescriptor + * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) + * descriptor. + * @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 [MetricDescriptor]{@link google.api.MetricDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createMetricDescriptor( + request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMetricDescriptor, + | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.api.IMetricDescriptor, + | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.api.IMetricDescriptor, + ( + | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + | 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 || '', + }); + return this._innerApiCalls.createMetricDescriptor( + request, + options, + callback + ); + } + deleteMetricDescriptor( + request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + | undefined + ), + {} | undefined + ] + >; + deleteMetricDescriptor( + request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a metric descriptor. Only user-created + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + * deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The metric descriptor on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_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 [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteMetricDescriptor( + request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + | 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 || '', + }); + return this._innerApiCalls.deleteMetricDescriptor( + request, + options, + callback + ); + } + createTimeSeries( + request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, + {} | undefined + ] + >; + createTimeSeries( + request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, + {} | undefined + > + ): void; + /** + * Creates or adds data to one or more time series. + * The response is empty if all time series in the request were written. + * If any time series could not be written, a corresponding failure message is + * included in the error response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {number[]} request.timeSeries + * Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * @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. + */ + createTimeSeries( + request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | 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 || '', + }); + return this._innerApiCalls.createTimeSeries(request, options, callback); + } + + listMonitoredResourceDescriptors( + request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + ] + >; + listMonitoredResourceDescriptors( + request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + > + ): void; + /** + * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label:id + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listMonitoredResourceDescriptors( + request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + >, + callback?: Callback< + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + > + ): Promise< + [ + protosTypes.google.api.IMonitoredResourceDescriptor[], + protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protosTypes.google.monitoring.v3.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 || {}; + 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.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 {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label:id + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listMonitoredResourceDescriptors.createStream( + this._innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, + request, + callSettings + ); + } + listMetricDescriptors( + request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.api.IMetricDescriptor[], + protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + ] + >; + listMetricDescriptors( + request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.api.IMetricDescriptor[], + protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + > + ): void; + /** + * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. + * 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 [MetricDescriptor]{@link google.api.MetricDescriptor} 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 [ListMetricDescriptorsRequest]{@link google.monitoring.v3.ListMetricDescriptorsRequest} + * 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 + * [ListMetricDescriptorsResponse]{@link google.monitoring.v3.ListMetricDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listMetricDescriptors( + request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.api.IMetricDescriptor[], + protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + >, + callback?: Callback< + protosTypes.google.api.IMetricDescriptor[], + protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + > + ): Promise< + [ + protosTypes.google.api.IMetricDescriptor[], + protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listMetricDescriptors( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listMetricDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listMetricDescriptors} 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [MetricDescriptor]{@link google.api.MetricDescriptor} on 'data' event. + */ + listMetricDescriptorsStream( + request?: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listMetricDescriptors.createStream( + this._innerApiCalls.listMetricDescriptors as gax.GaxCall, + request, + callSettings + ); + } + listTimeSeries( + request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.ITimeSeries[], + protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, + protosTypes.google.monitoring.v3.IListTimeSeriesResponse + ] + >; + listTimeSeries( + request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.ITimeSeries[], + protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, + protosTypes.google.monitoring.v3.IListTimeSeriesResponse + > + ): void; + /** + * Lists time series that match a filter. This method does not require a Stackdriver account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * that specifies which time series should be returned. The filter must + * specify a single metric type, and can additionally specify metric labels + * and other information. For example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * @param {google.monitoring.v3.TimeInterval} request.interval + * Required. The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * @param {google.monitoring.v3.Aggregation} request.aggregation + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * @param {string} request.orderBy + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * @param {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} request.view + * Required. Specifies which information is returned about the time series. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries}. + * 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} 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 [ListTimeSeriesRequest]{@link google.monitoring.v3.ListTimeSeriesRequest} + * 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 + * [ListTimeSeriesResponse]{@link google.monitoring.v3.ListTimeSeriesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listTimeSeries( + request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.ITimeSeries[], + protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, + protosTypes.google.monitoring.v3.IListTimeSeriesResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.ITimeSeries[], + protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, + protosTypes.google.monitoring.v3.IListTimeSeriesResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.ITimeSeries[], + protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, + protosTypes.google.monitoring.v3.IListTimeSeriesResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listTimeSeries(request, options, callback); + } + + /** + * Equivalent to {@link listTimeSeries}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listTimeSeries} 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * that specifies which time series should be returned. The filter must + * specify a single metric type, and can additionally specify metric labels + * and other information. For example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * @param {google.monitoring.v3.TimeInterval} request.interval + * Required. The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * @param {google.monitoring.v3.Aggregation} request.aggregation + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * @param {string} request.orderBy + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * @param {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} request.view + * Required. Specifies which information is returned about the time series. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} on 'data' event. + */ + listTimeSeriesStream( + request?: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listTimeSeries.createStream( + this._innerApiCalls.listTimeSeries as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.render({ + folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this._pathTemplates.folderGroupPathTemplate.render({ + folder, + group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderMetricDescriptor resource name string. + * + * @param {string} folder + * @param {string} metric_descriptor + * @returns {string} Resource name string. + */ + folderMetricDescriptorPath(folder: string, metricDescriptor: string) { + return this._pathTemplates.folderMetricDescriptorPathTemplate.render({ + folder, + metric_descriptor: metricDescriptor, + }); + } + + /** + * Parse the folder from FolderMetricDescriptor resource. + * + * @param {string} folderMetricDescriptorName + * A fully-qualified path representing folder_metric_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderMetricDescriptorName( + folderMetricDescriptorName: string + ) { + return this._pathTemplates.folderMetricDescriptorPathTemplate.match( + folderMetricDescriptorName + ).folder; + } + + /** + * Parse the metric_descriptor from FolderMetricDescriptor resource. + * + * @param {string} folderMetricDescriptorName + * A fully-qualified path representing folder_metric_descriptor resource. + * @returns {string} A string representing the metric_descriptor. + */ + matchMetricDescriptorFromFolderMetricDescriptorName( + folderMetricDescriptorName: string + ) { + return this._pathTemplates.folderMetricDescriptorPathTemplate.match( + folderMetricDescriptorName + ).metric_descriptor; + } + + /** + * Return a fully-qualified folderMonitoredResourceDescriptor resource name string. + * + * @param {string} folder + * @param {string} monitored_resource_descriptor + * @returns {string} Resource name string. + */ + folderMonitoredResourceDescriptorPath( + folder: string, + monitoredResourceDescriptor: string + ) { + return this._pathTemplates.folderMonitoredResourceDescriptorPathTemplate.render( + { + folder, + monitored_resource_descriptor: monitoredResourceDescriptor, + } + ); + } + + /** + * Parse the folder from FolderMonitoredResourceDescriptor resource. + * + * @param {string} folderMonitoredResourceDescriptorName + * A fully-qualified path representing folder_monitored_resource_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderMonitoredResourceDescriptorName( + folderMonitoredResourceDescriptorName: string + ) { + return this._pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match( + folderMonitoredResourceDescriptorName + ).folder; + } + + /** + * Parse the monitored_resource_descriptor from FolderMonitoredResourceDescriptor resource. + * + * @param {string} folderMonitoredResourceDescriptorName + * A fully-qualified path representing folder_monitored_resource_descriptor resource. + * @returns {string} A string representing the monitored_resource_descriptor. + */ + matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName( + folderMonitoredResourceDescriptorName: string + ) { + return this._pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match( + folderMonitoredResourceDescriptorName + ).monitored_resource_descriptor; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this._pathTemplates.folderNotificationChannelPathTemplate.render({ + folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this._pathTemplates.folderServicePathTemplate.render({ + folder, + service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization, + alert_policy: alertPolicy, + condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( + { + organization, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this._pathTemplates.organizationGroupPathTemplate.render({ + organization, + group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationMetricDescriptor resource name string. + * + * @param {string} organization + * @param {string} metric_descriptor + * @returns {string} Resource name string. + */ + organizationMetricDescriptorPath( + organization: string, + metricDescriptor: string + ) { + return this._pathTemplates.organizationMetricDescriptorPathTemplate.render({ + organization, + metric_descriptor: metricDescriptor, + }); + } + + /** + * Parse the organization from OrganizationMetricDescriptor resource. + * + * @param {string} organizationMetricDescriptorName + * A fully-qualified path representing organization_metric_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationMetricDescriptorName( + organizationMetricDescriptorName: string + ) { + return this._pathTemplates.organizationMetricDescriptorPathTemplate.match( + organizationMetricDescriptorName + ).organization; + } + + /** + * Parse the metric_descriptor from OrganizationMetricDescriptor resource. + * + * @param {string} organizationMetricDescriptorName + * A fully-qualified path representing organization_metric_descriptor resource. + * @returns {string} A string representing the metric_descriptor. + */ + matchMetricDescriptorFromOrganizationMetricDescriptorName( + organizationMetricDescriptorName: string + ) { + return this._pathTemplates.organizationMetricDescriptorPathTemplate.match( + organizationMetricDescriptorName + ).metric_descriptor; + } + + /** + * Return a fully-qualified organizationMonitoredResourceDescriptor resource name string. + * + * @param {string} organization + * @param {string} monitored_resource_descriptor + * @returns {string} Resource name string. + */ + organizationMonitoredResourceDescriptorPath( + organization: string, + monitoredResourceDescriptor: string + ) { + return this._pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.render( + { + organization, + monitored_resource_descriptor: monitoredResourceDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationMonitoredResourceDescriptor resource. + * + * @param {string} organizationMonitoredResourceDescriptorName + * A fully-qualified path representing organization_monitored_resource_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationMonitoredResourceDescriptorName( + organizationMonitoredResourceDescriptorName: string + ) { + return this._pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match( + organizationMonitoredResourceDescriptorName + ).organization; + } + + /** + * Parse the monitored_resource_descriptor from OrganizationMonitoredResourceDescriptor resource. + * + * @param {string} organizationMonitoredResourceDescriptorName + * A fully-qualified path representing organization_monitored_resource_descriptor resource. + * @returns {string} A string representing the monitored_resource_descriptor. + */ + matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName( + organizationMonitoredResourceDescriptorName: string + ) { + return this._pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match( + organizationMonitoredResourceDescriptorName + ).monitored_resource_descriptor; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this._pathTemplates.organizationServicePathTemplate.render({ + organization, + service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( + { + organization, + uptime_check_config: uptimeCheckConfig, + } + ); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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 projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.render({ + project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ + project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this._pathTemplates.projectGroupPathTemplate.render({ + project, + group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectMetricDescriptor resource name string. + * + * @param {string} project + * @param {string} metric_descriptor + * @returns {string} Resource name string. + */ + projectMetricDescriptorPath(project: string, metricDescriptor: string) { + return this._pathTemplates.projectMetricDescriptorPathTemplate.render({ + project, + metric_descriptor: metricDescriptor, + }); + } + + /** + * Parse the project from ProjectMetricDescriptor resource. + * + * @param {string} projectMetricDescriptorName + * A fully-qualified path representing project_metric_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectMetricDescriptorName( + projectMetricDescriptorName: string + ) { + return this._pathTemplates.projectMetricDescriptorPathTemplate.match( + projectMetricDescriptorName + ).project; + } + + /** + * Parse the metric_descriptor from ProjectMetricDescriptor resource. + * + * @param {string} projectMetricDescriptorName + * A fully-qualified path representing project_metric_descriptor resource. + * @returns {string} A string representing the metric_descriptor. + */ + matchMetricDescriptorFromProjectMetricDescriptorName( + projectMetricDescriptorName: string + ) { + return this._pathTemplates.projectMetricDescriptorPathTemplate.match( + projectMetricDescriptorName + ).metric_descriptor; + } + + /** + * Return a fully-qualified projectMonitoredResourceDescriptor resource name string. + * + * @param {string} project + * @param {string} monitored_resource_descriptor + * @returns {string} Resource name string. + */ + projectMonitoredResourceDescriptorPath( + project: string, + monitoredResourceDescriptor: string + ) { + return this._pathTemplates.projectMonitoredResourceDescriptorPathTemplate.render( + { + project, + monitored_resource_descriptor: monitoredResourceDescriptor, + } + ); + } + + /** + * Parse the project from ProjectMonitoredResourceDescriptor resource. + * + * @param {string} projectMonitoredResourceDescriptorName + * A fully-qualified path representing project_monitored_resource_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectMonitoredResourceDescriptorName( + projectMonitoredResourceDescriptorName: string + ) { + return this._pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match( + projectMonitoredResourceDescriptorName + ).project; + } + + /** + * Parse the monitored_resource_descriptor from ProjectMonitoredResourceDescriptor resource. + * + * @param {string} projectMonitoredResourceDescriptorName + * A fully-qualified path representing project_monitored_resource_descriptor resource. + * @returns {string} A string representing the monitored_resource_descriptor. + */ + matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName( + projectMonitoredResourceDescriptorName: string + ) { + return this._pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match( + projectMonitoredResourceDescriptorName + ).monitored_resource_descriptor; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this._pathTemplates.projectNotificationChannelPathTemplate.render({ + project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this._pathTemplates.projectServicePathTemplate.render({ + project, + service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.metricServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json index c67d2422ec1..1bb5d8d4e2c 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client_config.json @@ -2,58 +2,67 @@ "interfaces": { "google.monitoring.v3.MetricService": { "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 + }, + "71ca22c74d2828b200f9ff1cc285a8beb96cc2af": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "ListMonitoredResourceDescriptors": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetMonitoredResourceDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListMetricDescriptors": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetMetricDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateMetricDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 12000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteMetricDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListTimeSeries": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateTimeSeries": { "timeout_millis": 12000, diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json index 495ef207a60..0534dc6a035 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json @@ -1,3 +1,18 @@ [ - "../../protos/google/monitoring/v3/metric_service.proto" + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", + "../../protos/google/monitoring/v3/uptime_service.proto" ] diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js deleted file mode 100644 index 103c9fc32e5..00000000000 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.js +++ /dev/null @@ -1,1286 +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('./notification_channel_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * The Notification Channel API provides access to configuration that - * controls how messages related to incidents are sent. - * - * @class - * @memberof v3 - */ -class NotificationChannelServiceClient { - /** - * Construct an instance of NotificationChannelServiceClient. - * - * @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 = { - notificationChannelPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/notificationChannels/{notification_channel}' - ), - notificationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' - ), - 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 = { - listNotificationChannelDescriptors: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'channelDescriptors' - ), - listNotificationChannels: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'notificationChannels' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.NotificationChannelService', - 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.monitoring.v3.NotificationChannelService. - const notificationChannelServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService( - 'google.monitoring.v3.NotificationChannelService' - ) - : protos.google.monitoring.v3.NotificationChannelService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const notificationChannelServiceStubMethods = [ - 'listNotificationChannelDescriptors', - 'getNotificationChannelDescriptor', - 'listNotificationChannels', - 'getNotificationChannel', - 'createNotificationChannel', - 'updateNotificationChannel', - 'deleteNotificationChannel', - 'sendNotificationChannelVerificationCode', - 'getNotificationChannelVerificationCode', - 'verifyNotificationChannel', - ]; - for (const methodName of notificationChannelServiceStubMethods) { - const innerCallPromise = notificationChannelServiceStub.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 'monitoring.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'monitoring.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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.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 the descriptors for supported channel types. The use of descriptors - * makes it possible for new channel types to be dynamically added. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * - * projects/[PROJECT_ID] - * - * Note that this names the parent container in which to look for the - * descriptors; to retrieve a single descriptor by name, use the - * GetNotificationChannelDescriptor - * operation, instead. - * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. - * - * 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 [ListNotificationChannelDescriptorsResponse]{@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} 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 [ListNotificationChannelDescriptorsResponse]{@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * - * client.listNotificationChannelDescriptors({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = 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.listNotificationChannelDescriptors(nextRequest, options).then(callback); - * } - * } - * client.listNotificationChannelDescriptors({name: formattedName}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listNotificationChannelDescriptors(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.listNotificationChannelDescriptors( - request, - options, - callback - ); - } - - /** - * Equivalent to {@link listNotificationChannelDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listNotificationChannelDescriptors} 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.name - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * - * projects/[PROJECT_ID] - * - * Note that this names the parent container in which to look for the - * descriptors; to retrieve a single descriptor by name, use the - * GetNotificationChannelDescriptor - * operation, instead. - * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * client.listNotificationChannelDescriptorsStream({name: formattedName}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listNotificationChannelDescriptorsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listNotificationChannelDescriptors.createStream( - this._innerApiCalls.listNotificationChannelDescriptors, - request, - options - ); - } - - /** - * Gets a single channel descriptor. The descriptor indicates which fields - * are expected / permitted for a notification channel of the given type. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The channel type for which to execute the request. The format is - * `projects/[PROJECT_ID]/notificationChannelDescriptors/{channel_type}`. - * @param {Object} [options] - * Optional parameters. You 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.notificationChannelDescriptorPath('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); - * client.getNotificationChannelDescriptor({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getNotificationChannelDescriptor(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.getNotificationChannelDescriptor( - request, - options, - callback - ); - } - - /** - * Lists the notification channels that have been created for the project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is - * `projects/[PROJECT_ID]`. That is, this names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * `GetNotificationChannel` - * operation. - * @param {string} [request.filter] - * If provided, this field specifies the criteria that must be met by - * notification channels to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @param {string} [request.orderBy] - * A comma-separated list of fields by which to sort the result. Supports - * the same set of fields as in `filter`. Entries can be prefixed with - * a minus sign to sort in descending rather than ascending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * - * 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 [ListNotificationChannelsResponse]{@link google.monitoring.v3.ListNotificationChannelsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} 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 [ListNotificationChannelsResponse]{@link google.monitoring.v3.ListNotificationChannelsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedName = client.projectPath('[PROJECT]'); - * - * client.listNotificationChannels({name: formattedName}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const formattedName = 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.listNotificationChannels(nextRequest, options).then(callback); - * } - * } - * client.listNotificationChannels({name: formattedName}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listNotificationChannels(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.listNotificationChannels( - request, - options, - callback - ); - } - - /** - * Equivalent to {@link listNotificationChannels}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listNotificationChannels} 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.name - * Required. The project on which to execute the request. The format is - * `projects/[PROJECT_ID]`. That is, this names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * `GetNotificationChannel` - * operation. - * @param {string} [request.filter] - * If provided, this field specifies the criteria that must be met by - * notification channels to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @param {string} [request.orderBy] - * A comma-separated list of fields by which to sort the result. Supports - * the same set of fields as in `filter`. Entries can be prefixed with - * a minus sign to sort in descending rather than ascending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * client.listNotificationChannelsStream({name: formattedName}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listNotificationChannelsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listNotificationChannels.createStream( - this._innerApiCalls.listNotificationChannels, - request, - options - ); - } - - /** - * Gets a single notification channel. The channel includes the relevant - * configuration details with which the channel was created. However, the - * response may truncate or omit passwords, API keys, or other private key - * matter and thus the response may not be 100% identical to the information - * that was supplied in the call to the create method. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The channel for which to execute the request. The format is - * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * client.getNotificationChannel({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getNotificationChannel(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.getNotificationChannel( - request, - options, - callback - ); - } - - /** - * Creates a new notification channel, representing a single notification - * endpoint such as an email address, SMS number, or PagerDuty service. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The project on which to execute the request. The format is: - * - * projects/[PROJECT_ID] - * - * Note that this names the container into which the channel will be - * written. This does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * @param {Object} request.notificationChannel - * Required. The definition of the `NotificationChannel` to create. - * - * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} - * @param {Object} [options] - * Optional parameters. You 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.projectPath('[PROJECT]'); - * const notificationChannel = {}; - * const request = { - * name: formattedName, - * notificationChannel: notificationChannel, - * }; - * client.createNotificationChannel(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createNotificationChannel(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.createNotificationChannel( - request, - options, - callback - ); - } - - /** - * Updates a notification channel. Fields not specified in the field mask - * remain unchanged. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.notificationChannel - * Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * - * This object should have the same structure as [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} - * @param {Object} [request.updateMask] - * The fields to update. - * - * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const notificationChannel = {}; - * client.updateNotificationChannel({notificationChannel: notificationChannel}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateNotificationChannel(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({ - 'notification_channel.name': request.notificationChannel.name, - }); - - return this._innerApiCalls.updateNotificationChannel( - request, - options, - callback - ); - } - - /** - * Deletes a notification channel. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The channel for which to execute the request. The format is - * `projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]`. - * @param {boolean} [request.force] - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, channels that are still referenced by an existing - * alerting policy will fail to be deleted in a delete operation. - * @param {Object} [options] - * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * client.deleteNotificationChannel({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteNotificationChannel(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.deleteNotificationChannel( - request, - options, - callback - ); - } - - /** - * Causes a verification code to be delivered to the channel. The code - * can then be supplied in `VerifyNotificationChannel` to verify the channel. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The notification channel to which to send a verification code. - * @param {Object} [options] - * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * client.sendNotificationChannelVerificationCode({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - sendNotificationChannelVerificationCode(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.sendNotificationChannelVerificationCode( - request, - options, - callback - ); - } - - /** - * Requests a verification code for an already verified channel that can then - * be used in a call to VerifyNotificationChannel() on a different channel - * with an equivalent identity in the same or in a different project. This - * makes it possible to copy a channel between projects without requiring - * manual reverification of the channel. If the channel is not in the - * verified state, this method will fail (in other words, this may only be - * used if the SendNotificationChannelVerificationCode and - * VerifyNotificationChannel paths have already been used to put the given - * channel into the verified state). - * - * There is no guarantee that the verification codes returned by this method - * will be of a similar structure or form as the ones that are delivered - * to the channel via SendNotificationChannelVerificationCode; while - * VerifyNotificationChannel() will recognize both the codes delivered via - * SendNotificationChannelVerificationCode() and returned from - * GetNotificationChannelVerificationCode(), it is typically the case that - * the verification codes delivered via - * SendNotificationChannelVerificationCode() will be shorter and also - * have a shorter expiration (e.g. codes such as "G-123456") whereas - * GetVerificationCode() will typically return a much longer, websafe base - * 64 encoded string that has a longer expiration time. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The notification channel for which a verification code is to be generated - * and retrieved. This must name a channel that is already verified; if - * the specified channel is not verified, the request will fail. - * @param {Object} [request.expireTime] - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * @param {Object} [options] - * Optional parameters. You 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 [GetNotificationChannelVerificationCodeResponse]{@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [GetNotificationChannelVerificationCodeResponse]{@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * client.getNotificationChannelVerificationCode({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getNotificationChannelVerificationCode(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.getNotificationChannelVerificationCode( - request, - options, - callback - ); - } - - /** - * Verifies a `NotificationChannel` by proving receipt of the code - * delivered to the channel as a result of calling - * `SendNotificationChannelVerificationCode`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The notification channel to verify. - * @param {string} request.code - * Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * @param {Object} [options] - * Optional parameters. You 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.NotificationChannelServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.notificationChannelPath('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * const code = ''; - * const request = { - * name: formattedName, - * code: code, - * }; - * client.verifyNotificationChannel(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - verifyNotificationChannel(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.verifyNotificationChannel( - request, - options, - callback - ); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified notification_channel resource name string. - * - * @param {String} project - * @param {String} notificationChannel - * @returns {String} - */ - notificationChannelPath(project, notificationChannel) { - return this._pathTemplates.notificationChannelPathTemplate.render({ - project: project, - notification_channel: notificationChannel, - }); - } - - /** - * Return a fully-qualified notification_channel_descriptor resource name string. - * - * @param {String} project - * @param {String} channelDescriptor - * @returns {String} - */ - notificationChannelDescriptorPath(project, channelDescriptor) { - return this._pathTemplates.notificationChannelDescriptorPathTemplate.render( - { - project: project, - channel_descriptor: channelDescriptor, - } - ); - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {String} project - * @returns {String} - */ - projectPath(project) { - return this._pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the notificationChannelName from a notification_channel resource. - * - * @param {String} notificationChannelName - * A fully-qualified path representing a notification_channel resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromNotificationChannelName(notificationChannelName) { - return this._pathTemplates.notificationChannelPathTemplate.match( - notificationChannelName - ).project; - } - - /** - * Parse the notificationChannelName from a notification_channel resource. - * - * @param {String} notificationChannelName - * A fully-qualified path representing a notification_channel resources. - * @returns {String} - A string representing the notification_channel. - */ - matchNotificationChannelFromNotificationChannelName(notificationChannelName) { - return this._pathTemplates.notificationChannelPathTemplate.match( - notificationChannelName - ).notification_channel; - } - - /** - * Parse the notificationChannelDescriptorName from a notification_channel_descriptor resource. - * - * @param {String} notificationChannelDescriptorName - * A fully-qualified path representing a notification_channel_descriptor resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromNotificationChannelDescriptorName( - notificationChannelDescriptorName - ) { - return this._pathTemplates.notificationChannelDescriptorPathTemplate.match( - notificationChannelDescriptorName - ).project; - } - - /** - * Parse the notificationChannelDescriptorName from a notification_channel_descriptor resource. - * - * @param {String} notificationChannelDescriptorName - * A fully-qualified path representing a notification_channel_descriptor resources. - * @returns {String} - A string representing the channel_descriptor. - */ - matchChannelDescriptorFromNotificationChannelDescriptorName( - notificationChannelDescriptorName - ) { - return this._pathTemplates.notificationChannelDescriptorPathTemplate.match( - notificationChannelDescriptorName - ).channel_descriptor; - } - - /** - * 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 = NotificationChannelServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts new file mode 100644 index 00000000000..e5e566a950f --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -0,0 +1,2677 @@ +// 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. +// +// ** 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 './notification_channel_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The Notification Channel API provides access to configuration that + * controls how messages related to incidents are sent. + * @class + * @memberof v3 + */ +export class NotificationChannelServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + notificationChannelServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of NotificationChannelServiceClient. + * + * @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?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this + .constructor as typeof NotificationChannelServiceClient; + 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. + const 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 NotificationChannelServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + 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 = { + folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listNotificationChannelDescriptors: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'channelDescriptors' + ), + listNotificationChannels: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'notificationChannels' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.NotificationChannelService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.v3.NotificationChannelService. + this.notificationChannelServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.v3.NotificationChannelService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.v3.NotificationChannelService, + 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 notificationChannelServiceStubMethods = [ + 'listNotificationChannelDescriptors', + 'getNotificationChannelDescriptor', + 'listNotificationChannels', + 'getNotificationChannel', + 'createNotificationChannel', + 'updateNotificationChannel', + 'deleteNotificationChannel', + 'sendNotificationChannelVerificationCode', + 'getNotificationChannelVerificationCode', + 'verifyNotificationChannel', + ]; + + for (const methodName of notificationChannelServiceStubMethods) { + const innerCallPromise = this.notificationChannelServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + 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); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + getNotificationChannelDescriptor( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + ( + | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | undefined + ), + {} | undefined + ] + >; + getNotificationChannelDescriptor( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a single channel descriptor. The descriptor indicates which fields + * are expected / permitted for a notification channel of the given type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The channel type for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getNotificationChannelDescriptor( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + ( + | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | 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 || '', + }); + return this._innerApiCalls.getNotificationChannelDescriptor( + request, + options, + callback + ); + } + getNotificationChannel( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + | undefined + ), + {} | undefined + ] + >; + getNotificationChannel( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + | undefined, + {} | undefined + > + ): void; + /** + * Gets a single notification channel. The channel includes the relevant + * configuration details with which the channel was created. However, the + * response may truncate or omit passwords, API keys, or other private key + * matter and thus the response may not be 100% identical to the information + * that was supplied in the call to the create method. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The channel for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getNotificationChannel( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + | 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 || '', + }); + return this._innerApiCalls.getNotificationChannel( + request, + options, + callback + ); + } + createNotificationChannel( + request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + | undefined + ), + {} | undefined + ] + >; + createNotificationChannel( + request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a new notification channel, representing a single notification + * endpoint such as an email address, SMS number, or PagerDuty service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * @param {google.monitoring.v3.NotificationChannel} request.notificationChannel + * Required. The definition of the `NotificationChannel` to create. + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createNotificationChannel( + request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + | 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 || '', + }); + return this._innerApiCalls.createNotificationChannel( + request, + options, + callback + ); + } + updateNotificationChannel( + request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + | undefined + ), + {} | undefined + ] + >; + updateNotificationChannel( + request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates a notification channel. Fields not specified in the field mask + * remain unchanged. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * The fields to update. + * @param {google.monitoring.v3.NotificationChannel} request.notificationChannel + * Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateNotificationChannel( + request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + | 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({ + 'notification_channel.name': request.notificationChannel!.name || '', + }); + return this._innerApiCalls.updateNotificationChannel( + request, + options, + callback + ); + } + deleteNotificationChannel( + request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + | undefined + ), + {} | undefined + ] + >; + deleteNotificationChannel( + request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes a notification channel. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The channel for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * @param {boolean} request.force + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, channels that are still referenced by an existing + * alerting policy will fail to be deleted in a delete operation. + * @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. + */ + deleteNotificationChannel( + request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + | 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 || '', + }); + return this._innerApiCalls.deleteNotificationChannel( + request, + options, + callback + ); + } + sendNotificationChannelVerificationCode( + request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | undefined + ), + {} | undefined + ] + >; + sendNotificationChannelVerificationCode( + request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | undefined, + {} | undefined + > + ): void; + /** + * Causes a verification code to be delivered to the channel. The code + * can then be supplied in `VerifyNotificationChannel` to verify the channel. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The notification channel to which to send a verification code. + * @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. + */ + sendNotificationChannelVerificationCode( + request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | 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 || '', + }); + return this._innerApiCalls.sendNotificationChannelVerificationCode( + request, + options, + callback + ); + } + getNotificationChannelVerificationCode( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + ( + | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | undefined + ), + {} | undefined + ] + >; + getNotificationChannelVerificationCode( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | undefined, + {} | undefined + > + ): void; + /** + * Requests a verification code for an already verified channel that can then + * be used in a call to VerifyNotificationChannel() on a different channel + * with an equivalent identity in the same or in a different project. This + * makes it possible to copy a channel between projects without requiring + * manual reverification of the channel. If the channel is not in the + * verified state, this method will fail (in other words, this may only be + * used if the SendNotificationChannelVerificationCode and + * VerifyNotificationChannel paths have already been used to put the given + * channel into the verified state). + * + * There is no guarantee that the verification codes returned by this method + * will be of a similar structure or form as the ones that are delivered + * to the channel via SendNotificationChannelVerificationCode; while + * VerifyNotificationChannel() will recognize both the codes delivered via + * SendNotificationChannelVerificationCode() and returned from + * GetNotificationChannelVerificationCode(), it is typically the case that + * the verification codes delivered via + * SendNotificationChannelVerificationCode() will be shorter and also + * have a shorter expiration (e.g. codes such as "G-123456") whereas + * GetVerificationCode() will typically return a much longer, websafe base + * 64 encoded string that has a longer expiration time. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The notification channel for which a verification code is to be generated + * and retrieved. This must name a channel that is already verified; if + * the specified channel is not verified, the request will fail. + * @param {google.protobuf.Timestamp} request.expireTime + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * @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 [GetNotificationChannelVerificationCodeResponse]{@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getNotificationChannelVerificationCode( + request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + ( + | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | 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 || '', + }); + return this._innerApiCalls.getNotificationChannelVerificationCode( + request, + options, + callback + ); + } + verifyNotificationChannel( + request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + | undefined + ), + {} | undefined + ] + >; + verifyNotificationChannel( + request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + | undefined, + {} | undefined + > + ): void; + /** + * Verifies a `NotificationChannel` by proving receipt of the code + * delivered to the channel as a result of calling + * `SendNotificationChannelVerificationCode`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The notification channel to verify. + * @param {string} request.code + * Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + verifyNotificationChannel( + request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannel, + | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel, + ( + | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + | 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 || '', + }); + return this._innerApiCalls.verifyNotificationChannel( + request, + options, + callback + ); + } + + listNotificationChannelDescriptors( + request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + ] + >; + listNotificationChannelDescriptors( + request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + > + ): void; + /** + * Lists the descriptors for supported channel types. The use of descriptors + * makes it possible for new channel types to be dynamically added. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this names the parent container in which to look for the + * descriptors; to retrieve a single descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @param {string} request.pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. + * 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} 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 [ListNotificationChannelDescriptorsRequest]{@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest} + * 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 + * [ListNotificationChannelDescriptorsResponse]{@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listNotificationChannelDescriptors( + request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listNotificationChannelDescriptors( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listNotificationChannelDescriptors}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listNotificationChannelDescriptors} 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.name + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this names the parent container in which to look for the + * descriptors; to retrieve a single descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @param {string} request.pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * @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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} on 'data' event. + */ + listNotificationChannelDescriptorsStream( + request?: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listNotificationChannelDescriptors.createStream( + this._innerApiCalls.listNotificationChannelDescriptors as gax.GaxCall, + request, + callSettings + ); + } + listNotificationChannels( + request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel[], + protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + ] + >; + listNotificationChannels( + request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.INotificationChannel[], + protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + > + ): void; + /** + * Lists the notification channels that have been created for the project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by + * notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} request.orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of fields as in `filter`. Entries can be prefixed with + * a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {number} request.pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @param {string} request.pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. + * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} 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 [ListNotificationChannelsRequest]{@link google.monitoring.v3.ListNotificationChannelsRequest} + * 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 + * [ListNotificationChannelsResponse]{@link google.monitoring.v3.ListNotificationChannelsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listNotificationChannels( + request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.INotificationChannel[], + protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.INotificationChannel[], + protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.INotificationChannel[], + protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, + protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listNotificationChannels( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listNotificationChannels}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listNotificationChannels} 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by + * notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} request.orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of fields as in `filter`. Entries can be prefixed with + * a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {number} request.pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @param {string} request.pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * @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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} on 'data' event. + */ + listNotificationChannelsStream( + request?: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listNotificationChannels.createStream( + this._innerApiCalls.listNotificationChannels as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.render({ + folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this._pathTemplates.folderGroupPathTemplate.render({ + folder, + group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this._pathTemplates.folderNotificationChannelPathTemplate.render({ + folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this._pathTemplates.folderServicePathTemplate.render({ + folder, + service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization, + alert_policy: alertPolicy, + condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( + { + organization, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this._pathTemplates.organizationGroupPathTemplate.render({ + organization, + group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this._pathTemplates.organizationServicePathTemplate.render({ + organization, + service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( + { + organization, + uptime_check_config: uptimeCheckConfig, + } + ); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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 projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.render({ + project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ + project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this._pathTemplates.projectGroupPathTemplate.render({ + project, + group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this._pathTemplates.projectNotificationChannelPathTemplate.render({ + project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this._pathTemplates.projectServicePathTemplate.render({ + project, + service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.notificationChannelServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json index 5fddaef1323..58fb6cbe21e 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client_config.json @@ -2,73 +2,82 @@ "interfaces": { "google.monitoring.v3.NotificationChannelService": { "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 + }, + "71ca22c74d2828b200f9ff1cc285a8beb96cc2af": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "ListNotificationChannelDescriptors": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetNotificationChannelDescriptor": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListNotificationChannels": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "SendNotificationChannelVerificationCode": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetNotificationChannelVerificationCode": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "VerifyNotificationChannel": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" } } } diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json index 0de383ffbb9..0534dc6a035 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json @@ -1,3 +1,18 @@ [ - "../../protos/google/monitoring/v3/notification_service.proto" + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", + "../../protos/google/monitoring/v3/uptime_service.proto" ] diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js deleted file mode 100644 index 237f13f8657..00000000000 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.js +++ /dev/null @@ -1,1238 +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('./service_monitoring_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for - * managing and querying aspects of a workspace's services. These include the - * `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy - * of categorized Health Metrics. - * - * @class - * @memberof v3 - */ -class ServiceMonitoringServiceClient { - /** - * Construct an instance of ServiceMonitoringServiceClient. - * - * @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 = { - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - servicePathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/services/{service}' - ), - serviceLevelObjectivePathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - }; - - // 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 = { - listServices: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'services' - ), - listServiceLevelObjectives: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'serviceLevelObjectives' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.ServiceMonitoringService', - 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.monitoring.v3.ServiceMonitoringService. - const serviceMonitoringServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.monitoring.v3.ServiceMonitoringService') - : protos.google.monitoring.v3.ServiceMonitoringService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const serviceMonitoringServiceStubMethods = [ - 'createService', - 'getService', - 'listServices', - 'updateService', - 'deleteService', - 'createServiceLevelObjective', - 'getServiceLevelObjective', - 'listServiceLevelObjectives', - 'updateServiceLevelObjective', - 'deleteServiceLevelObjective', - ]; - for (const methodName of serviceMonitoringServiceStubMethods) { - const innerCallPromise = serviceMonitoringServiceStub.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 'monitoring.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'monitoring.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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.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 -- - // ------------------- - - /** - * Create a `Service`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent workspace. - * Of the form `projects/{project_id}`. - * @param {Object} request.service - * Required. The `Service` to create. - * - * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} - * @param {string} [request.serviceId] - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern [a-z0-9\-]+ - * @param {Object} [options] - * Optional parameters. You 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 [Service]{@link google.monitoring.v3.Service}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Service]{@link google.monitoring.v3.Service}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * const service = {}; - * const request = { - * parent: formattedParent, - * service: service, - * }; - * client.createService(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createService(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.createService(request, options, callback); - } - - /** - * Get the named `Service`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the `Service`. - * Of the form `projects/{project_id}/services/{service_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 [Service]{@link google.monitoring.v3.Service}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Service]{@link google.monitoring.v3.Service}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); - * client.getService({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getService(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.getService(request, options, callback); - } - - /** - * List `Service`s for this workspace. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent `Workspace`. - * Of the form `projects/{project_id}`. - * @param {string} [request.filter] - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` - * - `cluster_istio.location` - * - `cluster_istio.cluster_name` - * - `cluster_istio.service_namespace` - * - `cluster_istio.service_name` - * - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". - * @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 [Service]{@link google.monitoring.v3.Service}. - * - * 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 [ListServicesResponse]{@link google.monitoring.v3.ListServicesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Service]{@link google.monitoring.v3.Service}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Service]{@link google.monitoring.v3.Service} 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 [ListServicesResponse]{@link google.monitoring.v3.ListServicesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * client.listServices({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.listServices(nextRequest, options).then(callback); - * } - * } - * client.listServices({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listServices(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.listServices(request, options, callback); - } - - /** - * Equivalent to {@link listServices}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listServices} 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. Resource name of the parent `Workspace`. - * Of the form `projects/{project_id}`. - * @param {string} [request.filter] - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` - * - `cluster_istio.location` - * - `cluster_istio.cluster_name` - * - `cluster_istio.service_namespace` - * - `cluster_istio.service_name` - * - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". - * @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 [Service]{@link google.monitoring.v3.Service} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * client.listServicesStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listServicesStream(request, options) { - options = options || {}; - - return this._descriptors.page.listServices.createStream( - this._innerApiCalls.listServices, - request, - options - ); - } - - /** - * Update this `Service`. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.service - * Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * - * This object should have the same structure as [Service]{@link google.monitoring.v3.Service} - * @param {Object} [request.updateMask] - * A set of field paths defining which fields to use for the update. - * - * 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 [Service]{@link google.monitoring.v3.Service}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Service]{@link google.monitoring.v3.Service}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const service = {}; - * client.updateService({service: service}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateService(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({ - 'service.name': request.service.name, - }); - - return this._innerApiCalls.updateService(request, options, callback); - } - - /** - * Soft delete this `Service`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the `Service` to delete. - * Of the form `projects/{project_id}/services/{service_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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); - * client.deleteService({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteService(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.deleteService(request, options, callback); - } - - /** - * Create a `ServiceLevelObjective` for the given `Service`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. - * @param {Object} request.serviceLevelObjective - * Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * - * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} - * @param {string} [request.serviceLevelObjectiveId] - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern [a-z0-9\-]+ - * @param {Object} [options] - * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - * const serviceLevelObjective = {}; - * const request = { - * parent: formattedParent, - * serviceLevelObjective: serviceLevelObjective, - * }; - * client.createServiceLevelObjective(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createServiceLevelObjective(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.createServiceLevelObjective( - request, - options, - callback - ); - } - - /** - * Get a `ServiceLevelObjective` by name. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the `ServiceLevelObjective` to get. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - * @param {number} [request.view] - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * The number should be among the values of [View]{@link google.monitoring.v3.View} - * @param {Object} [options] - * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.serviceLevelObjectivePath('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - * client.getServiceLevelObjective({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getServiceLevelObjective(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.getServiceLevelObjective( - request, - options, - callback - ); - } - - /** - * List the `ServiceLevelObjective`s for the given `Service`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. - * @param {string} [request.filter] - * A filter specifying what `ServiceLevelObjective`s to return. - * @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 {number} [request.view] - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * The number should be among the values of [View]{@link google.monitoring.v3.View} - * @param {Object} [options] - * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * - * 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 [ListServiceLevelObjectivesResponse]{@link google.monitoring.v3.ListServiceLevelObjectivesResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} 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 [ListServiceLevelObjectivesResponse]{@link google.monitoring.v3.ListServiceLevelObjectivesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - * - * client.listServiceLevelObjectives({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.servicePath('[PROJECT]', '[SERVICE]'); - * - * - * 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.listServiceLevelObjectives(nextRequest, options).then(callback); - * } - * } - * client.listServiceLevelObjectives({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listServiceLevelObjectives(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.listServiceLevelObjectives( - request, - options, - callback - ); - } - - /** - * Equivalent to {@link listServiceLevelObjectives}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listServiceLevelObjectives} 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. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. - * @param {string} [request.filter] - * A filter specifying what `ServiceLevelObjective`s to return. - * @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 {number} [request.view] - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * The number should be among the values of [View]{@link google.monitoring.v3.View} - * @param {Object} [options] - * Optional parameters. You 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - * client.listServiceLevelObjectivesStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listServiceLevelObjectivesStream(request, options) { - options = options || {}; - - return this._descriptors.page.listServiceLevelObjectives.createStream( - this._innerApiCalls.listServiceLevelObjectives, - request, - options - ); - } - - /** - * Update the given `ServiceLevelObjective`. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.serviceLevelObjective - * Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * - * This object should have the same structure as [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} - * @param {Object} [request.updateMask] - * A set of field paths defining which fields to use for the update. - * - * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const serviceLevelObjective = {}; - * client.updateServiceLevelObjective({serviceLevelObjective: serviceLevelObjective}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateServiceLevelObjective(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({ - 'service_level_objective.name': request.serviceLevelObjective.name, - }); - - return this._innerApiCalls.updateServiceLevelObjective( - request, - options, - callback - ); - } - - /** - * Delete the given `ServiceLevelObjective`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the `ServiceLevelObjective` to delete. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. - * @param {Object} [options] - * Optional parameters. You 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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.ServiceMonitoringServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.serviceLevelObjectivePath('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - * client.deleteServiceLevelObjective({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteServiceLevelObjective(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.deleteServiceLevelObjective( - request, - options, - callback - ); - } - - // -------------------- - // -- 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 service resource name string. - * - * @param {String} project - * @param {String} service - * @returns {String} - */ - servicePath(project, service) { - return this._pathTemplates.servicePathTemplate.render({ - project: project, - service: service, - }); - } - - /** - * Return a fully-qualified service_level_objective resource name string. - * - * @param {String} project - * @param {String} service - * @param {String} serviceLevelObjective - * @returns {String} - */ - serviceLevelObjectivePath(project, service, serviceLevelObjective) { - return this._pathTemplates.serviceLevelObjectivePathTemplate.render({ - project: project, - service: service, - service_level_objective: serviceLevelObjective, - }); - } - - /** - * 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 serviceName from a service resource. - * - * @param {String} serviceName - * A fully-qualified path representing a service resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromServiceName(serviceName) { - return this._pathTemplates.servicePathTemplate.match(serviceName).project; - } - - /** - * Parse the serviceName from a service resource. - * - * @param {String} serviceName - * A fully-qualified path representing a service resources. - * @returns {String} - A string representing the service. - */ - matchServiceFromServiceName(serviceName) { - return this._pathTemplates.servicePathTemplate.match(serviceName).service; - } - - /** - * Parse the serviceLevelObjectiveName from a service_level_objective resource. - * - * @param {String} serviceLevelObjectiveName - * A fully-qualified path representing a service_level_objective resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromServiceLevelObjectiveName(serviceLevelObjectiveName) { - return this._pathTemplates.serviceLevelObjectivePathTemplate.match( - serviceLevelObjectiveName - ).project; - } - - /** - * Parse the serviceLevelObjectiveName from a service_level_objective resource. - * - * @param {String} serviceLevelObjectiveName - * A fully-qualified path representing a service_level_objective resources. - * @returns {String} - A string representing the service. - */ - matchServiceFromServiceLevelObjectiveName(serviceLevelObjectiveName) { - return this._pathTemplates.serviceLevelObjectivePathTemplate.match( - serviceLevelObjectiveName - ).service; - } - - /** - * Parse the serviceLevelObjectiveName from a service_level_objective resource. - * - * @param {String} serviceLevelObjectiveName - * A fully-qualified path representing a service_level_objective resources. - * @returns {String} - A string representing the service_level_objective. - */ - matchServiceLevelObjectiveFromServiceLevelObjectiveName( - serviceLevelObjectiveName - ) { - return this._pathTemplates.serviceLevelObjectivePathTemplate.match( - serviceLevelObjectiveName - ).service_level_objective; - } -} - -module.exports = ServiceMonitoringServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts new file mode 100644 index 00000000000..4516ab43d7b --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -0,0 +1,2565 @@ +// 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. +// +// ** 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 './service_monitoring_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for + * managing and querying aspects of a workspace's services. These include the + * `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy + * of categorized Health Metrics. + * @class + * @memberof v3 + */ +export class ServiceMonitoringServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + serviceMonitoringServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ServiceMonitoringServiceClient. + * + * @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?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this + .constructor as typeof ServiceMonitoringServiceClient; + 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. + const 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 ServiceMonitoringServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + 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 = { + folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listServices: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'services' + ), + listServiceLevelObjectives: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'serviceLevelObjectives' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.ServiceMonitoringService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.v3.ServiceMonitoringService. + this.serviceMonitoringServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.v3.ServiceMonitoringService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.v3.ServiceMonitoringService, + 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 serviceMonitoringServiceStubMethods = [ + 'createService', + 'getService', + 'listServices', + 'updateService', + 'deleteService', + 'createServiceLevelObjective', + 'getServiceLevelObjective', + 'listServiceLevelObjectives', + 'updateServiceLevelObjective', + 'deleteServiceLevelObjective', + ]; + + for (const methodName of serviceMonitoringServiceStubMethods) { + const innerCallPromise = this.serviceMonitoringServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + 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); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + createService( + request: protosTypes.google.monitoring.v3.ICreateServiceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, + {} | undefined + ] + >; + createService( + request: protosTypes.google.monitoring.v3.ICreateServiceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, + {} | undefined + > + ): void; + /** + * Create a `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent workspace. + * Of the form `projects/{project_id}`. + * @param {string} request.serviceId + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern [a-z0-9\-]+ + * @param {google.monitoring.v3.Service} request.service + * Required. The `Service` to create. + * @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 [Service]{@link google.monitoring.v3.Service}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createService( + request: protosTypes.google.monitoring.v3.ICreateServiceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.ICreateServiceRequest | 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 || '', + }); + return this._innerApiCalls.createService(request, options, callback); + } + getService( + request: protosTypes.google.monitoring.v3.IGetServiceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, + {} | undefined + ] + >; + getService( + request: protosTypes.google.monitoring.v3.IGetServiceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, + {} | undefined + > + ): void; + /** + * Get the named `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the `Service`. + * Of the form `projects/{project_id}/services/{service_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 [Service]{@link google.monitoring.v3.Service}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getService( + request: protosTypes.google.monitoring.v3.IGetServiceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IGetServiceRequest | 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 || '', + }); + return this._innerApiCalls.getService(request, options, callback); + } + updateService( + request: protosTypes.google.monitoring.v3.IUpdateServiceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, + {} | undefined + ] + >; + updateService( + request: protosTypes.google.monitoring.v3.IUpdateServiceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, + {} | undefined + > + ): void; + /** + * Update this `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.monitoring.v3.Service} request.service + * Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * @param {google.protobuf.FieldMask} request.updateMask + * A set of field paths defining which fields to use for the update. + * @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 [Service]{@link google.monitoring.v3.Service}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateService( + request: protosTypes.google.monitoring.v3.IUpdateServiceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IService, + protosTypes.google.monitoring.v3.IUpdateServiceRequest | 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({ + 'service.name': request.service!.name || '', + }); + return this._innerApiCalls.updateService(request, options, callback); + } + deleteService( + request: protosTypes.google.monitoring.v3.IDeleteServiceRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, + {} | undefined + ] + >; + deleteService( + request: protosTypes.google.monitoring.v3.IDeleteServiceRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, + {} | undefined + > + ): void; + /** + * Soft delete this `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the `Service` to delete. + * Of the form `projects/{project_id}/services/{service_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. + */ + deleteService( + request: protosTypes.google.monitoring.v3.IDeleteServiceRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.monitoring.v3.IDeleteServiceRequest | 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 || '', + }); + return this._innerApiCalls.deleteService(request, options, callback); + } + createServiceLevelObjective( + request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective, + ( + | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | undefined + ), + {} | undefined + ] + >; + createServiceLevelObjective( + request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): void; + /** + * Create a `ServiceLevelObjective` for the given `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {string} request.serviceLevelObjectiveId + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern [a-z0-9\-]+ + * @param {google.monitoring.v3.ServiceLevelObjective} request.serviceLevelObjective + * Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * @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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createServiceLevelObjective( + request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective, + ( + | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | 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 || '', + }); + return this._innerApiCalls.createServiceLevelObjective( + request, + options, + callback + ); + } + getServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective, + ( + | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | undefined + ), + {} | undefined + ] + >; + getServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): void; + /** + * Get a `ServiceLevelObjective` by name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the `ServiceLevelObjective` to get. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * @param {google.monitoring.v3.ServiceLevelObjective.View} request.view + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * @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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective, + ( + | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | 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 || '', + }); + return this._innerApiCalls.getServiceLevelObjective( + request, + options, + callback + ); + } + updateServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective, + ( + | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | undefined + ), + {} | undefined + ] + >; + updateServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): void; + /** + * Update the given `ServiceLevelObjective`. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.monitoring.v3.ServiceLevelObjective} request.serviceLevelObjective + * Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * @param {google.protobuf.FieldMask} request.updateMask + * A set of field paths defining which fields to use for the update. + * @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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective, + | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective, + ( + | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | 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({ + 'service_level_objective.name': request.serviceLevelObjective!.name || '', + }); + return this._innerApiCalls.updateServiceLevelObjective( + request, + options, + callback + ); + } + deleteServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | undefined + ), + {} | undefined + ] + >; + deleteServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): void; + /** + * Delete the given `ServiceLevelObjective`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the `ServiceLevelObjective` to delete. + * Of the form + * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * @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. + */ + deleteServiceLevelObjective( + request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | 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 || '', + }); + return this._innerApiCalls.deleteServiceLevelObjective( + request, + options, + callback + ); + } + + listServices( + request: protosTypes.google.monitoring.v3.IListServicesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IService[], + protosTypes.google.monitoring.v3.IListServicesRequest | null, + protosTypes.google.monitoring.v3.IListServicesResponse + ] + >; + listServices( + request: protosTypes.google.monitoring.v3.IListServicesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IService[], + protosTypes.google.monitoring.v3.IListServicesRequest | null, + protosTypes.google.monitoring.v3.IListServicesResponse + > + ): void; + /** + * List `Service`s for this workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent `Workspace`. + * Of the form `projects/{project_id}`. + * @param {string} request.filter + * A filter specifying what `Service`s to return. The filter currently + * supports the following fields: + * + * - `identifier_case` + * - `app_engine.module_id` + * - `cloud_endpoints.service` + * - `cluster_istio.location` + * - `cluster_istio.cluster_name` + * - `cluster_istio.service_namespace` + * - `cluster_istio.service_name` + * + * `identifier_case` refers to which option in the identifier oneof is + * populated. For example, the filter `identifier_case = "CUSTOM"` would match + * all services with a value for the `custom` field. Valid options are + * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * @param {number} request.pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [Service]{@link google.monitoring.v3.Service}. + * 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 [Service]{@link google.monitoring.v3.Service} 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 [ListServicesRequest]{@link google.monitoring.v3.ListServicesRequest} + * 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 + * [ListServicesResponse]{@link google.monitoring.v3.ListServicesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listServices( + request: protosTypes.google.monitoring.v3.IListServicesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IService[], + protosTypes.google.monitoring.v3.IListServicesRequest | null, + protosTypes.google.monitoring.v3.IListServicesResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IService[], + protosTypes.google.monitoring.v3.IListServicesRequest | null, + protosTypes.google.monitoring.v3.IListServicesResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IService[], + protosTypes.google.monitoring.v3.IListServicesRequest | null, + protosTypes.google.monitoring.v3.IListServicesResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listServices(request, options, callback); + } + + /** + * Equivalent to {@link listServices}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listServices} 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. Resource name of the parent `Workspace`. + * Of the form `projects/{project_id}`. + * @param {string} request.filter + * A filter specifying what `Service`s to return. The filter currently + * supports the following fields: + * + * - `identifier_case` + * - `app_engine.module_id` + * - `cloud_endpoints.service` + * - `cluster_istio.location` + * - `cluster_istio.cluster_name` + * - `cluster_istio.service_namespace` + * - `cluster_istio.service_name` + * + * `identifier_case` refers to which option in the identifier oneof is + * populated. For example, the filter `identifier_case = "CUSTOM"` would match + * all services with a value for the `custom` field. Valid options are + * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * @param {number} request.pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [Service]{@link google.monitoring.v3.Service} on 'data' event. + */ + listServicesStream( + request?: protosTypes.google.monitoring.v3.IListServicesRequest, + 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); + return this._descriptors.page.listServices.createStream( + this._innerApiCalls.listServices as gax.GaxCall, + request, + callSettings + ); + } + listServiceLevelObjectives( + request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective[], + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + ] + >; + listServiceLevelObjectives( + request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective[], + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + > + ): void; + /** + * List the `ServiceLevelObjective`s for the given `Service`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {string} request.filter + * A filter specifying what `ServiceLevelObjective`s to return. + * @param {number} request.pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {google.monitoring.v3.ServiceLevelObjective.View} request.view + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * @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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. + * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} 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 [ListServiceLevelObjectivesRequest]{@link google.monitoring.v3.ListServiceLevelObjectivesRequest} + * 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 + * [ListServiceLevelObjectivesResponse]{@link google.monitoring.v3.ListServiceLevelObjectivesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listServiceLevelObjectives( + request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective[], + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IServiceLevelObjective[], + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IServiceLevelObjective[], + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listServiceLevelObjectives( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listServiceLevelObjectives}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listServiceLevelObjectives} 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. Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {string} request.filter + * A filter specifying what `ServiceLevelObjective`s to return. + * @param {number} request.pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {google.monitoring.v3.ServiceLevelObjective.View} request.view + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * @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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} on 'data' event. + */ + listServiceLevelObjectivesStream( + request?: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + 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); + return this._descriptors.page.listServiceLevelObjectives.createStream( + this._innerApiCalls.listServiceLevelObjectives as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.render({ + folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this._pathTemplates.folderGroupPathTemplate.render({ + folder, + group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this._pathTemplates.folderNotificationChannelPathTemplate.render({ + folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this._pathTemplates.folderServicePathTemplate.render({ + folder, + service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization, + alert_policy: alertPolicy, + condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( + { + organization, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this._pathTemplates.organizationGroupPathTemplate.render({ + organization, + group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this._pathTemplates.organizationServicePathTemplate.render({ + organization, + service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( + { + organization, + uptime_check_config: uptimeCheckConfig, + } + ); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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 projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.render({ + project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ + project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this._pathTemplates.projectGroupPathTemplate.render({ + project, + group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this._pathTemplates.projectNotificationChannelPathTemplate.render({ + project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this._pathTemplates.projectServicePathTemplate.render({ + project, + service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.serviceMonitoringServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json index dfa25dc0bb1..b088f168fe2 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client_config.json @@ -2,73 +2,82 @@ "interfaces": { "google.monitoring.v3.ServiceMonitoringService": { "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 + }, + "71ca22c74d2828b200f9ff1cc285a8beb96cc2af": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "CreateService": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetService": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListServices": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "UpdateService": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteService": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateServiceLevelObjective": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetServiceLevelObjective": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListServiceLevelObjectives": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "UpdateServiceLevelObjective": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteServiceLevelObjective": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" } } } diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json index 10dad48263d..0534dc6a035 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json @@ -1,3 +1,18 @@ [ - "../../protos/google/monitoring/v3/service_service.proto" + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", + "../../protos/google/monitoring/v3/uptime_service.proto" ] diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js deleted file mode 100644 index 3f322c5f032..00000000000 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.js +++ /dev/null @@ -1,884 +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('./uptime_check_service_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * The UptimeCheckService API is used to manage (list, create, delete, edit) - * Uptime check configurations in the Stackdriver Monitoring product. An Uptime - * check is a piece of configuration that determines which resources and - * services to monitor for availability. These configurations can also be - * configured interactively by navigating to the [Cloud Console] - * (http://console.cloud.google.com), selecting the appropriate project, - * clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, - * and then clicking on "Uptime". - * - * @class - * @memberof v3 - */ -class UptimeCheckServiceClient { - /** - * Construct an instance of UptimeCheckServiceClient. - * - * @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 = { - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - uptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( - 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' - ), - }; - - // 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 = { - listUptimeCheckConfigs: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'uptimeCheckConfigs' - ), - listUptimeCheckIps: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'uptimeCheckIps' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.monitoring.v3.UptimeCheckService', - 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.monitoring.v3.UptimeCheckService. - const uptimeCheckServiceStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.monitoring.v3.UptimeCheckService') - : protos.google.monitoring.v3.UptimeCheckService, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const uptimeCheckServiceStubMethods = [ - 'listUptimeCheckConfigs', - 'getUptimeCheckConfig', - 'createUptimeCheckConfig', - 'updateUptimeCheckConfig', - 'deleteUptimeCheckConfig', - 'listUptimeCheckIps', - ]; - for (const methodName of uptimeCheckServiceStubMethods) { - const innerCallPromise = uptimeCheckServiceStub.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 'monitoring.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'monitoring.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/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.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 the existing valid Uptime check configurations for the project - * (leaving out any invalid configurations). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project whose Uptime check configurations are listed. The format - * is `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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * - * 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 [ListUptimeCheckConfigsResponse]{@link google.monitoring.v3.ListUptimeCheckConfigsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} 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 [ListUptimeCheckConfigsResponse]{@link google.monitoring.v3.ListUptimeCheckConfigsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const formattedParent = client.projectPath('[PROJECT]'); - * - * client.listUptimeCheckConfigs({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.listUptimeCheckConfigs(nextRequest, options).then(callback); - * } - * } - * client.listUptimeCheckConfigs({parent: formattedParent}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listUptimeCheckConfigs(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.listUptimeCheckConfigs( - request, - options, - callback - ); - } - - /** - * Equivalent to {@link listUptimeCheckConfigs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listUptimeCheckConfigs} 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 project whose Uptime check configurations are listed. The format - * is `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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * client.listUptimeCheckConfigsStream({parent: formattedParent}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listUptimeCheckConfigsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listUptimeCheckConfigs.createStream( - this._innerApiCalls.listUptimeCheckConfigs, - request, - options - ); - } - - /** - * Gets a single Uptime check configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The Uptime check configuration to retrieve. The format - * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - * client.getUptimeCheckConfig({name: formattedName}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getUptimeCheckConfig(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.getUptimeCheckConfig(request, options, callback); - } - - /** - * Creates a new Uptime check configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project in which to create the Uptime check. The format - * is `projects/[PROJECT_ID]`. - * @param {Object} request.uptimeCheckConfig - * Required. The new Uptime check configuration. - * - * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * @param {Object} [options] - * Optional parameters. You 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedParent = client.projectPath('[PROJECT]'); - * const uptimeCheckConfig = {}; - * const request = { - * parent: formattedParent, - * uptimeCheckConfig: uptimeCheckConfig, - * }; - * client.createUptimeCheckConfig(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createUptimeCheckConfig(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.createUptimeCheckConfig( - request, - options, - callback - ); - } - - /** - * Updates an Uptime check configuration. You can either replace the entire - * configuration with a new one or replace only certain fields in the current - * configuration by specifying the fields to be updated via `updateMask`. - * Returns the updated configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {Object} request.uptimeCheckConfig - * Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresonding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * - * This object should have the same structure as [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} - * @param {Object} [request.updateMask] - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * - * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * const uptimeCheckConfig = {}; - * client.updateUptimeCheckConfig({uptimeCheckConfig: uptimeCheckConfig}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateUptimeCheckConfig(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({ - 'uptime_check_config.name': request.uptimeCheckConfig.name, - }); - - return this._innerApiCalls.updateUptimeCheckConfig( - request, - options, - callback - ); - } - - /** - * Deletes an Uptime check configuration. Note that this method will fail - * if the Uptime check configuration is referenced by an alert policy or - * other dependent configs that would be rendered invalid by the deletion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The Uptime check configuration to delete. The format - * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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 monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * const formattedName = client.uptimeCheckConfigPath('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - * client.deleteUptimeCheckConfig({name: formattedName}).catch(err => { - * console.error(err); - * }); - */ - deleteUptimeCheckConfig(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.deleteUptimeCheckConfig( - request, - options, - callback - ); - } - - /** - * Returns the list of IP addresses that checkers run from - * - * @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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. - * - * 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 [ListUptimeCheckIpsResponse]{@link google.monitoring.v3.ListUptimeCheckIpsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} 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 [ListUptimeCheckIpsResponse]{@link google.monitoring.v3.ListUptimeCheckIpsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * client.listUptimeCheckIps({}) - * .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.listUptimeCheckIps(nextRequest, options).then(callback); - * } - * } - * client.listUptimeCheckIps({}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listUptimeCheckIps(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.listUptimeCheckIps(request, options, callback); - } - - /** - * Equivalent to {@link listUptimeCheckIps}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listUptimeCheckIps} 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} on 'data' event. - * - * @example - * - * const monitoring = require('@google-cloud/monitoring'); - * - * const client = new monitoring.v3.UptimeCheckServiceClient({ - * // optional auth parameters. - * }); - * - * - * client.listUptimeCheckIpsStream({}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listUptimeCheckIpsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listUptimeCheckIps.createStream( - this._innerApiCalls.listUptimeCheckIps, - request, - options - ); - } - - // -------------------- - // -- 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 uptime_check_config resource name string. - * - * @param {String} project - * @param {String} uptimeCheckConfig - * @returns {String} - */ - uptimeCheckConfigPath(project, uptimeCheckConfig) { - return this._pathTemplates.uptimeCheckConfigPathTemplate.render({ - project: project, - uptime_check_config: uptimeCheckConfig, - }); - } - - /** - * 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 uptimeCheckConfigName from a uptime_check_config resource. - * - * @param {String} uptimeCheckConfigName - * A fully-qualified path representing a uptime_check_config resources. - * @returns {String} - A string representing the project. - */ - matchProjectFromUptimeCheckConfigName(uptimeCheckConfigName) { - return this._pathTemplates.uptimeCheckConfigPathTemplate.match( - uptimeCheckConfigName - ).project; - } - - /** - * Parse the uptimeCheckConfigName from a uptime_check_config resource. - * - * @param {String} uptimeCheckConfigName - * A fully-qualified path representing a uptime_check_config resources. - * @returns {String} - A string representing the uptime_check_config. - */ - matchUptimeCheckConfigFromUptimeCheckConfigName(uptimeCheckConfigName) { - return this._pathTemplates.uptimeCheckConfigPathTemplate.match( - uptimeCheckConfigName - ).uptime_check_config; - } -} - -module.exports = UptimeCheckServiceClient; diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts new file mode 100644 index 00000000000..98febf66092 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -0,0 +1,2207 @@ +// 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. +// +// ** 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 './uptime_check_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The UptimeCheckService API is used to manage (list, create, delete, edit) + * Uptime check configurations in the Stackdriver Monitoring product. An Uptime + * check is a piece of configuration that determines which resources and + * services to monitor for availability. These configurations can also be + * configured interactively by navigating to the [Cloud Console] + * (http://console.cloud.google.com), selecting the appropriate project, + * clicking on "Monitoring" on the left-hand side to navigate to Stackdriver, + * and then clicking on "Uptime". + * @class + * @memberof v3 + */ +export class UptimeCheckServiceClient { + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + private _pathTemplates: {[name: string]: gax.PathTemplate}; + private _terminated = false; + auth: gax.GoogleAuth; + uptimeCheckServiceStub: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of UptimeCheckServiceClient. + * + * @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?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof UptimeCheckServiceClient; + 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. + const 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 UptimeCheckServiceClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth as gax.GoogleAuth; + + // Determine the client header string. + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${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' + ); + 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 = { + folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), + projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + listUptimeCheckConfigs: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'uptimeCheckConfigs' + ), + listUptimeCheckIps: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'uptimeCheckIps' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.monitoring.v3.UptimeCheckService', + 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 = {}; + + // Put together the "service stub" for + // google.monitoring.v3.UptimeCheckService. + this.uptimeCheckServiceStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.monitoring.v3.UptimeCheckService' + ) + : // tslint:disable-next-line no-any + (protos as any).google.monitoring.v3.UptimeCheckService, + 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 uptimeCheckServiceStubMethods = [ + 'listUptimeCheckConfigs', + 'getUptimeCheckConfig', + 'createUptimeCheckConfig', + 'updateUptimeCheckConfig', + 'deleteUptimeCheckConfig', + 'listUptimeCheckIps', + ]; + + for (const methodName of uptimeCheckServiceStubMethods) { + const innerCallPromise = this.uptimeCheckServiceStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const apiCall = gaxModule.createApiCall( + innerCallPromise, + 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); + }; + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'monitoring.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/monitoring', + 'https://www.googleapis.com/auth/monitoring.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 -- + // ------------------- + getUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, + {} | undefined + ] + >; + getUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, + {} | undefined + > + ): void; + /** + * Gets a single Uptime check configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Uptime check configuration to retrieve. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | 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 || '', + }); + return this._innerApiCalls.getUptimeCheckConfig(request, options, callback); + } + createUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + ( + | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | undefined + ), + {} | undefined + ] + >; + createUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | undefined, + {} | undefined + > + ): void; + /** + * Creates a new Uptime check configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project in which to create the Uptime check. The format + * is `projects/[PROJECT_ID]`. + * @param {google.monitoring.v3.UptimeCheckConfig} request.uptimeCheckConfig + * Required. The new Uptime check configuration. + * @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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + ( + | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | 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 || '', + }); + return this._innerApiCalls.createUptimeCheckConfig( + request, + options, + callback + ); + } + updateUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + ( + | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | undefined + ), + {} | undefined + ] + >; + updateUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | undefined, + {} | undefined + > + ): void; + /** + * Updates an Uptime check configuration. You can either replace the entire + * configuration with a new one or replace only certain fields in the current + * configuration by specifying the fields to be updated via `updateMask`. + * Returns the updated configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Optional. If present, only the listed fields in the current Uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * @param {google.monitoring.v3.UptimeCheckConfig} request.uptimeCheckConfig + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresonding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * @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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig, + ( + | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | 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({ + 'uptime_check_config.name': request.uptimeCheckConfig!.name || '', + }); + return this._innerApiCalls.updateUptimeCheckConfig( + request, + options, + callback + ); + } + deleteUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | undefined + ), + {} | undefined + ] + >; + deleteUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | undefined, + {} | undefined + > + ): void; + /** + * Deletes an Uptime check configuration. Note that this method will fail + * if the Uptime check configuration is referenced by an alert policy or + * other dependent configs that would be rendered invalid by the deletion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Uptime check configuration to delete. The format + * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_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. + */ + deleteUptimeCheckConfig( + request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + ( + | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | 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 || '', + }); + return this._innerApiCalls.deleteUptimeCheckConfig( + request, + options, + callback + ); + } + + listUptimeCheckConfigs( + request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig[], + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + ] + >; + listUptimeCheckConfigs( + request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig[], + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + > + ): void; + /** + * Lists the existing valid Uptime check configurations for the project + * (leaving out any invalid configurations). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project whose Uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. + * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} 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 [ListUptimeCheckConfigsRequest]{@link google.monitoring.v3.ListUptimeCheckConfigsRequest} + * 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 + * [ListUptimeCheckConfigsResponse]{@link google.monitoring.v3.ListUptimeCheckConfigsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listUptimeCheckConfigs( + request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig[], + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckConfig[], + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckConfig[], + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + ] + > | 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 || '', + }); + return this._innerApiCalls.listUptimeCheckConfigs( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listUptimeCheckConfigs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listUptimeCheckConfigs} 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 project whose Uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} on 'data' event. + */ + listUptimeCheckConfigsStream( + request?: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + 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); + return this._descriptors.page.listUptimeCheckConfigs.createStream( + this._innerApiCalls.listUptimeCheckConfigs as gax.GaxCall, + request, + callSettings + ); + } + listUptimeCheckIps( + request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckIp[], + protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + ] + >; + listUptimeCheckIps( + request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckIp[], + protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + > + ): void; + /** + * Returns the list of IP addresses that checkers run from + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * @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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. + * 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} 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 [ListUptimeCheckIpsRequest]{@link google.monitoring.v3.ListUptimeCheckIpsRequest} + * 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 + * [ListUptimeCheckIpsResponse]{@link google.monitoring.v3.ListUptimeCheckIpsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listUptimeCheckIps( + request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protosTypes.google.monitoring.v3.IUptimeCheckIp[], + protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + >, + callback?: Callback< + protosTypes.google.monitoring.v3.IUptimeCheckIp[], + protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + > + ): Promise< + [ + protosTypes.google.monitoring.v3.IUptimeCheckIp[], + protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + ] + > | void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.listUptimeCheckIps(request, options, callback); + } + + /** + * Equivalent to {@link listUptimeCheckIps}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listUptimeCheckIps} 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 results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * @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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} on 'data' event. + */ + listUptimeCheckIpsStream( + request?: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + options?: gax.CallOptions + ): Transform { + request = request || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listUptimeCheckIps.createStream( + this._innerApiCalls.listUptimeCheckIps as gax.GaxCall, + request, + callSettings + ); + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.render({ + folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this._pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this._pathTemplates.folderGroupPathTemplate.render({ + folder, + group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this._pathTemplates.folderNotificationChannelPathTemplate.render({ + folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this._pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this._pathTemplates.folderServicePathTemplate.render({ + folder, + service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this._pathTemplates.folderServicePathTemplate.match( + folderServiceName + ).service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization, + alert_policy: alertPolicy, + condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( + { + organization, + channel_descriptor: channelDescriptor, + } + ); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this._pathTemplates.organizationGroupPathTemplate.render({ + organization, + group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this._pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this._pathTemplates.organizationServicePathTemplate.render({ + organization, + service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this._pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( + { + organization, + uptime_check_config: uptimeCheckConfig, + } + ); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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 projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.render({ + project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this._pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project, + alert_policy: alertPolicy, + condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ + project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this._pathTemplates.projectGroupPathTemplate.render({ + project, + group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this._pathTemplates.projectNotificationChannelPathTemplate.render({ + project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this._pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this._pathTemplates.projectServicePathTemplate.render({ + project, + service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this._pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project, + service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this.uptimeCheckServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json index 11705881bb1..90df7a47556 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client_config.json @@ -2,53 +2,62 @@ "interfaces": { "google.monitoring.v3.UptimeCheckService": { "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 + }, + "71ca22c74d2828b200f9ff1cc285a8beb96cc2af": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, "methods": { "ListUptimeCheckConfigs": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "GetUptimeCheckConfig": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "CreateUptimeCheckConfig": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateUptimeCheckConfig": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteUptimeCheckConfig": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" }, "ListUptimeCheckIps": { - "timeout_millis": 60000, + "timeout_millis": 30000, "retry_codes_name": "idempotent", - "retry_params_name": "default" + "retry_params_name": "71ca22c74d2828b200f9ff1cc285a8beb96cc2af" } } } diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json index f504a3c2a3b..0534dc6a035 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json @@ -1,3 +1,18 @@ [ + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", "../../protos/google/monitoring/v3/uptime_service.proto" ] diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 2eb4d0dde6f..7ff83528b8b 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,27 +1,19 @@ { - "updateTime": "2020-01-31T12:25:54.656390Z", + "updateTime": "2020-02-11T08:09:54.291652Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7", - "internalRef": "292450564", - "log": "7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\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" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -31,9 +23,8 @@ "source": "googleapis", "apiName": "monitoring", "apiVersion": "v3", - "language": "nodejs", - "generator": "gapic", - "config": "google/monitoring/artman_monitoring.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } ] diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index eecaea25a76..52a1914524b 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -20,31 +20,26 @@ import logging logging.basicConfig(level=logging.DEBUG) -gapic = gcp.GAPICGenerator() +gapic = gcp.GAPICMicrogenerator() version = "v3" -library = gapic.node_library( - "monitoring", version, config_path="/google/monitoring/artman_monitoring.yaml" +library = gapic.typescript_library( + "monitoring", + version, + generator_args={ + "grpc-service-config": f"google/monitoring/{version}/monitoring_grpc_service_config.json", + "package-name": f"@google-cloud/monitoring", + "main-service": f"monitoring" + }, + proto_path=f'/google/monitoring/{version}', + extra_proto_files=['google/cloud/common_resources.proto'] ) -s.copy(library, excludes=["src/index.js", "README.md", "package.json"]) + +s.copy(library, excludes=["src/index.ts", "README.md", "package.json"]) common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +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/**/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") - - subprocess.run(["npm", "install"]) subprocess.run(["npm", "run", "fix"]) +subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..001f06d484b --- /dev/null +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js @@ -0,0 +1,32 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const monitoring = require('@google-cloud/monitoring'); + +function main() { + const alertPolicyServiceClient = new monitoring.AlertPolicyServiceClient(); + const groupServiceClient = new monitoring.GroupServiceClient(); + const metricServiceClient = new monitoring.MetricServiceClient(); + const notificationChannelServiceClient = new monitoring.NotificationChannelServiceClient(); + const serviceMonitoringServiceClient = new monitoring.ServiceMonitoringServiceClient(); + const uptimeCheckServiceClient = new monitoring.UptimeCheckServiceClient(); +} + +main(); diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..a493300d67f --- /dev/null +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,30 @@ +// 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. +// +// ** 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 {AlertPolicyServiceClient, GroupServiceClient, MetricServiceClient, NotificationChannelServiceClient, ServiceMonitoringServiceClient, UptimeCheckServiceClient} from '@google-cloud/monitoring'; + +function main() { + const alertPolicyServiceClient = new AlertPolicyServiceClient(); + const groupServiceClient = new GroupServiceClient(); + const metricServiceClient = new MetricServiceClient(); + const notificationChannelServiceClient = new NotificationChannelServiceClient(); + const serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + const uptimeCheckServiceClient = new UptimeCheckServiceClient(); +} + +main(); diff --git a/packages/google-cloud-monitoring/system-test/install.ts b/packages/google-cloud-monitoring/system-test/install.ts new file mode 100644 index 00000000000..c9aa74ec221 --- /dev/null +++ b/packages/google-cloud-monitoring/system-test/install.ts @@ -0,0 +1,51 @@ +// 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. +// +// ** 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 {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() { + 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. + }); + + 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/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js b/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts similarity index 94% rename from packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js rename to packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts index 4791222a091..efd9be651eb 100644 --- a/packages/google-cloud-monitoring/system-test/metric_service_smoke_test.js +++ b/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts @@ -12,9 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; - -const {describe, it} = require('mocha'); +import {describe, it} from 'mocha'; describe('MetricServiceSmokeTest', () => { if (!process.env.GCLOUD_PROJECT) { @@ -34,7 +32,7 @@ describe('MetricServiceSmokeTest', () => { client .listMonitoredResourceDescriptors({name: formattedName}) - .then(responses => { + .then((responses: string[]) => { const resources = responses[0]; for (let i = 0; i < resources.length; i += 1) { console.log(resources[i]); @@ -55,7 +53,7 @@ describe('MetricServiceSmokeTest', () => { const formattedName = client.projectPath(projectId); const options = {autoPaginate: false}; - const callback = responses => { + const callback = (responses: string[]) => { // The actual resources in a response. const resources = responses[0]; // The next request if the response shows that there are more responses. @@ -89,7 +87,7 @@ describe('MetricServiceSmokeTest', () => { const formattedName = client.projectPath(projectId); client .listMonitoredResourceDescriptorsStream({name: formattedName}) - .on('data', element => { + .on('data', (element: string) => { console.log(element); }) .on('error', done) diff --git a/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts new file mode 100644 index 00000000000..90f52dc3920 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts @@ -0,0 +1,339 @@ +// 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. +// +// ** 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 alertpolicyserviceModule = 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('v3.AlertPolicyServiceClient', () => { + it('has servicePath', () => { + const servicePath = + alertpolicyserviceModule.v3.AlertPolicyServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + alertpolicyserviceModule.v3.AlertPolicyServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = alertpolicyserviceModule.v3.AlertPolicyServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('getAlertPolicy', () => { + it('invokes getAlertPolicy without error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getAlertPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getAlertPolicy with error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getAlertPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createAlertPolicy', () => { + it('invokes createAlertPolicy without error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createAlertPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createAlertPolicy with error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createAlertPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteAlertPolicy', () => { + it('invokes deleteAlertPolicy without error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteAlertPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteAlertPolicy with error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteAlertPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateAlertPolicy', () => { + it('invokes updateAlertPolicy without error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; + request.alertPolicy = {}; + request.alertPolicy.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateAlertPolicy(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateAlertPolicy with error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; + request.alertPolicy = {}; + request.alertPolicy.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateAlertPolicy(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listAlertPolicies', () => { + it('invokes listAlertPolicies without error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listAlertPolicies = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listAlertPolicies(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listAlertPoliciesStream', () => { + it('invokes listAlertPoliciesStream without error', done => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listAlertPolicies = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listAlertPoliciesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts new file mode 100644 index 00000000000..89a5260adff --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts @@ -0,0 +1,396 @@ +// 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. +// +// ** 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 groupserviceModule = 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('v3.GroupServiceClient', () => { + it('has servicePath', () => { + const servicePath = groupserviceModule.v3.GroupServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = groupserviceModule.v3.GroupServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = groupserviceModule.v3.GroupServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new groupserviceModule.v3.GroupServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('getGroup', () => { + it('invokes getGroup without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getGroup = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getGroup(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getGroup with error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getGroup = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createGroup', () => { + it('invokes createGroup without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createGroup = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createGroup(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createGroup with error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createGroup = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateGroup', () => { + it('invokes updateGroup without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; + request.group = {}; + request.group.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateGroup(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateGroup with error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; + request.group = {}; + request.group.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteGroup', () => { + it('invokes deleteGroup without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteGroup(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteGroup with error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteGroup(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listGroups', () => { + it('invokes listGroups without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListGroupsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listGroups = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listGroups(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listGroupsStream', () => { + it('invokes listGroupsStream without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListGroupsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listGroups = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listGroupsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listGroupMembers', () => { + it('invokes listGroupMembers without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListGroupMembersRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listGroupMembers = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listGroupMembers(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listGroupMembersStream', () => { + it('invokes listGroupMembersStream without error', done => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListGroupMembersRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listGroupMembers = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listGroupMembersStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts new file mode 100644 index 00000000000..b707732b17d --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts @@ -0,0 +1,510 @@ +// 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. +// +// ** 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 metricserviceModule = 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('v3.MetricServiceClient', () => { + it('has servicePath', () => { + const servicePath = metricserviceModule.v3.MetricServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = metricserviceModule.v3.MetricServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = metricserviceModule.v3.MetricServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new metricserviceModule.v3.MetricServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('getMonitoredResourceDescriptor', () => { + it('invokes getMonitoredResourceDescriptor without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getMonitoredResourceDescriptor( + request, + (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + + it('invokes getMonitoredResourceDescriptor with error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getMonitoredResourceDescriptor( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('getMetricDescriptor', () => { + it('invokes getMetricDescriptor without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getMetricDescriptor(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getMetricDescriptor with error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getMetricDescriptor(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createMetricDescriptor', () => { + it('invokes createMetricDescriptor without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createMetricDescriptor(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createMetricDescriptor with error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createMetricDescriptor(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteMetricDescriptor', () => { + it('invokes deleteMetricDescriptor without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteMetricDescriptor(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteMetricDescriptor with error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteMetricDescriptor(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createTimeSeries', () => { + it('invokes createTimeSeries without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createTimeSeries(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createTimeSeries with error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createTimeSeries(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest = {}; + request.name = ''; + // 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 metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest = {}; + request.name = ''; + // 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('listMetricDescriptors', () => { + it('invokes listMetricDescriptors without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listMetricDescriptors = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listMetricDescriptors(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listMetricDescriptorsStream', () => { + it('invokes listMetricDescriptorsStream without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listMetricDescriptors = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listMetricDescriptorsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listTimeSeries', () => { + it('invokes listTimeSeries without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listTimeSeries = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listTimeSeries(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listTimeSeriesStream', () => { + it('invokes listTimeSeriesStream without error', done => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listTimeSeries = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listTimeSeriesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts new file mode 100644 index 00000000000..ed4961d6a40 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts @@ -0,0 +1,671 @@ +// 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. +// +// ** 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 notificationchannelserviceModule = 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('v3.NotificationChannelServiceClient', () => { + it('has servicePath', () => { + const servicePath = + notificationchannelserviceModule.v3.NotificationChannelServiceClient + .servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + notificationchannelserviceModule.v3.NotificationChannelServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = + notificationchannelserviceModule.v3.NotificationChannelServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + describe('getNotificationChannelDescriptor', () => { + it('invokes getNotificationChannelDescriptor without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getNotificationChannelDescriptor( + request, + (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + + it('invokes getNotificationChannelDescriptor with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getNotificationChannelDescriptor( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('getNotificationChannel', () => { + it('invokes getNotificationChannel without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getNotificationChannel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getNotificationChannel with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getNotificationChannel(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createNotificationChannel', () => { + it('invokes createNotificationChannel without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createNotificationChannel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createNotificationChannel with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createNotificationChannel( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('updateNotificationChannel', () => { + it('invokes updateNotificationChannel without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; + request.notificationChannel = {}; + request.notificationChannel.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateNotificationChannel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateNotificationChannel with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; + request.notificationChannel = {}; + request.notificationChannel.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateNotificationChannel( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('deleteNotificationChannel', () => { + it('invokes deleteNotificationChannel without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteNotificationChannel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteNotificationChannel with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteNotificationChannel( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('sendNotificationChannelVerificationCode', () => { + it('invokes sendNotificationChannelVerificationCode without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.sendNotificationChannelVerificationCode( + request, + (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + + it('invokes sendNotificationChannelVerificationCode with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + null, + error + ); + client.sendNotificationChannelVerificationCode( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('getNotificationChannelVerificationCode', () => { + it('invokes getNotificationChannelVerificationCode without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getNotificationChannelVerificationCode( + request, + (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + + it('invokes getNotificationChannelVerificationCode with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getNotificationChannelVerificationCode( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('verifyNotificationChannel', () => { + it('invokes verifyNotificationChannel without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.verifyNotificationChannel(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes verifyNotificationChannel with error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( + request, + null, + error + ); + client.verifyNotificationChannel( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('listNotificationChannelDescriptors', () => { + it('invokes listNotificationChannelDescriptors without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listNotificationChannelDescriptors = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listNotificationChannelDescriptors( + request, + (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + }); + describe('listNotificationChannelDescriptorsStream', () => { + it('invokes listNotificationChannelDescriptorsStream without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listNotificationChannelDescriptors = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listNotificationChannelDescriptorsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listNotificationChannels', () => { + it('invokes listNotificationChannels without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listNotificationChannels = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listNotificationChannels( + request, + (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + }); + describe('listNotificationChannelsStream', () => { + it('invokes listNotificationChannelsStream without error', done => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listNotificationChannels = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listNotificationChannelsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts new file mode 100644 index 00000000000..d6b905d5bc0 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts @@ -0,0 +1,652 @@ +// 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. +// +// ** 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 servicemonitoringserviceModule = 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('v3.ServiceMonitoringServiceClient', () => { + it('has servicePath', () => { + const servicePath = + servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient + .servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = + servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + describe('createService', () => { + it('invokes createService without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createService = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createService(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createService with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createService = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createService(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getService', () => { + it('invokes getService without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getService = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getService(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getService with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getService = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getService(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateService', () => { + it('invokes updateService without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; + request.service = {}; + request.service.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateService = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateService(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateService with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; + request.service = {}; + request.service.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateService = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateService(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteService', () => { + it('invokes deleteService without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteService = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteService(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteService with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteService = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteService(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createServiceLevelObjective', () => { + it('invokes createServiceLevelObjective without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createServiceLevelObjective(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createServiceLevelObjective with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createServiceLevelObjective( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('getServiceLevelObjective', () => { + it('invokes getServiceLevelObjective without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getServiceLevelObjective(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getServiceLevelObjective with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getServiceLevelObjective( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('updateServiceLevelObjective', () => { + it('invokes updateServiceLevelObjective without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; + request.serviceLevelObjective = {}; + request.serviceLevelObjective.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateServiceLevelObjective(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateServiceLevelObjective with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; + request.serviceLevelObjective = {}; + request.serviceLevelObjective.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateServiceLevelObjective( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('deleteServiceLevelObjective', () => { + it('invokes deleteServiceLevelObjective without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteServiceLevelObjective(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteServiceLevelObjective with error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteServiceLevelObjective( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('listServices', () => { + it('invokes listServices without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListServicesRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listServices = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listServices(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listServicesStream', () => { + it('invokes listServicesStream without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListServicesRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listServices = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listServicesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listServiceLevelObjectives', () => { + it('invokes listServiceLevelObjectives without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listServiceLevelObjectives = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listServiceLevelObjectives( + request, + (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + } + ); + }); + }); + describe('listServiceLevelObjectivesStream', () => { + it('invokes listServiceLevelObjectivesStream without error', done => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + // Mock request + const request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listServiceLevelObjectives = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listServiceLevelObjectivesStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts new file mode 100644 index 00000000000..3266e39ebe8 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts @@ -0,0 +1,405 @@ +// 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. +// +// ** 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 uptimecheckserviceModule = 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('v3.UptimeCheckServiceClient', () => { + it('has servicePath', () => { + const servicePath = + uptimecheckserviceModule.v3.UptimeCheckServiceClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = + uptimecheckserviceModule.v3.UptimeCheckServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = uptimecheckserviceModule.v3.UptimeCheckServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient(); + assert(client); + }); + it('should create a client with gRPC fallback', () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + fallback: true, + }); + assert(client); + }); + describe('getUptimeCheckConfig', () => { + it('invokes getUptimeCheckConfig without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.getUptimeCheckConfig(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getUptimeCheckConfig with error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + client.getUptimeCheckConfig(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createUptimeCheckConfig', () => { + it('invokes createUptimeCheckConfig without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.createUptimeCheckConfig(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createUptimeCheckConfig with error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + client.createUptimeCheckConfig( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('updateUptimeCheckConfig', () => { + it('invokes updateUptimeCheckConfig without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; + request.uptimeCheckConfig = {}; + request.uptimeCheckConfig.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.updateUptimeCheckConfig(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateUptimeCheckConfig with error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; + request.uptimeCheckConfig = {}; + request.uptimeCheckConfig.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + client.updateUptimeCheckConfig( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('deleteUptimeCheckConfig', () => { + it('invokes deleteUptimeCheckConfig without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); + client.deleteUptimeCheckConfig(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteUptimeCheckConfig with error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; + request.name = ''; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( + request, + null, + error + ); + client.deleteUptimeCheckConfig( + request, + (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + } + ); + }); + }); + describe('listUptimeCheckConfigs', () => { + it('invokes listUptimeCheckConfigs without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckConfigs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listUptimeCheckConfigs(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listUptimeCheckConfigsStream', () => { + it('invokes listUptimeCheckConfigsStream without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest = {}; + request.parent = ''; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckConfigs = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listUptimeCheckConfigsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); + describe('listUptimeCheckIps', () => { + it('invokes listUptimeCheckIps without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckIps = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listUptimeCheckIps(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listUptimeCheckIpsStream', () => { + it('invokes listUptimeCheckIpsStream without error', done => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest = {}; + // Mock response + const expectedResponse = {response: 'data'}; + // Mock Grpc layer + client._innerApiCalls.listUptimeCheckIps = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listUptimeCheckIpsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(expectedResponse); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic-v3.js b/packages/google-cloud-monitoring/test/gapic-v3.js deleted file mode 100644 index ff6cca815a9..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-v3.js +++ /dev/null @@ -1,3170 +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 monitoringModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('AlertPolicyServiceClient', () => { - it('has servicePath', () => { - const servicePath = - monitoringModule.v3.AlertPolicyServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - monitoringModule.v3.AlertPolicyServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = monitoringModule.v3.AlertPolicyServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new monitoringModule.v3.AlertPolicyServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('listAlertPolicies', () => { - it('invokes listAlertPolicies without error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock response - const nextPageToken = ''; - const alertPoliciesElement = {}; - const alertPolicies = [alertPoliciesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - alertPolicies: alertPolicies, - }; - - // Mock Grpc layer - client._innerApiCalls.listAlertPolicies = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.alertPolicies); - }; - - client.listAlertPolicies(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.alertPolicies); - done(); - }); - }); - - it('invokes listAlertPolicies with error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listAlertPolicies = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listAlertPolicies(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getAlertPolicy', () => { - it('invokes getAlertPolicy without error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.alertPolicyPath( - '[PROJECT]', - '[ALERT_POLICY]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getAlertPolicy(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getAlertPolicy with error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.alertPolicyPath( - '[PROJECT]', - '[ALERT_POLICY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getAlertPolicy(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createAlertPolicy', () => { - it('invokes createAlertPolicy without error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const alertPolicy = {}; - const request = { - name: formattedName, - alertPolicy: alertPolicy, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createAlertPolicy(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createAlertPolicy with error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const alertPolicy = {}; - const request = { - name: formattedName, - alertPolicy: alertPolicy, - }; - - // Mock Grpc layer - client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createAlertPolicy(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteAlertPolicy', () => { - it('invokes deleteAlertPolicy without error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.alertPolicyPath( - '[PROJECT]', - '[ALERT_POLICY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod(request); - - client.deleteAlertPolicy(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteAlertPolicy with error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.alertPolicyPath( - '[PROJECT]', - '[ALERT_POLICY]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteAlertPolicy(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('updateAlertPolicy', () => { - it('invokes updateAlertPolicy without error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const alertPolicy = {}; - const request = { - alertPolicy: alertPolicy, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateAlertPolicy(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateAlertPolicy with error', done => { - const client = new monitoringModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const alertPolicy = {}; - const request = { - alertPolicy: alertPolicy, - }; - - // Mock Grpc layer - client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateAlertPolicy(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('GroupServiceClient', () => { - it('has servicePath', () => { - const servicePath = monitoringModule.v3.GroupServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = monitoringModule.v3.GroupServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = monitoringModule.v3.GroupServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new monitoringModule.v3.GroupServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v3.GroupServiceClient({fallback: true}); - assert(client); - }); - - describe('listGroups', () => { - it('invokes listGroups without error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock response - const nextPageToken = ''; - const groupElement = {}; - const group = [groupElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - group: group, - }; - - // Mock Grpc layer - client._innerApiCalls.listGroups = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.group); - }; - - client.listGroups(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.group); - done(); - }); - }); - - it('invokes listGroups with error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listGroups = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listGroups(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getGroup', () => { - it('invokes getGroup without error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const parentName = 'parentName1015022848'; - const filter = 'filter-1274492040'; - const isCluster = false; - const expectedResponse = { - name: name2, - displayName: displayName, - parentName: parentName, - filter: filter, - isCluster: isCluster, - }; - - // Mock Grpc layer - client._innerApiCalls.getGroup = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getGroup(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getGroup with error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getGroup(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createGroup', () => { - it('invokes createGroup without error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const group = {}; - const request = { - name: formattedName, - group: group, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const parentName = 'parentName1015022848'; - const filter = 'filter-1274492040'; - const isCluster = false; - const expectedResponse = { - name: name2, - displayName: displayName, - parentName: parentName, - filter: filter, - isCluster: isCluster, - }; - - // Mock Grpc layer - client._innerApiCalls.createGroup = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createGroup(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createGroup with error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const group = {}; - const request = { - name: formattedName, - group: group, - }; - - // Mock Grpc layer - client._innerApiCalls.createGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createGroup(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateGroup', () => { - it('invokes updateGroup without error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const group = {}; - const request = { - group: group, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const parentName = 'parentName1015022848'; - const filter = 'filter-1274492040'; - const isCluster = false; - const expectedResponse = { - name: name, - displayName: displayName, - parentName: parentName, - filter: filter, - isCluster: isCluster, - }; - - // Mock Grpc layer - client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateGroup(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateGroup with error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const group = {}; - const request = { - group: group, - }; - - // Mock Grpc layer - client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateGroup(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteGroup', () => { - it('invokes deleteGroup without error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod(request); - - client.deleteGroup(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteGroup with error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteGroup(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('listGroupMembers', () => { - it('invokes listGroupMembers without error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - const request = { - name: formattedName, - }; - - // Mock response - const nextPageToken = ''; - const totalSize = 705419236; - const membersElement = {}; - const members = [membersElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - totalSize: totalSize, - members: members, - }; - - // Mock Grpc layer - client._innerApiCalls.listGroupMembers = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.members); - }; - - client.listGroupMembers(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.members); - done(); - }); - }); - - it('invokes listGroupMembers with error', done => { - const client = new monitoringModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.groupPath('[PROJECT]', '[GROUP]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listGroupMembers = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listGroupMembers(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('MetricServiceClient', () => { - it('has servicePath', () => { - const servicePath = monitoringModule.v3.MetricServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = monitoringModule.v3.MetricServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = monitoringModule.v3.MetricServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new monitoringModule.v3.MetricServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v3.MetricServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('listMonitoredResourceDescriptors', () => { - it('invokes listMonitoredResourceDescriptors without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // 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 monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // 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('getMonitoredResourceDescriptor', () => { - it('invokes getMonitoredResourceDescriptor without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.monitoredResourceDescriptorPath( - '[PROJECT]', - '[MONITORED_RESOURCE_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const type = 'type3575610'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name2, - type: type, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer - client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getMonitoredResourceDescriptor(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getMonitoredResourceDescriptor with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.monitoredResourceDescriptorPath( - '[PROJECT]', - '[MONITORED_RESOURCE_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getMonitoredResourceDescriptor(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listMetricDescriptors', () => { - it('invokes listMetricDescriptors without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock response - const nextPageToken = ''; - const metricDescriptorsElement = {}; - const metricDescriptors = [metricDescriptorsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - metricDescriptors: metricDescriptors, - }; - - // Mock Grpc layer - client._innerApiCalls.listMetricDescriptors = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.metricDescriptors); - }; - - client.listMetricDescriptors(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.metricDescriptors); - done(); - }); - }); - - it('invokes listMetricDescriptors with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listMetricDescriptors = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listMetricDescriptors(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getMetricDescriptor', () => { - it('invokes getMetricDescriptor without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.metricDescriptorPath( - '[PROJECT]', - '[METRIC_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const type = 'type3575610'; - const unit = 'unit3594628'; - const description = 'description-1724546052'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - type: type, - unit: unit, - description: description, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getMetricDescriptor(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getMetricDescriptor with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.metricDescriptorPath( - '[PROJECT]', - '[METRIC_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getMetricDescriptor(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createMetricDescriptor', () => { - it('invokes createMetricDescriptor without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const metricDescriptor = {}; - const request = { - name: formattedName, - metricDescriptor: metricDescriptor, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const type = 'type3575610'; - const unit = 'unit3594628'; - const description = 'description-1724546052'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - type: type, - unit: unit, - description: description, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createMetricDescriptor(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createMetricDescriptor with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const metricDescriptor = {}; - const request = { - name: formattedName, - metricDescriptor: metricDescriptor, - }; - - // Mock Grpc layer - client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createMetricDescriptor(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteMetricDescriptor', () => { - it('invokes deleteMetricDescriptor without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.metricDescriptorPath( - '[PROJECT]', - '[METRIC_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( - request - ); - - client.deleteMetricDescriptor(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteMetricDescriptor with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.metricDescriptorPath( - '[PROJECT]', - '[METRIC_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteMetricDescriptor(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('listTimeSeries', () => { - it('invokes listTimeSeries without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const filter = 'filter-1274492040'; - const interval = {}; - const view = 'FULL'; - const request = { - name: formattedName, - filter: filter, - interval: interval, - view: view, - }; - - // Mock response - const nextPageToken = ''; - const timeSeriesElement = {}; - const timeSeries = [timeSeriesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - timeSeries: timeSeries, - }; - - // Mock Grpc layer - client._innerApiCalls.listTimeSeries = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.timeSeries); - }; - - client.listTimeSeries(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.timeSeries); - done(); - }); - }); - - it('invokes listTimeSeries with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const filter = 'filter-1274492040'; - const interval = {}; - const view = 'FULL'; - const request = { - name: formattedName, - filter: filter, - interval: interval, - view: view, - }; - - // Mock Grpc layer - client._innerApiCalls.listTimeSeries = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listTimeSeries(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createTimeSeries', () => { - it('invokes createTimeSeries without error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const timeSeries = []; - const request = { - name: formattedName, - timeSeries: timeSeries, - }; - - // Mock Grpc layer - client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod(request); - - client.createTimeSeries(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes createTimeSeries with error', done => { - const client = new monitoringModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const timeSeries = []; - const request = { - name: formattedName, - timeSeries: timeSeries, - }; - - // Mock Grpc layer - client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createTimeSeries(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); -}); -describe('NotificationChannelServiceClient', () => { - it('has servicePath', () => { - const servicePath = - monitoringModule.v3.NotificationChannelServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - monitoringModule.v3.NotificationChannelServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = monitoringModule.v3.NotificationChannelServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new monitoringModule.v3.NotificationChannelServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('listNotificationChannelDescriptors', () => { - it('invokes listNotificationChannelDescriptors without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock response - const nextPageToken = ''; - const channelDescriptorsElement = {}; - const channelDescriptors = [channelDescriptorsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - channelDescriptors: channelDescriptors, - }; - - // Mock Grpc layer - client._innerApiCalls.listNotificationChannelDescriptors = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.channelDescriptors); - }; - - client.listNotificationChannelDescriptors(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.channelDescriptors); - done(); - }); - }); - - it('invokes listNotificationChannelDescriptors with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listNotificationChannelDescriptors = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listNotificationChannelDescriptors(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getNotificationChannelDescriptor', () => { - it('invokes getNotificationChannelDescriptor without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelDescriptorPath( - '[PROJECT]', - '[CHANNEL_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const type = 'type3575610'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - name: name2, - type: type, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer - client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getNotificationChannelDescriptor(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getNotificationChannelDescriptor with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelDescriptorPath( - '[PROJECT]', - '[CHANNEL_DESCRIPTOR]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getNotificationChannelDescriptor(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listNotificationChannels', () => { - it('invokes listNotificationChannels without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock response - const nextPageToken = ''; - const notificationChannelsElement = {}; - const notificationChannels = [notificationChannelsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - notificationChannels: notificationChannels, - }; - - // Mock Grpc layer - client._innerApiCalls.listNotificationChannels = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.notificationChannels); - }; - - client.listNotificationChannels(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.notificationChannels); - done(); - }); - }); - - it('invokes listNotificationChannels with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.listNotificationChannels = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listNotificationChannels(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getNotificationChannel', () => { - it('invokes getNotificationChannel without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const type = 'type3575610'; - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - type: type, - name: name2, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer - client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getNotificationChannel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getNotificationChannel with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getNotificationChannel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createNotificationChannel', () => { - it('invokes createNotificationChannel without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const notificationChannel = {}; - const request = { - name: formattedName, - notificationChannel: notificationChannel, - }; - - // Mock response - const type = 'type3575610'; - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - type: type, - name: name2, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer - client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createNotificationChannel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createNotificationChannel with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.projectPath('[PROJECT]'); - const notificationChannel = {}; - const request = { - name: formattedName, - notificationChannel: notificationChannel, - }; - - // Mock Grpc layer - client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createNotificationChannel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateNotificationChannel', () => { - it('invokes updateNotificationChannel without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const notificationChannel = {}; - const request = { - notificationChannel: notificationChannel, - }; - - // Mock response - const type = 'type3575610'; - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - type: type, - name: name, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer - client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateNotificationChannel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateNotificationChannel with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const notificationChannel = {}; - const request = { - notificationChannel: notificationChannel, - }; - - // Mock Grpc layer - client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateNotificationChannel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteNotificationChannel', () => { - it('invokes deleteNotificationChannel without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( - request - ); - - client.deleteNotificationChannel(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteNotificationChannel with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteNotificationChannel(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('sendNotificationChannelVerificationCode', () => { - it('invokes sendNotificationChannelVerificationCode without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request - ); - - client.sendNotificationChannelVerificationCode(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes sendNotificationChannelVerificationCode with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.sendNotificationChannelVerificationCode(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('getNotificationChannelVerificationCode', () => { - it('invokes getNotificationChannelVerificationCode without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const code = 'code3059181'; - const expectedResponse = { - code: code, - }; - - // Mock Grpc layer - client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getNotificationChannelVerificationCode( - request, - (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - - it('invokes getNotificationChannelVerificationCode with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getNotificationChannelVerificationCode( - request, - (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - - describe('verifyNotificationChannel', () => { - it('invokes verifyNotificationChannel without error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const code = 'code3059181'; - const request = { - name: formattedName, - code: code, - }; - - // Mock response - const type = 'type3575610'; - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const description = 'description-1724546052'; - const expectedResponse = { - type: type, - name: name2, - displayName: displayName, - description: description, - }; - - // Mock Grpc layer - client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.verifyNotificationChannel(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes verifyNotificationChannel with error', done => { - const client = new monitoringModule.v3.NotificationChannelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.notificationChannelPath( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - const code = 'code3059181'; - const request = { - name: formattedName, - code: code, - }; - - // Mock Grpc layer - client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.verifyNotificationChannel(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); -describe('ServiceMonitoringServiceClient', () => { - it('has servicePath', () => { - const servicePath = - monitoringModule.v3.ServiceMonitoringServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - monitoringModule.v3.ServiceMonitoringServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = monitoringModule.v3.ServiceMonitoringServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('createService', () => { - it('invokes createService without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const service = {}; - const request = { - parent: formattedParent, - service: service, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.createService = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createService(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createService with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const service = {}; - const request = { - parent: formattedParent, - service: service, - }; - - // Mock Grpc layer - client._innerApiCalls.createService = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createService(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getService', () => { - it('invokes getService without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name2, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.getService = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getService(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getService with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getService = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getService(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listServices', () => { - it('invokes listServices without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - 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 servicesElement = {}; - const services = [servicesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - services: services, - }; - - // Mock Grpc layer - client._innerApiCalls.listServices = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.services); - }; - - client.listServices(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.services); - done(); - }); - }); - - it('invokes listServices with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - 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.listServices = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listServices(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateService', () => { - it('invokes updateService without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const service = {}; - const request = { - service: service, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const expectedResponse = { - name: name, - displayName: displayName, - }; - - // Mock Grpc layer - client._innerApiCalls.updateService = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateService(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateService with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const service = {}; - const request = { - service: service, - }; - - // Mock Grpc layer - client._innerApiCalls.updateService = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateService(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteService', () => { - it('invokes deleteService without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteService = mockSimpleGrpcMethod(request); - - client.deleteService(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteService with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.servicePath('[PROJECT]', '[SERVICE]'); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteService = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteService(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('createServiceLevelObjective', () => { - it('invokes createServiceLevelObjective without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - const serviceLevelObjective = {}; - const request = { - parent: formattedParent, - serviceLevelObjective: serviceLevelObjective, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const goal = 317825.0; - const expectedResponse = { - name: name, - displayName: displayName, - goal: goal, - }; - - // Mock Grpc layer - client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createServiceLevelObjective(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createServiceLevelObjective with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - const serviceLevelObjective = {}; - const request = { - parent: formattedParent, - serviceLevelObjective: serviceLevelObjective, - }; - - // Mock Grpc layer - client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createServiceLevelObjective(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getServiceLevelObjective', () => { - it('invokes getServiceLevelObjective without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.serviceLevelObjectivePath( - '[PROJECT]', - '[SERVICE]', - '[SERVICE_LEVEL_OBJECTIVE]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const goal = 317825.0; - const expectedResponse = { - name: name2, - displayName: displayName, - goal: goal, - }; - - // Mock Grpc layer - client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getServiceLevelObjective(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getServiceLevelObjective with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.serviceLevelObjectivePath( - '[PROJECT]', - '[SERVICE]', - '[SERVICE_LEVEL_OBJECTIVE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getServiceLevelObjective(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listServiceLevelObjectives', () => { - it('invokes listServiceLevelObjectives without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - const request = { - parent: formattedParent, - }; - - // Mock response - const nextPageToken = ''; - const serviceLevelObjectivesElement = {}; - const serviceLevelObjectives = [serviceLevelObjectivesElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - serviceLevelObjectives: serviceLevelObjectives, - }; - - // Mock Grpc layer - client._innerApiCalls.listServiceLevelObjectives = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.serviceLevelObjectives); - }; - - client.listServiceLevelObjectives(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual( - response, - expectedResponse.serviceLevelObjectives - ); - done(); - }); - }); - - it('invokes listServiceLevelObjectives with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.servicePath('[PROJECT]', '[SERVICE]'); - const request = { - parent: formattedParent, - }; - - // Mock Grpc layer - client._innerApiCalls.listServiceLevelObjectives = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listServiceLevelObjectives(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateServiceLevelObjective', () => { - it('invokes updateServiceLevelObjective without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const serviceLevelObjective = {}; - const request = { - serviceLevelObjective: serviceLevelObjective, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const goal = 317825.0; - const expectedResponse = { - name: name, - displayName: displayName, - goal: goal, - }; - - // Mock Grpc layer - client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateServiceLevelObjective(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateServiceLevelObjective with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const serviceLevelObjective = {}; - const request = { - serviceLevelObjective: serviceLevelObjective, - }; - - // Mock Grpc layer - client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateServiceLevelObjective(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteServiceLevelObjective', () => { - it('invokes deleteServiceLevelObjective without error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.serviceLevelObjectivePath( - '[PROJECT]', - '[SERVICE]', - '[SERVICE_LEVEL_OBJECTIVE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( - request - ); - - client.deleteServiceLevelObjective(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteServiceLevelObjective with error', done => { - const client = new monitoringModule.v3.ServiceMonitoringServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.serviceLevelObjectivePath( - '[PROJECT]', - '[SERVICE]', - '[SERVICE_LEVEL_OBJECTIVE]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteServiceLevelObjective(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); -}); -describe('UptimeCheckServiceClient', () => { - it('has servicePath', () => { - const servicePath = - monitoringModule.v3.UptimeCheckServiceClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - monitoringModule.v3.UptimeCheckServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = monitoringModule.v3.UptimeCheckServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new monitoringModule.v3.UptimeCheckServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - fallback: true, - }); - assert(client); - }); - - describe('listUptimeCheckConfigs', () => { - it('invokes listUptimeCheckConfigs without error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - 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 totalSize = 705419236; - const uptimeCheckConfigsElement = {}; - const uptimeCheckConfigs = [uptimeCheckConfigsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - totalSize: totalSize, - uptimeCheckConfigs: uptimeCheckConfigs, - }; - - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckConfigs = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.uptimeCheckConfigs); - }; - - client.listUptimeCheckConfigs(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.uptimeCheckConfigs); - done(); - }); - }); - - it('invokes listUptimeCheckConfigs with error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - 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.listUptimeCheckConfigs = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listUptimeCheckConfigs(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getUptimeCheckConfig', () => { - it('invokes getUptimeCheckConfig without error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.uptimeCheckConfigPath( - '[PROJECT]', - '[UPTIME_CHECK_CONFIG]' - ); - const request = { - name: formattedName, - }; - - // Mock response - const name2 = 'name2-1052831874'; - const displayName = 'displayName1615086568'; - const isInternal = true; - const expectedResponse = { - name: name2, - displayName: displayName, - isInternal: isInternal, - }; - - // Mock Grpc layer - client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getUptimeCheckConfig(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getUptimeCheckConfig with error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.uptimeCheckConfigPath( - '[PROJECT]', - '[UPTIME_CHECK_CONFIG]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getUptimeCheckConfig(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createUptimeCheckConfig', () => { - it('invokes createUptimeCheckConfig without error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const uptimeCheckConfig = {}; - const request = { - parent: formattedParent, - uptimeCheckConfig: uptimeCheckConfig, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const isInternal = true; - const expectedResponse = { - name: name, - displayName: displayName, - isInternal: isInternal, - }; - - // Mock Grpc layer - client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createUptimeCheckConfig(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createUptimeCheckConfig with error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedParent = client.projectPath('[PROJECT]'); - const uptimeCheckConfig = {}; - const request = { - parent: formattedParent, - uptimeCheckConfig: uptimeCheckConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createUptimeCheckConfig(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('updateUptimeCheckConfig', () => { - it('invokes updateUptimeCheckConfig without error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const uptimeCheckConfig = {}; - const request = { - uptimeCheckConfig: uptimeCheckConfig, - }; - - // Mock response - const name = 'name3373707'; - const displayName = 'displayName1615086568'; - const isInternal = true; - const expectedResponse = { - name: name, - displayName: displayName, - isInternal: isInternal, - }; - - // Mock Grpc layer - client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateUptimeCheckConfig(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateUptimeCheckConfig with error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const uptimeCheckConfig = {}; - const request = { - uptimeCheckConfig: uptimeCheckConfig, - }; - - // Mock Grpc layer - client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateUptimeCheckConfig(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteUptimeCheckConfig', () => { - it('invokes deleteUptimeCheckConfig without error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.uptimeCheckConfigPath( - '[PROJECT]', - '[UPTIME_CHECK_CONFIG]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( - request - ); - - client.deleteUptimeCheckConfig(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteUptimeCheckConfig with error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const formattedName = client.uptimeCheckConfigPath( - '[PROJECT]', - '[UPTIME_CHECK_CONFIG]' - ); - const request = { - name: formattedName, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteUptimeCheckConfig(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('listUptimeCheckIps', () => { - it('invokes listUptimeCheckIps without error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock response - const nextPageToken = ''; - const uptimeCheckIpsElement = {}; - const uptimeCheckIps = [uptimeCheckIpsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - uptimeCheckIps: uptimeCheckIps, - }; - - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckIps = ( - actualRequest, - options, - callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.uptimeCheckIps); - }; - - client.listUptimeCheckIps(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.uptimeCheckIps); - done(); - }); - }); - - it('invokes listUptimeCheckIps with error', done => { - const client = new monitoringModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckIps = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listUptimeCheckIps(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - 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/packages/google-cloud-monitoring/tsconfig.json b/packages/google-cloud-monitoring/tsconfig.json new file mode 100644 index 00000000000..613d35597b5 --- /dev/null +++ b/packages/google-cloud-monitoring/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-monitoring/tslint.json b/packages/google-cloud-monitoring/tslint.json new file mode 100644 index 00000000000..617dc975bae --- /dev/null +++ b/packages/google-cloud-monitoring/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tslint.json" +} diff --git a/packages/google-cloud-monitoring/webpack.config.js b/packages/google-cloud-monitoring/webpack.config.js index 402b3e0e480..c38f3d48b36 100644 --- a/packages/google-cloud-monitoring/webpack.config.js +++ b/packages/google-cloud-monitoring/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 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. @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +const path = require('path'); + module.exports = { - entry: './src/browser.js', + entry: './src/index.ts', output: { library: 'monitoring', filename: './monitoring.js', @@ -24,21 +26,37 @@ module.exports = { crypto: 'empty', }, resolve: { - extensions: ['.js', '.json'], + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], }, module: { rules: [ { - test: /node_modules[\\/]retry-request[\\/]/, - use: 'null-loader', + 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[\\/]https?-proxy-agent/, + use: 'null-loader' }, { - test: /node_modules[\\/]gtoken[\\/]/, - use: 'null-loader', + test: /node_modules[\\/]gtoken/, + use: 'null-loader' }, ], }, From 9e807b74888b69397cffa47222f93dc5cf5a058c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Feb 2020 21:35:00 +0100 Subject: [PATCH 266/422] chore(deps): update dependency uuid to v7 --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index e8991ae4483..147004e47b7 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -21,6 +21,6 @@ "chai": "^4.2.0", "mocha": "^7.0.0", "p-retry": "^4.0.0", - "uuid": "^3.3.2" + "uuid": "^7.0.0" } } From 9806da3415e055a23c40a53c4fd0a83d7cabe426 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Thu, 27 Feb 2020 11:04:07 -0800 Subject: [PATCH 267/422] feat: export protos in src/index.ts (#369) --- packages/google-cloud-monitoring/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts index dec2488733b..09facd7d5f3 100644 --- a/packages/google-cloud-monitoring/src/index.ts +++ b/packages/google-cloud-monitoring/src/index.ts @@ -43,3 +43,5 @@ export default { ServiceMonitoringServiceClient, UptimeCheckServiceClient, }; +import * as protos from '../protos/protos'; +export {protos}; From a194a56b0dda7900b3381f3e7b28c181989b47a7 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 11:53:58 -0800 Subject: [PATCH 268/422] chore: update jsdoc.js (#372) --- packages/google-cloud-monitoring/.jsdoc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 05a557abc58..83a96ed479a 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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/monitoring', - theme: 'lumen' + theme: 'lumen', + default: { + "outputSourceFiles": false + } }, markdown: { idInHeadings: true From 5ecfc00fbb9ff4130c93c3332d36722b70546d56 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Fri, 28 Feb 2020 16:33:18 -0800 Subject: [PATCH 269/422] chore: update jsdoc with macro license (#376) --- packages/google-cloud-monitoring/.jsdoc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 83a96ed479a..0684e995faf 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.jsdoc.js @@ -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'; From 4b31e1c446957b08dcceaddea111616604c1887e Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Fri, 28 Feb 2020 21:36:40 -0800 Subject: [PATCH 270/422] chore: correct .jsdoc.js protos and double quotes (#374) * chore: update jsdoc - protos and double quote * chore: update jsdoc - protos and double quote Co-authored-by: Alexander Fenster --- packages/google-cloud-monitoring/.jsdoc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 0684e995faf..bb0edf20f0a 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.jsdoc.js @@ -34,7 +34,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -45,7 +46,7 @@ module.exports = { systemName: '@google-cloud/monitoring', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { From 4af48fd54922b26a3b486956cd7ecc7614600096 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 1 Mar 2020 04:05:47 +0100 Subject: [PATCH 271/422] chore(deps): update dependency @types/mocha to v7 (#365) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index bdf25194eb4..d1819cfa6dc 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -45,7 +45,7 @@ "google-gax": "^1.14.1" }, "devDependencies": { - "@types/mocha": "^5.2.5", + "@types/mocha": "^7.0.0", "@types/node": "^12.12.27", "c8": "^7.1.0", "codecov": "^3.6.5", From 726061d7df2af79de7c2f9f9df93310892c870a5 Mon Sep 17 00:00:00 2001 From: "gcf-merge-on-green[bot]" <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2020 00:08:19 +0000 Subject: [PATCH 272/422] feat: deferred client initialization (#378) This PR includes changes from https://github.com/googleapis/gapic-generator-typescript/pull/317 that will move the asynchronous initialization and authentication from the client constructor to an `initialize()` method. This method will be automatically called when the first RPC call is performed. The client library usage has not changed, there is no need to update any code. If you want to make sure the client is authenticated _before_ the first RPC call, you can do ```js await client.initialize(); ``` manually before calling any client method. --- .../src/v3/alert_policy_service_client.ts | 131 ++++++++++------ .../src/v3/group_service_client.ts | 129 ++++++++++------ .../src/v3/metric_service_client.ts | 146 +++++++++++------- .../v3/notification_channel_service_client.ts | 141 +++++++++++------ .../v3/service_monitoring_service_client.ts | 133 ++++++++++------ .../src/v3/uptime_check_service_client.ts | 129 ++++++++++------ .../google-cloud-monitoring/synth.metadata | 7 +- .../test/gapic-alert_policy_service-v3.ts | 36 +++++ .../test/gapic-group_service-v3.ts | 40 +++++ .../test/gapic-metric_service-v3.ts | 48 ++++++ .../gapic-notification_channel_service-v3.ts | 60 +++++++ .../gapic-service_monitoring_service-v3.ts | 60 +++++++ .../test/gapic-uptime_check_service-v3.ts | 40 +++++ 13 files changed, 808 insertions(+), 292 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 55fed60328a..3d45295d634 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -52,8 +52,13 @@ export class AlertPolicyServiceClient { 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; - alertPolicyServiceStub: Promise<{[name: string]: Function}>; + alertPolicyServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of AlertPolicyServiceClient. @@ -77,8 +82,6 @@ export class AlertPolicyServiceClient { * 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. */ @@ -108,25 +111,28 @@ export class AlertPolicyServiceClient { // 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 = !isBrowser && opts.fallback ? gax.fallback : gax; + 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 AlertPolicyServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -142,7 +148,7 @@ export class AlertPolicyServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -150,77 +156,79 @@ export class AlertPolicyServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), - folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' ), - folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' ), - folderGroupPathTemplate: new gaxModule.PathTemplate( + folderGroupPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/groups/{group}' ), - folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), - folderServicePathTemplate: new gaxModule.PathTemplate( + folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), - organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' ), - organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' ), - organizationGroupPathTemplate: new gaxModule.PathTemplate( + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannels/{notification_channel}' ), - organizationServicePathTemplate: new gaxModule.PathTemplate( + organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - projectGroupPathTemplate: new gaxModule.PathTemplate( + projectGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - projectServicePathTemplate: new gaxModule.PathTemplate( + projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -229,7 +237,7 @@ export class AlertPolicyServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listAlertPolicies: new gaxModule.PageDescriptor( + listAlertPolicies: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'alertPolicies' @@ -237,7 +245,7 @@ export class AlertPolicyServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.v3.AlertPolicyService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -248,17 +256,35 @@ export class AlertPolicyServiceClient { // 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.alertPolicyServiceStub) { + return this.alertPolicyServiceStub; + } // Put together the "service stub" for // google.monitoring.v3.AlertPolicyService. - this.alertPolicyServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.alertPolicyServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.AlertPolicyService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.v3.AlertPolicyService, - opts + (this._protos as any).google.monitoring.v3.AlertPolicyService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -284,9 +310,9 @@ export class AlertPolicyServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -300,6 +326,8 @@ export class AlertPolicyServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.alertPolicyServiceStub; } /** @@ -427,6 +455,7 @@ export class AlertPolicyServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getAlertPolicy(request, options, callback); } createAlertPolicy( @@ -512,6 +541,7 @@ export class AlertPolicyServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.createAlertPolicy(request, options, callback); } deleteAlertPolicy( @@ -543,7 +573,7 @@ export class AlertPolicyServiceClient { * * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] * - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * For more information, see {@link google.monitoring.v3.AlertPolicy|AlertPolicy}. * @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. @@ -588,6 +618,7 @@ export class AlertPolicyServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteAlertPolicy(request, options, callback); } updateAlertPolicy( @@ -688,6 +719,7 @@ export class AlertPolicyServiceClient { ] = gax.routingHeader.fromParams({ 'alert_policy.name': request.alertPolicy!.name || '', }); + this.initialize(); return this._innerApiCalls.updateAlertPolicy(request, options, callback); } @@ -723,7 +755,7 @@ export class AlertPolicyServiceClient { * Note that this field names the parent container in which the alerting * policies to be listed are stored. To retrieve a single alerting policy * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * {@link google.monitoring.v3.AlertPolicyService.GetAlertPolicy|GetAlertPolicy} * operation, instead. * @param {string} request.filter * If provided, this field specifies the criteria that must be met by @@ -799,6 +831,7 @@ export class AlertPolicyServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listAlertPolicies(request, options, callback); } @@ -825,7 +858,7 @@ export class AlertPolicyServiceClient { * Note that this field names the parent container in which the alerting * policies to be listed are stored. To retrieve a single alerting policy * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * {@link google.monitoring.v3.AlertPolicyService.GetAlertPolicy|GetAlertPolicy} * operation, instead. * @param {string} request.filter * If provided, this field specifies the criteria that must be met by @@ -865,6 +898,7 @@ export class AlertPolicyServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listAlertPolicies.createStream( this._innerApiCalls.listAlertPolicies as gax.GaxCall, request, @@ -2075,8 +2109,9 @@ export class AlertPolicyServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.alertPolicyServiceStub.then(stub => { + return this.alertPolicyServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index e1c372b0db1..80bfc5063d2 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -55,8 +55,13 @@ export class GroupServiceClient { 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; - groupServiceStub: Promise<{[name: string]: Function}>; + groupServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of GroupServiceClient. @@ -80,8 +85,6 @@ export class GroupServiceClient { * 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. */ @@ -111,25 +114,28 @@ export class GroupServiceClient { // 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 = !isBrowser && opts.fallback ? gax.fallback : gax; + 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 GroupServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -145,7 +151,7 @@ export class GroupServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -153,77 +159,79 @@ export class GroupServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), - folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' ), - folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' ), - folderGroupPathTemplate: new gaxModule.PathTemplate( + folderGroupPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/groups/{group}' ), - folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), - folderServicePathTemplate: new gaxModule.PathTemplate( + folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), - organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' ), - organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' ), - organizationGroupPathTemplate: new gaxModule.PathTemplate( + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannels/{notification_channel}' ), - organizationServicePathTemplate: new gaxModule.PathTemplate( + organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - projectGroupPathTemplate: new gaxModule.PathTemplate( + projectGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - projectServicePathTemplate: new gaxModule.PathTemplate( + projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -232,12 +240,12 @@ export class GroupServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listGroups: new gaxModule.PageDescriptor( + listGroups: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'group' ), - listGroupMembers: new gaxModule.PageDescriptor( + listGroupMembers: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'members' @@ -245,7 +253,7 @@ export class GroupServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.v3.GroupService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -256,17 +264,35 @@ export class GroupServiceClient { // 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.groupServiceStub) { + return this.groupServiceStub; + } // Put together the "service stub" for // google.monitoring.v3.GroupService. - this.groupServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.groupServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.GroupService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.v3.GroupService, - opts + (this._protos as any).google.monitoring.v3.GroupService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -293,9 +319,9 @@ export class GroupServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -309,6 +335,8 @@ export class GroupServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.groupServiceStub; } /** @@ -436,6 +464,7 @@ export class GroupServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getGroup(request, options, callback); } createGroup( @@ -514,6 +543,7 @@ export class GroupServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.createGroup(request, options, callback); } updateGroup( @@ -589,6 +619,7 @@ export class GroupServiceClient { ] = gax.routingHeader.fromParams({ 'group.name': request.group!.name || '', }); + this.initialize(); return this._innerApiCalls.updateGroup(request, options, callback); } deleteGroup( @@ -666,6 +697,7 @@ export class GroupServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteGroup(request, options, callback); } @@ -782,6 +814,7 @@ export class GroupServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listGroups(request, options, callback); } @@ -853,6 +886,7 @@ export class GroupServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listGroups.createStream( this._innerApiCalls.listGroups as gax.GaxCall, request, @@ -962,6 +996,7 @@ export class GroupServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listGroupMembers(request, options, callback); } @@ -1023,6 +1058,7 @@ export class GroupServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listGroupMembers.createStream( this._innerApiCalls.listGroupMembers as gax.GaxCall, request, @@ -2233,8 +2269,9 @@ export class GroupServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.groupServiceStub.then(stub => { + return this.groupServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 5325f916ed2..44d265baa6e 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -45,8 +45,13 @@ export class MetricServiceClient { 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; - metricServiceStub: Promise<{[name: string]: Function}>; + metricServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of MetricServiceClient. @@ -70,8 +75,6 @@ export class MetricServiceClient { * 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. */ @@ -101,25 +104,28 @@ export class MetricServiceClient { // 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 = !isBrowser && opts.fallback ? gax.fallback : gax; + 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 MetricServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -135,7 +141,7 @@ export class MetricServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -143,95 +149,97 @@ export class MetricServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), - folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' ), - folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' ), - folderGroupPathTemplate: new gaxModule.PathTemplate( + folderGroupPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/groups/{group}' ), - folderMetricDescriptorPathTemplate: new gaxModule.PathTemplate( + folderMetricDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/metricDescriptors/{metric_descriptor=**}' ), - folderMonitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( + folderMonitoredResourceDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}' ), - folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), - folderServicePathTemplate: new gaxModule.PathTemplate( + folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), - organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' ), - organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' ), - organizationGroupPathTemplate: new gaxModule.PathTemplate( + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationMetricDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationMetricDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/metricDescriptors/{metric_descriptor=**}' ), - organizationMonitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationMonitoredResourceDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}' ), - organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannels/{notification_channel}' ), - organizationServicePathTemplate: new gaxModule.PathTemplate( + organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - projectGroupPathTemplate: new gaxModule.PathTemplate( + projectGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - projectMetricDescriptorPathTemplate: new gaxModule.PathTemplate( + projectMetricDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/metricDescriptors/{metric_descriptor=**}' ), - projectMonitoredResourceDescriptorPathTemplate: new gaxModule.PathTemplate( + projectMonitoredResourceDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' ), - projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - projectServicePathTemplate: new gaxModule.PathTemplate( + projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -240,17 +248,17 @@ export class MetricServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listMonitoredResourceDescriptors: new gaxModule.PageDescriptor( + listMonitoredResourceDescriptors: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'resourceDescriptors' ), - listMetricDescriptors: new gaxModule.PageDescriptor( + listMetricDescriptors: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'metricDescriptors' ), - listTimeSeries: new gaxModule.PageDescriptor( + listTimeSeries: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'timeSeries' @@ -258,7 +266,7 @@ export class MetricServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.v3.MetricService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -269,17 +277,35 @@ export class MetricServiceClient { // 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.metricServiceStub) { + return this.metricServiceStub; + } // Put together the "service stub" for // google.monitoring.v3.MetricService. - this.metricServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.metricServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.MetricService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.v3.MetricService, - opts + (this._protos as any).google.monitoring.v3.MetricService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -308,9 +334,9 @@ export class MetricServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -324,6 +350,8 @@ export class MetricServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.metricServiceStub; } /** @@ -464,6 +492,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getMonitoredResourceDescriptor( request, options, @@ -545,6 +574,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getMetricDescriptor(request, options, callback); } createMetricDescriptor( @@ -632,6 +662,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.createMetricDescriptor( request, options, @@ -723,6 +754,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteMetricDescriptor( request, options, @@ -811,6 +843,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.createTimeSeries(request, options, callback); } @@ -910,6 +943,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listMonitoredResourceDescriptors( request, options, @@ -968,6 +1002,7 @@ export class MetricServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listMonitoredResourceDescriptors.createStream( this._innerApiCalls.listMonitoredResourceDescriptors as gax.GaxCall, request, @@ -1072,6 +1107,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listMetricDescriptors( request, options, @@ -1132,6 +1168,7 @@ export class MetricServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listMetricDescriptors.createStream( this._innerApiCalls.listMetricDescriptors as gax.GaxCall, request, @@ -1254,6 +1291,7 @@ export class MetricServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listTimeSeries(request, options, callback); } @@ -1328,6 +1366,7 @@ export class MetricServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listTimeSeries.createStream( this._innerApiCalls.listTimeSeries as gax.GaxCall, request, @@ -2820,8 +2859,9 @@ export class MetricServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.metricServiceStub.then(stub => { + return this.metricServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index e5e566a950f..5716c3f5b03 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -45,8 +45,13 @@ export class NotificationChannelServiceClient { 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; - notificationChannelServiceStub: Promise<{[name: string]: Function}>; + notificationChannelServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of NotificationChannelServiceClient. @@ -70,8 +75,6 @@ export class NotificationChannelServiceClient { * 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. */ @@ -102,26 +105,29 @@ export class NotificationChannelServiceClient { // 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 = !isBrowser && opts.fallback ? gax.fallback : gax; + 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 NotificationChannelServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -137,7 +143,7 @@ export class NotificationChannelServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -145,77 +151,79 @@ export class NotificationChannelServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), - folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' ), - folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' ), - folderGroupPathTemplate: new gaxModule.PathTemplate( + folderGroupPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/groups/{group}' ), - folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), - folderServicePathTemplate: new gaxModule.PathTemplate( + folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), - organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' ), - organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' ), - organizationGroupPathTemplate: new gaxModule.PathTemplate( + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannels/{notification_channel}' ), - organizationServicePathTemplate: new gaxModule.PathTemplate( + organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - projectGroupPathTemplate: new gaxModule.PathTemplate( + projectGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - projectServicePathTemplate: new gaxModule.PathTemplate( + projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -224,12 +232,12 @@ export class NotificationChannelServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listNotificationChannelDescriptors: new gaxModule.PageDescriptor( + listNotificationChannelDescriptors: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'channelDescriptors' ), - listNotificationChannels: new gaxModule.PageDescriptor( + listNotificationChannels: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'notificationChannels' @@ -237,7 +245,7 @@ export class NotificationChannelServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.v3.NotificationChannelService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -248,17 +256,35 @@ export class NotificationChannelServiceClient { // 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.notificationChannelServiceStub) { + return this.notificationChannelServiceStub; + } // Put together the "service stub" for // google.monitoring.v3.NotificationChannelService. - this.notificationChannelServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.notificationChannelServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.NotificationChannelService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.v3.NotificationChannelService, - opts + (this._protos as any).google.monitoring.v3.NotificationChannelService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -289,9 +315,9 @@ export class NotificationChannelServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -305,6 +331,8 @@ export class NotificationChannelServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.notificationChannelServiceStub; } /** @@ -442,6 +470,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getNotificationChannelDescriptor( request, options, @@ -532,6 +561,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getNotificationChannel( request, options, @@ -626,6 +656,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.createNotificationChannel( request, options, @@ -716,6 +747,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ 'notification_channel.name': request.notificationChannel!.name || '', }); + this.initialize(); return this._innerApiCalls.updateNotificationChannel( request, options, @@ -807,6 +839,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteNotificationChannel( request, options, @@ -892,6 +925,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.sendNotificationChannelVerificationCode( request, options, @@ -1008,6 +1042,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getNotificationChannelVerificationCode( request, options, @@ -1102,6 +1137,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.verifyNotificationChannel( request, options, @@ -1142,7 +1178,7 @@ export class NotificationChannelServiceClient { * * Note that this names the parent container in which to look for the * descriptors; to retrieve a single descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * {@link google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor|GetNotificationChannelDescriptor} * operation, instead. * @param {number} request.pageSize * The maximum number of results to return in a single response. If @@ -1207,6 +1243,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listNotificationChannelDescriptors( request, options, @@ -1237,7 +1274,7 @@ export class NotificationChannelServiceClient { * * Note that this names the parent container in which to look for the * descriptors; to retrieve a single descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * {@link google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor|GetNotificationChannelDescriptor} * operation, instead. * @param {number} request.pageSize * The maximum number of results to return in a single response. If @@ -1266,6 +1303,7 @@ export class NotificationChannelServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listNotificationChannelDescriptors.createStream( this._innerApiCalls.listNotificationChannelDescriptors as gax.GaxCall, request, @@ -1305,7 +1343,7 @@ export class NotificationChannelServiceClient { * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * {@link google.monitoring.v3.NotificationChannelService.GetNotificationChannel|`GetNotificationChannel`} * operation. * @param {string} request.filter * If provided, this field specifies the criteria that must be met by @@ -1383,6 +1421,7 @@ export class NotificationChannelServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.listNotificationChannels( request, options, @@ -1414,7 +1453,7 @@ export class NotificationChannelServiceClient { * in which to look for the notification channels; it does not name a * specific channel. To query a specific channel by REST resource name, use * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * {@link google.monitoring.v3.NotificationChannelService.GetNotificationChannel|`GetNotificationChannel`} * operation. * @param {string} request.filter * If provided, this field specifies the criteria that must be met by @@ -1456,6 +1495,7 @@ export class NotificationChannelServiceClient { name: request.name || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listNotificationChannels.createStream( this._innerApiCalls.listNotificationChannels as gax.GaxCall, request, @@ -2666,8 +2706,9 @@ export class NotificationChannelServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.notificationChannelServiceStub.then(stub => { + return this.notificationChannelServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index 4516ab43d7b..ecee7592a36 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -47,8 +47,13 @@ export class ServiceMonitoringServiceClient { 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; - serviceMonitoringServiceStub: Promise<{[name: string]: Function}>; + serviceMonitoringServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of ServiceMonitoringServiceClient. @@ -72,8 +77,6 @@ export class ServiceMonitoringServiceClient { * 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. */ @@ -104,26 +107,29 @@ export class ServiceMonitoringServiceClient { // 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 = !isBrowser && opts.fallback ? gax.fallback : gax; + 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 ServiceMonitoringServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -139,7 +145,7 @@ export class ServiceMonitoringServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -147,77 +153,79 @@ export class ServiceMonitoringServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), - folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' ), - folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' ), - folderGroupPathTemplate: new gaxModule.PathTemplate( + folderGroupPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/groups/{group}' ), - folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), - folderServicePathTemplate: new gaxModule.PathTemplate( + folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), - organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' ), - organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' ), - organizationGroupPathTemplate: new gaxModule.PathTemplate( + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannels/{notification_channel}' ), - organizationServicePathTemplate: new gaxModule.PathTemplate( + organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - projectGroupPathTemplate: new gaxModule.PathTemplate( + projectGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - projectServicePathTemplate: new gaxModule.PathTemplate( + projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -226,12 +234,12 @@ export class ServiceMonitoringServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listServices: new gaxModule.PageDescriptor( + listServices: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'services' ), - listServiceLevelObjectives: new gaxModule.PageDescriptor( + listServiceLevelObjectives: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'serviceLevelObjectives' @@ -239,7 +247,7 @@ export class ServiceMonitoringServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.v3.ServiceMonitoringService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -250,17 +258,35 @@ export class ServiceMonitoringServiceClient { // 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.serviceMonitoringServiceStub) { + return this.serviceMonitoringServiceStub; + } // Put together the "service stub" for // google.monitoring.v3.ServiceMonitoringService. - this.serviceMonitoringServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.serviceMonitoringServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.ServiceMonitoringService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.v3.ServiceMonitoringService, - opts + (this._protos as any).google.monitoring.v3.ServiceMonitoringService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -291,9 +317,9 @@ export class ServiceMonitoringServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -307,6 +333,8 @@ export class ServiceMonitoringServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.serviceMonitoringServiceStub; } /** @@ -438,6 +466,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.createService(request, options, callback); } getService( @@ -510,6 +539,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getService(request, options, callback); } updateService( @@ -584,6 +614,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ 'service.name': request.service!.name || '', }); + this.initialize(); return this._innerApiCalls.updateService(request, options, callback); } deleteService( @@ -656,6 +687,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteService(request, options, callback); } createServiceLevelObjective( @@ -745,6 +777,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.createServiceLevelObjective( request, options, @@ -836,6 +869,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getServiceLevelObjective( request, options, @@ -923,6 +957,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ 'service_level_objective.name': request.serviceLevelObjective!.name || '', }); + this.initialize(); return this._innerApiCalls.updateServiceLevelObjective( request, options, @@ -1009,6 +1044,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteServiceLevelObjective( request, options, @@ -1121,6 +1157,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.listServices(request, options, callback); } @@ -1184,6 +1221,7 @@ export class ServiceMonitoringServiceClient { parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listServices.createStream( this._innerApiCalls.listServices as gax.GaxCall, request, @@ -1286,6 +1324,7 @@ export class ServiceMonitoringServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.listServiceLevelObjectives( request, options, @@ -1344,6 +1383,7 @@ export class ServiceMonitoringServiceClient { parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listServiceLevelObjectives.createStream( this._innerApiCalls.listServiceLevelObjectives as gax.GaxCall, request, @@ -2554,8 +2594,9 @@ export class ServiceMonitoringServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.serviceMonitoringServiceStub.then(stub => { + return this.serviceMonitoringServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index 98febf66092..d0aa99442a1 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -51,8 +51,13 @@ export class UptimeCheckServiceClient { 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; - uptimeCheckServiceStub: Promise<{[name: string]: Function}>; + uptimeCheckServiceStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of UptimeCheckServiceClient. @@ -76,8 +81,6 @@ export class UptimeCheckServiceClient { * 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. */ @@ -107,25 +110,28 @@ export class UptimeCheckServiceClient { // 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 = !isBrowser && opts.fallback ? gax.fallback : gax; + 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 UptimeCheckServiceClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -141,7 +147,7 @@ export class UptimeCheckServiceClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -149,77 +155,79 @@ export class UptimeCheckServiceClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this._pathTemplates = { - folderAlertPolicyPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), - folderAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' ), - folderChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' ), - folderGroupPathTemplate: new gaxModule.PathTemplate( + folderGroupPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/groups/{group}' ), - folderNotificationChannelPathTemplate: new gaxModule.PathTemplate( + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), - folderServicePathTemplate: new gaxModule.PathTemplate( + folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - folderUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), - organizationAlertPolicyPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' ), - organizationChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' ), - organizationGroupPathTemplate: new gaxModule.PathTemplate( + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new gaxModule.PathTemplate( + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/notificationChannels/{notification_channel}' ), - organizationServicePathTemplate: new gaxModule.PathTemplate( + organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - organizationUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' ), - projectPathTemplate: new gaxModule.PathTemplate('projects/{project}'), - projectAlertPolicyPathTemplate: new gaxModule.PathTemplate( + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), - projectAlertPolicyConditionPathTemplate: new gaxModule.PathTemplate( + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' ), - projectChannelDescriptorPathTemplate: new gaxModule.PathTemplate( + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' ), - projectGroupPathTemplate: new gaxModule.PathTemplate( + projectGroupPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/groups/{group}' ), - projectNotificationChannelPathTemplate: new gaxModule.PathTemplate( + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), - projectServicePathTemplate: new gaxModule.PathTemplate( + projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new gaxModule.PathTemplate( + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), - projectUptimeCheckConfigPathTemplate: new gaxModule.PathTemplate( + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), }; @@ -228,12 +236,12 @@ export class UptimeCheckServiceClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listUptimeCheckConfigs: new gaxModule.PageDescriptor( + listUptimeCheckConfigs: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'uptimeCheckConfigs' ), - listUptimeCheckIps: new gaxModule.PageDescriptor( + listUptimeCheckIps: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'uptimeCheckIps' @@ -241,7 +249,7 @@ export class UptimeCheckServiceClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.monitoring.v3.UptimeCheckService', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -252,17 +260,35 @@ export class UptimeCheckServiceClient { // 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.uptimeCheckServiceStub) { + return this.uptimeCheckServiceStub; + } // Put together the "service stub" for // google.monitoring.v3.UptimeCheckService. - this.uptimeCheckServiceStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.uptimeCheckServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.UptimeCheckService' ) : // tslint:disable-next-line no-any - (protos as any).google.monitoring.v3.UptimeCheckService, - opts + (this._protos as any).google.monitoring.v3.UptimeCheckService, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -289,9 +315,9 @@ export class UptimeCheckServiceClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -305,6 +331,8 @@ export class UptimeCheckServiceClient { return apiCall(argument, callOptions, callback); }; } + + return this.uptimeCheckServiceStub; } /** @@ -432,6 +460,7 @@ export class UptimeCheckServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.getUptimeCheckConfig(request, options, callback); } createUptimeCheckConfig( @@ -515,6 +544,7 @@ export class UptimeCheckServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.createUptimeCheckConfig( request, options, @@ -617,6 +647,7 @@ export class UptimeCheckServiceClient { ] = gax.routingHeader.fromParams({ 'uptime_check_config.name': request.uptimeCheckConfig!.name || '', }); + this.initialize(); return this._innerApiCalls.updateUptimeCheckConfig( request, options, @@ -704,6 +735,7 @@ export class UptimeCheckServiceClient { ] = gax.routingHeader.fromParams({ name: request.name || '', }); + this.initialize(); return this._innerApiCalls.deleteUptimeCheckConfig( request, options, @@ -803,6 +835,7 @@ export class UptimeCheckServiceClient { ] = gax.routingHeader.fromParams({ parent: request.parent || '', }); + this.initialize(); return this._innerApiCalls.listUptimeCheckConfigs( request, options, @@ -856,6 +889,7 @@ export class UptimeCheckServiceClient { parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listUptimeCheckConfigs.createStream( this._innerApiCalls.listUptimeCheckConfigs as gax.GaxCall, request, @@ -945,6 +979,7 @@ export class UptimeCheckServiceClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.listUptimeCheckIps(request, options, callback); } @@ -986,6 +1021,7 @@ export class UptimeCheckServiceClient { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listUptimeCheckIps.createStream( this._innerApiCalls.listUptimeCheckIps as gax.GaxCall, request, @@ -2196,8 +2232,9 @@ export class UptimeCheckServiceClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.uptimeCheckServiceStub.then(stub => { + return this.uptimeCheckServiceStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7ff83528b8b..2b34cb458bd 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-02-11T08:09:54.291652Z", + "updateTime": "2020-03-05T23:11:12.932334Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5006247aa157e59118833658084345ee59af7c09", - "internalRef": "294383128" + "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", + "internalRef": "299181282", + "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\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\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\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" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts index 90f52dc3920..bc7b80f2d37 100644 --- a/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts +++ b/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts @@ -83,12 +83,30 @@ describe('v3.AlertPolicyServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alertPolicyServiceStub, undefined); + await client.initialize(); + assert(client.alertPolicyServiceStub); + }); + it('has close method', () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('getAlertPolicy', () => { it('invokes getAlertPolicy without error', done => { const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; request.name = ''; @@ -112,6 +130,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; request.name = ''; @@ -137,6 +157,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; request.name = ''; @@ -160,6 +182,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; request.name = ''; @@ -185,6 +209,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; request.name = ''; @@ -208,6 +234,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; request.name = ''; @@ -233,6 +261,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; request.alertPolicy = {}; @@ -257,6 +287,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; request.alertPolicy = {}; @@ -283,6 +315,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest = {}; request.name = ''; @@ -310,6 +344,8 @@ describe('v3.AlertPolicyServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest = {}; request.name = ''; diff --git a/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts index 89a5260adff..941a1a75376 100644 --- a/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts +++ b/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts @@ -81,12 +81,30 @@ describe('v3.GroupServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.groupServiceStub, undefined); + await client.initialize(); + assert(client.groupServiceStub); + }); + it('has close method', () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('getGroup', () => { it('invokes getGroup without error', done => { const client = new groupserviceModule.v3.GroupServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; request.name = ''; @@ -110,6 +128,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; request.name = ''; @@ -135,6 +155,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; request.name = ''; @@ -158,6 +180,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; request.name = ''; @@ -183,6 +207,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; request.group = {}; @@ -207,6 +233,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; request.group = {}; @@ -233,6 +261,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; request.name = ''; @@ -256,6 +286,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; request.name = ''; @@ -281,6 +313,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListGroupsRequest = {}; request.name = ''; @@ -308,6 +342,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListGroupsRequest = {}; request.name = ''; @@ -340,6 +376,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListGroupMembersRequest = {}; request.name = ''; @@ -367,6 +405,8 @@ describe('v3.GroupServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListGroupMembersRequest = {}; request.name = ''; diff --git a/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts index b707732b17d..6490176488a 100644 --- a/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts +++ b/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts @@ -81,12 +81,30 @@ describe('v3.MetricServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricServiceStub, undefined); + await client.initialize(); + assert(client.metricServiceStub); + }); + it('has close method', () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('getMonitoredResourceDescriptor', () => { it('invokes getMonitoredResourceDescriptor without error', done => { const client = new metricserviceModule.v3.MetricServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; request.name = ''; @@ -113,6 +131,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; request.name = ''; @@ -141,6 +161,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; request.name = ''; @@ -164,6 +186,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; request.name = ''; @@ -189,6 +213,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; request.name = ''; @@ -212,6 +238,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; request.name = ''; @@ -237,6 +265,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; request.name = ''; @@ -260,6 +290,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; request.name = ''; @@ -285,6 +317,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; request.name = ''; @@ -308,6 +342,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; request.name = ''; @@ -333,6 +369,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest = {}; request.name = ''; @@ -363,6 +401,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest = {}; request.name = ''; @@ -395,6 +435,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest = {}; request.name = ''; @@ -422,6 +464,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest = {}; request.name = ''; @@ -454,6 +498,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest = {}; request.name = ''; @@ -481,6 +527,8 @@ describe('v3.MetricServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest = {}; request.name = ''; diff --git a/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts index ed4961d6a40..85398175164 100644 --- a/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts +++ b/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts @@ -88,6 +88,26 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.notificationChannelServiceStub, undefined); + await client.initialize(); + assert(client.notificationChannelServiceStub); + }); + it('has close method', () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); describe('getNotificationChannelDescriptor', () => { it('invokes getNotificationChannelDescriptor without error', done => { const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( @@ -96,6 +116,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; request.name = ''; @@ -124,6 +146,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; request.name = ''; @@ -154,6 +178,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; request.name = ''; @@ -179,6 +205,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; request.name = ''; @@ -206,6 +234,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; request.name = ''; @@ -231,6 +261,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; request.name = ''; @@ -261,6 +293,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; request.notificationChannel = {}; @@ -287,6 +321,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; request.notificationChannel = {}; @@ -318,6 +354,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; request.name = ''; @@ -343,6 +381,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; request.name = ''; @@ -373,6 +413,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; request.name = ''; @@ -401,6 +443,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; request.name = ''; @@ -431,6 +475,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; request.name = ''; @@ -459,6 +505,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; request.name = ''; @@ -489,6 +537,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; request.name = ''; @@ -514,6 +564,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; request.name = ''; @@ -544,6 +596,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest = {}; request.name = ''; @@ -576,6 +630,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest = {}; request.name = ''; @@ -610,6 +666,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest = {}; request.name = ''; @@ -642,6 +700,8 @@ describe('v3.NotificationChannelServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest = {}; request.name = ''; diff --git a/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts index d6b905d5bc0..f72b50dbf60 100644 --- a/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts +++ b/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts @@ -88,6 +88,26 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.serviceMonitoringServiceStub, undefined); + await client.initialize(); + assert(client.serviceMonitoringServiceStub); + }); + it('has close method', () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); describe('createService', () => { it('invokes createService without error', done => { const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( @@ -96,6 +116,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; request.parent = ''; @@ -121,6 +143,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; request.parent = ''; @@ -148,6 +172,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; request.name = ''; @@ -173,6 +199,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; request.name = ''; @@ -200,6 +228,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; request.service = {}; @@ -226,6 +256,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; request.service = {}; @@ -254,6 +286,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; request.name = ''; @@ -279,6 +313,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; request.name = ''; @@ -306,6 +342,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; request.parent = ''; @@ -331,6 +369,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; request.parent = ''; @@ -361,6 +401,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; request.name = ''; @@ -386,6 +428,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; request.name = ''; @@ -416,6 +460,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; request.serviceLevelObjective = {}; @@ -442,6 +488,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; request.serviceLevelObjective = {}; @@ -473,6 +521,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; request.name = ''; @@ -498,6 +548,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; request.name = ''; @@ -528,6 +580,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListServicesRequest = {}; request.parent = ''; @@ -557,6 +611,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListServicesRequest = {}; request.parent = ''; @@ -591,6 +647,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest = {}; request.parent = ''; @@ -623,6 +681,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { projectId: 'bogus', } ); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest = {}; request.parent = ''; diff --git a/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts index 3266e39ebe8..ae479840769 100644 --- a/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts +++ b/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts @@ -83,12 +83,30 @@ describe('v3.UptimeCheckServiceClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.uptimeCheckServiceStub, undefined); + await client.initialize(); + assert(client.uptimeCheckServiceStub); + }); + it('has close method', () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('getUptimeCheckConfig', () => { it('invokes getUptimeCheckConfig without error', done => { const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; request.name = ''; @@ -112,6 +130,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; request.name = ''; @@ -137,6 +157,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; request.parent = ''; @@ -160,6 +182,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; request.parent = ''; @@ -188,6 +212,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; request.uptimeCheckConfig = {}; @@ -212,6 +238,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; request.uptimeCheckConfig = {}; @@ -241,6 +269,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; request.name = ''; @@ -264,6 +294,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; request.name = ''; @@ -292,6 +324,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest = {}; request.parent = ''; @@ -319,6 +353,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest = {}; request.parent = ''; @@ -351,6 +387,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest = {}; // Mock response @@ -377,6 +415,8 @@ describe('v3.UptimeCheckServiceClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest = {}; // Mock response From 6c12509355aafc6b6de8f79b9e08cd32e55715ee Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 6 Mar 2020 07:55:25 -0800 Subject: [PATCH 273/422] build: update linkinator config --- packages/google-cloud-monitoring/linkinator.config.json | 4 +++- packages/google-cloud-monitoring/synth.metadata | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/linkinator.config.json b/packages/google-cloud-monitoring/linkinator.config.json index b555215ca02..29a223b6db6 100644 --- a/packages/google-cloud-monitoring/linkinator.config.json +++ b/packages/google-cloud-monitoring/linkinator.config.json @@ -4,5 +4,7 @@ "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io" - ] + ], + "silent": true, + "concurrency": 10 } diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 2b34cb458bd..69808cbb539 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,13 +1,12 @@ { - "updateTime": "2020-03-05T23:11:12.932334Z", + "updateTime": "2020-03-06T12:32:55.468505Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", - "internalRef": "299181282", - "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\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\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\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" + "internalRef": "299181282" } }, { From f68c28f5fae354bcbc00a92747618a4764f10688 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Mar 2020 14:58:00 -0800 Subject: [PATCH 274/422] build(tests): fix coveralls and enable build cop (#381) --- packages/google-cloud-monitoring/.mocharc.js | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/google-cloud-monitoring/.mocharc.js diff --git a/packages/google-cloud-monitoring/.mocharc.js b/packages/google-cloud-monitoring/.mocharc.js new file mode 100644 index 00000000000..ff7b34fa5d1 --- /dev/null +++ b/packages/google-cloud-monitoring/.mocharc.js @@ -0,0 +1,28 @@ +// 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}`; +} +module.exports = config From 4d0a1b779276faee84bd532140901c896d946c73 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 18 Mar 2020 13:00:21 -0700 Subject: [PATCH 275/422] docs: mention templates in contributing section of README (#386) --- packages/google-cloud-monitoring/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 2d909b67063..13338f809ce 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -152,6 +152,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/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 7081137132952ff9f790c8efa649fbe9ef0d10c1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Mar 2020 18:32:47 -0700 Subject: [PATCH 276/422] docs: document version support goals (#393) --- packages/google-cloud-monitoring/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 13338f809ce..878a3bc7714 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -129,6 +129,27 @@ has instructions for running the samples. The [Stackdriver Monitoring 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 1fb3fbe55da05fc62bf7cd3b946717b19b3bfd98 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 31 Mar 2020 15:28:17 -0700 Subject: [PATCH 277/422] feat!: drop node8 support, support for async iterators (#396) 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. --- .../google-cloud-monitoring/.eslintrc.json | 3 + .../google-cloud-monitoring/.eslintrc.yml | 15 - packages/google-cloud-monitoring/.jsdoc.js | 2 +- packages/google-cloud-monitoring/.prettierrc | 8 - .../google-cloud-monitoring/.prettierrc.js | 17 + packages/google-cloud-monitoring/package.json | 10 +- .../samples/quickstart.js | 2 +- .../src/v3/alert_policy_service_client.ts | 601 +-- .../src/v3/group_service_client.ts | 720 ++-- .../google-cloud-monitoring/src/v3/index.ts | 2 +- .../src/v3/metric_service_client.ts | 974 +++-- .../v3/notification_channel_service_client.ts | 966 +++-- .../v3/service_monitoring_service_client.ts | 905 +++-- .../src/v3/uptime_check_service_client.ts | 732 ++-- .../google-cloud-monitoring/synth.metadata | 19 +- .../system-test/fixtures/sample/src/index.js | 3 +- .../system-test/fixtures/sample/src/index.ts | 23 +- .../system-test/install.ts | 2 +- .../system-test/metrics_service_smoke_test.ts | 3 + .../test/gapic-alert_policy_service-v3.ts | 375 -- .../test/gapic-group_service-v3.ts | 436 -- .../test/gapic-metric_service-v3.ts | 558 --- .../gapic-notification_channel_service-v3.ts | 731 ---- .../gapic-service_monitoring_service-v3.ts | 712 ---- .../test/gapic-uptime_check_service-v3.ts | 445 --- .../test/gapic_alert_policy_service_v3.ts | 2457 ++++++++++++ .../test/gapic_group_service_v3.ts | 2732 +++++++++++++ .../test/gapic_metric_service_v3.ts | 3551 +++++++++++++++++ .../gapic_notification_channel_service_v3.ts | 3442 ++++++++++++++++ .../gapic_service_monitoring_service_v3.ts | 3379 ++++++++++++++++ .../test/gapic_uptime_check_service_v3.ts | 2729 +++++++++++++ .../google-cloud-monitoring/webpack.config.js | 14 +- 32 files changed, 21360 insertions(+), 5208 deletions(-) create mode 100644 packages/google-cloud-monitoring/.eslintrc.json delete mode 100644 packages/google-cloud-monitoring/.eslintrc.yml delete mode 100644 packages/google-cloud-monitoring/.prettierrc create mode 100644 packages/google-cloud-monitoring/.prettierrc.js delete mode 100644 packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts delete mode 100644 packages/google-cloud-monitoring/test/gapic-group_service-v3.ts delete mode 100644 packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts delete mode 100644 packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts delete mode 100644 packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts delete mode 100644 packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic_group_service_v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts create mode 100644 packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts diff --git a/packages/google-cloud-monitoring/.eslintrc.json b/packages/google-cloud-monitoring/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-monitoring/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-monitoring/.eslintrc.yml b/packages/google-cloud-monitoring/.eslintrc.yml deleted file mode 100644 index 73eeec27612..00000000000 --- a/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index bb0edf20f0a..43fd3e0d540 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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. diff --git a/packages/google-cloud-monitoring/.prettierrc b/packages/google-cloud-monitoring/.prettierrc deleted file mode 100644 index df6eac07446..00000000000 --- a/packages/google-cloud-monitoring/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ ---- -bracketSpacing: false -printWidth: 80 -semi: true -singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/packages/google-cloud-monitoring/.prettierrc.js b/packages/google-cloud-monitoring/.prettierrc.js new file mode 100644 index 00000000000..08cba3775be --- /dev/null +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d1819cfa6dc..d5f79fb8a83 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc", "engines": { - "node": ">=8.10.0" + "node": ">=10" }, "repository": "googleapis/nodejs-monitoring", "main": "build/src/index.js", @@ -42,18 +42,19 @@ "prepare": "npm run compile" }, "dependencies": { - "google-gax": "^1.14.1" + "google-gax": "^2.0.1" }, "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.12.27", + "@types/sinon": "^7.5.2", "c8": "^7.1.0", "codecov": "^3.6.5", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", - "gts": "^1.0.0", + "gts": "2.0.0-alpha.9", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", @@ -62,8 +63,9 @@ "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.13.7", + "sinon": "^9.0.1", "ts-loader": "^6.2.1", - "typescript": "^3.7.0", + "typescript": "^3.8.3", "webpack": "^4.41.6", "webpack-cli": "^3.3.11" } diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index 54d132476f4..1be7d2e1822 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -63,7 +63,7 @@ async function quickstart() { // Writes time series data const [result] = await client.createTimeSeries(request); - console.log(`Done writing time series data.`, result); + console.log('Done writing time series data.', result); } // [END monitoring_quickstart] diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 3d45295d634..20c6d51dd9d 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.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. @@ -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 './alert_policy_service_client_config.json'; const version = require('../../../package.json').version; @@ -48,9 +48,6 @@ const version = require('../../../package.json').version; * @memberof v3 */ export class AlertPolicyServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -58,6 +55,14 @@ export class AlertPolicyServiceClient { 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}; alertPolicyServiceStub?: Promise<{[name: string]: Function}>; /** @@ -149,13 +154,16 @@ export class AlertPolicyServiceClient { '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 = { folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), @@ -236,7 +244,7 @@ export class AlertPolicyServiceClient { // 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 = { listAlertPolicies: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -255,7 +263,7 @@ export class AlertPolicyServiceClient { // 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 = {}; } /** @@ -282,7 +290,7 @@ export class AlertPolicyServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.AlertPolicyService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.v3.AlertPolicyService, this._opts ) as Promise<{[method: string]: Function}>; @@ -296,14 +304,14 @@ export class AlertPolicyServiceClient { 'deleteAlertPolicy', 'updateAlertPolicy', ]; - for (const methodName of alertPolicyServiceStubMethods) { - const innerCallPromise = this.alertPolicyServiceStub.then( + const callPromise = this.alertPolicyServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -311,20 +319,14 @@ export class AlertPolicyServiceClient { ); 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.alertPolicyServiceStub; @@ -385,22 +387,30 @@ export class AlertPolicyServiceClient { // -- Service calls -- // ------------------- getAlertPolicy( - request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest, + request: protos.google.monitoring.v3.IGetAlertPolicyRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IGetAlertPolicyRequest | undefined, {} | undefined ] >; getAlertPolicy( - request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest, + request: protos.google.monitoring.v3.IGetAlertPolicyRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + getAlertPolicy( + request: protos.google.monitoring.v3.IGetAlertPolicyRequest, + callback: Callback< + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -419,23 +429,23 @@ export class AlertPolicyServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getAlertPolicy( - request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest, + request: protos.google.monitoring.v3.IGetAlertPolicyRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IGetAlertPolicyRequest | undefined, + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IGetAlertPolicyRequest | undefined, {} | undefined ] > | void { @@ -456,25 +466,33 @@ export class AlertPolicyServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getAlertPolicy(request, options, callback); + return this.innerApiCalls.getAlertPolicy(request, options, callback); } createAlertPolicy( - request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest, + request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, {} | undefined ] >; createAlertPolicy( - request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest, + request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + createAlertPolicy( + request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, + callback: Callback< + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -504,24 +522,25 @@ export class AlertPolicyServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createAlertPolicy( - request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest, + request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - | protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest + protos.google.monitoring.v3.IAlertPolicy, + | protos.google.monitoring.v3.ICreateAlertPolicyRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.ICreateAlertPolicyRequest | undefined, {} | undefined ] > | void { @@ -542,25 +561,33 @@ export class AlertPolicyServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.createAlertPolicy(request, options, callback); + return this.innerApiCalls.createAlertPolicy(request, options, callback); } deleteAlertPolicy( - request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest, + request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, {} | undefined ] >; deleteAlertPolicy( - request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest, + request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteAlertPolicy( + request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -581,24 +608,25 @@ export class AlertPolicyServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteAlertPolicy( - request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest, + request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteAlertPolicyRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteAlertPolicyRequest | undefined, {} | undefined ] > | void { @@ -619,25 +647,33 @@ export class AlertPolicyServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteAlertPolicy(request, options, callback); + return this.innerApiCalls.deleteAlertPolicy(request, options, callback); } updateAlertPolicy( - request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest, + request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, {} | undefined ] >; updateAlertPolicy( - request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest, + request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + updateAlertPolicy( + request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, + callback: Callback< + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -682,24 +718,25 @@ export class AlertPolicyServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateAlertPolicy( - request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest, + request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - | protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest + protos.google.monitoring.v3.IAlertPolicy, + | protos.google.monitoring.v3.IUpdateAlertPolicyRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy, - protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, + protos.google.monitoring.v3.IAlertPolicy, + protos.google.monitoring.v3.IUpdateAlertPolicyRequest | undefined, {} | undefined ] > | void { @@ -720,26 +757,34 @@ export class AlertPolicyServiceClient { 'alert_policy.name': request.alertPolicy!.name || '', }); this.initialize(); - return this._innerApiCalls.updateAlertPolicy(request, options, callback); + return this.innerApiCalls.updateAlertPolicy(request, options, callback); } listAlertPolicies( - request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + request: protos.google.monitoring.v3.IListAlertPoliciesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy[], - protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, - protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + protos.google.monitoring.v3.IAlertPolicy[], + protos.google.monitoring.v3.IListAlertPoliciesRequest | null, + protos.google.monitoring.v3.IListAlertPoliciesResponse ] >; listAlertPolicies( - request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + request: protos.google.monitoring.v3.IListAlertPoliciesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy[], - protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, - protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListAlertPoliciesRequest, + protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, + protos.google.monitoring.v3.IAlertPolicy + > + ): void; + listAlertPolicies( + request: protos.google.monitoring.v3.IListAlertPoliciesRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListAlertPoliciesRequest, + protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, + protos.google.monitoring.v3.IAlertPolicy > ): void; /** @@ -795,24 +840,26 @@ export class AlertPolicyServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listAlertPolicies( - request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + request: protos.google.monitoring.v3.IListAlertPoliciesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.IAlertPolicy[], - protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, - protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + | PaginationCallback< + protos.google.monitoring.v3.IListAlertPoliciesRequest, + | protos.google.monitoring.v3.IListAlertPoliciesResponse + | null + | undefined, + protos.google.monitoring.v3.IAlertPolicy >, - callback?: Callback< - protosTypes.google.monitoring.v3.IAlertPolicy[], - protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, - protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListAlertPoliciesRequest, + protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, + protos.google.monitoring.v3.IAlertPolicy > ): Promise< [ - protosTypes.google.monitoring.v3.IAlertPolicy[], - protosTypes.google.monitoring.v3.IListAlertPoliciesRequest | null, - protosTypes.google.monitoring.v3.IListAlertPoliciesResponse + protos.google.monitoring.v3.IAlertPolicy[], + protos.google.monitoring.v3.IListAlertPoliciesRequest | null, + protos.google.monitoring.v3.IListAlertPoliciesResponse ] > | void { request = request || {}; @@ -832,7 +879,7 @@ export class AlertPolicyServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listAlertPolicies(request, options, callback); + return this.innerApiCalls.listAlertPolicies(request, options, callback); } /** @@ -885,7 +932,7 @@ export class AlertPolicyServiceClient { * An object stream which emits an object representing [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} on 'data' event. */ listAlertPoliciesStream( - request?: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest, + request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -899,12 +946,76 @@ export class AlertPolicyServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listAlertPolicies.createStream( - this._innerApiCalls.listAlertPolicies as gax.GaxCall, + return this.descriptors.page.listAlertPolicies.createStream( + this.innerApiCalls.listAlertPolicies as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listAlertPolicies}, 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.name + * Required. The project whose alert policies are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * {@link google.monitoring.v3.AlertPolicyService.GetAlertPolicy|GetAlertPolicy} + * operation, instead. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by + * alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} request.orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of field references as the `filter` field. Entries can be + * prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {number} request.pageSize + * The maximum number of results to return in a single response. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method 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. + */ + listAlertPoliciesAsync( + request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listAlertPolicies.asyncIterate( + this.innerApiCalls['listAlertPolicies'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -917,8 +1028,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ folderAlertPolicyPath(folder: string, alertPolicy: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, }); } @@ -931,7 +1042,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).folder; } @@ -944,7 +1055,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).alert_policy; } @@ -962,10 +1073,10 @@ export class AlertPolicyServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -979,7 +1090,7 @@ export class AlertPolicyServiceClient { matchFolderFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).folder; } @@ -994,7 +1105,7 @@ export class AlertPolicyServiceClient { matchAlertPolicyFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).alert_policy; } @@ -1009,7 +1120,7 @@ export class AlertPolicyServiceClient { matchConditionFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).condition; } @@ -1022,8 +1133,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ folderChannelDescriptorPath(folder: string, channelDescriptor: string) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, channel_descriptor: channelDescriptor, }); } @@ -1038,7 +1149,7 @@ export class AlertPolicyServiceClient { matchFolderFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).folder; } @@ -1053,7 +1164,7 @@ export class AlertPolicyServiceClient { matchChannelDescriptorFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).channel_descriptor; } @@ -1066,9 +1177,9 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ folderGroupPath(folder: string, group: string) { - return this._pathTemplates.folderGroupPathTemplate.render({ - folder, - group, + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, }); } @@ -1080,7 +1191,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .folder; } @@ -1092,7 +1203,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the group. */ matchGroupFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .group; } @@ -1104,8 +1215,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ folderNotificationChannelPath(folder: string, notificationChannel: string) { - return this._pathTemplates.folderNotificationChannelPathTemplate.render({ - folder, + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, notification_channel: notificationChannel, }); } @@ -1120,7 +1231,7 @@ export class AlertPolicyServiceClient { matchFolderFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).folder; } @@ -1135,7 +1246,7 @@ export class AlertPolicyServiceClient { matchNotificationChannelFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).notification_channel; } @@ -1148,9 +1259,9 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ folderServicePath(folder: string, service: string) { - return this._pathTemplates.folderServicePathTemplate.render({ - folder, - service, + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, }); } @@ -1162,9 +1273,8 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).folder; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; } /** @@ -1175,9 +1285,8 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the service. */ matchServiceFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).service; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; } /** @@ -1193,10 +1302,10 @@ export class AlertPolicyServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( { - folder, - service, + folder: folder, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1212,7 +1321,7 @@ export class AlertPolicyServiceClient { matchFolderFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).folder; } @@ -1227,7 +1336,7 @@ export class AlertPolicyServiceClient { matchServiceFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service; } @@ -1242,7 +1351,7 @@ export class AlertPolicyServiceClient { matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1255,8 +1364,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ - folder, + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, uptime_check_config: uptimeCheckConfig, }); } @@ -1271,7 +1380,7 @@ export class AlertPolicyServiceClient { matchFolderFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).folder; } @@ -1286,7 +1395,7 @@ export class AlertPolicyServiceClient { matchUptimeCheckConfigFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).uptime_check_config; } @@ -1299,8 +1408,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ organizationAlertPolicyPath(organization: string, alertPolicy: string) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ - organization, + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, alert_policy: alertPolicy, }); } @@ -1315,7 +1424,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).organization; } @@ -1330,7 +1439,7 @@ export class AlertPolicyServiceClient { matchAlertPolicyFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).alert_policy; } @@ -1348,11 +1457,11 @@ export class AlertPolicyServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( { - organization, + organization: organization, alert_policy: alertPolicy, - condition, + condition: condition, } ); } @@ -1367,7 +1476,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).organization; } @@ -1382,7 +1491,7 @@ export class AlertPolicyServiceClient { matchAlertPolicyFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).alert_policy; } @@ -1397,7 +1506,7 @@ export class AlertPolicyServiceClient { matchConditionFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).condition; } @@ -1413,12 +1522,10 @@ export class AlertPolicyServiceClient { organization: string, channelDescriptor: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( - { - organization, - channel_descriptor: channelDescriptor, - } - ); + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); } /** @@ -1431,7 +1538,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).organization; } @@ -1446,7 +1553,7 @@ export class AlertPolicyServiceClient { matchChannelDescriptorFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).channel_descriptor; } @@ -1459,9 +1566,9 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ organizationGroupPath(organization: string, group: string) { - return this._pathTemplates.organizationGroupPathTemplate.render({ - organization, - group, + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, }); } @@ -1473,7 +1580,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).organization; } @@ -1486,7 +1593,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the group. */ matchGroupFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).group; } @@ -1502,9 +1609,9 @@ export class AlertPolicyServiceClient { organization: string, notificationChannel: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( { - organization, + organization: organization, notification_channel: notificationChannel, } ); @@ -1520,7 +1627,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).organization; } @@ -1535,7 +1642,7 @@ export class AlertPolicyServiceClient { matchNotificationChannelFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).notification_channel; } @@ -1548,9 +1655,9 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ organizationServicePath(organization: string, service: string) { - return this._pathTemplates.organizationServicePathTemplate.render({ - organization, - service, + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, }); } @@ -1564,7 +1671,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationServiceName( organizationServiceName: string ) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).organization; } @@ -1577,7 +1684,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the service. */ matchServiceFromOrganizationServiceName(organizationServiceName: string) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).service; } @@ -1595,10 +1702,10 @@ export class AlertPolicyServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( { - organization, - service, + organization: organization, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1614,7 +1721,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).organization; } @@ -1629,7 +1736,7 @@ export class AlertPolicyServiceClient { matchServiceFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service; } @@ -1644,7 +1751,7 @@ export class AlertPolicyServiceClient { matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1660,12 +1767,10 @@ export class AlertPolicyServiceClient { organization: string, uptimeCheckConfig: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( - { - organization, - uptime_check_config: uptimeCheckConfig, - } - ); + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); } /** @@ -1678,7 +1783,7 @@ export class AlertPolicyServiceClient { matchOrganizationFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).organization; } @@ -1693,7 +1798,7 @@ export class AlertPolicyServiceClient { matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).uptime_check_config; } @@ -1705,8 +1810,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -1718,7 +1823,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1729,8 +1834,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectAlertPolicyPath(project: string, alertPolicy: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, alert_policy: alertPolicy, }); } @@ -1743,7 +1848,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).project; } @@ -1756,7 +1861,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).alert_policy; } @@ -1774,10 +1879,10 @@ export class AlertPolicyServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1791,7 +1896,7 @@ export class AlertPolicyServiceClient { matchProjectFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).project; } @@ -1806,7 +1911,7 @@ export class AlertPolicyServiceClient { matchAlertPolicyFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).alert_policy; } @@ -1821,7 +1926,7 @@ export class AlertPolicyServiceClient { matchConditionFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).condition; } @@ -1834,8 +1939,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectChannelDescriptorPath(project: string, channelDescriptor: string) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, channel_descriptor: channelDescriptor, }); } @@ -1850,7 +1955,7 @@ export class AlertPolicyServiceClient { matchProjectFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).project; } @@ -1865,7 +1970,7 @@ export class AlertPolicyServiceClient { matchChannelDescriptorFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).channel_descriptor; } @@ -1878,9 +1983,9 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectGroupPath(project: string, group: string) { - return this._pathTemplates.projectGroupPathTemplate.render({ - project, - group, + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, }); } @@ -1892,7 +1997,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .project; } @@ -1904,7 +2009,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the group. */ matchGroupFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .group; } @@ -1916,8 +2021,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectNotificationChannelPath(project: string, notificationChannel: string) { - return this._pathTemplates.projectNotificationChannelPathTemplate.render({ - project, + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, notification_channel: notificationChannel, }); } @@ -1932,7 +2037,7 @@ export class AlertPolicyServiceClient { matchProjectFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).project; } @@ -1947,7 +2052,7 @@ export class AlertPolicyServiceClient { matchNotificationChannelFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).notification_channel; } @@ -1960,9 +2065,9 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectServicePath(project: string, service: string) { - return this._pathTemplates.projectServicePathTemplate.render({ - project, - service, + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, }); } @@ -1974,7 +2079,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).project; } @@ -1987,7 +2092,7 @@ export class AlertPolicyServiceClient { * @returns {string} A string representing the service. */ matchServiceFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).service; } @@ -2005,10 +2110,10 @@ export class AlertPolicyServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( { - project, - service, + project: project, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2024,7 +2129,7 @@ export class AlertPolicyServiceClient { matchProjectFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).project; } @@ -2039,7 +2144,7 @@ export class AlertPolicyServiceClient { matchServiceFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service; } @@ -2054,7 +2159,7 @@ export class AlertPolicyServiceClient { matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2067,8 +2172,8 @@ export class AlertPolicyServiceClient { * @returns {string} Resource name string. */ projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ - project, + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, uptime_check_config: uptimeCheckConfig, }); } @@ -2083,7 +2188,7 @@ export class AlertPolicyServiceClient { matchProjectFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).project; } @@ -2098,7 +2203,7 @@ export class AlertPolicyServiceClient { matchUptimeCheckConfigFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).uptime_check_config; } diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index 80bfc5063d2..605c5c110df 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.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. @@ -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 './group_service_client_config.json'; const version = require('../../../package.json').version; @@ -51,9 +51,6 @@ const version = require('../../../package.json').version; * @memberof v3 */ export class GroupServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -61,6 +58,14 @@ export class GroupServiceClient { 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}; groupServiceStub?: Promise<{[name: string]: Function}>; /** @@ -152,13 +157,16 @@ export class GroupServiceClient { '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 = { folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), @@ -239,7 +247,7 @@ export class GroupServiceClient { // 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 = { listGroups: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -263,7 +271,7 @@ export class GroupServiceClient { // 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 = {}; } /** @@ -290,7 +298,7 @@ export class GroupServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.GroupService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.v3.GroupService, this._opts ) as Promise<{[method: string]: Function}>; @@ -305,14 +313,14 @@ export class GroupServiceClient { 'deleteGroup', 'listGroupMembers', ]; - for (const methodName of groupServiceStubMethods) { - const innerCallPromise = this.groupServiceStub.then( + const callPromise = this.groupServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -320,20 +328,14 @@ export class GroupServiceClient { ); 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.groupServiceStub; @@ -394,22 +396,30 @@ export class GroupServiceClient { // -- Service calls -- // ------------------- getGroup( - request: protosTypes.google.monitoring.v3.IGetGroupRequest, + request: protos.google.monitoring.v3.IGetGroupRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IGetGroupRequest | undefined, {} | undefined ] >; getGroup( - request: protosTypes.google.monitoring.v3.IGetGroupRequest, + request: protos.google.monitoring.v3.IGetGroupRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IGetGroupRequest | null | undefined, + {} | null | undefined + > + ): void; + getGroup( + request: protos.google.monitoring.v3.IGetGroupRequest, + callback: Callback< + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IGetGroupRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -428,23 +438,23 @@ export class GroupServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getGroup( - request: protosTypes.google.monitoring.v3.IGetGroupRequest, + request: protos.google.monitoring.v3.IGetGroupRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IGetGroupRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IGetGroupRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IGetGroupRequest | undefined, + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IGetGroupRequest | undefined, {} | undefined ] > | void { @@ -465,25 +475,33 @@ export class GroupServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getGroup(request, options, callback); + return this.innerApiCalls.getGroup(request, options, callback); } createGroup( - request: protosTypes.google.monitoring.v3.ICreateGroupRequest, + request: protos.google.monitoring.v3.ICreateGroupRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.ICreateGroupRequest | undefined, {} | undefined ] >; createGroup( - request: protosTypes.google.monitoring.v3.ICreateGroupRequest, + request: protos.google.monitoring.v3.ICreateGroupRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.ICreateGroupRequest | null | undefined, + {} | null | undefined + > + ): void; + createGroup( + request: protos.google.monitoring.v3.ICreateGroupRequest, + callback: Callback< + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.ICreateGroupRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -507,23 +525,23 @@ export class GroupServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createGroup( - request: protosTypes.google.monitoring.v3.ICreateGroupRequest, + request: protos.google.monitoring.v3.ICreateGroupRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.ICreateGroupRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.ICreateGroupRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.ICreateGroupRequest | undefined, + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.ICreateGroupRequest | undefined, {} | undefined ] > | void { @@ -544,25 +562,33 @@ export class GroupServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.createGroup(request, options, callback); + return this.innerApiCalls.createGroup(request, options, callback); } updateGroup( - request: protosTypes.google.monitoring.v3.IUpdateGroupRequest, + request: protos.google.monitoring.v3.IUpdateGroupRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IUpdateGroupRequest | undefined, {} | undefined ] >; updateGroup( - request: protosTypes.google.monitoring.v3.IUpdateGroupRequest, + request: protos.google.monitoring.v3.IUpdateGroupRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IUpdateGroupRequest | null | undefined, + {} | null | undefined + > + ): void; + updateGroup( + request: protos.google.monitoring.v3.IUpdateGroupRequest, + callback: Callback< + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IUpdateGroupRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -583,23 +609,23 @@ export class GroupServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateGroup( - request: protosTypes.google.monitoring.v3.IUpdateGroupRequest, + request: protos.google.monitoring.v3.IUpdateGroupRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IUpdateGroupRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IUpdateGroupRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IGroup, - protosTypes.google.monitoring.v3.IUpdateGroupRequest | undefined, + protos.google.monitoring.v3.IGroup, + protos.google.monitoring.v3.IUpdateGroupRequest | undefined, {} | undefined ] > | void { @@ -620,25 +646,33 @@ export class GroupServiceClient { 'group.name': request.group!.name || '', }); this.initialize(); - return this._innerApiCalls.updateGroup(request, options, callback); + return this.innerApiCalls.updateGroup(request, options, callback); } deleteGroup( - request: protosTypes.google.monitoring.v3.IDeleteGroupRequest, + request: protos.google.monitoring.v3.IDeleteGroupRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteGroupRequest | undefined, {} | undefined ] >; deleteGroup( - request: protosTypes.google.monitoring.v3.IDeleteGroupRequest, + request: protos.google.monitoring.v3.IDeleteGroupRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteGroupRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteGroup( + request: protos.google.monitoring.v3.IDeleteGroupRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteGroupRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -661,23 +695,23 @@ export class GroupServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteGroup( - request: protosTypes.google.monitoring.v3.IDeleteGroupRequest, + request: protos.google.monitoring.v3.IDeleteGroupRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteGroupRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteGroupRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteGroupRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteGroupRequest | undefined, {} | undefined ] > | void { @@ -698,26 +732,34 @@ export class GroupServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteGroup(request, options, callback); + return this.innerApiCalls.deleteGroup(request, options, callback); } listGroups( - request: protosTypes.google.monitoring.v3.IListGroupsRequest, + request: protos.google.monitoring.v3.IListGroupsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IGroup[], - protosTypes.google.monitoring.v3.IListGroupsRequest | null, - protosTypes.google.monitoring.v3.IListGroupsResponse + protos.google.monitoring.v3.IGroup[], + protos.google.monitoring.v3.IListGroupsRequest | null, + protos.google.monitoring.v3.IListGroupsResponse ] >; listGroups( - request: protosTypes.google.monitoring.v3.IListGroupsRequest, + request: protos.google.monitoring.v3.IListGroupsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.IGroup[], - protosTypes.google.monitoring.v3.IListGroupsRequest | null, - protosTypes.google.monitoring.v3.IListGroupsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListGroupsRequest, + protos.google.monitoring.v3.IListGroupsResponse | null | undefined, + protos.google.monitoring.v3.IGroup + > + ): void; + listGroups( + request: protos.google.monitoring.v3.IListGroupsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListGroupsRequest, + protos.google.monitoring.v3.IListGroupsResponse | null | undefined, + protos.google.monitoring.v3.IGroup > ): void; /** @@ -778,24 +820,24 @@ export class GroupServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listGroups( - request: protosTypes.google.monitoring.v3.IListGroupsRequest, + request: protos.google.monitoring.v3.IListGroupsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.IGroup[], - protosTypes.google.monitoring.v3.IListGroupsRequest | null, - protosTypes.google.monitoring.v3.IListGroupsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListGroupsRequest, + protos.google.monitoring.v3.IListGroupsResponse | null | undefined, + protos.google.monitoring.v3.IGroup >, - callback?: Callback< - protosTypes.google.monitoring.v3.IGroup[], - protosTypes.google.monitoring.v3.IListGroupsRequest | null, - protosTypes.google.monitoring.v3.IListGroupsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListGroupsRequest, + protos.google.monitoring.v3.IListGroupsResponse | null | undefined, + protos.google.monitoring.v3.IGroup > ): Promise< [ - protosTypes.google.monitoring.v3.IGroup[], - protosTypes.google.monitoring.v3.IListGroupsRequest | null, - protosTypes.google.monitoring.v3.IListGroupsResponse + protos.google.monitoring.v3.IGroup[], + protos.google.monitoring.v3.IListGroupsRequest | null, + protos.google.monitoring.v3.IListGroupsResponse ] > | void { request = request || {}; @@ -815,7 +857,7 @@ export class GroupServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listGroups(request, options, callback); + return this.innerApiCalls.listGroups(request, options, callback); } /** @@ -873,7 +915,7 @@ export class GroupServiceClient { * An object stream which emits an object representing [Group]{@link google.monitoring.v3.Group} on 'data' event. */ listGroupsStream( - request?: protosTypes.google.monitoring.v3.IListGroupsRequest, + request?: protos.google.monitoring.v3.IListGroupsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -887,29 +929,106 @@ export class GroupServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listGroups.createStream( - this._innerApiCalls.listGroups as gax.GaxCall, + return this.descriptors.page.listGroups.createStream( + this.innerApiCalls.listGroups as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listGroups}, 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.name + * Required. The project whose groups are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.childrenOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * @param {string} request.ancestorsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @param {string} request.descendantsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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. + */ + listGroupsAsync( + request?: protos.google.monitoring.v3.IListGroupsRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listGroups.asyncIterate( + this.innerApiCalls['listGroups'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listGroupMembers( - request: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + request: protos.google.monitoring.v3.IListGroupMembersRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMonitoredResource[], - protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, - protosTypes.google.monitoring.v3.IListGroupMembersResponse + protos.google.api.IMonitoredResource[], + protos.google.monitoring.v3.IListGroupMembersRequest | null, + protos.google.monitoring.v3.IListGroupMembersResponse ] >; listGroupMembers( - request: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + request: protos.google.monitoring.v3.IListGroupMembersRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.api.IMonitoredResource[], - protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, - protosTypes.google.monitoring.v3.IListGroupMembersResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListGroupMembersRequest, + protos.google.monitoring.v3.IListGroupMembersResponse | null | undefined, + protos.google.api.IMonitoredResource + > + ): void; + listGroupMembers( + request: protos.google.monitoring.v3.IListGroupMembersRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListGroupMembersRequest, + protos.google.monitoring.v3.IListGroupMembersResponse | null | undefined, + protos.google.api.IMonitoredResource > ): void; /** @@ -960,24 +1079,26 @@ export class GroupServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listGroupMembers( - request: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + request: protos.google.monitoring.v3.IListGroupMembersRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.api.IMonitoredResource[], - protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, - protosTypes.google.monitoring.v3.IListGroupMembersResponse + | PaginationCallback< + protos.google.monitoring.v3.IListGroupMembersRequest, + | protos.google.monitoring.v3.IListGroupMembersResponse + | null + | undefined, + protos.google.api.IMonitoredResource >, - callback?: Callback< - protosTypes.google.api.IMonitoredResource[], - protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, - protosTypes.google.monitoring.v3.IListGroupMembersResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListGroupMembersRequest, + protos.google.monitoring.v3.IListGroupMembersResponse | null | undefined, + protos.google.api.IMonitoredResource > ): Promise< [ - protosTypes.google.api.IMonitoredResource[], - protosTypes.google.monitoring.v3.IListGroupMembersRequest | null, - protosTypes.google.monitoring.v3.IListGroupMembersResponse + protos.google.api.IMonitoredResource[], + protos.google.monitoring.v3.IListGroupMembersRequest | null, + protos.google.monitoring.v3.IListGroupMembersResponse ] > | void { request = request || {}; @@ -997,7 +1118,7 @@ export class GroupServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listGroupMembers(request, options, callback); + return this.innerApiCalls.listGroupMembers(request, options, callback); } /** @@ -1045,7 +1166,7 @@ export class GroupServiceClient { * An object stream which emits an object representing [MonitoredResource]{@link google.api.MonitoredResource} on 'data' event. */ listGroupMembersStream( - request?: protosTypes.google.monitoring.v3.IListGroupMembersRequest, + request?: protos.google.monitoring.v3.IListGroupMembersRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1059,12 +1180,71 @@ export class GroupServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listGroupMembers.createStream( - this._innerApiCalls.listGroupMembers as gax.GaxCall, + return this.descriptors.page.listGroupMembers.createStream( + this.innerApiCalls.listGroupMembers as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listGroupMembers}, 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.name + * Required. The group whose members are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {string} request.filter + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * + * `resource.type = "gce_instance"` + * @param {google.monitoring.v3.TimeInterval} request.interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * @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. + */ + listGroupMembersAsync( + request?: protos.google.monitoring.v3.IListGroupMembersRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listGroupMembers.asyncIterate( + this.innerApiCalls['listGroupMembers'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1077,8 +1257,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ folderAlertPolicyPath(folder: string, alertPolicy: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, }); } @@ -1091,7 +1271,7 @@ export class GroupServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).folder; } @@ -1104,7 +1284,7 @@ export class GroupServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).alert_policy; } @@ -1122,10 +1302,10 @@ export class GroupServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1139,7 +1319,7 @@ export class GroupServiceClient { matchFolderFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).folder; } @@ -1154,7 +1334,7 @@ export class GroupServiceClient { matchAlertPolicyFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).alert_policy; } @@ -1169,7 +1349,7 @@ export class GroupServiceClient { matchConditionFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).condition; } @@ -1182,8 +1362,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ folderChannelDescriptorPath(folder: string, channelDescriptor: string) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, channel_descriptor: channelDescriptor, }); } @@ -1198,7 +1378,7 @@ export class GroupServiceClient { matchFolderFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).folder; } @@ -1213,7 +1393,7 @@ export class GroupServiceClient { matchChannelDescriptorFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).channel_descriptor; } @@ -1226,9 +1406,9 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ folderGroupPath(folder: string, group: string) { - return this._pathTemplates.folderGroupPathTemplate.render({ - folder, - group, + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, }); } @@ -1240,7 +1420,7 @@ export class GroupServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .folder; } @@ -1252,7 +1432,7 @@ export class GroupServiceClient { * @returns {string} A string representing the group. */ matchGroupFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .group; } @@ -1264,8 +1444,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ folderNotificationChannelPath(folder: string, notificationChannel: string) { - return this._pathTemplates.folderNotificationChannelPathTemplate.render({ - folder, + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, notification_channel: notificationChannel, }); } @@ -1280,7 +1460,7 @@ export class GroupServiceClient { matchFolderFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).folder; } @@ -1295,7 +1475,7 @@ export class GroupServiceClient { matchNotificationChannelFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).notification_channel; } @@ -1308,9 +1488,9 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ folderServicePath(folder: string, service: string) { - return this._pathTemplates.folderServicePathTemplate.render({ - folder, - service, + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, }); } @@ -1322,9 +1502,8 @@ export class GroupServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).folder; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; } /** @@ -1335,9 +1514,8 @@ export class GroupServiceClient { * @returns {string} A string representing the service. */ matchServiceFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).service; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; } /** @@ -1353,10 +1531,10 @@ export class GroupServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( { - folder, - service, + folder: folder, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1372,7 +1550,7 @@ export class GroupServiceClient { matchFolderFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).folder; } @@ -1387,7 +1565,7 @@ export class GroupServiceClient { matchServiceFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service; } @@ -1402,7 +1580,7 @@ export class GroupServiceClient { matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1415,8 +1593,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ - folder, + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, uptime_check_config: uptimeCheckConfig, }); } @@ -1431,7 +1609,7 @@ export class GroupServiceClient { matchFolderFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).folder; } @@ -1446,7 +1624,7 @@ export class GroupServiceClient { matchUptimeCheckConfigFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).uptime_check_config; } @@ -1459,8 +1637,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ organizationAlertPolicyPath(organization: string, alertPolicy: string) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ - organization, + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, alert_policy: alertPolicy, }); } @@ -1475,7 +1653,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).organization; } @@ -1490,7 +1668,7 @@ export class GroupServiceClient { matchAlertPolicyFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).alert_policy; } @@ -1508,11 +1686,11 @@ export class GroupServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( { - organization, + organization: organization, alert_policy: alertPolicy, - condition, + condition: condition, } ); } @@ -1527,7 +1705,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).organization; } @@ -1542,7 +1720,7 @@ export class GroupServiceClient { matchAlertPolicyFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).alert_policy; } @@ -1557,7 +1735,7 @@ export class GroupServiceClient { matchConditionFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).condition; } @@ -1573,12 +1751,10 @@ export class GroupServiceClient { organization: string, channelDescriptor: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( - { - organization, - channel_descriptor: channelDescriptor, - } - ); + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); } /** @@ -1591,7 +1767,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).organization; } @@ -1606,7 +1782,7 @@ export class GroupServiceClient { matchChannelDescriptorFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).channel_descriptor; } @@ -1619,9 +1795,9 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ organizationGroupPath(organization: string, group: string) { - return this._pathTemplates.organizationGroupPathTemplate.render({ - organization, - group, + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, }); } @@ -1633,7 +1809,7 @@ export class GroupServiceClient { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).organization; } @@ -1646,7 +1822,7 @@ export class GroupServiceClient { * @returns {string} A string representing the group. */ matchGroupFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).group; } @@ -1662,9 +1838,9 @@ export class GroupServiceClient { organization: string, notificationChannel: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( { - organization, + organization: organization, notification_channel: notificationChannel, } ); @@ -1680,7 +1856,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).organization; } @@ -1695,7 +1871,7 @@ export class GroupServiceClient { matchNotificationChannelFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).notification_channel; } @@ -1708,9 +1884,9 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ organizationServicePath(organization: string, service: string) { - return this._pathTemplates.organizationServicePathTemplate.render({ - organization, - service, + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, }); } @@ -1724,7 +1900,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationServiceName( organizationServiceName: string ) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).organization; } @@ -1737,7 +1913,7 @@ export class GroupServiceClient { * @returns {string} A string representing the service. */ matchServiceFromOrganizationServiceName(organizationServiceName: string) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).service; } @@ -1755,10 +1931,10 @@ export class GroupServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( { - organization, - service, + organization: organization, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1774,7 +1950,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).organization; } @@ -1789,7 +1965,7 @@ export class GroupServiceClient { matchServiceFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service; } @@ -1804,7 +1980,7 @@ export class GroupServiceClient { matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1820,12 +1996,10 @@ export class GroupServiceClient { organization: string, uptimeCheckConfig: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( - { - organization, - uptime_check_config: uptimeCheckConfig, - } - ); + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); } /** @@ -1838,7 +2012,7 @@ export class GroupServiceClient { matchOrganizationFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).organization; } @@ -1853,7 +2027,7 @@ export class GroupServiceClient { matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).uptime_check_config; } @@ -1865,8 +2039,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -1878,7 +2052,7 @@ export class GroupServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1889,8 +2063,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectAlertPolicyPath(project: string, alertPolicy: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, alert_policy: alertPolicy, }); } @@ -1903,7 +2077,7 @@ export class GroupServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).project; } @@ -1916,7 +2090,7 @@ export class GroupServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).alert_policy; } @@ -1934,10 +2108,10 @@ export class GroupServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1951,7 +2125,7 @@ export class GroupServiceClient { matchProjectFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).project; } @@ -1966,7 +2140,7 @@ export class GroupServiceClient { matchAlertPolicyFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).alert_policy; } @@ -1981,7 +2155,7 @@ export class GroupServiceClient { matchConditionFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).condition; } @@ -1994,8 +2168,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectChannelDescriptorPath(project: string, channelDescriptor: string) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, channel_descriptor: channelDescriptor, }); } @@ -2010,7 +2184,7 @@ export class GroupServiceClient { matchProjectFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).project; } @@ -2025,7 +2199,7 @@ export class GroupServiceClient { matchChannelDescriptorFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).channel_descriptor; } @@ -2038,9 +2212,9 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectGroupPath(project: string, group: string) { - return this._pathTemplates.projectGroupPathTemplate.render({ - project, - group, + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, }); } @@ -2052,7 +2226,7 @@ export class GroupServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .project; } @@ -2064,7 +2238,7 @@ export class GroupServiceClient { * @returns {string} A string representing the group. */ matchGroupFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .group; } @@ -2076,8 +2250,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectNotificationChannelPath(project: string, notificationChannel: string) { - return this._pathTemplates.projectNotificationChannelPathTemplate.render({ - project, + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, notification_channel: notificationChannel, }); } @@ -2092,7 +2266,7 @@ export class GroupServiceClient { matchProjectFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).project; } @@ -2107,7 +2281,7 @@ export class GroupServiceClient { matchNotificationChannelFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).notification_channel; } @@ -2120,9 +2294,9 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectServicePath(project: string, service: string) { - return this._pathTemplates.projectServicePathTemplate.render({ - project, - service, + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, }); } @@ -2134,7 +2308,7 @@ export class GroupServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).project; } @@ -2147,7 +2321,7 @@ export class GroupServiceClient { * @returns {string} A string representing the service. */ matchServiceFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).service; } @@ -2165,10 +2339,10 @@ export class GroupServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( { - project, - service, + project: project, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2184,7 +2358,7 @@ export class GroupServiceClient { matchProjectFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).project; } @@ -2199,7 +2373,7 @@ export class GroupServiceClient { matchServiceFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service; } @@ -2214,7 +2388,7 @@ export class GroupServiceClient { matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2227,8 +2401,8 @@ export class GroupServiceClient { * @returns {string} Resource name string. */ projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ - project, + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, uptime_check_config: uptimeCheckConfig, }); } @@ -2243,7 +2417,7 @@ export class GroupServiceClient { matchProjectFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).project; } @@ -2258,7 +2432,7 @@ export class GroupServiceClient { matchUptimeCheckConfigFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).uptime_check_config; } diff --git a/packages/google-cloud-monitoring/src/v3/index.ts b/packages/google-cloud-monitoring/src/v3/index.ts index 137839b9018..fe58a3d3a4a 100644 --- a/packages/google-cloud-monitoring/src/v3/index.ts +++ b/packages/google-cloud-monitoring/src/v3/index.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/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 44d265baa6e..9f161a1bffb 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.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. @@ -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 './metric_service_client_config.json'; const version = require('../../../package.json').version; @@ -41,9 +41,6 @@ const version = require('../../../package.json').version; * @memberof v3 */ export class MetricServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -51,6 +48,14 @@ export class MetricServiceClient { 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}; metricServiceStub?: Promise<{[name: string]: Function}>; /** @@ -142,13 +147,16 @@ export class MetricServiceClient { '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 = { folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), @@ -247,7 +255,7 @@ export class MetricServiceClient { // 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 = { listMonitoredResourceDescriptors: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -276,7 +284,7 @@ export class MetricServiceClient { // 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 = {}; } /** @@ -303,7 +311,7 @@ export class MetricServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.MetricService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.v3.MetricService, this._opts ) as Promise<{[method: string]: Function}>; @@ -320,14 +328,14 @@ export class MetricServiceClient { 'listTimeSeries', 'createTimeSeries', ]; - for (const methodName of metricServiceStubMethods) { - const innerCallPromise = this.metricServiceStub.then( + const callPromise = this.metricServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -335,20 +343,14 @@ export class MetricServiceClient { ); 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.metricServiceStub; @@ -410,26 +412,37 @@ export class MetricServiceClient { // -- Service calls -- // ------------------- getMonitoredResourceDescriptor( - request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMonitoredResourceDescriptor, + protos.google.api.IMonitoredResourceDescriptor, ( - | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest | undefined ), {} | undefined ] >; getMonitoredResourceDescriptor( - request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.api.IMonitoredResourceDescriptor, - | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + protos.google.api.IMonitoredResourceDescriptor, + | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getMonitoredResourceDescriptor( + request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + callback: Callback< + protos.google.api.IMonitoredResourceDescriptor, + | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -451,26 +464,28 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getMonitoredResourceDescriptor( - request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, + request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.api.IMonitoredResourceDescriptor, - | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + protos.google.api.IMonitoredResourceDescriptor, + | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.api.IMonitoredResourceDescriptor, - | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + protos.google.api.IMonitoredResourceDescriptor, + | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.api.IMonitoredResourceDescriptor, + protos.google.api.IMonitoredResourceDescriptor, ( - | protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest + | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest | undefined ), {} | undefined @@ -493,29 +508,41 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getMonitoredResourceDescriptor( + return this.innerApiCalls.getMonitoredResourceDescriptor( request, options, callback ); } getMetricDescriptor( - request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest, + request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMetricDescriptor, - protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, + protos.google.api.IMetricDescriptor, + protos.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, {} | undefined ] >; getMetricDescriptor( - request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest, + request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.api.IMetricDescriptor, - protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, - {} | undefined + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.IGetMetricDescriptorRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getMetricDescriptor( + request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, + callback: Callback< + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.IGetMetricDescriptorRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -537,24 +564,27 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getMetricDescriptor( - request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest, + request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.api.IMetricDescriptor, - | protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.IGetMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.api.IMetricDescriptor, - protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, - {} | undefined + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.IGetMetricDescriptorRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.api.IMetricDescriptor, - protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, + protos.google.api.IMetricDescriptor, + protos.google.monitoring.v3.IGetMetricDescriptorRequest | undefined, {} | undefined ] > | void { @@ -575,29 +605,37 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getMetricDescriptor(request, options, callback); + return this.innerApiCalls.getMetricDescriptor(request, options, callback); } createMetricDescriptor( - request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest, + request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMetricDescriptor, - ( - | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest - | undefined - ), + protos.google.api.IMetricDescriptor, + protos.google.monitoring.v3.ICreateMetricDescriptorRequest | undefined, {} | undefined ] >; createMetricDescriptor( - request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest, + request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.api.IMetricDescriptor, - | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.ICreateMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createMetricDescriptor( + request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, + callback: Callback< + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.ICreateMetricDescriptorRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -621,28 +659,27 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createMetricDescriptor( - request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest, + request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.api.IMetricDescriptor, - | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.ICreateMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.api.IMetricDescriptor, - | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest + protos.google.api.IMetricDescriptor, + | protos.google.monitoring.v3.ICreateMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.api.IMetricDescriptor, - ( - | protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest - | undefined - ), + protos.google.api.IMetricDescriptor, + protos.google.monitoring.v3.ICreateMetricDescriptorRequest | undefined, {} | undefined ] > | void { @@ -663,33 +700,41 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.createMetricDescriptor( + return this.innerApiCalls.createMetricDescriptor( request, options, callback ); } deleteMetricDescriptor( - request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest, + request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteMetricDescriptorRequest | undefined, {} | undefined ] >; deleteMetricDescriptor( - request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest, + request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteMetricDescriptor( + request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteMetricDescriptorRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -713,28 +758,27 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteMetricDescriptor( - request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest, + request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteMetricDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteMetricDescriptorRequest | undefined, {} | undefined ] > | void { @@ -755,29 +799,37 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteMetricDescriptor( + return this.innerApiCalls.deleteMetricDescriptor( request, options, callback ); } createTimeSeries( - request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest, + request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, {} | undefined ] >; createTimeSeries( - request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest, + request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.ICreateTimeSeriesRequest | null | undefined, + {} | null | undefined + > + ): void; + createTimeSeries( + request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.ICreateTimeSeriesRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -807,23 +859,25 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createTimeSeries( - request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest, + request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.ICreateTimeSeriesRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.ICreateTimeSeriesRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.ICreateTimeSeriesRequest | undefined, {} | undefined ] > | void { @@ -844,26 +898,38 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.createTimeSeries(request, options, callback); + return this.innerApiCalls.createTimeSeries(request, options, callback); } listMonitoredResourceDescriptors( - request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + protos.google.api.IMonitoredResourceDescriptor[], + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse ] >; listMonitoredResourceDescriptors( - request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + | protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor + > + ): void; + listMonitoredResourceDescriptors( + request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + | protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor > ): void; /** @@ -907,24 +973,28 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listMonitoredResourceDescriptors( - request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + | protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor >, - callback?: Callback< - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + | protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + | null + | undefined, + protos.google.api.IMonitoredResourceDescriptor > ): Promise< [ - protosTypes.google.api.IMonitoredResourceDescriptor[], - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse + protos.google.api.IMonitoredResourceDescriptor[], + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest | null, + protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse ] > | void { request = request || {}; @@ -944,7 +1014,7 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listMonitoredResourceDescriptors( + return this.innerApiCalls.listMonitoredResourceDescriptors( request, options, callback @@ -989,7 +1059,7 @@ export class MetricServiceClient { * An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event. */ listMonitoredResourceDescriptorsStream( - request?: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + request?: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1003,29 +1073,93 @@ export class MetricServiceClient { }); 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 {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label:id + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, + 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({ + name: request.name || '', + }); + 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; + } listMetricDescriptors( - request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.api.IMetricDescriptor[], - protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + protos.google.api.IMetricDescriptor[], + protos.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protos.google.monitoring.v3.IListMetricDescriptorsResponse ] >; listMetricDescriptors( - request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.api.IMetricDescriptor[], - protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListMetricDescriptorsRequest, + | protos.google.monitoring.v3.IListMetricDescriptorsResponse + | null + | undefined, + protos.google.api.IMetricDescriptor + > + ): void; + listMetricDescriptors( + request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListMetricDescriptorsRequest, + | protos.google.monitoring.v3.IListMetricDescriptorsResponse + | null + | undefined, + protos.google.api.IMetricDescriptor > ): void; /** @@ -1071,24 +1205,28 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listMetricDescriptors( - request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.api.IMetricDescriptor[], - protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListMetricDescriptorsRequest, + | protos.google.monitoring.v3.IListMetricDescriptorsResponse + | null + | undefined, + protos.google.api.IMetricDescriptor >, - callback?: Callback< - protosTypes.google.api.IMetricDescriptor[], - protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListMetricDescriptorsRequest, + | protos.google.monitoring.v3.IListMetricDescriptorsResponse + | null + | undefined, + protos.google.api.IMetricDescriptor > ): Promise< [ - protosTypes.google.api.IMetricDescriptor[], - protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListMetricDescriptorsResponse + protos.google.api.IMetricDescriptor[], + protos.google.monitoring.v3.IListMetricDescriptorsRequest | null, + protos.google.monitoring.v3.IListMetricDescriptorsResponse ] > | void { request = request || {}; @@ -1108,11 +1246,7 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listMetricDescriptors( - request, - options, - callback - ); + return this.innerApiCalls.listMetricDescriptors(request, options, callback); } /** @@ -1155,7 +1289,7 @@ export class MetricServiceClient { * An object stream which emits an object representing [MetricDescriptor]{@link google.api.MetricDescriptor} on 'data' event. */ listMetricDescriptorsStream( - request?: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest, + request?: protos.google.monitoring.v3.IListMetricDescriptorsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1169,29 +1303,91 @@ export class MetricServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listMetricDescriptors.createStream( - this._innerApiCalls.listMetricDescriptors as gax.GaxCall, + return this.descriptors.page.listMetricDescriptors.createStream( + this.innerApiCalls.listMetricDescriptors as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listMetricDescriptors}, 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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. + */ + listMetricDescriptorsAsync( + request?: protos.google.monitoring.v3.IListMetricDescriptorsRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listMetricDescriptors.asyncIterate( + this.innerApiCalls['listMetricDescriptors'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listTimeSeries( - request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + request: protos.google.monitoring.v3.IListTimeSeriesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.ITimeSeries[], - protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, - protosTypes.google.monitoring.v3.IListTimeSeriesResponse + protos.google.monitoring.v3.ITimeSeries[], + protos.google.monitoring.v3.IListTimeSeriesRequest | null, + protos.google.monitoring.v3.IListTimeSeriesResponse ] >; listTimeSeries( - request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + request: protos.google.monitoring.v3.IListTimeSeriesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.ITimeSeries[], - protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, - protosTypes.google.monitoring.v3.IListTimeSeriesResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListTimeSeriesRequest, + protos.google.monitoring.v3.IListTimeSeriesResponse | null | undefined, + protos.google.monitoring.v3.ITimeSeries + > + ): void; + listTimeSeries( + request: protos.google.monitoring.v3.IListTimeSeriesRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListTimeSeriesRequest, + protos.google.monitoring.v3.IListTimeSeriesResponse | null | undefined, + protos.google.monitoring.v3.ITimeSeries > ): void; /** @@ -1255,24 +1451,26 @@ export class MetricServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listTimeSeries( - request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + request: protos.google.monitoring.v3.IListTimeSeriesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.ITimeSeries[], - protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, - protosTypes.google.monitoring.v3.IListTimeSeriesResponse + | PaginationCallback< + protos.google.monitoring.v3.IListTimeSeriesRequest, + | protos.google.monitoring.v3.IListTimeSeriesResponse + | null + | undefined, + protos.google.monitoring.v3.ITimeSeries >, - callback?: Callback< - protosTypes.google.monitoring.v3.ITimeSeries[], - protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, - protosTypes.google.monitoring.v3.IListTimeSeriesResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListTimeSeriesRequest, + protos.google.monitoring.v3.IListTimeSeriesResponse | null | undefined, + protos.google.monitoring.v3.ITimeSeries > ): Promise< [ - protosTypes.google.monitoring.v3.ITimeSeries[], - protosTypes.google.monitoring.v3.IListTimeSeriesRequest | null, - protosTypes.google.monitoring.v3.IListTimeSeriesResponse + protos.google.monitoring.v3.ITimeSeries[], + protos.google.monitoring.v3.IListTimeSeriesRequest | null, + protos.google.monitoring.v3.IListTimeSeriesResponse ] > | void { request = request || {}; @@ -1292,7 +1490,7 @@ export class MetricServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listTimeSeries(request, options, callback); + return this.innerApiCalls.listTimeSeries(request, options, callback); } /** @@ -1353,7 +1551,7 @@ export class MetricServiceClient { * An object stream which emits an object representing [TimeSeries]{@link google.monitoring.v3.TimeSeries} on 'data' event. */ listTimeSeriesStream( - request?: protosTypes.google.monitoring.v3.IListTimeSeriesRequest, + request?: protos.google.monitoring.v3.IListTimeSeriesRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1367,12 +1565,84 @@ export class MetricServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listTimeSeries.createStream( - this._innerApiCalls.listTimeSeries as gax.GaxCall, + return this.descriptors.page.listTimeSeries.createStream( + this.innerApiCalls.listTimeSeries as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listTimeSeries}, 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.filter + * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * that specifies which time series should be returned. The filter must + * specify a single metric type, and can additionally specify metric labels + * and other information. For example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * @param {google.monitoring.v3.TimeInterval} request.interval + * Required. The time interval for which results should be returned. Only time series + * that contain data points in the specified interval are included + * in the response. + * @param {google.monitoring.v3.Aggregation} request.aggregation + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * @param {string} request.orderBy + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * @param {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} request.view + * Required. Specifies which information is returned about the time series. + * @param {number} request.pageSize + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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. + */ + listTimeSeriesAsync( + request?: protos.google.monitoring.v3.IListTimeSeriesRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listTimeSeries.asyncIterate( + this.innerApiCalls['listTimeSeries'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1385,8 +1655,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderAlertPolicyPath(folder: string, alertPolicy: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, }); } @@ -1399,7 +1669,7 @@ export class MetricServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).folder; } @@ -1412,7 +1682,7 @@ export class MetricServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).alert_policy; } @@ -1430,10 +1700,10 @@ export class MetricServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1447,7 +1717,7 @@ export class MetricServiceClient { matchFolderFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).folder; } @@ -1462,7 +1732,7 @@ export class MetricServiceClient { matchAlertPolicyFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).alert_policy; } @@ -1477,7 +1747,7 @@ export class MetricServiceClient { matchConditionFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).condition; } @@ -1490,8 +1760,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderChannelDescriptorPath(folder: string, channelDescriptor: string) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, channel_descriptor: channelDescriptor, }); } @@ -1506,7 +1776,7 @@ export class MetricServiceClient { matchFolderFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).folder; } @@ -1521,7 +1791,7 @@ export class MetricServiceClient { matchChannelDescriptorFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).channel_descriptor; } @@ -1534,9 +1804,9 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderGroupPath(folder: string, group: string) { - return this._pathTemplates.folderGroupPathTemplate.render({ - folder, - group, + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, }); } @@ -1548,7 +1818,7 @@ export class MetricServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .folder; } @@ -1560,7 +1830,7 @@ export class MetricServiceClient { * @returns {string} A string representing the group. */ matchGroupFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .group; } @@ -1572,8 +1842,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderMetricDescriptorPath(folder: string, metricDescriptor: string) { - return this._pathTemplates.folderMetricDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderMetricDescriptorPathTemplate.render({ + folder: folder, metric_descriptor: metricDescriptor, }); } @@ -1588,7 +1858,7 @@ export class MetricServiceClient { matchFolderFromFolderMetricDescriptorName( folderMetricDescriptorName: string ) { - return this._pathTemplates.folderMetricDescriptorPathTemplate.match( + return this.pathTemplates.folderMetricDescriptorPathTemplate.match( folderMetricDescriptorName ).folder; } @@ -1603,7 +1873,7 @@ export class MetricServiceClient { matchMetricDescriptorFromFolderMetricDescriptorName( folderMetricDescriptorName: string ) { - return this._pathTemplates.folderMetricDescriptorPathTemplate.match( + return this.pathTemplates.folderMetricDescriptorPathTemplate.match( folderMetricDescriptorName ).metric_descriptor; } @@ -1619,9 +1889,9 @@ export class MetricServiceClient { folder: string, monitoredResourceDescriptor: string ) { - return this._pathTemplates.folderMonitoredResourceDescriptorPathTemplate.render( + return this.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.render( { - folder, + folder: folder, monitored_resource_descriptor: monitoredResourceDescriptor, } ); @@ -1637,7 +1907,7 @@ export class MetricServiceClient { matchFolderFromFolderMonitoredResourceDescriptorName( folderMonitoredResourceDescriptorName: string ) { - return this._pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match( + return this.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match( folderMonitoredResourceDescriptorName ).folder; } @@ -1652,7 +1922,7 @@ export class MetricServiceClient { matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName( folderMonitoredResourceDescriptorName: string ) { - return this._pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match( + return this.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match( folderMonitoredResourceDescriptorName ).monitored_resource_descriptor; } @@ -1665,8 +1935,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderNotificationChannelPath(folder: string, notificationChannel: string) { - return this._pathTemplates.folderNotificationChannelPathTemplate.render({ - folder, + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, notification_channel: notificationChannel, }); } @@ -1681,7 +1951,7 @@ export class MetricServiceClient { matchFolderFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).folder; } @@ -1696,7 +1966,7 @@ export class MetricServiceClient { matchNotificationChannelFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).notification_channel; } @@ -1709,9 +1979,9 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderServicePath(folder: string, service: string) { - return this._pathTemplates.folderServicePathTemplate.render({ - folder, - service, + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, }); } @@ -1723,9 +1993,8 @@ export class MetricServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).folder; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; } /** @@ -1736,9 +2005,8 @@ export class MetricServiceClient { * @returns {string} A string representing the service. */ matchServiceFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).service; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; } /** @@ -1754,10 +2022,10 @@ export class MetricServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( { - folder, - service, + folder: folder, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1773,7 +2041,7 @@ export class MetricServiceClient { matchFolderFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).folder; } @@ -1788,7 +2056,7 @@ export class MetricServiceClient { matchServiceFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service; } @@ -1803,7 +2071,7 @@ export class MetricServiceClient { matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1816,8 +2084,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ - folder, + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, uptime_check_config: uptimeCheckConfig, }); } @@ -1832,7 +2100,7 @@ export class MetricServiceClient { matchFolderFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).folder; } @@ -1847,7 +2115,7 @@ export class MetricServiceClient { matchUptimeCheckConfigFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).uptime_check_config; } @@ -1860,8 +2128,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ organizationAlertPolicyPath(organization: string, alertPolicy: string) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ - organization, + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, alert_policy: alertPolicy, }); } @@ -1876,7 +2144,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).organization; } @@ -1891,7 +2159,7 @@ export class MetricServiceClient { matchAlertPolicyFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).alert_policy; } @@ -1909,11 +2177,11 @@ export class MetricServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( { - organization, + organization: organization, alert_policy: alertPolicy, - condition, + condition: condition, } ); } @@ -1928,7 +2196,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).organization; } @@ -1943,7 +2211,7 @@ export class MetricServiceClient { matchAlertPolicyFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).alert_policy; } @@ -1958,7 +2226,7 @@ export class MetricServiceClient { matchConditionFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).condition; } @@ -1974,12 +2242,10 @@ export class MetricServiceClient { organization: string, channelDescriptor: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( - { - organization, - channel_descriptor: channelDescriptor, - } - ); + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); } /** @@ -1992,7 +2258,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).organization; } @@ -2007,7 +2273,7 @@ export class MetricServiceClient { matchChannelDescriptorFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).channel_descriptor; } @@ -2020,9 +2286,9 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ organizationGroupPath(organization: string, group: string) { - return this._pathTemplates.organizationGroupPathTemplate.render({ - organization, - group, + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, }); } @@ -2034,7 +2300,7 @@ export class MetricServiceClient { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).organization; } @@ -2047,7 +2313,7 @@ export class MetricServiceClient { * @returns {string} A string representing the group. */ matchGroupFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).group; } @@ -2063,8 +2329,8 @@ export class MetricServiceClient { organization: string, metricDescriptor: string ) { - return this._pathTemplates.organizationMetricDescriptorPathTemplate.render({ - organization, + return this.pathTemplates.organizationMetricDescriptorPathTemplate.render({ + organization: organization, metric_descriptor: metricDescriptor, }); } @@ -2079,7 +2345,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationMetricDescriptorName( organizationMetricDescriptorName: string ) { - return this._pathTemplates.organizationMetricDescriptorPathTemplate.match( + return this.pathTemplates.organizationMetricDescriptorPathTemplate.match( organizationMetricDescriptorName ).organization; } @@ -2094,7 +2360,7 @@ export class MetricServiceClient { matchMetricDescriptorFromOrganizationMetricDescriptorName( organizationMetricDescriptorName: string ) { - return this._pathTemplates.organizationMetricDescriptorPathTemplate.match( + return this.pathTemplates.organizationMetricDescriptorPathTemplate.match( organizationMetricDescriptorName ).metric_descriptor; } @@ -2110,9 +2376,9 @@ export class MetricServiceClient { organization: string, monitoredResourceDescriptor: string ) { - return this._pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.render( + return this.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.render( { - organization, + organization: organization, monitored_resource_descriptor: monitoredResourceDescriptor, } ); @@ -2128,7 +2394,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationMonitoredResourceDescriptorName( organizationMonitoredResourceDescriptorName: string ) { - return this._pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match( + return this.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match( organizationMonitoredResourceDescriptorName ).organization; } @@ -2143,7 +2409,7 @@ export class MetricServiceClient { matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName( organizationMonitoredResourceDescriptorName: string ) { - return this._pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match( + return this.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match( organizationMonitoredResourceDescriptorName ).monitored_resource_descriptor; } @@ -2159,9 +2425,9 @@ export class MetricServiceClient { organization: string, notificationChannel: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( { - organization, + organization: organization, notification_channel: notificationChannel, } ); @@ -2177,7 +2443,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).organization; } @@ -2192,7 +2458,7 @@ export class MetricServiceClient { matchNotificationChannelFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).notification_channel; } @@ -2205,9 +2471,9 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ organizationServicePath(organization: string, service: string) { - return this._pathTemplates.organizationServicePathTemplate.render({ - organization, - service, + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, }); } @@ -2221,7 +2487,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationServiceName( organizationServiceName: string ) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).organization; } @@ -2234,7 +2500,7 @@ export class MetricServiceClient { * @returns {string} A string representing the service. */ matchServiceFromOrganizationServiceName(organizationServiceName: string) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).service; } @@ -2252,10 +2518,10 @@ export class MetricServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( { - organization, - service, + organization: organization, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2271,7 +2537,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).organization; } @@ -2286,7 +2552,7 @@ export class MetricServiceClient { matchServiceFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service; } @@ -2301,7 +2567,7 @@ export class MetricServiceClient { matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2317,12 +2583,10 @@ export class MetricServiceClient { organization: string, uptimeCheckConfig: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( - { - organization, - uptime_check_config: uptimeCheckConfig, - } - ); + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); } /** @@ -2335,7 +2599,7 @@ export class MetricServiceClient { matchOrganizationFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).organization; } @@ -2350,7 +2614,7 @@ export class MetricServiceClient { matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).uptime_check_config; } @@ -2362,8 +2626,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -2375,7 +2639,7 @@ export class MetricServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -2386,8 +2650,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectAlertPolicyPath(project: string, alertPolicy: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, alert_policy: alertPolicy, }); } @@ -2400,7 +2664,7 @@ export class MetricServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).project; } @@ -2413,7 +2677,7 @@ export class MetricServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).alert_policy; } @@ -2431,10 +2695,10 @@ export class MetricServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -2448,7 +2712,7 @@ export class MetricServiceClient { matchProjectFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).project; } @@ -2463,7 +2727,7 @@ export class MetricServiceClient { matchAlertPolicyFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).alert_policy; } @@ -2478,7 +2742,7 @@ export class MetricServiceClient { matchConditionFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).condition; } @@ -2491,8 +2755,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectChannelDescriptorPath(project: string, channelDescriptor: string) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, channel_descriptor: channelDescriptor, }); } @@ -2507,7 +2771,7 @@ export class MetricServiceClient { matchProjectFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).project; } @@ -2522,7 +2786,7 @@ export class MetricServiceClient { matchChannelDescriptorFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).channel_descriptor; } @@ -2535,9 +2799,9 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectGroupPath(project: string, group: string) { - return this._pathTemplates.projectGroupPathTemplate.render({ - project, - group, + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, }); } @@ -2549,7 +2813,7 @@ export class MetricServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .project; } @@ -2561,7 +2825,7 @@ export class MetricServiceClient { * @returns {string} A string representing the group. */ matchGroupFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .group; } @@ -2573,8 +2837,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectMetricDescriptorPath(project: string, metricDescriptor: string) { - return this._pathTemplates.projectMetricDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectMetricDescriptorPathTemplate.render({ + project: project, metric_descriptor: metricDescriptor, }); } @@ -2589,7 +2853,7 @@ export class MetricServiceClient { matchProjectFromProjectMetricDescriptorName( projectMetricDescriptorName: string ) { - return this._pathTemplates.projectMetricDescriptorPathTemplate.match( + return this.pathTemplates.projectMetricDescriptorPathTemplate.match( projectMetricDescriptorName ).project; } @@ -2604,7 +2868,7 @@ export class MetricServiceClient { matchMetricDescriptorFromProjectMetricDescriptorName( projectMetricDescriptorName: string ) { - return this._pathTemplates.projectMetricDescriptorPathTemplate.match( + return this.pathTemplates.projectMetricDescriptorPathTemplate.match( projectMetricDescriptorName ).metric_descriptor; } @@ -2620,9 +2884,9 @@ export class MetricServiceClient { project: string, monitoredResourceDescriptor: string ) { - return this._pathTemplates.projectMonitoredResourceDescriptorPathTemplate.render( + return this.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.render( { - project, + project: project, monitored_resource_descriptor: monitoredResourceDescriptor, } ); @@ -2638,7 +2902,7 @@ export class MetricServiceClient { matchProjectFromProjectMonitoredResourceDescriptorName( projectMonitoredResourceDescriptorName: string ) { - return this._pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match( + return this.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match( projectMonitoredResourceDescriptorName ).project; } @@ -2653,7 +2917,7 @@ export class MetricServiceClient { matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName( projectMonitoredResourceDescriptorName: string ) { - return this._pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match( + return this.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match( projectMonitoredResourceDescriptorName ).monitored_resource_descriptor; } @@ -2666,8 +2930,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectNotificationChannelPath(project: string, notificationChannel: string) { - return this._pathTemplates.projectNotificationChannelPathTemplate.render({ - project, + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, notification_channel: notificationChannel, }); } @@ -2682,7 +2946,7 @@ export class MetricServiceClient { matchProjectFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).project; } @@ -2697,7 +2961,7 @@ export class MetricServiceClient { matchNotificationChannelFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).notification_channel; } @@ -2710,9 +2974,9 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectServicePath(project: string, service: string) { - return this._pathTemplates.projectServicePathTemplate.render({ - project, - service, + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, }); } @@ -2724,7 +2988,7 @@ export class MetricServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).project; } @@ -2737,7 +3001,7 @@ export class MetricServiceClient { * @returns {string} A string representing the service. */ matchServiceFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).service; } @@ -2755,10 +3019,10 @@ export class MetricServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( { - project, - service, + project: project, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2774,7 +3038,7 @@ export class MetricServiceClient { matchProjectFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).project; } @@ -2789,7 +3053,7 @@ export class MetricServiceClient { matchServiceFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service; } @@ -2804,7 +3068,7 @@ export class MetricServiceClient { matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2817,8 +3081,8 @@ export class MetricServiceClient { * @returns {string} Resource name string. */ projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ - project, + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, uptime_check_config: uptimeCheckConfig, }); } @@ -2833,7 +3097,7 @@ export class MetricServiceClient { matchProjectFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).project; } @@ -2848,7 +3112,7 @@ export class MetricServiceClient { matchUptimeCheckConfigFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).uptime_check_config; } diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index 5716c3f5b03..52ec8bc9f21 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.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. @@ -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 './notification_channel_service_client_config.json'; const version = require('../../../package.json').version; @@ -41,9 +41,6 @@ const version = require('../../../package.json').version; * @memberof v3 */ export class NotificationChannelServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -51,6 +48,14 @@ export class NotificationChannelServiceClient { 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}; notificationChannelServiceStub?: Promise<{[name: string]: Function}>; /** @@ -144,13 +149,16 @@ export class NotificationChannelServiceClient { '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 = { folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), @@ -231,7 +239,7 @@ export class NotificationChannelServiceClient { // 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 = { listNotificationChannelDescriptors: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -255,7 +263,7 @@ export class NotificationChannelServiceClient { // 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 = {}; } /** @@ -282,7 +290,7 @@ export class NotificationChannelServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.NotificationChannelService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.v3.NotificationChannelService, this._opts ) as Promise<{[method: string]: Function}>; @@ -301,14 +309,14 @@ export class NotificationChannelServiceClient { 'getNotificationChannelVerificationCode', 'verifyNotificationChannel', ]; - for (const methodName of notificationChannelServiceStubMethods) { - const innerCallPromise = this.notificationChannelServiceStub.then( + const callPromise = this.notificationChannelServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -316,20 +324,14 @@ export class NotificationChannelServiceClient { ); 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.notificationChannelServiceStub; @@ -390,26 +392,37 @@ export class NotificationChannelServiceClient { // -- Service calls -- // ------------------- getNotificationChannelDescriptor( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + protos.google.monitoring.v3.INotificationChannelDescriptor, ( - | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest | undefined ), {} | undefined ] >; getNotificationChannelDescriptor( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannelDescriptor, - | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + protos.google.monitoring.v3.INotificationChannelDescriptor, + | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getNotificationChannelDescriptor( + request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + callback: Callback< + protos.google.monitoring.v3.INotificationChannelDescriptor, + | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -429,26 +442,28 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getNotificationChannelDescriptor( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.INotificationChannelDescriptor, - | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + protos.google.monitoring.v3.INotificationChannelDescriptor, + | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannelDescriptor, - | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + protos.google.monitoring.v3.INotificationChannelDescriptor, + | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannelDescriptor, + protos.google.monitoring.v3.INotificationChannelDescriptor, ( - | protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest + | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest | undefined ), {} | undefined @@ -471,33 +486,41 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getNotificationChannelDescriptor( + return this.innerApiCalls.getNotificationChannelDescriptor( request, options, callback ); } getNotificationChannel( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.IGetNotificationChannelRequest | undefined, {} | undefined ] >; getNotificationChannel( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IGetNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getNotificationChannel( + request: protos.google.monitoring.v3.IGetNotificationChannelRequest, + callback: Callback< + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IGetNotificationChannelRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -520,28 +543,27 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getNotificationChannel( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IGetNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IGetNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.IGetNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.IGetNotificationChannelRequest | undefined, {} | undefined ] > | void { @@ -562,33 +584,41 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getNotificationChannel( + return this.innerApiCalls.getNotificationChannel( request, options, callback ); } createNotificationChannel( - request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest, + request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.ICreateNotificationChannelRequest | undefined, {} | undefined ] >; createNotificationChannel( - request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest, + request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.ICreateNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createNotificationChannel( + request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, + callback: Callback< + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.ICreateNotificationChannelRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -615,28 +645,27 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createNotificationChannel( - request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest, + request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.ICreateNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.ICreateNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.ICreateNotificationChannelRequest | undefined, {} | undefined ] > | void { @@ -657,33 +686,41 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.createNotificationChannel( + return this.innerApiCalls.createNotificationChannel( request, options, callback ); } updateNotificationChannel( - request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest, + request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.IUpdateNotificationChannelRequest | undefined, {} | undefined ] >; updateNotificationChannel( - request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest, + request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IUpdateNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + updateNotificationChannel( + request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, + callback: Callback< + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IUpdateNotificationChannelRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -706,28 +743,27 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateNotificationChannel( - request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest, + request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IUpdateNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IUpdateNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.IUpdateNotificationChannelRequest | undefined, {} | undefined ] > | void { @@ -748,33 +784,41 @@ export class NotificationChannelServiceClient { 'notification_channel.name': request.notificationChannel!.name || '', }); this.initialize(); - return this._innerApiCalls.updateNotificationChannel( + return this.innerApiCalls.updateNotificationChannel( request, options, callback ); } deleteNotificationChannel( - request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest, + request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteNotificationChannelRequest | undefined, {} | undefined ] >; deleteNotificationChannel( - request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest, + request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteNotificationChannel( + request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteNotificationChannelRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -798,28 +842,27 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteNotificationChannel( - request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest, + request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteNotificationChannelRequest | undefined, {} | undefined ] > | void { @@ -840,33 +883,44 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteNotificationChannel( + return this.innerApiCalls.deleteNotificationChannel( request, options, callback ); } sendNotificationChannelVerificationCode( - request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, + protos.google.protobuf.IEmpty, ( - | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest | undefined ), {} | undefined ] >; sendNotificationChannelVerificationCode( - request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + sendNotificationChannelVerificationCode( + request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -884,26 +938,28 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ sendNotificationChannelVerificationCode( - request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, + request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, + protos.google.protobuf.IEmpty, ( - | protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest + | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest | undefined ), {} | undefined @@ -926,33 +982,44 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.sendNotificationChannelVerificationCode( + return this.innerApiCalls.sendNotificationChannelVerificationCode( request, options, callback ); } getNotificationChannelVerificationCode( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, ( - | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest | undefined ), {} | undefined ] >; getNotificationChannelVerificationCode( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, - | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getNotificationChannelVerificationCode( + request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + callback: Callback< + protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1001,26 +1068,28 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getNotificationChannelVerificationCode( - request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, + request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, - | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, - | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, + protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, ( - | protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest + | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest | undefined ), {} | undefined @@ -1043,33 +1112,41 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getNotificationChannelVerificationCode( + return this.innerApiCalls.getNotificationChannelVerificationCode( request, options, callback ); } verifyNotificationChannel( - request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest, + request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.IVerifyNotificationChannelRequest | undefined, {} | undefined ] >; verifyNotificationChannel( - request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest, + request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IVerifyNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + verifyNotificationChannel( + request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, + callback: Callback< + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IVerifyNotificationChannelRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1096,28 +1173,27 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ verifyNotificationChannel( - request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest, + request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IVerifyNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannel, - | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest + protos.google.monitoring.v3.INotificationChannel, + | protos.google.monitoring.v3.IVerifyNotificationChannelRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel, - ( - | protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest - | undefined - ), + protos.google.monitoring.v3.INotificationChannel, + protos.google.monitoring.v3.IVerifyNotificationChannelRequest | undefined, {} | undefined ] > | void { @@ -1138,7 +1214,7 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.verifyNotificationChannel( + return this.innerApiCalls.verifyNotificationChannel( request, options, callback @@ -1146,22 +1222,34 @@ export class NotificationChannelServiceClient { } listNotificationChannelDescriptors( - request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + protos.google.monitoring.v3.INotificationChannelDescriptor[], + protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse ] >; listNotificationChannelDescriptors( - request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + | protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannelDescriptor + > + ): void; + listNotificationChannelDescriptors( + request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + | protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannelDescriptor > ): void; /** @@ -1207,24 +1295,28 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listNotificationChannelDescriptors( - request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + | protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannelDescriptor >, - callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + | protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannelDescriptor > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannelDescriptor[], - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsResponse + protos.google.monitoring.v3.INotificationChannelDescriptor[], + protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null, + protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse ] > | void { request = request || {}; @@ -1244,7 +1336,7 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listNotificationChannelDescriptors( + return this.innerApiCalls.listNotificationChannelDescriptors( request, options, callback @@ -1290,7 +1382,7 @@ export class NotificationChannelServiceClient { * An object stream which emits an object representing [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} on 'data' event. */ listNotificationChannelDescriptorsStream( - request?: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1304,29 +1396,96 @@ export class NotificationChannelServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listNotificationChannelDescriptors.createStream( - this._innerApiCalls.listNotificationChannelDescriptors as gax.GaxCall, + return this.descriptors.page.listNotificationChannelDescriptors.createStream( + this.innerApiCalls.listNotificationChannelDescriptors as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listNotificationChannelDescriptors}, 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.name + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this names the parent container in which to look for the + * descriptors; to retrieve a single descriptor by name, use the + * {@link google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor|GetNotificationChannelDescriptor} + * operation, instead. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @param {string} request.pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * @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. + */ + listNotificationChannelDescriptorsAsync( + request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listNotificationChannelDescriptors.asyncIterate( + this.innerApiCalls['listNotificationChannelDescriptors'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.monitoring.v3.INotificationChannelDescriptor + >; + } listNotificationChannels( - request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + request: protos.google.monitoring.v3.IListNotificationChannelsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel[], - protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + protos.google.monitoring.v3.INotificationChannel[], + protos.google.monitoring.v3.IListNotificationChannelsRequest | null, + protos.google.monitoring.v3.IListNotificationChannelsResponse ] >; listNotificationChannels( - request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + request: protos.google.monitoring.v3.IListNotificationChannelsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.INotificationChannel[], - protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelsRequest, + | protos.google.monitoring.v3.IListNotificationChannelsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannel + > + ): void; + listNotificationChannels( + request: protos.google.monitoring.v3.IListNotificationChannelsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelsRequest, + | protos.google.monitoring.v3.IListNotificationChannelsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannel > ): void; /** @@ -1385,24 +1544,28 @@ export class NotificationChannelServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listNotificationChannels( - request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + request: protos.google.monitoring.v3.IListNotificationChannelsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.INotificationChannel[], - protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelsRequest, + | protos.google.monitoring.v3.IListNotificationChannelsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannel >, - callback?: Callback< - protosTypes.google.monitoring.v3.INotificationChannel[], - protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListNotificationChannelsRequest, + | protos.google.monitoring.v3.IListNotificationChannelsResponse + | null + | undefined, + protos.google.monitoring.v3.INotificationChannel > ): Promise< [ - protosTypes.google.monitoring.v3.INotificationChannel[], - protosTypes.google.monitoring.v3.IListNotificationChannelsRequest | null, - protosTypes.google.monitoring.v3.IListNotificationChannelsResponse + protos.google.monitoring.v3.INotificationChannel[], + protos.google.monitoring.v3.IListNotificationChannelsRequest | null, + protos.google.monitoring.v3.IListNotificationChannelsResponse ] > | void { request = request || {}; @@ -1422,7 +1585,7 @@ export class NotificationChannelServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.listNotificationChannels( + return this.innerApiCalls.listNotificationChannels( request, options, callback @@ -1482,7 +1645,7 @@ export class NotificationChannelServiceClient { * An object stream which emits an object representing [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} on 'data' event. */ listNotificationChannelsStream( - request?: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest, + request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1496,12 +1659,79 @@ export class NotificationChannelServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listNotificationChannels.createStream( - this._innerApiCalls.listNotificationChannels as gax.GaxCall, + return this.descriptors.page.listNotificationChannels.createStream( + this.innerApiCalls.listNotificationChannels as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listNotificationChannels}, 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * {@link google.monitoring.v3.NotificationChannelService.GetNotificationChannel|`GetNotificationChannel`} + * operation. + * @param {string} request.filter + * If provided, this field specifies the criteria that must be met by + * notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {string} request.orderBy + * A comma-separated list of fields by which to sort the result. Supports + * the same set of fields as in `filter`. Entries can be prefixed with + * a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @param {number} request.pageSize + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @param {string} request.pageToken + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * @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. + */ + listNotificationChannelsAsync( + request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listNotificationChannels.asyncIterate( + this.innerApiCalls['listNotificationChannels'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1514,8 +1744,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ folderAlertPolicyPath(folder: string, alertPolicy: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, }); } @@ -1528,7 +1758,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).folder; } @@ -1541,7 +1771,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).alert_policy; } @@ -1559,10 +1789,10 @@ export class NotificationChannelServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1576,7 +1806,7 @@ export class NotificationChannelServiceClient { matchFolderFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).folder; } @@ -1591,7 +1821,7 @@ export class NotificationChannelServiceClient { matchAlertPolicyFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).alert_policy; } @@ -1606,7 +1836,7 @@ export class NotificationChannelServiceClient { matchConditionFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).condition; } @@ -1619,8 +1849,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ folderChannelDescriptorPath(folder: string, channelDescriptor: string) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, channel_descriptor: channelDescriptor, }); } @@ -1635,7 +1865,7 @@ export class NotificationChannelServiceClient { matchFolderFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).folder; } @@ -1650,7 +1880,7 @@ export class NotificationChannelServiceClient { matchChannelDescriptorFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).channel_descriptor; } @@ -1663,9 +1893,9 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ folderGroupPath(folder: string, group: string) { - return this._pathTemplates.folderGroupPathTemplate.render({ - folder, - group, + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, }); } @@ -1677,7 +1907,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .folder; } @@ -1689,7 +1919,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the group. */ matchGroupFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .group; } @@ -1701,8 +1931,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ folderNotificationChannelPath(folder: string, notificationChannel: string) { - return this._pathTemplates.folderNotificationChannelPathTemplate.render({ - folder, + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, notification_channel: notificationChannel, }); } @@ -1717,7 +1947,7 @@ export class NotificationChannelServiceClient { matchFolderFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).folder; } @@ -1732,7 +1962,7 @@ export class NotificationChannelServiceClient { matchNotificationChannelFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).notification_channel; } @@ -1745,9 +1975,9 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ folderServicePath(folder: string, service: string) { - return this._pathTemplates.folderServicePathTemplate.render({ - folder, - service, + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, }); } @@ -1759,9 +1989,8 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).folder; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; } /** @@ -1772,9 +2001,8 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the service. */ matchServiceFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).service; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; } /** @@ -1790,10 +2018,10 @@ export class NotificationChannelServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( { - folder, - service, + folder: folder, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1809,7 +2037,7 @@ export class NotificationChannelServiceClient { matchFolderFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).folder; } @@ -1824,7 +2052,7 @@ export class NotificationChannelServiceClient { matchServiceFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service; } @@ -1839,7 +2067,7 @@ export class NotificationChannelServiceClient { matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1852,8 +2080,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ - folder, + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, uptime_check_config: uptimeCheckConfig, }); } @@ -1868,7 +2096,7 @@ export class NotificationChannelServiceClient { matchFolderFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).folder; } @@ -1883,7 +2111,7 @@ export class NotificationChannelServiceClient { matchUptimeCheckConfigFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).uptime_check_config; } @@ -1896,8 +2124,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ organizationAlertPolicyPath(organization: string, alertPolicy: string) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ - organization, + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, alert_policy: alertPolicy, }); } @@ -1912,7 +2140,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).organization; } @@ -1927,7 +2155,7 @@ export class NotificationChannelServiceClient { matchAlertPolicyFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).alert_policy; } @@ -1945,11 +2173,11 @@ export class NotificationChannelServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( { - organization, + organization: organization, alert_policy: alertPolicy, - condition, + condition: condition, } ); } @@ -1964,7 +2192,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).organization; } @@ -1979,7 +2207,7 @@ export class NotificationChannelServiceClient { matchAlertPolicyFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).alert_policy; } @@ -1994,7 +2222,7 @@ export class NotificationChannelServiceClient { matchConditionFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).condition; } @@ -2010,12 +2238,10 @@ export class NotificationChannelServiceClient { organization: string, channelDescriptor: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( - { - organization, - channel_descriptor: channelDescriptor, - } - ); + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); } /** @@ -2028,7 +2254,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).organization; } @@ -2043,7 +2269,7 @@ export class NotificationChannelServiceClient { matchChannelDescriptorFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).channel_descriptor; } @@ -2056,9 +2282,9 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ organizationGroupPath(organization: string, group: string) { - return this._pathTemplates.organizationGroupPathTemplate.render({ - organization, - group, + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, }); } @@ -2070,7 +2296,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).organization; } @@ -2083,7 +2309,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the group. */ matchGroupFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).group; } @@ -2099,9 +2325,9 @@ export class NotificationChannelServiceClient { organization: string, notificationChannel: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( { - organization, + organization: organization, notification_channel: notificationChannel, } ); @@ -2117,7 +2343,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).organization; } @@ -2132,7 +2358,7 @@ export class NotificationChannelServiceClient { matchNotificationChannelFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).notification_channel; } @@ -2145,9 +2371,9 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ organizationServicePath(organization: string, service: string) { - return this._pathTemplates.organizationServicePathTemplate.render({ - organization, - service, + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, }); } @@ -2161,7 +2387,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationServiceName( organizationServiceName: string ) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).organization; } @@ -2174,7 +2400,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the service. */ matchServiceFromOrganizationServiceName(organizationServiceName: string) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).service; } @@ -2192,10 +2418,10 @@ export class NotificationChannelServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( { - organization, - service, + organization: organization, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2211,7 +2437,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).organization; } @@ -2226,7 +2452,7 @@ export class NotificationChannelServiceClient { matchServiceFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service; } @@ -2241,7 +2467,7 @@ export class NotificationChannelServiceClient { matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2257,12 +2483,10 @@ export class NotificationChannelServiceClient { organization: string, uptimeCheckConfig: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( - { - organization, - uptime_check_config: uptimeCheckConfig, - } - ); + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); } /** @@ -2275,7 +2499,7 @@ export class NotificationChannelServiceClient { matchOrganizationFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).organization; } @@ -2290,7 +2514,7 @@ export class NotificationChannelServiceClient { matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).uptime_check_config; } @@ -2302,8 +2526,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -2315,7 +2539,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -2326,8 +2550,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectAlertPolicyPath(project: string, alertPolicy: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, alert_policy: alertPolicy, }); } @@ -2340,7 +2564,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).project; } @@ -2353,7 +2577,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).alert_policy; } @@ -2371,10 +2595,10 @@ export class NotificationChannelServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -2388,7 +2612,7 @@ export class NotificationChannelServiceClient { matchProjectFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).project; } @@ -2403,7 +2627,7 @@ export class NotificationChannelServiceClient { matchAlertPolicyFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).alert_policy; } @@ -2418,7 +2642,7 @@ export class NotificationChannelServiceClient { matchConditionFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).condition; } @@ -2431,8 +2655,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectChannelDescriptorPath(project: string, channelDescriptor: string) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, channel_descriptor: channelDescriptor, }); } @@ -2447,7 +2671,7 @@ export class NotificationChannelServiceClient { matchProjectFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).project; } @@ -2462,7 +2686,7 @@ export class NotificationChannelServiceClient { matchChannelDescriptorFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).channel_descriptor; } @@ -2475,9 +2699,9 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectGroupPath(project: string, group: string) { - return this._pathTemplates.projectGroupPathTemplate.render({ - project, - group, + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, }); } @@ -2489,7 +2713,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .project; } @@ -2501,7 +2725,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the group. */ matchGroupFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .group; } @@ -2513,8 +2737,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectNotificationChannelPath(project: string, notificationChannel: string) { - return this._pathTemplates.projectNotificationChannelPathTemplate.render({ - project, + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, notification_channel: notificationChannel, }); } @@ -2529,7 +2753,7 @@ export class NotificationChannelServiceClient { matchProjectFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).project; } @@ -2544,7 +2768,7 @@ export class NotificationChannelServiceClient { matchNotificationChannelFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).notification_channel; } @@ -2557,9 +2781,9 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectServicePath(project: string, service: string) { - return this._pathTemplates.projectServicePathTemplate.render({ - project, - service, + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, }); } @@ -2571,7 +2795,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).project; } @@ -2584,7 +2808,7 @@ export class NotificationChannelServiceClient { * @returns {string} A string representing the service. */ matchServiceFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).service; } @@ -2602,10 +2826,10 @@ export class NotificationChannelServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( { - project, - service, + project: project, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2621,7 +2845,7 @@ export class NotificationChannelServiceClient { matchProjectFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).project; } @@ -2636,7 +2860,7 @@ export class NotificationChannelServiceClient { matchServiceFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service; } @@ -2651,7 +2875,7 @@ export class NotificationChannelServiceClient { matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2664,8 +2888,8 @@ export class NotificationChannelServiceClient { * @returns {string} Resource name string. */ projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ - project, + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, uptime_check_config: uptimeCheckConfig, }); } @@ -2680,7 +2904,7 @@ export class NotificationChannelServiceClient { matchProjectFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).project; } @@ -2695,7 +2919,7 @@ export class NotificationChannelServiceClient { matchUptimeCheckConfigFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).uptime_check_config; } diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index ecee7592a36..99b6bb76f32 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.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. @@ -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 './service_monitoring_service_client_config.json'; const version = require('../../../package.json').version; @@ -43,9 +43,6 @@ const version = require('../../../package.json').version; * @memberof v3 */ export class ServiceMonitoringServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -53,6 +50,14 @@ export class ServiceMonitoringServiceClient { 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}; serviceMonitoringServiceStub?: Promise<{[name: string]: Function}>; /** @@ -146,13 +151,16 @@ export class ServiceMonitoringServiceClient { '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 = { folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), @@ -233,7 +241,7 @@ export class ServiceMonitoringServiceClient { // 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 = { listServices: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -257,7 +265,7 @@ export class ServiceMonitoringServiceClient { // 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 = {}; } /** @@ -284,7 +292,7 @@ export class ServiceMonitoringServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.ServiceMonitoringService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.v3.ServiceMonitoringService, this._opts ) as Promise<{[method: string]: Function}>; @@ -303,14 +311,14 @@ export class ServiceMonitoringServiceClient { 'updateServiceLevelObjective', 'deleteServiceLevelObjective', ]; - for (const methodName of serviceMonitoringServiceStubMethods) { - const innerCallPromise = this.serviceMonitoringServiceStub.then( + const callPromise = this.serviceMonitoringServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -318,20 +326,14 @@ export class ServiceMonitoringServiceClient { ); 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.serviceMonitoringServiceStub; @@ -392,22 +394,30 @@ export class ServiceMonitoringServiceClient { // -- Service calls -- // ------------------- createService( - request: protosTypes.google.monitoring.v3.ICreateServiceRequest, + request: protos.google.monitoring.v3.ICreateServiceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.ICreateServiceRequest | undefined, {} | undefined ] >; createService( - request: protosTypes.google.monitoring.v3.ICreateServiceRequest, + request: protos.google.monitoring.v3.ICreateServiceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, + {} | null | undefined + > + ): void; + createService( + request: protos.google.monitoring.v3.ICreateServiceRequest, + callback: Callback< + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -430,23 +440,23 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createService( - request: protosTypes.google.monitoring.v3.ICreateServiceRequest, + request: protos.google.monitoring.v3.ICreateServiceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.ICreateServiceRequest | undefined, + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.ICreateServiceRequest | undefined, {} | undefined ] > | void { @@ -467,25 +477,33 @@ export class ServiceMonitoringServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createService(request, options, callback); + return this.innerApiCalls.createService(request, options, callback); } getService( - request: protosTypes.google.monitoring.v3.IGetServiceRequest, + request: protos.google.monitoring.v3.IGetServiceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IGetServiceRequest | undefined, {} | undefined ] >; getService( - request: protosTypes.google.monitoring.v3.IGetServiceRequest, + request: protos.google.monitoring.v3.IGetServiceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IGetServiceRequest | null | undefined, + {} | null | undefined + > + ): void; + getService( + request: protos.google.monitoring.v3.IGetServiceRequest, + callback: Callback< + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IGetServiceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -503,23 +521,23 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getService( - request: protosTypes.google.monitoring.v3.IGetServiceRequest, + request: protos.google.monitoring.v3.IGetServiceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IGetServiceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IGetServiceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IGetServiceRequest | undefined, + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IGetServiceRequest | undefined, {} | undefined ] > | void { @@ -540,25 +558,33 @@ export class ServiceMonitoringServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getService(request, options, callback); + return this.innerApiCalls.getService(request, options, callback); } updateService( - request: protosTypes.google.monitoring.v3.IUpdateServiceRequest, + request: protos.google.monitoring.v3.IUpdateServiceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IUpdateServiceRequest | undefined, {} | undefined ] >; updateService( - request: protosTypes.google.monitoring.v3.IUpdateServiceRequest, + request: protos.google.monitoring.v3.IUpdateServiceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, + {} | null | undefined + > + ): void; + updateService( + request: protos.google.monitoring.v3.IUpdateServiceRequest, + callback: Callback< + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -578,23 +604,23 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateService( - request: protosTypes.google.monitoring.v3.IUpdateServiceRequest, + request: protos.google.monitoring.v3.IUpdateServiceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IService, - protosTypes.google.monitoring.v3.IUpdateServiceRequest | undefined, + protos.google.monitoring.v3.IService, + protos.google.monitoring.v3.IUpdateServiceRequest | undefined, {} | undefined ] > | void { @@ -615,25 +641,33 @@ export class ServiceMonitoringServiceClient { 'service.name': request.service!.name || '', }); this.initialize(); - return this._innerApiCalls.updateService(request, options, callback); + return this.innerApiCalls.updateService(request, options, callback); } deleteService( - request: protosTypes.google.monitoring.v3.IDeleteServiceRequest, + request: protos.google.monitoring.v3.IDeleteServiceRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteServiceRequest | undefined, {} | undefined ] >; deleteService( - request: protosTypes.google.monitoring.v3.IDeleteServiceRequest, + request: protos.google.monitoring.v3.IDeleteServiceRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, + {} | null | undefined + > + ): void; + deleteService( + request: protos.google.monitoring.v3.IDeleteServiceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -651,23 +685,23 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteService( - request: protosTypes.google.monitoring.v3.IDeleteServiceRequest, + request: protos.google.monitoring.v3.IDeleteServiceRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, - {} | undefined + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.monitoring.v3.IDeleteServiceRequest | undefined, + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteServiceRequest | undefined, {} | undefined ] > | void { @@ -688,29 +722,40 @@ export class ServiceMonitoringServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteService(request, options, callback); + return this.innerApiCalls.deleteService(request, options, callback); } createServiceLevelObjective( - request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective, + protos.google.monitoring.v3.IServiceLevelObjective, ( - | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | undefined ), {} | undefined ] >; createServiceLevelObjective( - request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createServiceLevelObjective( + request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + callback: Callback< + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -736,26 +781,28 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createServiceLevelObjective( - request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective, + protos.google.monitoring.v3.IServiceLevelObjective, ( - | protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest + | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest | undefined ), {} | undefined @@ -778,33 +825,41 @@ export class ServiceMonitoringServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createServiceLevelObjective( + return this.innerApiCalls.createServiceLevelObjective( request, options, callback ); } getServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective, - ( - | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest - | undefined - ), + protos.google.monitoring.v3.IServiceLevelObjective, + protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | undefined, {} | undefined ] >; getServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getServiceLevelObjective( + request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + callback: Callback< + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -828,28 +883,27 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective, - ( - | protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest - | undefined - ), + protos.google.monitoring.v3.IServiceLevelObjective, + protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest | undefined, {} | undefined ] > | void { @@ -870,33 +924,44 @@ export class ServiceMonitoringServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getServiceLevelObjective( + return this.innerApiCalls.getServiceLevelObjective( request, options, callback ); } updateServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective, + protos.google.monitoring.v3.IServiceLevelObjective, ( - | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | undefined ), {} | undefined ] >; updateServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + updateServiceLevelObjective( + request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + callback: Callback< + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -916,26 +981,28 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective, - | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + protos.google.monitoring.v3.IServiceLevelObjective, + | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective, + protos.google.monitoring.v3.IServiceLevelObjective, ( - | protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest + | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest | undefined ), {} | undefined @@ -958,33 +1025,44 @@ export class ServiceMonitoringServiceClient { 'service_level_objective.name': request.serviceLevelObjective!.name || '', }); this.initialize(); - return this._innerApiCalls.updateServiceLevelObjective( + return this.innerApiCalls.updateServiceLevelObjective( request, options, callback ); } deleteServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, + protos.google.protobuf.IEmpty, ( - | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | undefined ), {} | undefined ] >; deleteServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteServiceLevelObjective( + request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1003,26 +1081,28 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteServiceLevelObjective( - request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, + request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, + protos.google.protobuf.IEmpty, ( - | protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest + | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest | undefined ), {} | undefined @@ -1045,7 +1125,7 @@ export class ServiceMonitoringServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteServiceLevelObjective( + return this.innerApiCalls.deleteServiceLevelObjective( request, options, callback @@ -1053,22 +1133,30 @@ export class ServiceMonitoringServiceClient { } listServices( - request: protosTypes.google.monitoring.v3.IListServicesRequest, + request: protos.google.monitoring.v3.IListServicesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IService[], - protosTypes.google.monitoring.v3.IListServicesRequest | null, - protosTypes.google.monitoring.v3.IListServicesResponse + protos.google.monitoring.v3.IService[], + protos.google.monitoring.v3.IListServicesRequest | null, + protos.google.monitoring.v3.IListServicesResponse ] >; listServices( - request: protosTypes.google.monitoring.v3.IListServicesRequest, + request: protos.google.monitoring.v3.IListServicesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.IService[], - protosTypes.google.monitoring.v3.IListServicesRequest | null, - protosTypes.google.monitoring.v3.IListServicesResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListServicesRequest, + protos.google.monitoring.v3.IListServicesResponse | null | undefined, + protos.google.monitoring.v3.IService + > + ): void; + listServices( + request: protos.google.monitoring.v3.IListServicesRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListServicesRequest, + protos.google.monitoring.v3.IListServicesResponse | null | undefined, + protos.google.monitoring.v3.IService > ): void; /** @@ -1121,24 +1209,24 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listServices( - request: protosTypes.google.monitoring.v3.IListServicesRequest, + request: protos.google.monitoring.v3.IListServicesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.IService[], - protosTypes.google.monitoring.v3.IListServicesRequest | null, - protosTypes.google.monitoring.v3.IListServicesResponse + | PaginationCallback< + protos.google.monitoring.v3.IListServicesRequest, + protos.google.monitoring.v3.IListServicesResponse | null | undefined, + protos.google.monitoring.v3.IService >, - callback?: Callback< - protosTypes.google.monitoring.v3.IService[], - protosTypes.google.monitoring.v3.IListServicesRequest | null, - protosTypes.google.monitoring.v3.IListServicesResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListServicesRequest, + protos.google.monitoring.v3.IListServicesResponse | null | undefined, + protos.google.monitoring.v3.IService > ): Promise< [ - protosTypes.google.monitoring.v3.IService[], - protosTypes.google.monitoring.v3.IListServicesRequest | null, - protosTypes.google.monitoring.v3.IListServicesResponse + protos.google.monitoring.v3.IService[], + protos.google.monitoring.v3.IListServicesRequest | null, + protos.google.monitoring.v3.IListServicesResponse ] > | void { request = request || {}; @@ -1158,7 +1246,7 @@ export class ServiceMonitoringServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listServices(request, options, callback); + return this.innerApiCalls.listServices(request, options, callback); } /** @@ -1208,7 +1296,7 @@ export class ServiceMonitoringServiceClient { * An object stream which emits an object representing [Service]{@link google.monitoring.v3.Service} on 'data' event. */ listServicesStream( - request?: protosTypes.google.monitoring.v3.IListServicesRequest, + request?: protos.google.monitoring.v3.IListServicesRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1222,29 +1310,102 @@ export class ServiceMonitoringServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listServices.createStream( - this._innerApiCalls.listServices as gax.GaxCall, + return this.descriptors.page.listServices.createStream( + this.innerApiCalls.listServices as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listServices}, 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. Resource name of the parent `Workspace`. + * Of the form `projects/{project_id}`. + * @param {string} request.filter + * A filter specifying what `Service`s to return. The filter currently + * supports the following fields: + * + * - `identifier_case` + * - `app_engine.module_id` + * - `cloud_endpoints.service` + * - `cluster_istio.location` + * - `cluster_istio.cluster_name` + * - `cluster_istio.service_namespace` + * - `cluster_istio.service_name` + * + * `identifier_case` refers to which option in the identifier oneof is + * populated. For example, the filter `identifier_case = "CUSTOM"` would match + * all services with a value for the `custom` field. Valid options are + * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * @param {number} request.pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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. + */ + listServicesAsync( + request?: protos.google.monitoring.v3.IListServicesRequest, + 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.listServices.asyncIterate( + this.innerApiCalls['listServices'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listServiceLevelObjectives( - request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective[], - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + protos.google.monitoring.v3.IServiceLevelObjective[], + protos.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protos.google.monitoring.v3.IListServiceLevelObjectivesResponse ] >; listServiceLevelObjectives( - request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective[], - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, + | protos.google.monitoring.v3.IListServiceLevelObjectivesResponse + | null + | undefined, + protos.google.monitoring.v3.IServiceLevelObjective + > + ): void; + listServiceLevelObjectives( + request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, + | protos.google.monitoring.v3.IListServiceLevelObjectivesResponse + | null + | undefined, + protos.google.monitoring.v3.IServiceLevelObjective > ): void; /** @@ -1288,24 +1449,28 @@ export class ServiceMonitoringServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listServiceLevelObjectives( - request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective[], - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + | PaginationCallback< + protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, + | protos.google.monitoring.v3.IListServiceLevelObjectivesResponse + | null + | undefined, + protos.google.monitoring.v3.IServiceLevelObjective >, - callback?: Callback< - protosTypes.google.monitoring.v3.IServiceLevelObjective[], - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, + | protos.google.monitoring.v3.IListServiceLevelObjectivesResponse + | null + | undefined, + protos.google.monitoring.v3.IServiceLevelObjective > ): Promise< [ - protosTypes.google.monitoring.v3.IServiceLevelObjective[], - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, - protosTypes.google.monitoring.v3.IListServiceLevelObjectivesResponse + protos.google.monitoring.v3.IServiceLevelObjective[], + protos.google.monitoring.v3.IListServiceLevelObjectivesRequest | null, + protos.google.monitoring.v3.IListServiceLevelObjectivesResponse ] > | void { request = request || {}; @@ -1325,7 +1490,7 @@ export class ServiceMonitoringServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listServiceLevelObjectives( + return this.innerApiCalls.listServiceLevelObjectives( request, options, callback @@ -1370,7 +1535,7 @@ export class ServiceMonitoringServiceClient { * An object stream which emits an object representing [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} on 'data' event. */ listServiceLevelObjectivesStream( - request?: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest, + request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -1384,12 +1549,64 @@ export class ServiceMonitoringServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listServiceLevelObjectives.createStream( - this._innerApiCalls.listServiceLevelObjectives as gax.GaxCall, + return this.descriptors.page.listServiceLevelObjectives.createStream( + this.innerApiCalls.listServiceLevelObjectives as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listServiceLevelObjectives}, 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. Resource name of the parent `Service`. + * Of the form `projects/{project_id}/services/{service_id}`. + * @param {string} request.filter + * A filter specifying what `ServiceLevelObjective`s to return. + * @param {number} request.pageSize + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @param {google.monitoring.v3.ServiceLevelObjective.View} request.view + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * @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. + */ + listServiceLevelObjectivesAsync( + request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, + 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.listServiceLevelObjectives.asyncIterate( + this.innerApiCalls['listServiceLevelObjectives'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1402,8 +1619,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ folderAlertPolicyPath(folder: string, alertPolicy: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, }); } @@ -1416,7 +1633,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).folder; } @@ -1429,7 +1646,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).alert_policy; } @@ -1447,10 +1664,10 @@ export class ServiceMonitoringServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1464,7 +1681,7 @@ export class ServiceMonitoringServiceClient { matchFolderFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).folder; } @@ -1479,7 +1696,7 @@ export class ServiceMonitoringServiceClient { matchAlertPolicyFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).alert_policy; } @@ -1494,7 +1711,7 @@ export class ServiceMonitoringServiceClient { matchConditionFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).condition; } @@ -1507,8 +1724,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ folderChannelDescriptorPath(folder: string, channelDescriptor: string) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, channel_descriptor: channelDescriptor, }); } @@ -1523,7 +1740,7 @@ export class ServiceMonitoringServiceClient { matchFolderFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).folder; } @@ -1538,7 +1755,7 @@ export class ServiceMonitoringServiceClient { matchChannelDescriptorFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).channel_descriptor; } @@ -1551,9 +1768,9 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ folderGroupPath(folder: string, group: string) { - return this._pathTemplates.folderGroupPathTemplate.render({ - folder, - group, + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, }); } @@ -1565,7 +1782,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .folder; } @@ -1577,7 +1794,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the group. */ matchGroupFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .group; } @@ -1589,8 +1806,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ folderNotificationChannelPath(folder: string, notificationChannel: string) { - return this._pathTemplates.folderNotificationChannelPathTemplate.render({ - folder, + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, notification_channel: notificationChannel, }); } @@ -1605,7 +1822,7 @@ export class ServiceMonitoringServiceClient { matchFolderFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).folder; } @@ -1620,7 +1837,7 @@ export class ServiceMonitoringServiceClient { matchNotificationChannelFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).notification_channel; } @@ -1633,9 +1850,9 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ folderServicePath(folder: string, service: string) { - return this._pathTemplates.folderServicePathTemplate.render({ - folder, - service, + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, }); } @@ -1647,9 +1864,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).folder; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; } /** @@ -1660,9 +1876,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the service. */ matchServiceFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).service; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; } /** @@ -1678,10 +1893,10 @@ export class ServiceMonitoringServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( { - folder, - service, + folder: folder, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1697,7 +1912,7 @@ export class ServiceMonitoringServiceClient { matchFolderFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).folder; } @@ -1712,7 +1927,7 @@ export class ServiceMonitoringServiceClient { matchServiceFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service; } @@ -1727,7 +1942,7 @@ export class ServiceMonitoringServiceClient { matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1740,8 +1955,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ - folder, + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, uptime_check_config: uptimeCheckConfig, }); } @@ -1756,7 +1971,7 @@ export class ServiceMonitoringServiceClient { matchFolderFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).folder; } @@ -1771,7 +1986,7 @@ export class ServiceMonitoringServiceClient { matchUptimeCheckConfigFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).uptime_check_config; } @@ -1784,8 +1999,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ organizationAlertPolicyPath(organization: string, alertPolicy: string) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ - organization, + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, alert_policy: alertPolicy, }); } @@ -1800,7 +2015,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).organization; } @@ -1815,7 +2030,7 @@ export class ServiceMonitoringServiceClient { matchAlertPolicyFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).alert_policy; } @@ -1833,11 +2048,11 @@ export class ServiceMonitoringServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( { - organization, + organization: organization, alert_policy: alertPolicy, - condition, + condition: condition, } ); } @@ -1852,7 +2067,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).organization; } @@ -1867,7 +2082,7 @@ export class ServiceMonitoringServiceClient { matchAlertPolicyFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).alert_policy; } @@ -1882,7 +2097,7 @@ export class ServiceMonitoringServiceClient { matchConditionFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).condition; } @@ -1898,12 +2113,10 @@ export class ServiceMonitoringServiceClient { organization: string, channelDescriptor: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( - { - organization, - channel_descriptor: channelDescriptor, - } - ); + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); } /** @@ -1916,7 +2129,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).organization; } @@ -1931,7 +2144,7 @@ export class ServiceMonitoringServiceClient { matchChannelDescriptorFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).channel_descriptor; } @@ -1944,9 +2157,9 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ organizationGroupPath(organization: string, group: string) { - return this._pathTemplates.organizationGroupPathTemplate.render({ - organization, - group, + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, }); } @@ -1958,7 +2171,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).organization; } @@ -1971,7 +2184,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the group. */ matchGroupFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).group; } @@ -1987,9 +2200,9 @@ export class ServiceMonitoringServiceClient { organization: string, notificationChannel: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( { - organization, + organization: organization, notification_channel: notificationChannel, } ); @@ -2005,7 +2218,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).organization; } @@ -2020,7 +2233,7 @@ export class ServiceMonitoringServiceClient { matchNotificationChannelFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).notification_channel; } @@ -2033,9 +2246,9 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ organizationServicePath(organization: string, service: string) { - return this._pathTemplates.organizationServicePathTemplate.render({ - organization, - service, + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, }); } @@ -2049,7 +2262,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationServiceName( organizationServiceName: string ) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).organization; } @@ -2062,7 +2275,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the service. */ matchServiceFromOrganizationServiceName(organizationServiceName: string) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).service; } @@ -2080,10 +2293,10 @@ export class ServiceMonitoringServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( { - organization, - service, + organization: organization, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2099,7 +2312,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).organization; } @@ -2114,7 +2327,7 @@ export class ServiceMonitoringServiceClient { matchServiceFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service; } @@ -2129,7 +2342,7 @@ export class ServiceMonitoringServiceClient { matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2145,12 +2358,10 @@ export class ServiceMonitoringServiceClient { organization: string, uptimeCheckConfig: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( - { - organization, - uptime_check_config: uptimeCheckConfig, - } - ); + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); } /** @@ -2163,7 +2374,7 @@ export class ServiceMonitoringServiceClient { matchOrganizationFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).organization; } @@ -2178,7 +2389,7 @@ export class ServiceMonitoringServiceClient { matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).uptime_check_config; } @@ -2190,8 +2401,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -2203,7 +2414,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -2214,8 +2425,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectAlertPolicyPath(project: string, alertPolicy: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, alert_policy: alertPolicy, }); } @@ -2228,7 +2439,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).project; } @@ -2241,7 +2452,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).alert_policy; } @@ -2259,10 +2470,10 @@ export class ServiceMonitoringServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -2276,7 +2487,7 @@ export class ServiceMonitoringServiceClient { matchProjectFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).project; } @@ -2291,7 +2502,7 @@ export class ServiceMonitoringServiceClient { matchAlertPolicyFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).alert_policy; } @@ -2306,7 +2517,7 @@ export class ServiceMonitoringServiceClient { matchConditionFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).condition; } @@ -2319,8 +2530,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectChannelDescriptorPath(project: string, channelDescriptor: string) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, channel_descriptor: channelDescriptor, }); } @@ -2335,7 +2546,7 @@ export class ServiceMonitoringServiceClient { matchProjectFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).project; } @@ -2350,7 +2561,7 @@ export class ServiceMonitoringServiceClient { matchChannelDescriptorFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).channel_descriptor; } @@ -2363,9 +2574,9 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectGroupPath(project: string, group: string) { - return this._pathTemplates.projectGroupPathTemplate.render({ - project, - group, + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, }); } @@ -2377,7 +2588,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .project; } @@ -2389,7 +2600,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the group. */ matchGroupFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .group; } @@ -2401,8 +2612,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectNotificationChannelPath(project: string, notificationChannel: string) { - return this._pathTemplates.projectNotificationChannelPathTemplate.render({ - project, + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, notification_channel: notificationChannel, }); } @@ -2417,7 +2628,7 @@ export class ServiceMonitoringServiceClient { matchProjectFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).project; } @@ -2432,7 +2643,7 @@ export class ServiceMonitoringServiceClient { matchNotificationChannelFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).notification_channel; } @@ -2445,9 +2656,9 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectServicePath(project: string, service: string) { - return this._pathTemplates.projectServicePathTemplate.render({ - project, - service, + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, }); } @@ -2459,7 +2670,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).project; } @@ -2472,7 +2683,7 @@ export class ServiceMonitoringServiceClient { * @returns {string} A string representing the service. */ matchServiceFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).service; } @@ -2490,10 +2701,10 @@ export class ServiceMonitoringServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( { - project, - service, + project: project, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2509,7 +2720,7 @@ export class ServiceMonitoringServiceClient { matchProjectFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).project; } @@ -2524,7 +2735,7 @@ export class ServiceMonitoringServiceClient { matchServiceFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service; } @@ -2539,7 +2750,7 @@ export class ServiceMonitoringServiceClient { matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2552,8 +2763,8 @@ export class ServiceMonitoringServiceClient { * @returns {string} Resource name string. */ projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ - project, + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, uptime_check_config: uptimeCheckConfig, }); } @@ -2568,7 +2779,7 @@ export class ServiceMonitoringServiceClient { matchProjectFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).project; } @@ -2583,7 +2794,7 @@ export class ServiceMonitoringServiceClient { matchUptimeCheckConfigFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).uptime_check_config; } diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index d0aa99442a1..0d982a41405 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.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. @@ -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 './uptime_check_service_client_config.json'; const version = require('../../../package.json').version; @@ -47,9 +47,6 @@ const version = require('../../../package.json').version; * @memberof v3 */ export class UptimeCheckServiceClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _innerApiCalls: {[name: string]: Function}; - private _pathTemplates: {[name: string]: gax.PathTemplate}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -57,6 +54,14 @@ export class UptimeCheckServiceClient { 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}; uptimeCheckServiceStub?: Promise<{[name: string]: Function}>; /** @@ -148,13 +153,16 @@ export class UptimeCheckServiceClient { '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 = { folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/alertPolicies/{alert_policy}' ), @@ -235,7 +243,7 @@ export class UptimeCheckServiceClient { // 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 = { listUptimeCheckConfigs: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -259,7 +267,7 @@ export class UptimeCheckServiceClient { // 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 = {}; } /** @@ -286,7 +294,7 @@ export class UptimeCheckServiceClient { ? (this._protos as protobuf.Root).lookupService( 'google.monitoring.v3.UptimeCheckService' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.monitoring.v3.UptimeCheckService, this._opts ) as Promise<{[method: string]: Function}>; @@ -301,14 +309,14 @@ export class UptimeCheckServiceClient { 'deleteUptimeCheckConfig', 'listUptimeCheckIps', ]; - for (const methodName of uptimeCheckServiceStubMethods) { - const innerCallPromise = this.uptimeCheckServiceStub.then( + const callPromise = this.uptimeCheckServiceStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; @@ -316,20 +324,14 @@ export class UptimeCheckServiceClient { ); 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.uptimeCheckServiceStub; @@ -390,22 +392,34 @@ export class UptimeCheckServiceClient { // -- Service calls -- // ------------------- getUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, + protos.google.monitoring.v3.IUptimeCheckConfig, + protos.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, {} | undefined ] >; getUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IGetUptimeCheckConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getUptimeCheckConfig( + request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, + callback: Callback< + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IGetUptimeCheckConfigRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -423,24 +437,27 @@ export class UptimeCheckServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IGetUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, - {} | undefined + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IGetUptimeCheckConfigRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, + protos.google.monitoring.v3.IUptimeCheckConfig, + protos.google.monitoring.v3.IGetUptimeCheckConfigRequest | undefined, {} | undefined ] > | void { @@ -461,29 +478,37 @@ export class UptimeCheckServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.getUptimeCheckConfig(request, options, callback); + return this.innerApiCalls.getUptimeCheckConfig(request, options, callback); } createUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - ( - | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest - | undefined - ), + protos.google.monitoring.v3.IUptimeCheckConfig, + protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest | undefined, {} | undefined ] >; createUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createUptimeCheckConfig( + request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + callback: Callback< + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -503,28 +528,27 @@ export class UptimeCheckServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - ( - | protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest - | undefined - ), + protos.google.monitoring.v3.IUptimeCheckConfig, + protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest | undefined, {} | undefined ] > | void { @@ -545,33 +569,41 @@ export class UptimeCheckServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.createUptimeCheckConfig( + return this.innerApiCalls.createUptimeCheckConfig( request, options, callback ); } updateUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - ( - | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest - | undefined - ), + protos.google.monitoring.v3.IUptimeCheckConfig, + protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest | undefined, {} | undefined ] >; updateUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + updateUptimeCheckConfig( + request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + callback: Callback< + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -606,28 +638,27 @@ export class UptimeCheckServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + protos.google.monitoring.v3.IUptimeCheckConfig, + | protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig, - ( - | protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest - | undefined - ), + protos.google.monitoring.v3.IUptimeCheckConfig, + protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest | undefined, {} | undefined ] > | void { @@ -648,33 +679,41 @@ export class UptimeCheckServiceClient { 'uptime_check_config.name': request.uptimeCheckConfig!.name || '', }); this.initialize(); - return this._innerApiCalls.updateUptimeCheckConfig( + return this.innerApiCalls.updateUptimeCheckConfig( request, options, callback ); } deleteUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest | undefined, {} | undefined ] >; deleteUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteUptimeCheckConfig( + request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -694,28 +733,27 @@ export class UptimeCheckServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteUptimeCheckConfig( - request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, + request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + protos.google.protobuf.IEmpty, + | protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest | undefined, {} | undefined ] > | void { @@ -736,7 +774,7 @@ export class UptimeCheckServiceClient { name: request.name || '', }); this.initialize(); - return this._innerApiCalls.deleteUptimeCheckConfig( + return this.innerApiCalls.deleteUptimeCheckConfig( request, options, callback @@ -744,22 +782,34 @@ export class UptimeCheckServiceClient { } listUptimeCheckConfigs( - request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig[], - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + protos.google.monitoring.v3.IUptimeCheckConfig[], + protos.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protos.google.monitoring.v3.IListUptimeCheckConfigsResponse ] >; listUptimeCheckConfigs( - request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig[], - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, + | protos.google.monitoring.v3.IListUptimeCheckConfigsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckConfig + > + ): void; + listUptimeCheckConfigs( + request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, + | protos.google.monitoring.v3.IListUptimeCheckConfigsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckConfig > ): void; /** @@ -799,24 +849,28 @@ export class UptimeCheckServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listUptimeCheckConfigs( - request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig[], - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, + | protos.google.monitoring.v3.IListUptimeCheckConfigsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckConfig >, - callback?: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckConfig[], - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, + | protos.google.monitoring.v3.IListUptimeCheckConfigsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckConfig > ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckConfig[], - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckConfigsResponse + protos.google.monitoring.v3.IUptimeCheckConfig[], + protos.google.monitoring.v3.IListUptimeCheckConfigsRequest | null, + protos.google.monitoring.v3.IListUptimeCheckConfigsResponse ] > | void { request = request || {}; @@ -836,7 +890,7 @@ export class UptimeCheckServiceClient { parent: request.parent || '', }); this.initialize(); - return this._innerApiCalls.listUptimeCheckConfigs( + return this.innerApiCalls.listUptimeCheckConfigs( request, options, callback @@ -876,7 +930,7 @@ export class UptimeCheckServiceClient { * An object stream which emits an object representing [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} on 'data' event. */ listUptimeCheckConfigsStream( - request?: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest, + request?: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, options?: gax.CallOptions ): Transform { request = request || {}; @@ -890,29 +944,88 @@ export class UptimeCheckServiceClient { }); const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listUptimeCheckConfigs.createStream( - this._innerApiCalls.listUptimeCheckConfigs as gax.GaxCall, + return this.descriptors.page.listUptimeCheckConfigs.createStream( + this.innerApiCalls.listUptimeCheckConfigs as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listUptimeCheckConfigs}, 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 project whose Uptime check configurations are listed. The format + * is `projects/[PROJECT_ID]`. + * @param {number} request.pageSize + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method 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. + */ + listUptimeCheckConfigsAsync( + request?: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, + 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.listUptimeCheckConfigs.asyncIterate( + this.innerApiCalls['listUptimeCheckConfigs'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listUptimeCheckIps( - request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckIp[], - protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + protos.google.monitoring.v3.IUptimeCheckIp[], + protos.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protos.google.monitoring.v3.IListUptimeCheckIpsResponse ] >; listUptimeCheckIps( - request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckIp[], - protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + callback: PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckIpsRequest, + | protos.google.monitoring.v3.IListUptimeCheckIpsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckIp + > + ): void; + listUptimeCheckIps( + request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckIpsRequest, + | protos.google.monitoring.v3.IListUptimeCheckIpsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckIp > ): void; /** @@ -950,24 +1063,28 @@ export class UptimeCheckServiceClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listUptimeCheckIps( - request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.monitoring.v3.IUptimeCheckIp[], - protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + | PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckIpsRequest, + | protos.google.monitoring.v3.IListUptimeCheckIpsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckIp >, - callback?: Callback< - protosTypes.google.monitoring.v3.IUptimeCheckIp[], - protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + callback?: PaginationCallback< + protos.google.monitoring.v3.IListUptimeCheckIpsRequest, + | protos.google.monitoring.v3.IListUptimeCheckIpsResponse + | null + | undefined, + protos.google.monitoring.v3.IUptimeCheckIp > ): Promise< [ - protosTypes.google.monitoring.v3.IUptimeCheckIp[], - protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest | null, - protosTypes.google.monitoring.v3.IListUptimeCheckIpsResponse + protos.google.monitoring.v3.IUptimeCheckIp[], + protos.google.monitoring.v3.IListUptimeCheckIpsRequest | null, + protos.google.monitoring.v3.IListUptimeCheckIpsResponse ] > | void { request = request || {}; @@ -980,7 +1097,7 @@ export class UptimeCheckServiceClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.listUptimeCheckIps(request, options, callback); + return this.innerApiCalls.listUptimeCheckIps(request, options, callback); } /** @@ -1015,19 +1132,58 @@ export class UptimeCheckServiceClient { * An object stream which emits an object representing [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} on 'data' event. */ listUptimeCheckIpsStream( - request?: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest, + request?: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, options?: gax.CallOptions ): Transform { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listUptimeCheckIps.createStream( - this._innerApiCalls.listUptimeCheckIps as gax.GaxCall, + return this.descriptors.page.listUptimeCheckIps.createStream( + this.innerApiCalls.listUptimeCheckIps as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listUptimeCheckIps}, 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 + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * @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. + */ + listUptimeCheckIpsAsync( + request?: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listUptimeCheckIps.asyncIterate( + this.innerApiCalls['listUptimeCheckIps'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -1040,8 +1196,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ folderAlertPolicyPath(folder: string, alertPolicy: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, }); } @@ -1054,7 +1210,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).folder; } @@ -1067,7 +1223,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { - return this._pathTemplates.folderAlertPolicyPathTemplate.match( + return this.pathTemplates.folderAlertPolicyPathTemplate.match( folderAlertPolicyName ).alert_policy; } @@ -1085,10 +1241,10 @@ export class UptimeCheckServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.render({ - folder, + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1102,7 +1258,7 @@ export class UptimeCheckServiceClient { matchFolderFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).folder; } @@ -1117,7 +1273,7 @@ export class UptimeCheckServiceClient { matchAlertPolicyFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).alert_policy; } @@ -1132,7 +1288,7 @@ export class UptimeCheckServiceClient { matchConditionFromFolderAlertPolicyConditionName( folderAlertPolicyConditionName: string ) { - return this._pathTemplates.folderAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( folderAlertPolicyConditionName ).condition; } @@ -1145,8 +1301,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ folderChannelDescriptorPath(folder: string, channelDescriptor: string) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.render({ - folder, + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, channel_descriptor: channelDescriptor, }); } @@ -1161,7 +1317,7 @@ export class UptimeCheckServiceClient { matchFolderFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).folder; } @@ -1176,7 +1332,7 @@ export class UptimeCheckServiceClient { matchChannelDescriptorFromFolderChannelDescriptorName( folderChannelDescriptorName: string ) { - return this._pathTemplates.folderChannelDescriptorPathTemplate.match( + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( folderChannelDescriptorName ).channel_descriptor; } @@ -1189,9 +1345,9 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ folderGroupPath(folder: string, group: string) { - return this._pathTemplates.folderGroupPathTemplate.render({ - folder, - group, + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, }); } @@ -1203,7 +1359,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .folder; } @@ -1215,7 +1371,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the group. */ matchGroupFromFolderGroupName(folderGroupName: string) { - return this._pathTemplates.folderGroupPathTemplate.match(folderGroupName) + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) .group; } @@ -1227,8 +1383,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ folderNotificationChannelPath(folder: string, notificationChannel: string) { - return this._pathTemplates.folderNotificationChannelPathTemplate.render({ - folder, + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, notification_channel: notificationChannel, }); } @@ -1243,7 +1399,7 @@ export class UptimeCheckServiceClient { matchFolderFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).folder; } @@ -1258,7 +1414,7 @@ export class UptimeCheckServiceClient { matchNotificationChannelFromFolderNotificationChannelName( folderNotificationChannelName: string ) { - return this._pathTemplates.folderNotificationChannelPathTemplate.match( + return this.pathTemplates.folderNotificationChannelPathTemplate.match( folderNotificationChannelName ).notification_channel; } @@ -1271,9 +1427,9 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ folderServicePath(folder: string, service: string) { - return this._pathTemplates.folderServicePathTemplate.render({ - folder, - service, + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, }); } @@ -1285,9 +1441,8 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the folder. */ matchFolderFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).folder; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; } /** @@ -1298,9 +1453,8 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the service. */ matchServiceFromFolderServiceName(folderServiceName: string) { - return this._pathTemplates.folderServicePathTemplate.match( - folderServiceName - ).service; + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; } /** @@ -1316,10 +1470,10 @@ export class UptimeCheckServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( { - folder, - service, + folder: folder, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1335,7 +1489,7 @@ export class UptimeCheckServiceClient { matchFolderFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).folder; } @@ -1350,7 +1504,7 @@ export class UptimeCheckServiceClient { matchServiceFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service; } @@ -1365,7 +1519,7 @@ export class UptimeCheckServiceClient { matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( folderServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( folderServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1378,8 +1532,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.render({ - folder, + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, uptime_check_config: uptimeCheckConfig, }); } @@ -1394,7 +1548,7 @@ export class UptimeCheckServiceClient { matchFolderFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).folder; } @@ -1409,7 +1563,7 @@ export class UptimeCheckServiceClient { matchUptimeCheckConfigFromFolderUptimeCheckConfigName( folderUptimeCheckConfigName: string ) { - return this._pathTemplates.folderUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( folderUptimeCheckConfigName ).uptime_check_config; } @@ -1422,8 +1576,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ organizationAlertPolicyPath(organization: string, alertPolicy: string) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.render({ - organization, + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, alert_policy: alertPolicy, }); } @@ -1438,7 +1592,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).organization; } @@ -1453,7 +1607,7 @@ export class UptimeCheckServiceClient { matchAlertPolicyFromOrganizationAlertPolicyName( organizationAlertPolicyName: string ) { - return this._pathTemplates.organizationAlertPolicyPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( organizationAlertPolicyName ).alert_policy; } @@ -1471,11 +1625,11 @@ export class UptimeCheckServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( { - organization, + organization: organization, alert_policy: alertPolicy, - condition, + condition: condition, } ); } @@ -1490,7 +1644,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).organization; } @@ -1505,7 +1659,7 @@ export class UptimeCheckServiceClient { matchAlertPolicyFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).alert_policy; } @@ -1520,7 +1674,7 @@ export class UptimeCheckServiceClient { matchConditionFromOrganizationAlertPolicyConditionName( organizationAlertPolicyConditionName: string ) { - return this._pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( organizationAlertPolicyConditionName ).condition; } @@ -1536,12 +1690,10 @@ export class UptimeCheckServiceClient { organization: string, channelDescriptor: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.render( - { - organization, - channel_descriptor: channelDescriptor, - } - ); + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); } /** @@ -1554,7 +1706,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).organization; } @@ -1569,7 +1721,7 @@ export class UptimeCheckServiceClient { matchChannelDescriptorFromOrganizationChannelDescriptorName( organizationChannelDescriptorName: string ) { - return this._pathTemplates.organizationChannelDescriptorPathTemplate.match( + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( organizationChannelDescriptorName ).channel_descriptor; } @@ -1582,9 +1734,9 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ organizationGroupPath(organization: string, group: string) { - return this._pathTemplates.organizationGroupPathTemplate.render({ - organization, - group, + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, }); } @@ -1596,7 +1748,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the organization. */ matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).organization; } @@ -1609,7 +1761,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the group. */ matchGroupFromOrganizationGroupName(organizationGroupName: string) { - return this._pathTemplates.organizationGroupPathTemplate.match( + return this.pathTemplates.organizationGroupPathTemplate.match( organizationGroupName ).group; } @@ -1625,9 +1777,9 @@ export class UptimeCheckServiceClient { organization: string, notificationChannel: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.render( + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( { - organization, + organization: organization, notification_channel: notificationChannel, } ); @@ -1643,7 +1795,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).organization; } @@ -1658,7 +1810,7 @@ export class UptimeCheckServiceClient { matchNotificationChannelFromOrganizationNotificationChannelName( organizationNotificationChannelName: string ) { - return this._pathTemplates.organizationNotificationChannelPathTemplate.match( + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( organizationNotificationChannelName ).notification_channel; } @@ -1671,9 +1823,9 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ organizationServicePath(organization: string, service: string) { - return this._pathTemplates.organizationServicePathTemplate.render({ - organization, - service, + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, }); } @@ -1687,7 +1839,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationServiceName( organizationServiceName: string ) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).organization; } @@ -1700,7 +1852,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the service. */ matchServiceFromOrganizationServiceName(organizationServiceName: string) { - return this._pathTemplates.organizationServicePathTemplate.match( + return this.pathTemplates.organizationServicePathTemplate.match( organizationServiceName ).service; } @@ -1718,10 +1870,10 @@ export class UptimeCheckServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( { - organization, - service, + organization: organization, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -1737,7 +1889,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).organization; } @@ -1752,7 +1904,7 @@ export class UptimeCheckServiceClient { matchServiceFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service; } @@ -1767,7 +1919,7 @@ export class UptimeCheckServiceClient { matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( organizationServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( organizationServiceServiceLevelObjectiveName ).service_level_objective; } @@ -1783,12 +1935,10 @@ export class UptimeCheckServiceClient { organization: string, uptimeCheckConfig: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.render( - { - organization, - uptime_check_config: uptimeCheckConfig, - } - ); + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); } /** @@ -1801,7 +1951,7 @@ export class UptimeCheckServiceClient { matchOrganizationFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).organization; } @@ -1816,7 +1966,7 @@ export class UptimeCheckServiceClient { matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( organizationUptimeCheckConfigName: string ) { - return this._pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( organizationUptimeCheckConfigName ).uptime_check_config; } @@ -1828,8 +1978,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectPath(project: string) { - return this._pathTemplates.projectPathTemplate.render({ - project, + return this.pathTemplates.projectPathTemplate.render({ + project: project, }); } @@ -1841,7 +1991,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: string) { - return this._pathTemplates.projectPathTemplate.match(projectName).project; + return this.pathTemplates.projectPathTemplate.match(projectName).project; } /** @@ -1852,8 +2002,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectAlertPolicyPath(project: string, alertPolicy: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, alert_policy: alertPolicy, }); } @@ -1866,7 +2016,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).project; } @@ -1879,7 +2029,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the alert_policy. */ matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { - return this._pathTemplates.projectAlertPolicyPathTemplate.match( + return this.pathTemplates.projectAlertPolicyPathTemplate.match( projectAlertPolicyName ).alert_policy; } @@ -1897,10 +2047,10 @@ export class UptimeCheckServiceClient { alertPolicy: string, condition: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.render({ - project, + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, alert_policy: alertPolicy, - condition, + condition: condition, }); } @@ -1914,7 +2064,7 @@ export class UptimeCheckServiceClient { matchProjectFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).project; } @@ -1929,7 +2079,7 @@ export class UptimeCheckServiceClient { matchAlertPolicyFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).alert_policy; } @@ -1944,7 +2094,7 @@ export class UptimeCheckServiceClient { matchConditionFromProjectAlertPolicyConditionName( projectAlertPolicyConditionName: string ) { - return this._pathTemplates.projectAlertPolicyConditionPathTemplate.match( + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( projectAlertPolicyConditionName ).condition; } @@ -1957,8 +2107,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectChannelDescriptorPath(project: string, channelDescriptor: string) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.render({ - project, + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, channel_descriptor: channelDescriptor, }); } @@ -1973,7 +2123,7 @@ export class UptimeCheckServiceClient { matchProjectFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).project; } @@ -1988,7 +2138,7 @@ export class UptimeCheckServiceClient { matchChannelDescriptorFromProjectChannelDescriptorName( projectChannelDescriptorName: string ) { - return this._pathTemplates.projectChannelDescriptorPathTemplate.match( + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( projectChannelDescriptorName ).channel_descriptor; } @@ -2001,9 +2151,9 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectGroupPath(project: string, group: string) { - return this._pathTemplates.projectGroupPathTemplate.render({ - project, - group, + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, }); } @@ -2015,7 +2165,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .project; } @@ -2027,7 +2177,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the group. */ matchGroupFromProjectGroupName(projectGroupName: string) { - return this._pathTemplates.projectGroupPathTemplate.match(projectGroupName) + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) .group; } @@ -2039,8 +2189,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectNotificationChannelPath(project: string, notificationChannel: string) { - return this._pathTemplates.projectNotificationChannelPathTemplate.render({ - project, + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, notification_channel: notificationChannel, }); } @@ -2055,7 +2205,7 @@ export class UptimeCheckServiceClient { matchProjectFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).project; } @@ -2070,7 +2220,7 @@ export class UptimeCheckServiceClient { matchNotificationChannelFromProjectNotificationChannelName( projectNotificationChannelName: string ) { - return this._pathTemplates.projectNotificationChannelPathTemplate.match( + return this.pathTemplates.projectNotificationChannelPathTemplate.match( projectNotificationChannelName ).notification_channel; } @@ -2083,9 +2233,9 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectServicePath(project: string, service: string) { - return this._pathTemplates.projectServicePathTemplate.render({ - project, - service, + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, }); } @@ -2097,7 +2247,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the project. */ matchProjectFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).project; } @@ -2110,7 +2260,7 @@ export class UptimeCheckServiceClient { * @returns {string} A string representing the service. */ matchServiceFromProjectServiceName(projectServiceName: string) { - return this._pathTemplates.projectServicePathTemplate.match( + return this.pathTemplates.projectServicePathTemplate.match( projectServiceName ).service; } @@ -2128,10 +2278,10 @@ export class UptimeCheckServiceClient { service: string, serviceLevelObjective: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( { - project, - service, + project: project, + service: service, service_level_objective: serviceLevelObjective, } ); @@ -2147,7 +2297,7 @@ export class UptimeCheckServiceClient { matchProjectFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).project; } @@ -2162,7 +2312,7 @@ export class UptimeCheckServiceClient { matchServiceFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service; } @@ -2177,7 +2327,7 @@ export class UptimeCheckServiceClient { matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( projectServiceServiceLevelObjectiveName: string ) { - return this._pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( projectServiceServiceLevelObjectiveName ).service_level_objective; } @@ -2190,8 +2340,8 @@ export class UptimeCheckServiceClient { * @returns {string} Resource name string. */ projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.render({ - project, + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, uptime_check_config: uptimeCheckConfig, }); } @@ -2206,7 +2356,7 @@ export class UptimeCheckServiceClient { matchProjectFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).project; } @@ -2221,7 +2371,7 @@ export class UptimeCheckServiceClient { matchUptimeCheckConfigFromProjectUptimeCheckConfigName( projectUptimeCheckConfigName: string ) { - return this._pathTemplates.projectUptimeCheckConfigPathTemplate.match( + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( projectUptimeCheckConfigName ).uptime_check_config; } diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 69808cbb539..1c1b8835642 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,22 +1,5 @@ { - "updateTime": "2020-03-06T12:32:55.468505Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", - "internalRef": "299181282" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" - } - } - ], + "updateTime": "2020-03-31T19:49:37.802729Z", "destinations": [ { "client": { diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js index 001f06d484b..1a73cd85938 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/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. @@ -16,7 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** - /* eslint-disable node/no-missing-require, no-unused-vars */ const monitoring = require('@google-cloud/monitoring'); diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts index a493300d67f..70b78043268 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.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. @@ -16,15 +16,22 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {AlertPolicyServiceClient, GroupServiceClient, MetricServiceClient, NotificationChannelServiceClient, ServiceMonitoringServiceClient, UptimeCheckServiceClient} from '@google-cloud/monitoring'; +import { + AlertPolicyServiceClient, + GroupServiceClient, + MetricServiceClient, + NotificationChannelServiceClient, + ServiceMonitoringServiceClient, + UptimeCheckServiceClient, +} from '@google-cloud/monitoring'; function main() { - const alertPolicyServiceClient = new AlertPolicyServiceClient(); - const groupServiceClient = new GroupServiceClient(); - const metricServiceClient = new MetricServiceClient(); - const notificationChannelServiceClient = new NotificationChannelServiceClient(); - const serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - const uptimeCheckServiceClient = new UptimeCheckServiceClient(); + new AlertPolicyServiceClient(); + new GroupServiceClient(); + new MetricServiceClient(); + new NotificationChannelServiceClient(); + new ServiceMonitoringServiceClient(); + new UptimeCheckServiceClient(); } main(); diff --git a/packages/google-cloud-monitoring/system-test/install.ts b/packages/google-cloud-monitoring/system-test/install.ts index c9aa74ec221..c4d80e9c0c8 100644 --- a/packages/google-cloud-monitoring/system-test/install.ts +++ b/packages/google-cloud-monitoring/system-test/install.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/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts b/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts index efd9be651eb..4923de6f4f8 100644 --- a/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts +++ b/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts @@ -21,6 +21,7 @@ describe('MetricServiceSmokeTest', () => { const projectId = process.env.GCLOUD_PROJECT; it('successfully makes a call to the service using promises', done => { + // eslint-disable-next-line @typescript-eslint/no-var-requires const monitoring = require('../src'); const client = new monitoring.v3.MetricServiceClient({ @@ -43,6 +44,7 @@ describe('MetricServiceSmokeTest', () => { }); it('successfully makes a call to the service using callbacks', done => { + // eslint-disable-next-line @typescript-eslint/no-var-requires const monitoring = require('../src'); const client = new monitoring.v3.MetricServiceClient({ @@ -78,6 +80,7 @@ describe('MetricServiceSmokeTest', () => { }); it('successfully makes a call to the service using streaming', done => { + // eslint-disable-next-line @typescript-eslint/no-var-requires const monitoring = require('../src'); const client = new monitoring.v3.MetricServiceClient({ diff --git a/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts deleted file mode 100644 index bc7b80f2d37..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-alert_policy_service-v3.ts +++ /dev/null @@ -1,375 +0,0 @@ -// 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. -// -// ** 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 alertpolicyserviceModule = 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('v3.AlertPolicyServiceClient', () => { - it('has servicePath', () => { - const servicePath = - alertpolicyserviceModule.v3.AlertPolicyServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - alertpolicyserviceModule.v3.AlertPolicyServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = alertpolicyserviceModule.v3.AlertPolicyServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.alertPolicyServiceStub, undefined); - await client.initialize(); - assert(client.alertPolicyServiceStub); - }); - it('has close method', () => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getAlertPolicy', () => { - it('invokes getAlertPolicy without error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getAlertPolicy(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getAlertPolicy with error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetAlertPolicyRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getAlertPolicy(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createAlertPolicy', () => { - it('invokes createAlertPolicy without error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createAlertPolicy(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createAlertPolicy with error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateAlertPolicyRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createAlertPolicy(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteAlertPolicy', () => { - it('invokes deleteAlertPolicy without error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteAlertPolicy(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteAlertPolicy with error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteAlertPolicyRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteAlertPolicy(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateAlertPolicy', () => { - it('invokes updateAlertPolicy without error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; - request.alertPolicy = {}; - request.alertPolicy.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateAlertPolicy(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateAlertPolicy with error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateAlertPolicyRequest = {}; - request.alertPolicy = {}; - request.alertPolicy.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateAlertPolicy = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateAlertPolicy(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listAlertPolicies', () => { - it('invokes listAlertPolicies without error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listAlertPolicies = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listAlertPolicies(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listAlertPoliciesStream', () => { - it('invokes listAlertPoliciesStream without error', done => { - const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListAlertPoliciesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listAlertPolicies = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listAlertPoliciesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts deleted file mode 100644 index 941a1a75376..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-group_service-v3.ts +++ /dev/null @@ -1,436 +0,0 @@ -// 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. -// -// ** 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 groupserviceModule = 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('v3.GroupServiceClient', () => { - it('has servicePath', () => { - const servicePath = groupserviceModule.v3.GroupServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = groupserviceModule.v3.GroupServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = groupserviceModule.v3.GroupServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new groupserviceModule.v3.GroupServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new groupserviceModule.v3.GroupServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.groupServiceStub, undefined); - await client.initialize(); - assert(client.groupServiceStub); - }); - it('has close method', () => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getGroup', () => { - it('invokes getGroup without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getGroup = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getGroup(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getGroup with error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetGroupRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getGroup(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createGroup', () => { - it('invokes createGroup without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createGroup = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createGroup(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createGroup with error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateGroupRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createGroup(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateGroup', () => { - it('invokes updateGroup without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; - request.group = {}; - request.group.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateGroup(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateGroup with error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateGroupRequest = {}; - request.group = {}; - request.group.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateGroup(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteGroup', () => { - it('invokes deleteGroup without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteGroup(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteGroup with error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteGroupRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteGroup = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteGroup(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listGroups', () => { - it('invokes listGroups without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListGroupsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listGroups = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listGroups(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listGroupsStream', () => { - it('invokes listGroupsStream without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListGroupsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listGroups = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listGroupsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listGroupMembers', () => { - it('invokes listGroupMembers without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListGroupMembersRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listGroupMembers = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listGroupMembers(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listGroupMembersStream', () => { - it('invokes listGroupMembersStream without error', done => { - const client = new groupserviceModule.v3.GroupServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListGroupMembersRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listGroupMembers = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listGroupMembersStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts deleted file mode 100644 index 6490176488a..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-metric_service-v3.ts +++ /dev/null @@ -1,558 +0,0 @@ -// 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. -// -// ** 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 metricserviceModule = 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('v3.MetricServiceClient', () => { - it('has servicePath', () => { - const servicePath = metricserviceModule.v3.MetricServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = metricserviceModule.v3.MetricServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = metricserviceModule.v3.MetricServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new metricserviceModule.v3.MetricServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new metricserviceModule.v3.MetricServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.metricServiceStub, undefined); - await client.initialize(); - assert(client.metricServiceStub); - }); - it('has close method', () => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getMonitoredResourceDescriptor', () => { - it('invokes getMonitoredResourceDescriptor without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getMonitoredResourceDescriptor( - request, - (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - - it('invokes getMonitoredResourceDescriptor with error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getMonitoredResourceDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getMonitoredResourceDescriptor( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('getMetricDescriptor', () => { - it('invokes getMetricDescriptor without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getMetricDescriptor(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getMetricDescriptor with error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetMetricDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getMetricDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getMetricDescriptor(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createMetricDescriptor', () => { - it('invokes createMetricDescriptor without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createMetricDescriptor(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createMetricDescriptor with error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateMetricDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createMetricDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createMetricDescriptor(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteMetricDescriptor', () => { - it('invokes deleteMetricDescriptor without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteMetricDescriptor(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteMetricDescriptor with error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteMetricDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteMetricDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteMetricDescriptor(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createTimeSeries', () => { - it('invokes createTimeSeries without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createTimeSeries(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createTimeSeries with error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateTimeSeriesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createTimeSeries = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createTimeSeries(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listMonitoredResourceDescriptors', () => { - it('invokes listMonitoredResourceDescriptors without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest = {}; - request.name = ''; - // 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 metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest = {}; - request.name = ''; - // 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('listMetricDescriptors', () => { - it('invokes listMetricDescriptors without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listMetricDescriptors = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listMetricDescriptors(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listMetricDescriptorsStream', () => { - it('invokes listMetricDescriptorsStream without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListMetricDescriptorsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listMetricDescriptors = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listMetricDescriptorsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listTimeSeries', () => { - it('invokes listTimeSeries without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listTimeSeries = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listTimeSeries(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listTimeSeriesStream', () => { - it('invokes listTimeSeriesStream without error', done => { - const client = new metricserviceModule.v3.MetricServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListTimeSeriesRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listTimeSeries = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listTimeSeriesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts deleted file mode 100644 index 85398175164..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-notification_channel_service-v3.ts +++ /dev/null @@ -1,731 +0,0 @@ -// 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. -// -// ** 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 notificationchannelserviceModule = 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('v3.NotificationChannelServiceClient', () => { - it('has servicePath', () => { - const servicePath = - notificationchannelserviceModule.v3.NotificationChannelServiceClient - .servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - notificationchannelserviceModule.v3.NotificationChannelServiceClient - .apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = - notificationchannelserviceModule.v3.NotificationChannelServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - fallback: true, - } - ); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.notificationChannelServiceStub, undefined); - await client.initialize(); - assert(client.notificationChannelServiceStub); - }); - it('has close method', () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.close(); - }); - describe('getNotificationChannelDescriptor', () => { - it('invokes getNotificationChannelDescriptor without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getNotificationChannelDescriptor( - request, - (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - - it('invokes getNotificationChannelDescriptor with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetNotificationChannelDescriptorRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getNotificationChannelDescriptor = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getNotificationChannelDescriptor( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('getNotificationChannel', () => { - it('invokes getNotificationChannel without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getNotificationChannel(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getNotificationChannel with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getNotificationChannel(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createNotificationChannel', () => { - it('invokes createNotificationChannel without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createNotificationChannel(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createNotificationChannel with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createNotificationChannel( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('updateNotificationChannel', () => { - it('invokes updateNotificationChannel without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; - request.notificationChannel = {}; - request.notificationChannel.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateNotificationChannel(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateNotificationChannel with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateNotificationChannelRequest = {}; - request.notificationChannel = {}; - request.notificationChannel.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateNotificationChannel( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('deleteNotificationChannel', () => { - it('invokes deleteNotificationChannel without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteNotificationChannel(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteNotificationChannel with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteNotificationChannel( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('sendNotificationChannelVerificationCode', () => { - it('invokes sendNotificationChannelVerificationCode without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.sendNotificationChannelVerificationCode( - request, - (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - - it('invokes sendNotificationChannelVerificationCode with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.sendNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - null, - error - ); - client.sendNotificationChannelVerificationCode( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('getNotificationChannelVerificationCode', () => { - it('invokes getNotificationChannelVerificationCode without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getNotificationChannelVerificationCode( - request, - (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - - it('invokes getNotificationChannelVerificationCode with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getNotificationChannelVerificationCode = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getNotificationChannelVerificationCode( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('verifyNotificationChannel', () => { - it('invokes verifyNotificationChannel without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.verifyNotificationChannel(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes verifyNotificationChannel with error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IVerifyNotificationChannelRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.verifyNotificationChannel = mockSimpleGrpcMethod( - request, - null, - error - ); - client.verifyNotificationChannel( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('listNotificationChannelDescriptors', () => { - it('invokes listNotificationChannelDescriptors without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listNotificationChannelDescriptors = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listNotificationChannelDescriptors( - request, - (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - }); - describe('listNotificationChannelDescriptorsStream', () => { - it('invokes listNotificationChannelDescriptorsStream without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListNotificationChannelDescriptorsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listNotificationChannelDescriptors = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listNotificationChannelDescriptorsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listNotificationChannels', () => { - it('invokes listNotificationChannels without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listNotificationChannels = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listNotificationChannels( - request, - (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - }); - describe('listNotificationChannelsStream', () => { - it('invokes listNotificationChannelsStream without error', done => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListNotificationChannelsRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listNotificationChannels = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listNotificationChannelsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts deleted file mode 100644 index f72b50dbf60..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-service_monitoring_service-v3.ts +++ /dev/null @@ -1,712 +0,0 @@ -// 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. -// -// ** 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 servicemonitoringserviceModule = 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('v3.ServiceMonitoringServiceClient', () => { - it('has servicePath', () => { - const servicePath = - servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient - .servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient - .apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = - servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - fallback: true, - } - ); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.serviceMonitoringServiceStub, undefined); - await client.initialize(); - assert(client.serviceMonitoringServiceStub); - }); - it('has close method', () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.close(); - }); - describe('createService', () => { - it('invokes createService without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createService = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createService(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createService with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateServiceRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createService = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createService(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getService', () => { - it('invokes getService without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getService = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getService(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getService with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetServiceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getService = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getService(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateService', () => { - it('invokes updateService without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; - request.service = {}; - request.service.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateService = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateService(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateService with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateServiceRequest = {}; - request.service = {}; - request.service.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateService = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateService(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteService', () => { - it('invokes deleteService without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteService = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteService(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteService with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteServiceRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteService = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteService(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createServiceLevelObjective', () => { - it('invokes createServiceLevelObjective without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createServiceLevelObjective(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createServiceLevelObjective with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateServiceLevelObjectiveRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createServiceLevelObjective( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('getServiceLevelObjective', () => { - it('invokes getServiceLevelObjective without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getServiceLevelObjective(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getServiceLevelObjective with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetServiceLevelObjectiveRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getServiceLevelObjective( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('updateServiceLevelObjective', () => { - it('invokes updateServiceLevelObjective without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; - request.serviceLevelObjective = {}; - request.serviceLevelObjective.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateServiceLevelObjective(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateServiceLevelObjective with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest = {}; - request.serviceLevelObjective = {}; - request.serviceLevelObjective.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateServiceLevelObjective( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('deleteServiceLevelObjective', () => { - it('invokes deleteServiceLevelObjective without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteServiceLevelObjective(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteServiceLevelObjective with error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteServiceLevelObjective = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteServiceLevelObjective( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('listServices', () => { - it('invokes listServices without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListServicesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listServices = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listServices(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listServicesStream', () => { - it('invokes listServicesStream without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListServicesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listServices = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listServicesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listServiceLevelObjectives', () => { - it('invokes listServiceLevelObjectives without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listServiceLevelObjectives = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listServiceLevelObjectives( - request, - (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - } - ); - }); - }); - describe('listServiceLevelObjectivesStream', () => { - it('invokes listServiceLevelObjectivesStream without error', done => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListServiceLevelObjectivesRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listServiceLevelObjectives = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listServiceLevelObjectivesStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts b/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts deleted file mode 100644 index ae479840769..00000000000 --- a/packages/google-cloud-monitoring/test/gapic-uptime_check_service-v3.ts +++ /dev/null @@ -1,445 +0,0 @@ -// 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. -// -// ** 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 uptimecheckserviceModule = 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('v3.UptimeCheckServiceClient', () => { - it('has servicePath', () => { - const servicePath = - uptimecheckserviceModule.v3.UptimeCheckServiceClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = - uptimecheckserviceModule.v3.UptimeCheckServiceClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = uptimecheckserviceModule.v3.UptimeCheckServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.uptimeCheckServiceStub, undefined); - await client.initialize(); - assert(client.uptimeCheckServiceStub); - }); - it('has close method', () => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getUptimeCheckConfig', () => { - it('invokes getUptimeCheckConfig without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getUptimeCheckConfig(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getUptimeCheckConfig with error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IGetUptimeCheckConfigRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getUptimeCheckConfig(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createUptimeCheckConfig', () => { - it('invokes createUptimeCheckConfig without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createUptimeCheckConfig(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createUptimeCheckConfig with error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.ICreateUptimeCheckConfigRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createUptimeCheckConfig( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('updateUptimeCheckConfig', () => { - it('invokes updateUptimeCheckConfig without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; - request.uptimeCheckConfig = {}; - request.uptimeCheckConfig.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateUptimeCheckConfig(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateUptimeCheckConfig with error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IUpdateUptimeCheckConfigRequest = {}; - request.uptimeCheckConfig = {}; - request.uptimeCheckConfig.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateUptimeCheckConfig( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('deleteUptimeCheckConfig', () => { - it('invokes deleteUptimeCheckConfig without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteUptimeCheckConfig(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteUptimeCheckConfig with error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IDeleteUptimeCheckConfigRequest = {}; - request.name = ''; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteUptimeCheckConfig = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteUptimeCheckConfig( - request, - (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - } - ); - }); - }); - describe('listUptimeCheckConfigs', () => { - it('invokes listUptimeCheckConfigs without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckConfigs = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listUptimeCheckConfigs(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listUptimeCheckConfigsStream', () => { - it('invokes listUptimeCheckConfigsStream without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListUptimeCheckConfigsRequest = {}; - request.parent = ''; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckConfigs = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listUptimeCheckConfigsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listUptimeCheckIps', () => { - it('invokes listUptimeCheckIps without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckIps = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listUptimeCheckIps(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listUptimeCheckIpsStream', () => { - it('invokes listUptimeCheckIpsStream without error', done => { - const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.monitoring.v3.IListUptimeCheckIpsRequest = {}; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listUptimeCheckIps = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listUptimeCheckIpsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts new file mode 100644 index 00000000000..16017316657 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts @@ -0,0 +1,2457 @@ +// 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 alertpolicyserviceModule 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('v3.AlertPolicyServiceClient', () => { + it('has servicePath', () => { + const servicePath = + alertpolicyserviceModule.v3.AlertPolicyServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + alertpolicyserviceModule.v3.AlertPolicyServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = alertpolicyserviceModule.v3.AlertPolicyServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.alertPolicyServiceStub, undefined); + await client.initialize(); + assert(client.alertPolicyServiceStub); + }); + + it('has close method', () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + 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 alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + 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('getAlertPolicy', () => { + it('invokes getAlertPolicy without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.AlertPolicy() + ); + client.innerApiCalls.getAlertPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getAlertPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getAlertPolicy without error using callback', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.AlertPolicy() + ); + client.innerApiCalls.getAlertPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getAlertPolicy( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IAlertPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getAlertPolicy with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getAlertPolicy = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getAlertPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.getAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createAlertPolicy', () => { + it('invokes createAlertPolicy without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.AlertPolicy() + ); + client.innerApiCalls.createAlertPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.createAlertPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createAlertPolicy without error using callback', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.AlertPolicy() + ); + client.innerApiCalls.createAlertPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createAlertPolicy( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IAlertPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createAlertPolicy with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createAlertPolicy = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createAlertPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.createAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteAlertPolicy', () => { + it('invokes deleteAlertPolicy without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAlertPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.deleteAlertPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteAlertPolicy without error using callback', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAlertPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteAlertPolicy( + 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.deleteAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteAlertPolicy with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteAlertPolicyRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAlertPolicy = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteAlertPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateAlertPolicy', () => { + it('invokes updateAlertPolicy without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateAlertPolicyRequest() + ); + request.alertPolicy = {}; + request.alertPolicy.name = ''; + const expectedHeaderRequestParams = 'alert_policy.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.AlertPolicy() + ); + client.innerApiCalls.updateAlertPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.updateAlertPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateAlertPolicy without error using callback', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateAlertPolicyRequest() + ); + request.alertPolicy = {}; + request.alertPolicy.name = ''; + const expectedHeaderRequestParams = 'alert_policy.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.AlertPolicy() + ); + client.innerApiCalls.updateAlertPolicy = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateAlertPolicy( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IAlertPolicy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateAlertPolicy with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateAlertPolicyRequest() + ); + request.alertPolicy = {}; + request.alertPolicy.name = ''; + const expectedHeaderRequestParams = 'alert_policy.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAlertPolicy = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateAlertPolicy(request); + }, expectedError); + assert( + (client.innerApiCalls.updateAlertPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listAlertPolicies', () => { + it('invokes listAlertPolicies without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + ]; + client.innerApiCalls.listAlertPolicies = stubSimpleCall(expectedResponse); + const [response] = await client.listAlertPolicies(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAlertPolicies as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAlertPolicies without error using callback', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + ]; + client.innerApiCalls.listAlertPolicies = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listAlertPolicies( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IAlertPolicy[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listAlertPolicies as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listAlertPolicies with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listAlertPolicies = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listAlertPolicies(request); + }, expectedError); + assert( + (client.innerApiCalls.listAlertPolicies as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listAlertPoliciesStream without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + ]; + client.descriptors.page.listAlertPolicies.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listAlertPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.AlertPolicy[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.AlertPolicy) => { + 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.listAlertPolicies.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAlertPolicies, request) + ); + assert.strictEqual( + (client.descriptors.page.listAlertPolicies + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listAlertPoliciesStream with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listAlertPolicies.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAlertPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.AlertPolicy[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.AlertPolicy) => { + 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.listAlertPolicies.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAlertPolicies, request) + ); + assert.strictEqual( + (client.descriptors.page.listAlertPolicies + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAlertPolicies without error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), + ]; + client.descriptors.page.listAlertPolicies.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.IAlertPolicy[] = []; + const iterable = client.listAlertPoliciesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAlertPolicies + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listAlertPolicies + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listAlertPolicies with error', async () => { + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListAlertPoliciesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listAlertPolicies.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listAlertPoliciesAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.IAlertPolicy[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAlertPolicies + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listAlertPolicies + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + 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('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new alertpolicyserviceModule.v3.AlertPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts new file mode 100644 index 00000000000..5ba251ff679 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts @@ -0,0 +1,2732 @@ +// 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 groupserviceModule 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('v3.GroupServiceClient', () => { + it('has servicePath', () => { + const servicePath = groupserviceModule.v3.GroupServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = groupserviceModule.v3.GroupServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = groupserviceModule.v3.GroupServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new groupserviceModule.v3.GroupServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.groupServiceStub, undefined); + await client.initialize(); + assert(client.groupServiceStub); + }); + + it('has close method', () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new groupserviceModule.v3.GroupServiceClient({ + 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 groupserviceModule.v3.GroupServiceClient({ + 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('getGroup', () => { + it('invokes getGroup without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Group() + ); + client.innerApiCalls.getGroup = stubSimpleCall(expectedResponse); + const [response] = await client.getGroup(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getGroup without error using callback', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Group() + ); + client.innerApiCalls.getGroup = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getGroup( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IGroup | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getGroup with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getGroup = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.getGroup(request); + }, expectedError); + assert( + (client.innerApiCalls.getGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createGroup', () => { + it('invokes createGroup without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Group() + ); + client.innerApiCalls.createGroup = stubSimpleCall(expectedResponse); + const [response] = await client.createGroup(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createGroup without error using callback', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Group() + ); + client.innerApiCalls.createGroup = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createGroup( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IGroup | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createGroup with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createGroup = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createGroup(request); + }, expectedError); + assert( + (client.innerApiCalls.createGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateGroup', () => { + it('invokes updateGroup without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateGroupRequest() + ); + request.group = {}; + request.group.name = ''; + const expectedHeaderRequestParams = 'group.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Group() + ); + client.innerApiCalls.updateGroup = stubSimpleCall(expectedResponse); + const [response] = await client.updateGroup(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateGroup without error using callback', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateGroupRequest() + ); + request.group = {}; + request.group.name = ''; + const expectedHeaderRequestParams = 'group.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Group() + ); + client.innerApiCalls.updateGroup = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateGroup( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IGroup | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateGroup with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateGroupRequest() + ); + request.group = {}; + request.group.name = ''; + const expectedHeaderRequestParams = 'group.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGroup = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateGroup(request); + }, expectedError); + assert( + (client.innerApiCalls.updateGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteGroup', () => { + it('invokes deleteGroup without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGroup = stubSimpleCall(expectedResponse); + const [response] = await client.deleteGroup(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteGroup without error using callback', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGroup = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteGroup( + 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.deleteGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteGroup with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteGroupRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGroup = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteGroup(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteGroup as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listGroups', () => { + it('invokes listGroups without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + ]; + client.innerApiCalls.listGroups = stubSimpleCall(expectedResponse); + const [response] = await client.listGroups(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listGroups as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listGroups without error using callback', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + ]; + client.innerApiCalls.listGroups = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listGroups( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IGroup[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listGroups as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listGroups with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listGroups = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listGroups(request); + }, expectedError); + assert( + (client.innerApiCalls.listGroups as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listGroupsStream without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + ]; + client.descriptors.page.listGroups.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listGroupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.Group[] = []; + stream.on('data', (response: protos.google.monitoring.v3.Group) => { + 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.listGroups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGroups, request) + ); + assert.strictEqual( + (client.descriptors.page.listGroups.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listGroupsStream with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listGroups.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listGroupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.Group[] = []; + stream.on('data', (response: protos.google.monitoring.v3.Group) => { + 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.listGroups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGroups, request) + ); + assert.strictEqual( + (client.descriptors.page.listGroups.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listGroups without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + generateSampleMessage(new protos.google.monitoring.v3.Group()), + ]; + client.descriptors.page.listGroups.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.IGroup[] = []; + const iterable = client.listGroupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listGroups.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listGroups.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listGroups with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listGroups.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listGroupsAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.IGroup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listGroups.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listGroups.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listGroupMembers', () => { + it('invokes listGroupMembers without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + ]; + client.innerApiCalls.listGroupMembers = stubSimpleCall(expectedResponse); + const [response] = await client.listGroupMembers(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listGroupMembers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listGroupMembers without error using callback', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + ]; + client.innerApiCalls.listGroupMembers = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listGroupMembers( + request, + ( + err?: Error | null, + result?: protos.google.api.IMonitoredResource[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listGroupMembers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listGroupMembers with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listGroupMembers = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listGroupMembers(request); + }, expectedError); + assert( + (client.innerApiCalls.listGroupMembers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listGroupMembersStream without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + ]; + client.descriptors.page.listGroupMembers.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listGroupMembersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.MonitoredResource[] = []; + stream.on('data', (response: protos.google.api.MonitoredResource) => { + 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.listGroupMembers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGroupMembers, request) + ); + assert.strictEqual( + (client.descriptors.page.listGroupMembers + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listGroupMembersStream with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listGroupMembers.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listGroupMembersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.MonitoredResource[] = []; + stream.on('data', (response: protos.google.api.MonitoredResource) => { + 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.listGroupMembers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGroupMembers, request) + ); + assert.strictEqual( + (client.descriptors.page.listGroupMembers + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listGroupMembers without error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + generateSampleMessage(new protos.google.api.MonitoredResource()), + ]; + client.descriptors.page.listGroupMembers.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.api.IMonitoredResource[] = []; + const iterable = client.listGroupMembersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listGroupMembers + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listGroupMembers + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listGroupMembers with error', async () => { + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListGroupMembersRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listGroupMembers.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listGroupMembersAsync(request); + assert.rejects(async () => { + const responses: protos.google.api.IMonitoredResource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listGroupMembers + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listGroupMembers + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + 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('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new groupserviceModule.v3.GroupServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts new file mode 100644 index 00000000000..142d8e0ec7f --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts @@ -0,0 +1,3551 @@ +// 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 metricserviceModule 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('v3.MetricServiceClient', () => { + it('has servicePath', () => { + const servicePath = metricserviceModule.v3.MetricServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = metricserviceModule.v3.MetricServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = metricserviceModule.v3.MetricServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new metricserviceModule.v3.MetricServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.metricServiceStub, undefined); + await client.initialize(); + assert(client.metricServiceStub); + }); + + it('has close method', () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new metricserviceModule.v3.MetricServiceClient({ + 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 metricserviceModule.v3.MetricServiceClient({ + 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('getMonitoredResourceDescriptor', () => { + it('invokes getMonitoredResourceDescriptor without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetMonitoredResourceDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ); + client.innerApiCalls.getMonitoredResourceDescriptor = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getMonitoredResourceDescriptor(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getMonitoredResourceDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getMonitoredResourceDescriptor without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetMonitoredResourceDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.MonitoredResourceDescriptor() + ); + client.innerApiCalls.getMonitoredResourceDescriptor = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getMonitoredResourceDescriptor( + 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.getMonitoredResourceDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getMonitoredResourceDescriptor with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetMonitoredResourceDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getMonitoredResourceDescriptor = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getMonitoredResourceDescriptor(request); + }, expectedError); + assert( + (client.innerApiCalls.getMonitoredResourceDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getMetricDescriptor', () => { + it('invokes getMetricDescriptor without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.MetricDescriptor() + ); + client.innerApiCalls.getMetricDescriptor = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getMetricDescriptor(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getMetricDescriptor without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.MetricDescriptor() + ); + client.innerApiCalls.getMetricDescriptor = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getMetricDescriptor( + request, + ( + err?: Error | null, + result?: protos.google.api.IMetricDescriptor | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getMetricDescriptor with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getMetricDescriptor = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getMetricDescriptor(request); + }, expectedError); + assert( + (client.innerApiCalls.getMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createMetricDescriptor', () => { + it('invokes createMetricDescriptor without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.MetricDescriptor() + ); + client.innerApiCalls.createMetricDescriptor = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createMetricDescriptor(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createMetricDescriptor without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.api.MetricDescriptor() + ); + client.innerApiCalls.createMetricDescriptor = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createMetricDescriptor( + request, + ( + err?: Error | null, + result?: protos.google.api.IMetricDescriptor | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createMetricDescriptor with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createMetricDescriptor = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createMetricDescriptor(request); + }, expectedError); + assert( + (client.innerApiCalls.createMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteMetricDescriptor', () => { + it('invokes deleteMetricDescriptor without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteMetricDescriptor = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteMetricDescriptor(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteMetricDescriptor without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteMetricDescriptor = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteMetricDescriptor( + 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.deleteMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteMetricDescriptor with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteMetricDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMetricDescriptor = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteMetricDescriptor(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteMetricDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createTimeSeries', () => { + it('invokes createTimeSeries without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.createTimeSeries = stubSimpleCall(expectedResponse); + const [response] = await client.createTimeSeries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createTimeSeries without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.createTimeSeries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createTimeSeries( + 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.createTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createTimeSeries with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createTimeSeries = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createTimeSeries(request); + }, expectedError); + assert( + (client.innerApiCalls.createTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listMonitoredResourceDescriptors', () => { + it('invokes listMonitoredResourceDescriptors without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + 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 metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + 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 metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + 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 metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + 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 + ) + ); + assert.strictEqual( + (client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listMonitoredResourceDescriptorsStream with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + 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 + ) + ); + assert.strictEqual( + (client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listMonitoredResourceDescriptors without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + 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 + ); + assert.strictEqual( + (client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listMonitoredResourceDescriptors with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + 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 + ); + assert.strictEqual( + (client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listMetricDescriptors', () => { + it('invokes listMetricDescriptors without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + ]; + client.innerApiCalls.listMetricDescriptors = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listMetricDescriptors(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listMetricDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listMetricDescriptors without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + ]; + client.innerApiCalls.listMetricDescriptors = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listMetricDescriptors( + request, + ( + err?: Error | null, + result?: protos.google.api.IMetricDescriptor[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listMetricDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listMetricDescriptors with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listMetricDescriptors = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listMetricDescriptors(request); + }, expectedError); + assert( + (client.innerApiCalls.listMetricDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listMetricDescriptorsStream without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + ]; + client.descriptors.page.listMetricDescriptors.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listMetricDescriptorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.MetricDescriptor[] = []; + stream.on('data', (response: protos.google.api.MetricDescriptor) => { + 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.listMetricDescriptors + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMetricDescriptors, request) + ); + assert.strictEqual( + (client.descriptors.page.listMetricDescriptors + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listMetricDescriptorsStream with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listMetricDescriptors.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listMetricDescriptorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.api.MetricDescriptor[] = []; + stream.on('data', (response: protos.google.api.MetricDescriptor) => { + 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.listMetricDescriptors + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMetricDescriptors, request) + ); + assert.strictEqual( + (client.descriptors.page.listMetricDescriptors + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listMetricDescriptors without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + generateSampleMessage(new protos.google.api.MetricDescriptor()), + ]; + client.descriptors.page.listMetricDescriptors.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.api.IMetricDescriptor[] = []; + const iterable = client.listMetricDescriptorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listMetricDescriptors with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListMetricDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listMetricDescriptors.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listMetricDescriptorsAsync(request); + assert.rejects(async () => { + const responses: protos.google.api.IMetricDescriptor[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listTimeSeries', () => { + it('invokes listTimeSeries without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + ]; + client.innerApiCalls.listTimeSeries = stubSimpleCall(expectedResponse); + const [response] = await client.listTimeSeries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTimeSeries without error using callback', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + ]; + client.innerApiCalls.listTimeSeries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listTimeSeries( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.ITimeSeries[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listTimeSeries with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listTimeSeries = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listTimeSeries(request); + }, expectedError); + assert( + (client.innerApiCalls.listTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listTimeSeriesStream without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + ]; + client.descriptors.page.listTimeSeries.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listTimeSeriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.TimeSeries[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.TimeSeries) => { + 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.listTimeSeries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTimeSeries, request) + ); + assert.strictEqual( + (client.descriptors.page.listTimeSeries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listTimeSeriesStream with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listTimeSeries.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTimeSeriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.TimeSeries[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.TimeSeries) => { + 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.listTimeSeries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTimeSeries, request) + ); + assert.strictEqual( + (client.descriptors.page.listTimeSeries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTimeSeries without error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), + ]; + client.descriptors.page.listTimeSeries.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.ITimeSeries[] = []; + const iterable = client.listTimeSeriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTimeSeries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTimeSeries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listTimeSeries with error', async () => { + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listTimeSeries.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listTimeSeriesAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.ITimeSeries[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTimeSeries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listTimeSeries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderMetricDescriptor', () => { + const fakePath = '/rendered/path/folderMetricDescriptor'; + const expectedParameters = { + folder: 'folderValue', + metric_descriptor: 'metricDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderMetricDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderMetricDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderMetricDescriptorPath', () => { + const result = client.folderMetricDescriptorPath( + 'folderValue', + 'metricDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderMetricDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderMetricDescriptorName', () => { + const result = client.matchFolderFromFolderMetricDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderMetricDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetricDescriptorFromFolderMetricDescriptorName', () => { + const result = client.matchMetricDescriptorFromFolderMetricDescriptorName( + fakePath + ); + assert.strictEqual(result, 'metricDescriptorValue'); + assert( + (client.pathTemplates.folderMetricDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderMonitoredResourceDescriptor', () => { + const fakePath = '/rendered/path/folderMonitoredResourceDescriptor'; + const expectedParameters = { + folder: 'folderValue', + monitored_resource_descriptor: 'monitoredResourceDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderMonitoredResourceDescriptorPath', () => { + const result = client.folderMonitoredResourceDescriptorPath( + 'folderValue', + 'monitoredResourceDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderMonitoredResourceDescriptorName', () => { + const result = client.matchFolderFromFolderMonitoredResourceDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName', () => { + const result = client.matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName( + fakePath + ); + assert.strictEqual(result, 'monitoredResourceDescriptorValue'); + assert( + (client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationMetricDescriptor', () => { + const fakePath = '/rendered/path/organizationMetricDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + metric_descriptor: 'metricDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationMetricDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationMetricDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationMetricDescriptorPath', () => { + const result = client.organizationMetricDescriptorPath( + 'organizationValue', + 'metricDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationMetricDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationMetricDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationMetricDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationMetricDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetricDescriptorFromOrganizationMetricDescriptorName', () => { + const result = client.matchMetricDescriptorFromOrganizationMetricDescriptorName( + fakePath + ); + assert.strictEqual(result, 'metricDescriptorValue'); + assert( + (client.pathTemplates.organizationMetricDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationMonitoredResourceDescriptor', () => { + const fakePath = '/rendered/path/organizationMonitoredResourceDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + monitored_resource_descriptor: 'monitoredResourceDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationMonitoredResourceDescriptorPath', () => { + const result = client.organizationMonitoredResourceDescriptorPath( + 'organizationValue', + 'monitoredResourceDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationMonitoredResourceDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationMonitoredResourceDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationMonitoredResourceDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationMonitoredResourceDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName', () => { + const result = client.matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName( + fakePath + ); + assert.strictEqual(result, 'monitoredResourceDescriptorValue'); + assert( + (client.pathTemplates + .organizationMonitoredResourceDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + 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('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectMetricDescriptor', () => { + const fakePath = '/rendered/path/projectMetricDescriptor'; + const expectedParameters = { + project: 'projectValue', + metric_descriptor: 'metricDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectMetricDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectMetricDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectMetricDescriptorPath', () => { + const result = client.projectMetricDescriptorPath( + 'projectValue', + 'metricDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectMetricDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectMetricDescriptorName', () => { + const result = client.matchProjectFromProjectMetricDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectMetricDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetricDescriptorFromProjectMetricDescriptorName', () => { + const result = client.matchMetricDescriptorFromProjectMetricDescriptorName( + fakePath + ); + assert.strictEqual(result, 'metricDescriptorValue'); + assert( + (client.pathTemplates.projectMetricDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectMonitoredResourceDescriptor', () => { + const fakePath = '/rendered/path/projectMonitoredResourceDescriptor'; + const expectedParameters = { + project: 'projectValue', + monitored_resource_descriptor: 'monitoredResourceDescriptorValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectMonitoredResourceDescriptorPath', () => { + const result = client.projectMonitoredResourceDescriptorPath( + 'projectValue', + 'monitoredResourceDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectMonitoredResourceDescriptorName', () => { + const result = client.matchProjectFromProjectMonitoredResourceDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName', () => { + const result = client.matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName( + fakePath + ); + assert.strictEqual(result, 'monitoredResourceDescriptorValue'); + assert( + (client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts new file mode 100644 index 00000000000..863d9437538 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts @@ -0,0 +1,3442 @@ +// 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 notificationchannelserviceModule 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('v3.NotificationChannelServiceClient', () => { + it('has servicePath', () => { + const servicePath = + notificationchannelserviceModule.v3.NotificationChannelServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + notificationchannelserviceModule.v3.NotificationChannelServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + notificationchannelserviceModule.v3.NotificationChannelServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.notificationChannelServiceStub, undefined); + await client.initialize(); + assert(client.notificationChannelServiceStub); + }); + + it('has close method', () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + 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 notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + 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('getNotificationChannelDescriptor', () => { + it('invokes getNotificationChannelDescriptor without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ); + client.innerApiCalls.getNotificationChannelDescriptor = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getNotificationChannelDescriptor(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getNotificationChannelDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getNotificationChannelDescriptor without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ); + client.innerApiCalls.getNotificationChannelDescriptor = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getNotificationChannelDescriptor( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.INotificationChannelDescriptor | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getNotificationChannelDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getNotificationChannelDescriptor with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelDescriptorRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getNotificationChannelDescriptor = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getNotificationChannelDescriptor(request); + }, expectedError); + assert( + (client.innerApiCalls.getNotificationChannelDescriptor as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getNotificationChannel', () => { + it('invokes getNotificationChannel without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.getNotificationChannel = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getNotificationChannel(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getNotificationChannel without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.getNotificationChannel = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getNotificationChannel( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.INotificationChannel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getNotificationChannel with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getNotificationChannel = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getNotificationChannel(request); + }, expectedError); + assert( + (client.innerApiCalls.getNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createNotificationChannel', () => { + it('invokes createNotificationChannel without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.createNotificationChannel = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createNotificationChannel(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createNotificationChannel without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.createNotificationChannel = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createNotificationChannel( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.INotificationChannel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createNotificationChannel with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createNotificationChannel = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createNotificationChannel(request); + }, expectedError); + assert( + (client.innerApiCalls.createNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateNotificationChannel', () => { + it('invokes updateNotificationChannel without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateNotificationChannelRequest() + ); + request.notificationChannel = {}; + request.notificationChannel.name = ''; + const expectedHeaderRequestParams = 'notification_channel.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.updateNotificationChannel = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateNotificationChannel(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateNotificationChannel without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateNotificationChannelRequest() + ); + request.notificationChannel = {}; + request.notificationChannel.name = ''; + const expectedHeaderRequestParams = 'notification_channel.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.updateNotificationChannel = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateNotificationChannel( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.INotificationChannel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateNotificationChannel with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateNotificationChannelRequest() + ); + request.notificationChannel = {}; + request.notificationChannel.name = ''; + const expectedHeaderRequestParams = 'notification_channel.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateNotificationChannel = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateNotificationChannel(request); + }, expectedError); + assert( + (client.innerApiCalls.updateNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteNotificationChannel', () => { + it('invokes deleteNotificationChannel without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteNotificationChannel = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteNotificationChannel(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteNotificationChannel without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteNotificationChannel = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteNotificationChannel( + 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.deleteNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteNotificationChannel with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteNotificationChannel = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteNotificationChannel(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('sendNotificationChannelVerificationCode', () => { + it('invokes sendNotificationChannelVerificationCode without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.sendNotificationChannelVerificationCode = stubSimpleCall( + expectedResponse + ); + const [response] = await client.sendNotificationChannelVerificationCode( + request + ); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls + .sendNotificationChannelVerificationCode as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes sendNotificationChannelVerificationCode without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.sendNotificationChannelVerificationCode = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.sendNotificationChannelVerificationCode( + 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 + .sendNotificationChannelVerificationCode as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes sendNotificationChannelVerificationCode with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.sendNotificationChannelVerificationCode = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.sendNotificationChannelVerificationCode(request); + }, expectedError); + assert( + (client.innerApiCalls + .sendNotificationChannelVerificationCode as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getNotificationChannelVerificationCode', () => { + it('invokes getNotificationChannelVerificationCode without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse() + ); + client.innerApiCalls.getNotificationChannelVerificationCode = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getNotificationChannelVerificationCode( + request + ); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls + .getNotificationChannelVerificationCode as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getNotificationChannelVerificationCode without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse() + ); + client.innerApiCalls.getNotificationChannelVerificationCode = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getNotificationChannelVerificationCode( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls + .getNotificationChannelVerificationCode as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getNotificationChannelVerificationCode with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getNotificationChannelVerificationCode = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getNotificationChannelVerificationCode(request); + }, expectedError); + assert( + (client.innerApiCalls + .getNotificationChannelVerificationCode as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('verifyNotificationChannel', () => { + it('invokes verifyNotificationChannel without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.VerifyNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.verifyNotificationChannel = stubSimpleCall( + expectedResponse + ); + const [response] = await client.verifyNotificationChannel(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.verifyNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes verifyNotificationChannel without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.VerifyNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ); + client.innerApiCalls.verifyNotificationChannel = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.verifyNotificationChannel( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.INotificationChannel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.verifyNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes verifyNotificationChannel with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.VerifyNotificationChannelRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.verifyNotificationChannel = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.verifyNotificationChannel(request); + }, expectedError); + assert( + (client.innerApiCalls.verifyNotificationChannel as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listNotificationChannelDescriptors', () => { + it('invokes listNotificationChannelDescriptors without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + ]; + client.innerApiCalls.listNotificationChannelDescriptors = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listNotificationChannelDescriptors( + request + ); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listNotificationChannelDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listNotificationChannelDescriptors without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + ]; + client.innerApiCalls.listNotificationChannelDescriptors = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listNotificationChannelDescriptors( + request, + ( + err?: Error | null, + result?: + | protos.google.monitoring.v3.INotificationChannelDescriptor[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listNotificationChannelDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listNotificationChannelDescriptors with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listNotificationChannelDescriptors = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listNotificationChannelDescriptors(request); + }, expectedError); + assert( + (client.innerApiCalls.listNotificationChannelDescriptors as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listNotificationChannelDescriptorsStream without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + ]; + client.descriptors.page.listNotificationChannelDescriptors.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listNotificationChannelDescriptorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.NotificationChannelDescriptor[] = []; + stream.on( + 'data', + ( + response: protos.google.monitoring.v3.NotificationChannelDescriptor + ) => { + 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.listNotificationChannelDescriptors + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listNotificationChannelDescriptors, + request + ) + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannelDescriptors + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listNotificationChannelDescriptorsStream with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listNotificationChannelDescriptors.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listNotificationChannelDescriptorsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.NotificationChannelDescriptor[] = []; + stream.on( + 'data', + ( + response: protos.google.monitoring.v3.NotificationChannelDescriptor + ) => { + 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.listNotificationChannelDescriptors + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listNotificationChannelDescriptors, + request + ) + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannelDescriptors + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listNotificationChannelDescriptors without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannelDescriptor() + ), + ]; + client.descriptors.page.listNotificationChannelDescriptors.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = []; + const iterable = client.listNotificationChannelDescriptorsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listNotificationChannelDescriptors with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listNotificationChannelDescriptors.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listNotificationChannelDescriptorsAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listNotificationChannels', () => { + it('invokes listNotificationChannels without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + ]; + client.innerApiCalls.listNotificationChannels = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listNotificationChannels(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listNotificationChannels as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listNotificationChannels without error using callback', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + ]; + client.innerApiCalls.listNotificationChannels = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listNotificationChannels( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.INotificationChannel[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listNotificationChannels as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listNotificationChannels with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listNotificationChannels = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listNotificationChannels(request); + }, expectedError); + assert( + (client.innerApiCalls.listNotificationChannels as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listNotificationChannelsStream without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + ]; + client.descriptors.page.listNotificationChannels.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listNotificationChannelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.NotificationChannel[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.NotificationChannel) => { + 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.listNotificationChannels + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listNotificationChannels, request) + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannels + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listNotificationChannelsStream with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listNotificationChannels.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listNotificationChannelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.NotificationChannel[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.NotificationChannel) => { + 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.listNotificationChannels + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listNotificationChannels, request) + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannels + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listNotificationChannels without error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + generateSampleMessage( + new protos.google.monitoring.v3.NotificationChannel() + ), + ]; + client.descriptors.page.listNotificationChannels.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.INotificationChannel[] = []; + const iterable = client.listNotificationChannelsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listNotificationChannels with error', async () => { + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListNotificationChannelsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.listNotificationChannels.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listNotificationChannelsAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.INotificationChannel[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + 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('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts new file mode 100644 index 00000000000..ab41526c84d --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts @@ -0,0 +1,3379 @@ +// 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 servicemonitoringserviceModule 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('v3.ServiceMonitoringServiceClient', () => { + it('has servicePath', () => { + const servicePath = + servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.serviceMonitoringServiceStub, undefined); + await client.initialize(); + assert(client.serviceMonitoringServiceStub); + }); + + it('has close method', () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + 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 servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + 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('createService', () => { + it('invokes createService without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateServiceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Service() + ); + client.innerApiCalls.createService = stubSimpleCall(expectedResponse); + const [response] = await client.createService(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createService without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateServiceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Service() + ); + client.innerApiCalls.createService = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createService( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IService | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createService with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateServiceRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createService = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createService(request); + }, expectedError); + assert( + (client.innerApiCalls.createService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getService', () => { + it('invokes getService without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetServiceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Service() + ); + client.innerApiCalls.getService = stubSimpleCall(expectedResponse); + const [response] = await client.getService(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getService without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetServiceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Service() + ); + client.innerApiCalls.getService = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getService( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IService | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getService with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetServiceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getService = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getService(request); + }, expectedError); + assert( + (client.innerApiCalls.getService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateService', () => { + it('invokes updateService without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateServiceRequest() + ); + request.service = {}; + request.service.name = ''; + const expectedHeaderRequestParams = 'service.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Service() + ); + client.innerApiCalls.updateService = stubSimpleCall(expectedResponse); + const [response] = await client.updateService(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateService without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateServiceRequest() + ); + request.service = {}; + request.service.name = ''; + const expectedHeaderRequestParams = 'service.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.Service() + ); + client.innerApiCalls.updateService = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateService( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IService | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateService with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateServiceRequest() + ); + request.service = {}; + request.service.name = ''; + const expectedHeaderRequestParams = 'service.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateService = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateService(request); + }, expectedError); + assert( + (client.innerApiCalls.updateService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteService', () => { + it('invokes deleteService without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteServiceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteService = stubSimpleCall(expectedResponse); + const [response] = await client.deleteService(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteService without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteServiceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteService = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteService( + 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.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteService with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteServiceRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteService = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteService(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteService as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createServiceLevelObjective', () => { + it('invokes createServiceLevelObjective without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateServiceLevelObjectiveRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ); + client.innerApiCalls.createServiceLevelObjective = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createServiceLevelObjective(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createServiceLevelObjective without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateServiceLevelObjectiveRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ); + client.innerApiCalls.createServiceLevelObjective = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createServiceLevelObjective( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IServiceLevelObjective | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createServiceLevelObjective with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateServiceLevelObjectiveRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createServiceLevelObjective = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createServiceLevelObjective(request); + }, expectedError); + assert( + (client.innerApiCalls.createServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getServiceLevelObjective', () => { + it('invokes getServiceLevelObjective without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetServiceLevelObjectiveRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ); + client.innerApiCalls.getServiceLevelObjective = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getServiceLevelObjective(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getServiceLevelObjective without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetServiceLevelObjectiveRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ); + client.innerApiCalls.getServiceLevelObjective = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getServiceLevelObjective( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IServiceLevelObjective | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getServiceLevelObjective with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetServiceLevelObjectiveRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getServiceLevelObjective = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getServiceLevelObjective(request); + }, expectedError); + assert( + (client.innerApiCalls.getServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateServiceLevelObjective', () => { + it('invokes updateServiceLevelObjective without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateServiceLevelObjectiveRequest() + ); + request.serviceLevelObjective = {}; + request.serviceLevelObjective.name = ''; + const expectedHeaderRequestParams = 'service_level_objective.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ); + client.innerApiCalls.updateServiceLevelObjective = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateServiceLevelObjective(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateServiceLevelObjective without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateServiceLevelObjectiveRequest() + ); + request.serviceLevelObjective = {}; + request.serviceLevelObjective.name = ''; + const expectedHeaderRequestParams = 'service_level_objective.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ); + client.innerApiCalls.updateServiceLevelObjective = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateServiceLevelObjective( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IServiceLevelObjective | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateServiceLevelObjective with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateServiceLevelObjectiveRequest() + ); + request.serviceLevelObjective = {}; + request.serviceLevelObjective.name = ''; + const expectedHeaderRequestParams = 'service_level_objective.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateServiceLevelObjective = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateServiceLevelObjective(request); + }, expectedError); + assert( + (client.innerApiCalls.updateServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteServiceLevelObjective', () => { + it('invokes deleteServiceLevelObjective without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteServiceLevelObjectiveRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteServiceLevelObjective = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteServiceLevelObjective(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteServiceLevelObjective without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteServiceLevelObjectiveRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteServiceLevelObjective = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteServiceLevelObjective( + 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.deleteServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteServiceLevelObjective with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteServiceLevelObjectiveRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteServiceLevelObjective = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteServiceLevelObjective(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteServiceLevelObjective as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listServices', () => { + it('invokes listServices without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + ]; + client.innerApiCalls.listServices = stubSimpleCall(expectedResponse); + const [response] = await client.listServices(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServices without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + ]; + client.innerApiCalls.listServices = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listServices( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IService[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listServices with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listServices = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listServices(request); + }, expectedError); + assert( + (client.innerApiCalls.listServices as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServicesStream without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + ]; + client.descriptors.page.listServices.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listServicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.Service[] = []; + stream.on('data', (response: protos.google.monitoring.v3.Service) => { + 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.listServices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServices, request) + ); + assert.strictEqual( + (client.descriptors.page.listServices + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listServicesStream with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listServices.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listServicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.Service[] = []; + stream.on('data', (response: protos.google.monitoring.v3.Service) => { + 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.listServices.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServices, request) + ); + assert.strictEqual( + (client.descriptors.page.listServices + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServices without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + generateSampleMessage(new protos.google.monitoring.v3.Service()), + ]; + client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.IService[] = []; + const iterable = client.listServicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listServices + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServices + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServices with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServicesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listServicesAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.IService[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listServices + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServices + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listServiceLevelObjectives', () => { + it('invokes listServiceLevelObjectives without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + ]; + client.innerApiCalls.listServiceLevelObjectives = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listServiceLevelObjectives(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServiceLevelObjectives as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServiceLevelObjectives without error using callback', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + ]; + client.innerApiCalls.listServiceLevelObjectives = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listServiceLevelObjectives( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IServiceLevelObjective[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listServiceLevelObjectives as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listServiceLevelObjectives with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listServiceLevelObjectives = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listServiceLevelObjectives(request); + }, expectedError); + assert( + (client.innerApiCalls.listServiceLevelObjectives as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listServiceLevelObjectivesStream without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + ]; + client.descriptors.page.listServiceLevelObjectives.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listServiceLevelObjectivesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.ServiceLevelObjective[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.ServiceLevelObjective) => { + 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.listServiceLevelObjectives + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServiceLevelObjectives, request) + ); + assert.strictEqual( + (client.descriptors.page.listServiceLevelObjectives + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listServiceLevelObjectivesStream with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listServiceLevelObjectives.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listServiceLevelObjectivesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.ServiceLevelObjective[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.ServiceLevelObjective) => { + 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.listServiceLevelObjectives + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listServiceLevelObjectives, request) + ); + assert.strictEqual( + (client.descriptors.page.listServiceLevelObjectives + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServiceLevelObjectives without error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + generateSampleMessage( + new protos.google.monitoring.v3.ServiceLevelObjective() + ), + ]; + client.descriptors.page.listServiceLevelObjectives.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = []; + const iterable = client.listServiceLevelObjectivesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listServiceLevelObjectives with error', async () => { + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listServiceLevelObjectives.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listServiceLevelObjectivesAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + 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('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts new file mode 100644 index 00000000000..494d1d134cc --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts @@ -0,0 +1,2729 @@ +// 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 uptimecheckserviceModule 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('v3.UptimeCheckServiceClient', () => { + it('has servicePath', () => { + const servicePath = + uptimecheckserviceModule.v3.UptimeCheckServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + uptimecheckserviceModule.v3.UptimeCheckServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = uptimecheckserviceModule.v3.UptimeCheckServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.uptimeCheckServiceStub, undefined); + await client.initialize(); + assert(client.uptimeCheckServiceStub); + }); + + it('has close method', () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + 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 uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + 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('getUptimeCheckConfig', () => { + it('invokes getUptimeCheckConfig without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetUptimeCheckConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ); + client.innerApiCalls.getUptimeCheckConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getUptimeCheckConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getUptimeCheckConfig without error using callback', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetUptimeCheckConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ); + client.innerApiCalls.getUptimeCheckConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getUptimeCheckConfig( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IUptimeCheckConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getUptimeCheckConfig with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.GetUptimeCheckConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getUptimeCheckConfig = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getUptimeCheckConfig(request); + }, expectedError); + assert( + (client.innerApiCalls.getUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createUptimeCheckConfig', () => { + it('invokes createUptimeCheckConfig without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateUptimeCheckConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ); + client.innerApiCalls.createUptimeCheckConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createUptimeCheckConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createUptimeCheckConfig without error using callback', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateUptimeCheckConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ); + client.innerApiCalls.createUptimeCheckConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createUptimeCheckConfig( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IUptimeCheckConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createUptimeCheckConfig with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.CreateUptimeCheckConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createUptimeCheckConfig = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createUptimeCheckConfig(request); + }, expectedError); + assert( + (client.innerApiCalls.createUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateUptimeCheckConfig', () => { + it('invokes updateUptimeCheckConfig without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateUptimeCheckConfigRequest() + ); + request.uptimeCheckConfig = {}; + request.uptimeCheckConfig.name = ''; + const expectedHeaderRequestParams = 'uptime_check_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ); + client.innerApiCalls.updateUptimeCheckConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateUptimeCheckConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateUptimeCheckConfig without error using callback', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateUptimeCheckConfigRequest() + ); + request.uptimeCheckConfig = {}; + request.uptimeCheckConfig.name = ''; + const expectedHeaderRequestParams = 'uptime_check_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ); + client.innerApiCalls.updateUptimeCheckConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateUptimeCheckConfig( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IUptimeCheckConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateUptimeCheckConfig with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.UpdateUptimeCheckConfigRequest() + ); + request.uptimeCheckConfig = {}; + request.uptimeCheckConfig.name = ''; + const expectedHeaderRequestParams = 'uptime_check_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUptimeCheckConfig = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateUptimeCheckConfig(request); + }, expectedError); + assert( + (client.innerApiCalls.updateUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteUptimeCheckConfig', () => { + it('invokes deleteUptimeCheckConfig without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteUptimeCheckConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUptimeCheckConfig = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteUptimeCheckConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteUptimeCheckConfig without error using callback', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteUptimeCheckConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUptimeCheckConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteUptimeCheckConfig( + 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.deleteUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteUptimeCheckConfig with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.DeleteUptimeCheckConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUptimeCheckConfig = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteUptimeCheckConfig(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteUptimeCheckConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listUptimeCheckConfigs', () => { + it('invokes listUptimeCheckConfigs without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + ]; + client.innerApiCalls.listUptimeCheckConfigs = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listUptimeCheckConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listUptimeCheckConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listUptimeCheckConfigs without error using callback', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + ]; + client.innerApiCalls.listUptimeCheckConfigs = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listUptimeCheckConfigs( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IUptimeCheckConfig[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listUptimeCheckConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listUptimeCheckConfigs with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listUptimeCheckConfigs = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listUptimeCheckConfigs(request); + }, expectedError); + assert( + (client.innerApiCalls.listUptimeCheckConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listUptimeCheckConfigsStream without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + ]; + client.descriptors.page.listUptimeCheckConfigs.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listUptimeCheckConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.UptimeCheckConfig[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.UptimeCheckConfig) => { + 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.listUptimeCheckConfigs + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listUptimeCheckConfigs, request) + ); + assert.strictEqual( + (client.descriptors.page.listUptimeCheckConfigs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listUptimeCheckConfigsStream with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listUptimeCheckConfigs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listUptimeCheckConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.UptimeCheckConfig[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.UptimeCheckConfig) => { + 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.listUptimeCheckConfigs + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listUptimeCheckConfigs, request) + ); + assert.strictEqual( + (client.descriptors.page.listUptimeCheckConfigs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listUptimeCheckConfigs without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + generateSampleMessage( + new protos.google.monitoring.v3.UptimeCheckConfig() + ), + ]; + client.descriptors.page.listUptimeCheckConfigs.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.IUptimeCheckConfig[] = []; + const iterable = client.listUptimeCheckConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listUptimeCheckConfigs with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listUptimeCheckConfigs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listUptimeCheckConfigsAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.IUptimeCheckConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listUptimeCheckIps', () => { + it('invokes listUptimeCheckIps without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + ]; + client.innerApiCalls.listUptimeCheckIps = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listUptimeCheckIps(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listUptimeCheckIps as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listUptimeCheckIps without error using callback', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + ]; + client.innerApiCalls.listUptimeCheckIps = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listUptimeCheckIps( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.IUptimeCheckIp[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listUptimeCheckIps as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listUptimeCheckIps with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listUptimeCheckIps = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listUptimeCheckIps(request); + }, expectedError); + assert( + (client.innerApiCalls.listUptimeCheckIps as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listUptimeCheckIpsStream without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + ]; + client.descriptors.page.listUptimeCheckIps.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listUptimeCheckIpsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.UptimeCheckIp[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.UptimeCheckIp) => { + 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.listUptimeCheckIps.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listUptimeCheckIps, request) + ); + }); + + it('invokes listUptimeCheckIpsStream with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listUptimeCheckIps.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listUptimeCheckIpsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.UptimeCheckIp[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.UptimeCheckIp) => { + 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.listUptimeCheckIps.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listUptimeCheckIps, request) + ); + }); + + it('uses async iteration with listUptimeCheckIps without error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), + ]; + client.descriptors.page.listUptimeCheckIps.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.IUptimeCheckIp[] = []; + const iterable = client.listUptimeCheckIpsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUptimeCheckIps + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listUptimeCheckIps with error', async () => { + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listUptimeCheckIps.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listUptimeCheckIpsAsync(request); + assert.rejects(async () => { + const responses: protos.google.monitoring.v3.IUptimeCheckIp[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUptimeCheckIps + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + 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('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new uptimecheckserviceModule.v3.UptimeCheckServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-monitoring/webpack.config.js b/packages/google-cloud-monitoring/webpack.config.js index c38f3d48b36..39aa3c704a3 100644 --- a/packages/google-cloud-monitoring/webpack.config.js +++ b/packages/google-cloud-monitoring/webpack.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. @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, From daaa16ac7837a0aff2ef8a6d55f6471564134559 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 31 Mar 2020 18:36:57 -0700 Subject: [PATCH 278/422] build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#398) --- packages/google-cloud-monitoring/synth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index 52a1914524b..a62a6a94733 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -20,6 +20,9 @@ import logging logging.basicConfig(level=logging.DEBUG) +AUTOSYNTH_MULTIPLE_COMMITS = True + + gapic = gcp.GAPICMicrogenerator() version = "v3" library = gapic.typescript_library( From 112243b9384ffe43acad3894acc441540ab678ed Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Apr 2020 00:44:12 +0200 Subject: [PATCH 279/422] chore(deps): update dependency @types/sinon to v9 (#399) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index d5f79fb8a83..338edf3555e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -47,7 +47,7 @@ "devDependencies": { "@types/mocha": "^7.0.0", "@types/node": "^12.12.27", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", "eslint": "^6.0.0", From 629a7f112583c2667f81f5c9aba5afc2a31a8be2 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 3 Apr 2020 08:53:06 -0700 Subject: [PATCH 280/422] refactor(test): use exponential backoff and retry some integration tests (#402) * refactor(test): use exponential backoff and retry for integration tests * chore: remove p-retry dependency, in favor of this.retries * chore: slight tweak to retry logic * chore: add stagger as suggested --- .../samples/package.json | 1 - .../samples/test/quickstart.test.js | 34 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 147004e47b7..4698ed8fc0d 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -20,7 +20,6 @@ "devDependencies": { "chai": "^4.2.0", "mocha": "^7.0.0", - "p-retry": "^4.0.0", "uuid": "^7.0.0" } } diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js index 50bbdde1616..82bee1637c7 100644 --- a/packages/google-cloud-monitoring/samples/test/quickstart.test.js +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -17,24 +17,26 @@ const {assert} = require('chai'); const {describe, it} = require('mocha'); const cp = require('child_process'); -const retry = require('p-retry'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - +// A helper for delaying integration tests with an exponential backoff. +// See examples like: https://github.com/googleapis/nodejs-monitoring/issues/190, +// https://github.com/googleapis/nodejs-monitoring/issues/191. +const delay = async test => { + const retries = test.currentRetry(); + if (retries === 0) return; // no retry on the first failure. + // see: https://cloud.google.com/storage/docs/exponential-backoff: + const ms = Math.pow(2, retries) * 250 + Math.random() * 1000; + return new Promise(done => { + console.info(`retrying "${test.title}" in ${ms}ms`); + setTimeout(done, ms); + }); +}; describe('quickstart', () => { - it('should run the quickstart', async () => { - // The write in the quickstart appears to be very, very flaky. - // This should not be needed. The tracking bug is here: - // https://github.com/googleapis/nodejs-monitoring/issues/191 - await retry( - async () => { - const result = execSync('node quickstart'); - assert.match(result, /Done writing time series data/); - }, - { - retries: 10, - onFailedAttempt: () => console.warn('Write failed, retrying...'), - } - ); + it('should run the quickstart', async function() { + this.retries(8); + await delay(this.test); // delay the start of the test, if this is a retry. + const result = execSync('node quickstart'); + assert.match(result, /Done writing time series data/); }); }); From 9c29765dbdd675a540dbfb2aed3984daa42eff42 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Apr 2020 09:43:26 -0700 Subject: [PATCH 281/422] feat: refresh monitoring client libraries (#401) --- packages/google-cloud-monitoring/README.md | 2 +- .../protos/google/monitoring/v3/alert.proto | 40 +- .../google/monitoring/v3/alert_service.proto | 3 +- .../protos/google/monitoring/v3/common.proto | 5 +- .../google/monitoring/v3/dropped_labels.proto | 3 +- .../protos/google/monitoring/v3/group.proto | 19 +- .../google/monitoring/v3/group_service.proto | 3 +- .../protos/google/monitoring/v3/metric.proto | 135 +- .../google/monitoring/v3/metric_service.proto | 62 +- .../monitoring/v3/mutation_record.proto | 3 +- .../google/monitoring/v3/notification.proto | 11 +- .../monitoring/v3/notification_service.proto | 3 +- .../protos/google/monitoring/v3/service.proto | 41 +- .../monitoring/v3/service_service.proto | 60 +- .../google/monitoring/v3/span_context.proto | 19 +- .../protos/google/monitoring/v3/uptime.proto | 12 +- .../google/monitoring/v3/uptime_service.proto | 23 +- .../protos/protos.d.ts | 2862 +++++-- .../google-cloud-monitoring/protos/protos.js | 7058 ++++++++++++----- .../protos/protos.json | 241 +- .../src/v3/metric_service_client.ts | 10 +- .../v3/service_monitoring_service_client.ts | 80 +- .../src/v3/uptime_check_service_client.ts | 30 +- .../google-cloud-monitoring/synth.metadata | 19 +- 24 files changed, 7950 insertions(+), 2794 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 878a3bc7714..0e619daf1c5 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -105,7 +105,7 @@ async function quickstart() { // Writes time series data const [result] = await client.createTimeSeries(request); - console.log(`Done writing time series data.`, result); + console.log('Done writing time series data.', result); } ``` diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index a498ff07a21..d569c1153de 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.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"; @@ -34,7 +33,7 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A description of the conditions under which some aspect of your system is // considered to be "unhealthy" and the ways to notify people or services about // this state. For an overview of alert policies, see -// [Introduction to Alerting](/monitoring/alerts/). +// [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/). message AlertPolicy { option (google.api.resource) = { type: "monitoring.googleapis.com/AlertPolicy" @@ -94,8 +93,8 @@ message AlertPolicy { // // The filter is similar to the one that is specified in the // [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + // (that call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. @@ -109,8 +108,8 @@ message AlertPolicy { // are applied in the order specified. // // This field is similar to the one in the [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this // field. repeated Aggregation aggregations = 8; @@ -180,8 +179,8 @@ message AlertPolicy { // // The filter is similar to the one that is specified in the // [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that - // call is useful to verify the time series that will be retrieved / + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + // (that call is useful to verify the time series that will be retrieved / // processed) and must specify the metric type and optionally may contain // restrictions on resource type, resource labels, and metric labels. // This field may not exceed 2048 Unicode characters in length. @@ -195,8 +194,8 @@ message AlertPolicy { // are applied in the order specified. // // This field is similar to the one in the [`ListTimeSeries` - // request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It - // is advisable to use the `ListTimeSeries` method when debugging this + // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + // It is advisable to use the `ListTimeSeries` method when debugging this // field. repeated Aggregation aggregations = 5; @@ -215,6 +214,20 @@ message AlertPolicy { Trigger trigger = 3; } + // A condition type that allows alert policies to be defined using the + // time series query language. + message TimeSeriesQueryLanguageCondition { + // A query in the time series query language format that generates time + // series indicating points in time that the condition should be + // considered active. + string query = 1; + + // A short explanation of what the query represents. For example: + // + // "Error ratio exceeds 15% for >5% of servers in >2 regions" + string summary = 2; + } + // Required if the condition exists. The unique resource name for this // condition. Its format is: // @@ -255,6 +268,11 @@ message AlertPolicy { // A condition that checks that a time series continues to // receive new data points. MetricAbsence condition_absent = 2; + + // A condition that uses the time series query language format to define + // alerts. + // If set, no other conditions can be present. + TimeSeriesQueryLanguageCondition condition_time_series_query_language = 14; } } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index 8115b3875fc..18a4b053f68 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.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/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index a4093b1c388..f3068849278 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.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"; @@ -104,7 +103,7 @@ message TimeInterval { // representative data can be more easily graphed and comprehended, and the // individual time series data is still available for later drilldown. For more // details, see [Aggregating Time -// Series](/monitoring/api/v3/metrics#aggregating_time_series). +// Series](https://cloud.google.com/monitoring/api/v3/metrics#aggregating_time_series). message Aggregation { // The `Aligner` specifies the operation that will be applied to the data // points in each alignment period in a time series. Except for diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index 9b943ccd047..769b25b325b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.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/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index c6428071f33..2d31af193b6 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.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"; @@ -61,19 +60,23 @@ message Group { pattern: "*" }; - // Output only. The name of this group. The format is - // `"projects/{project_id_or_number}/groups/{group_id}"`. + // Output only. The name of this group. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // // When creating a group, this field is ignored and a new name is created // consisting of the project specified in the call to `CreateGroup` - // and a unique `{group_id}` that is generated automatically. + // and a unique `[GROUP_ID]` that is generated automatically. string name = 1; // A user-assigned name for this group, used only for display purposes. string display_name = 2; - // The name of the group's parent, if it has one. - // The format is `"projects/{project_id_or_number}/groups/{group_id}"`. - // For groups with no parent, `parentName` is the empty string, `""`. + // The name of the group's parent, if it has one. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + // + // For groups with no parent, `parent_name` is the empty string, `""`. string parent_name = 3; // The filter used to determine which monitored resources belong to this diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 39b80512e5b..5e804040775 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.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/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 3c202ed412c..fa5e7d4e616 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.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"; @@ -22,6 +21,7 @@ import "google/api/label.proto"; import "google/api/metric.proto"; import "google/api/monitored_resource.proto"; import "google/monitoring/v3/common.proto"; +import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; @@ -94,3 +94,134 @@ message TimeSeries { // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. repeated Point points = 5; } + +// A descriptor for the labels and points in a timeseries. +message TimeSeriesDescriptor { + // A descriptor for the value columns in a data point. + message ValueDescriptor { + // The value key. + string key = 1; + + // The value type. + google.api.MetricDescriptor.ValueType value_type = 2; + + // The value stream kind. + google.api.MetricDescriptor.MetricKind metric_kind = 3; + } + + // Descriptors for the labels. + repeated google.api.LabelDescriptor label_descriptors = 1; + + // Descriptors for the point data value columns. + repeated ValueDescriptor point_descriptors = 5; +} + +// Represents the values of a time series associated with a +// TimeSeriesDescriptor. +message TimeSeriesData { + // A point's value columns and time interval. Each point has one or more + // point values corresponding to the entries in `point_descriptors` field in + // the TimeSeriesDescriptor associated with this object. + message PointData { + // The values that make up the point. + repeated TypedValue values = 1; + + // The time interval associated with the point. + TimeInterval time_interval = 2; + } + + // The values of the labels in the time series identifier, given in the same + // order as the `label_descriptors` field of the TimeSeriesDescriptor + // associated with this object. Each value must have a value of the type + // given in the corresponding entry of `label_descriptors`. + repeated LabelValue label_values = 1; + + // The points in the time series. + repeated PointData point_data = 2; +} + +// A label value. +message LabelValue { + // The label value can be a bool, int64, or string. + oneof value { + // A bool label value. + bool bool_value = 1; + + // An int64 label value. + int64 int64_value = 2; + + // A string label value. + string string_value = 3; + } +} + +// An error associated with a query in the time series query language format. +message QueryError { + // The location of the time series query language text that this error applies + // to. + TextLocator locator = 1; + + // The error message. + string message = 2; +} + +// A locator for text. Indicates a particular part of the text of a request or +// of an object referenced in the request. +// +// For example, suppose the request field `text` contains: +// +// text: "The quick brown fox jumps over the lazy dog." +// +// Then the locator: +// +// source: "text" +// start_position { +// line: 1 +// column: 17 +// } +// end_position { +// line: 1 +// column: 19 +// } +// +// refers to the part of the text: "fox". +message TextLocator { + // The position of a byte within the text. + message Position { + // The line, starting with 1, where the byte is positioned. + int32 line = 1; + + // The column within the line, starting with 1, where the byte is + // positioned. This is a byte index even though the text is UTF-8. + int32 column = 2; + } + + // The source of the text. The source may be a field in the request, in which + // case its format is the format of the + // google.rpc.BadRequest.FieldViolation.field field in + // https://cloud.google.com/apis/design/errors#error_details. It may also be + // be a source other than the request field (e.g. a macro definition + // referenced in the text of the query), in which case this is the name of + // the source (e.g. the macro name). + string source = 1; + + // The position of the first byte within the text. + Position start_position = 2; + + // The position of the last byte within the text. + Position end_position = 3; + + // If `source`, `start_position`, and `end_position` describe a call on + // some object (e.g. a macro in the time series query language text) and a + // location is to be designated in that object's text, `nested_locator` + // identifies the location within that object. + TextLocator nested_locator = 4; + + // When `nested_locator` is set, this field gives the reason for the nesting. + // Usually, the reason is a macro invocation. In that case, the macro name + // (including the leading '@') signals the location of the macro call + // in the text and a macro argument name (including the leading '$') signals + // the location of the macro argument inside the macro body that got + // substituted away. + string nesting_reason = 5; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 56263d1289d..d03c052afe3 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.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"; @@ -63,7 +62,7 @@ service MetricService { "https://www.googleapis.com/auth/monitoring.read," "https://www.googleapis.com/auth/monitoring.write"; - // Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + // Lists monitored resource descriptors that match a filter. This method does not require a Workspace. rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/monitoredResourceDescriptors" @@ -71,7 +70,7 @@ service MetricService { option (google.api.method_signature) = "name"; } - // Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + // Gets a single monitored resource descriptor. This method does not require a Workspace. rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/monitoredResourceDescriptors/**}" @@ -79,7 +78,7 @@ service MetricService { option (google.api.method_signature) = "name"; } - // Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + // Lists metric descriptors that match a filter. This method does not require a Workspace. rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/metricDescriptors" @@ -87,7 +86,7 @@ service MetricService { option (google.api.method_signature) = "name"; } - // Gets a single metric descriptor. This method does not require a Stackdriver account. + // Gets a single metric descriptor. This method does not require a Workspace. rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) { option (google.api.http) = { get: "/v3/{name=projects/*/metricDescriptors/**}" @@ -116,7 +115,7 @@ service MetricService { option (google.api.method_signature) = "name"; } - // Lists time series that match a filter. This method does not require a Stackdriver account. + // Lists time series that match a filter. This method does not require a Workspace. rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" @@ -416,3 +415,52 @@ message CreateTimeSeriesSummary { // The number of points that failed to be written. Order is not guaranteed. repeated Error errors = 3; } + +// The `QueryTimeSeries` request. +message QueryTimeSeriesRequest { + // Required. The project on which to execute the request. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] + string name = 1; + + // Required. The query in the time series query language format. The default + // time zone is in UTC. + string query = 7; + + // A positive number that is the maximum number of time_series_data to return. + int32 page_size = 9; + + // If this field is not empty then it must contain the `nextPageToken` value + // returned by a previous call to this method. Using this field causes the + // method to return additional results from the previous method call. + string page_token = 10; +} + +// The `QueryTimeSeries` response. +message QueryTimeSeriesResponse { + // The descriptor for the time series data. + TimeSeriesDescriptor time_series_descriptor = 8; + + // The time series data. + repeated TimeSeriesData time_series_data = 9; + + // If there are more results than have been returned, then this field is set + // to a non-empty value. To see the additional results, use that value as + // `page_token` in the next call to this method. + string next_page_token = 10; + + // Query execution errors that may have caused the time series data returned + // to be incomplete. The available data will be available in the + // response. + repeated google.rpc.Status partial_errors = 11; +} + +// This is an error detail intended to be used with INVALID_ARGUMENT errors. +message QueryErrorList { + // Errors in parsing the time series query language text. The number of errors + // in the response may be limited. + repeated QueryError errors = 1; + + // A summary of all the errors. + string error_summary = 2; +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index eab1f37d2e9..e12ef2e163c 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.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/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index fb3ef4625d6..814cac1a842 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.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"; @@ -42,9 +41,9 @@ message NotificationChannelDescriptor { pattern: "*" }; - // The full REST resource name for this descriptor. The syntax is: + // The full REST resource name for this descriptor. The format is: // - // projects/[PROJECT_ID]/notificationChannelDescriptors/[TYPE] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] // // In the above, `[TYPE]` is the value of the `type` field. string name = 6; @@ -117,9 +116,9 @@ message NotificationChannel { // value of the [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] field. string type = 1; - // The full REST resource name for this channel. The syntax is: + // The full REST resource name for this channel. The format is: // - // projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] + // projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] // // The `[CHANNEL_ID]` is automatically assigned by the server on creation. string name = 6; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index 2ba8ae29844..a9d06152164 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.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/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto index 82a953bde7a..47acd0c301e 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.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,7 +32,7 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3"; // A `Service` is a discrete, autonomous, and network-accessible unit, designed // to solve an individual concern // ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In -// Stackdriver Monitoring, a `Service` acts as the root resource under which +// Cloud Monitoring, a `Service` acts as the root resource under which // operational aspects of the service are accessible. message Service { option (google.api.resource) = { @@ -66,8 +65,11 @@ message Service { string service = 1; } - // Istio service. Learn more at http://istio.io. + // Istio service scoped to a single Kubernetes cluster. Learn more at + // http://istio.io. message ClusterIstio { + option deprecated = true; + // The location of the Kubernetes cluster in which this Istio service is // defined. Corresponds to the `location` resource label in `k8s_cluster` // resources. @@ -87,6 +89,21 @@ message Service { string service_name = 4; } + // Istio service scoped to an Istio mesh + message MeshIstio { + // Identifier for the mesh in which this Istio service is defined. + // Corresponds to the `mesh_uid` metric label in Istio metrics. + string mesh_uid = 1; + + // The namespace of the Istio service underlying this service. Corresponds + // to the `destination_service_namespace` metric label in Istio metrics. + string service_namespace = 3; + + // The name of the Istio service underlying this service. Corresponds to the + // `destination_service_name` metric label in Istio metrics. + string service_name = 4; + } + // Configuration for how to query telemetry on a Service. message Telemetry { // The full name of the resource that defines this service. Formatted as @@ -94,8 +111,9 @@ message Service { string resource_name = 1; } - // Resource name for this Service. Of the form - // `projects/{project_id}/services/{service_id}`. + // Resource name for this Service. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] string name = 1; // Name used for UI elements listing this Service. @@ -113,7 +131,10 @@ message Service { CloudEndpoints cloud_endpoints = 8; // Type used for Istio services that live in a Kubernetes cluster. - ClusterIstio cluster_istio = 9; + ClusterIstio cluster_istio = 9 [deprecated = true]; + + // Type used for Istio services scoped to an Istio mesh. + MeshIstio mesh_istio = 10; } // Configuration for how to query telemetry on a Service. @@ -155,9 +176,9 @@ message ServiceLevelObjective { EXPLICIT = 1; } - // Resource name for this `ServiceLevelObjective`. - // Of the form - // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + // Resource name for this `ServiceLevelObjective`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] string name = 1; // Name used for UI elements listing this SLO. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto index 5b9c096a064..467e5d77b98 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.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"; @@ -20,7 +19,6 @@ package google.monitoring.v3; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; -import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/monitoring/v3/service.proto"; import "google/protobuf/empty.proto"; @@ -33,7 +31,7 @@ option java_outer_classname = "ServiceMonitoringServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; -// The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for +// The Cloud Monitoring Service-Oriented Monitoring API has endpoints for // managing and querying aspects of a workspace's services. These include the // `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy // of categorized Health Metrics. @@ -131,8 +129,9 @@ service ServiceMonitoringService { // The `CreateService` request. message CreateServiceRequest { - // Required. Resource name of the parent workspace. - // Of the form `projects/{project_id}`. + // Required. Resource name of the parent workspace. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -141,7 +140,7 @@ message CreateServiceRequest { ]; // Optional. The Service id to use for this Service. If omitted, an id will be - // generated instead. Must match the pattern [a-z0-9\-]+ + // generated instead. Must match the pattern `[a-z0-9\-]+` string service_id = 3; // Required. The `Service` to create. @@ -150,8 +149,9 @@ message CreateServiceRequest { // The `GetService` request. message GetServiceRequest { - // Required. Resource name of the `Service`. - // Of the form `projects/{project_id}/services/{service_id}`. + // Required. Resource name of the `Service`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -162,8 +162,11 @@ message GetServiceRequest { // The `ListServices` request. message ListServicesRequest { - // Required. Resource name of the parent `Workspace`. - // Of the form `projects/{project_id}`. + // Required. Resource name of the parent containing the listed services, either a + // project or a Monitoring Workspace. The formats are: + // + // projects/[PROJECT_ID_OR_NUMBER] + // workspaces/[HOST_PROJECT_ID_OR_NUMBER] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -205,7 +208,7 @@ message ListServicesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } @@ -221,8 +224,9 @@ message UpdateServiceRequest { // The `DeleteService` request. message DeleteServiceRequest { - // Required. Resource name of the `Service` to delete. - // Of the form `projects/{project_id}/services/{service_id}`. + // Required. Resource name of the `Service` to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -233,8 +237,9 @@ message DeleteServiceRequest { // The `CreateServiceLevelObjective` request. message CreateServiceLevelObjectiveRequest { - // Required. Resource name of the parent `Service`. - // Of the form `projects/{project_id}/services/{service_id}`. + // Required. Resource name of the parent `Service`. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -244,7 +249,7 @@ message CreateServiceLevelObjectiveRequest { // Optional. The ServiceLevelObjective id to use for this // ServiceLevelObjective. If omitted, an id will be generated instead. Must - // match the pattern [a-z0-9\-]+ + // match the pattern `[a-z0-9\-]+` string service_level_objective_id = 3; // Required. The `ServiceLevelObjective` to create. @@ -255,9 +260,9 @@ message CreateServiceLevelObjectiveRequest { // The `GetServiceLevelObjective` request. message GetServiceLevelObjectiveRequest { - // Required. Resource name of the `ServiceLevelObjective` to get. - // Of the form - // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + // Required. Resource name of the `ServiceLevelObjective` to get. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -274,8 +279,11 @@ message GetServiceLevelObjectiveRequest { // The `ListServiceLevelObjectives` request. message ListServiceLevelObjectivesRequest { - // Required. Resource name of the parent `Service`. - // Of the form `projects/{project_id}/services/{service_id}`. + // Required. Resource name of the parent containing the listed SLOs, either a + // project or a Monitoring Workspace. The formats are: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + // workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -309,7 +317,7 @@ message ListServiceLevelObjectivesResponse { // If there are more results than have been returned, then this field is set // to a non-empty value. To see the additional results, - // use that value as `pageToken` in the next call to this method. + // use that value as `page_token` in the next call to this method. string next_page_token = 2; } @@ -325,9 +333,9 @@ message UpdateServiceLevelObjectiveRequest { // The `DeleteServiceLevelObjective` request. message DeleteServiceLevelObjectiveRequest { - // Required. Resource name of the `ServiceLevelObjective` to delete. - // Of the form - // `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + // Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto index cbcb8f72e87..9e109460d29 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.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"; @@ -24,20 +23,22 @@ option java_outer_classname = "SpanContextProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; -// The context of a span, attached to google.api.Distribution.Exemplars -// in google.api.Distribution values during aggregation. +// The context of a span, attached to +// [Exemplars][google.api.Distribution.Exemplars] +// in [Distribution][google.api.Distribution] values during aggregation. // // It contains the name of a span with format: -// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] +// +// projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] message SpanContext { - // The resource name of the span in the following format: + // The resource name of the span. The format is: // - // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] + // projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] // - // [TRACE_ID] is a unique identifier for a trace within a project; + // `[TRACE_ID]` is a unique identifier for a trace within a project; // it is a 32-character hexadecimal encoding of a 16-byte array. // - // [SPAN_ID] is a unique identifier for a span within a trace; it + // `[SPAN_ID]` is a unique identifier for a span within a trace; it // is a 16-character hexadecimal encoding of an 8-byte array. string span_name = 1; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 7cb4947d507..c6094ce09ec 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.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"; @@ -78,9 +77,9 @@ message InternalChecker { // A unique resource name for this InternalChecker. The format is: // - // `projects/[PROJECT_ID]/internalCheckers/[INTERNAL_CHECKER_ID]`. + // projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] // - // `[PROJECT_ID]` is the Stackdriver Workspace project for the + // `[PROJECT_ID_OR_NUMBER]` is the Stackdriver Workspace project for the // Uptime check config associated with the internal checker. string name = 1; @@ -120,7 +119,8 @@ message UptimeCheckConfig { // monitored resource, when multiple resources are being monitored. message ResourceGroup { // The group of resources being monitored. Should be only the `[GROUP_ID]`, - // and not the full-path `projects/[PROJECT_ID]/groups/[GROUP_ID]`. + // and not the full-path + // `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. string group_id = 1; // The resource type of the group members. @@ -238,7 +238,7 @@ message UptimeCheckConfig { // A unique resource name for this Uptime check configuration. The format is: // - // `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] // // This field should be omitted when creating the Uptime check configuration; // on create, the resource name is assigned by the server and included in the diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index 9c7bf796144..cbccffc7c41 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.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"; @@ -106,8 +105,9 @@ service UptimeCheckService { // The protocol for the `ListUptimeCheckConfigs` request. message ListUptimeCheckConfigsRequest { - // Required. The project whose Uptime check configurations are listed. The format - // is `projects/[PROJECT_ID]`. + // Required. The project whose Uptime check configurations are listed. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -146,8 +146,9 @@ message ListUptimeCheckConfigsResponse { // The protocol for the `GetUptimeCheckConfig` request. message GetUptimeCheckConfigRequest { - // Required. The Uptime check configuration to retrieve. The format - // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // Required. The Uptime check configuration to retrieve. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -158,8 +159,9 @@ message GetUptimeCheckConfigRequest { // The protocol for the `CreateUptimeCheckConfig` request. message CreateUptimeCheckConfigRequest { - // Required. The project in which to create the Uptime check. The format - // is `projects/[PROJECT_ID]`. + // Required. The project in which to create the Uptime check. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER] string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -195,8 +197,9 @@ message UpdateUptimeCheckConfigRequest { // The protocol for the `DeleteUptimeCheckConfig` request. message DeleteUptimeCheckConfigRequest { - // Required. The Uptime check configuration to delete. The format - // is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + // Required. The Uptime check configuration to delete. The format is: + // + // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 7ab2191afbc..18e53a845e3 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -285,6 +285,9 @@ export namespace google { /** Condition conditionAbsent */ conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + + /** Condition conditionTimeSeriesQueryLanguage */ + conditionTimeSeriesQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null); } /** Represents a Condition. */ @@ -308,8 +311,11 @@ export namespace google { /** Condition conditionAbsent. */ public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + /** Condition conditionTimeSeriesQueryLanguage. */ + public conditionTimeSeriesQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null); + /** Condition condition. */ - public condition?: ("conditionThreshold"|"conditionAbsent"); + public condition?: ("conditionThreshold"|"conditionAbsent"|"conditionTimeSeriesQueryLanguage"); /** * Creates a new Condition instance using the specified properties. @@ -722,6 +728,102 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a TimeSeriesQueryLanguageCondition. */ + interface ITimeSeriesQueryLanguageCondition { + + /** TimeSeriesQueryLanguageCondition query */ + query?: (string|null); + + /** TimeSeriesQueryLanguageCondition summary */ + summary?: (string|null); + } + + /** Represents a TimeSeriesQueryLanguageCondition. */ + class TimeSeriesQueryLanguageCondition implements ITimeSeriesQueryLanguageCondition { + + /** + * Constructs a new TimeSeriesQueryLanguageCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition); + + /** TimeSeriesQueryLanguageCondition query. */ + public query: string; + + /** TimeSeriesQueryLanguageCondition summary. */ + public summary: string; + + /** + * Creates a new TimeSeriesQueryLanguageCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesQueryLanguageCondition instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; + + /** + * Encodes the specified TimeSeriesQueryLanguageCondition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. + * @param message TimeSeriesQueryLanguageCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeriesQueryLanguageCondition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. + * @param message TimeSeriesQueryLanguageCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; + + /** + * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; + + /** + * Verifies a TimeSeriesQueryLanguageCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeriesQueryLanguageCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesQueryLanguageCondition + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; + + /** + * Creates a plain object from a TimeSeriesQueryLanguageCondition message. Also converts values to other types if specified. + * @param message TimeSeriesQueryLanguageCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeriesQueryLanguageCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** ConditionCombinerType enum. */ @@ -3312,1608 +3414,2730 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Represents a MetricService */ - class MetricService extends $protobuf.rpc.Service { + /** Properties of a TimeSeriesDescriptor. */ + interface ITimeSeriesDescriptor { + + /** TimeSeriesDescriptor labelDescriptors */ + labelDescriptors?: (google.api.ILabelDescriptor[]|null); + + /** TimeSeriesDescriptor pointDescriptors */ + pointDescriptors?: (google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor[]|null); + } + + /** Represents a TimeSeriesDescriptor. */ + class TimeSeriesDescriptor implements ITimeSeriesDescriptor { /** - * Constructs a new MetricService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new TimeSeriesDescriptor. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.monitoring.v3.ITimeSeriesDescriptor); + + /** TimeSeriesDescriptor labelDescriptors. */ + public labelDescriptors: google.api.ILabelDescriptor[]; + + /** TimeSeriesDescriptor pointDescriptors. */ + public pointDescriptors: google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor[]; /** - * Creates new MetricService 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 TimeSeriesDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesDescriptor instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetricService; + public static create(properties?: google.monitoring.v3.ITimeSeriesDescriptor): google.monitoring.v3.TimeSeriesDescriptor; /** - * 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 TimeSeriesDescriptor message. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.verify|verify} messages. + * @param message TimeSeriesDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback): void; + public static encode(message: google.monitoring.v3.ITimeSeriesDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListMonitoredResourceDescriptors. - * @param request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns Promise + * Encodes the specified TimeSeriesDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.verify|verify} messages. + * @param message TimeSeriesDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): Promise; + public static encodeDelimited(message: google.monitoring.v3.ITimeSeriesDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetMonitoredResourceDescriptor. - * @param request GetMonitoredResourceDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + * Decodes a TimeSeriesDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesDescriptor; /** - * Calls GetMonitoredResourceDescriptor. - * @param request GetMonitoredResourceDescriptorRequest message or plain object - * @returns Promise + * Decodes a TimeSeriesDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesDescriptor; /** - * Calls ListMetricDescriptors. - * @param request ListMetricDescriptorsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + * Verifies a TimeSeriesDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMetricDescriptorsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListMetricDescriptors. - * @param request ListMetricDescriptorsRequest message or plain object - * @returns Promise + * Creates a TimeSeriesDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesDescriptor */ - public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesDescriptor; /** - * Calls GetMetricDescriptor. - * @param request GetMetricDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetricDescriptor + * Creates a plain object from a TimeSeriesDescriptor message. Also converts values to other types if specified. + * @param message TimeSeriesDescriptor + * @param [options] Conversion options + * @returns Plain object */ - public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMetricDescriptorCallback): void; + public static toObject(message: google.monitoring.v3.TimeSeriesDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetMetricDescriptor. - * @param request GetMetricDescriptorRequest message or plain object - * @returns Promise + * Converts this TimeSeriesDescriptor to JSON. + * @returns JSON object */ - public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest): Promise; + public toJSON(): { [k: string]: any }; + } + + namespace TimeSeriesDescriptor { + + /** Properties of a ValueDescriptor. */ + interface IValueDescriptor { + + /** ValueDescriptor key */ + key?: (string|null); + + /** ValueDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** ValueDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + } + + /** Represents a ValueDescriptor. */ + class ValueDescriptor implements IValueDescriptor { + + /** + * Constructs a new ValueDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor); + + /** ValueDescriptor key. */ + public key: string; + + /** ValueDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** ValueDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** + * Creates a new ValueDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ValueDescriptor instance + */ + public static create(properties?: google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor): google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor; + + /** + * Encodes the specified ValueDescriptor message. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.verify|verify} messages. + * @param message ValueDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValueDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.verify|verify} messages. + * @param message ValueDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValueDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValueDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor; + + /** + * Decodes a ValueDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValueDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor; + + /** + * Verifies a ValueDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValueDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValueDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor; + + /** + * Creates a plain object from a ValueDescriptor message. Also converts values to other types if specified. + * @param message ValueDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValueDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TimeSeriesData. */ + interface ITimeSeriesData { + + /** TimeSeriesData labelValues */ + labelValues?: (google.monitoring.v3.ILabelValue[]|null); + + /** TimeSeriesData pointData */ + pointData?: (google.monitoring.v3.TimeSeriesData.IPointData[]|null); + } + + /** Represents a TimeSeriesData. */ + class TimeSeriesData implements ITimeSeriesData { /** - * Calls CreateMetricDescriptor. - * @param request CreateMetricDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MetricDescriptor + * Constructs a new TimeSeriesData. + * @param [properties] Properties to set */ - public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.CreateMetricDescriptorCallback): void; + constructor(properties?: google.monitoring.v3.ITimeSeriesData); + + /** TimeSeriesData labelValues. */ + public labelValues: google.monitoring.v3.ILabelValue[]; + + /** TimeSeriesData pointData. */ + public pointData: google.monitoring.v3.TimeSeriesData.IPointData[]; /** - * Calls CreateMetricDescriptor. - * @param request CreateMetricDescriptorRequest message or plain object - * @returns Promise + * Creates a new TimeSeriesData instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeriesData instance */ - public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest): Promise; + public static create(properties?: google.monitoring.v3.ITimeSeriesData): google.monitoring.v3.TimeSeriesData; /** - * Calls DeleteMetricDescriptor. - * @param request DeleteMetricDescriptorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified TimeSeriesData message. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.verify|verify} messages. + * @param message TimeSeriesData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback): void; + public static encode(message: google.monitoring.v3.ITimeSeriesData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteMetricDescriptor. - * @param request DeleteMetricDescriptorRequest message or plain object - * @returns Promise + * Encodes the specified TimeSeriesData message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.verify|verify} messages. + * @param message TimeSeriesData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest): Promise; + public static encodeDelimited(message: google.monitoring.v3.ITimeSeriesData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListTimeSeries. - * @param request ListTimeSeriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + * Decodes a TimeSeriesData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeriesData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest, callback: google.monitoring.v3.MetricService.ListTimeSeriesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesData; /** - * Calls ListTimeSeries. - * @param request ListTimeSeriesRequest message or plain object - * @returns Promise + * Decodes a TimeSeriesData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeriesData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesData; /** - * Calls CreateTimeSeries. - * @param request CreateTimeSeriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Verifies a TimeSeriesData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest, callback: google.monitoring.v3.MetricService.CreateTimeSeriesCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateTimeSeries. - * @param request CreateTimeSeriesRequest message or plain object - * @returns Promise + * Creates a TimeSeriesData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeriesData */ - public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest): Promise; - } - - namespace MetricService { + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesData; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. - * @param error Error, if any - * @param [response] ListMonitoredResourceDescriptorsResponse + * Creates a plain object from a TimeSeriesData message. Also converts values to other types if specified. + * @param message TimeSeriesData + * @param [options] Conversion options + * @returns Plain object */ - type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) => void; + public static toObject(message: google.monitoring.v3.TimeSeriesData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. - * @param error Error, if any - * @param [response] MonitoredResourceDescriptor + * Converts this TimeSeriesData to JSON. + * @returns JSON object */ - type GetMonitoredResourceDescriptorCallback = (error: (Error|null), response?: google.api.MonitoredResourceDescriptor) => void; + public toJSON(): { [k: string]: any }; + } - /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. - * @param error Error, if any - * @param [response] ListMetricDescriptorsResponse - */ - type ListMetricDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMetricDescriptorsResponse) => void; + namespace TimeSeriesData { - /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. - * @param error Error, if any - * @param [response] MetricDescriptor - */ - type GetMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + /** Properties of a PointData. */ + interface IPointData { - /** - * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. - * @param error Error, if any - * @param [response] MetricDescriptor - */ - type CreateMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + /** PointData values */ + values?: (google.monitoring.v3.ITypedValue[]|null); - /** - * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteMetricDescriptorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** PointData timeInterval */ + timeInterval?: (google.monitoring.v3.ITimeInterval|null); + } - /** - * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. - * @param error Error, if any - * @param [response] ListTimeSeriesResponse - */ - type ListTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.ListTimeSeriesResponse) => void; + /** Represents a PointData. */ + class PointData implements IPointData { - /** - * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. - * @param error Error, if any - * @param [response] Empty - */ - type CreateTimeSeriesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** + * Constructs a new PointData. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.TimeSeriesData.IPointData); - /** Properties of a ListMonitoredResourceDescriptorsRequest. */ - interface IListMonitoredResourceDescriptorsRequest { + /** PointData values. */ + public values: google.monitoring.v3.ITypedValue[]; - /** ListMonitoredResourceDescriptorsRequest name */ - name?: (string|null); + /** PointData timeInterval. */ + public timeInterval?: (google.monitoring.v3.ITimeInterval|null); - /** ListMonitoredResourceDescriptorsRequest filter */ - filter?: (string|null); + /** + * Creates a new PointData instance using the specified properties. + * @param [properties] Properties to set + * @returns PointData instance + */ + public static create(properties?: google.monitoring.v3.TimeSeriesData.IPointData): google.monitoring.v3.TimeSeriesData.PointData; - /** ListMonitoredResourceDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** + * Encodes the specified PointData message. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.PointData.verify|verify} messages. + * @param message PointData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.TimeSeriesData.IPointData, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListMonitoredResourceDescriptorsRequest pageToken */ - pageToken?: (string|null); + /** + * Encodes the specified PointData message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.PointData.verify|verify} messages. + * @param message PointData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.TimeSeriesData.IPointData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PointData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PointData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TimeSeriesData.PointData; + + /** + * Decodes a PointData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PointData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TimeSeriesData.PointData; + + /** + * Verifies a PointData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PointData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PointData + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TimeSeriesData.PointData; + + /** + * Creates a plain object from a PointData message. Also converts values to other types if specified. + * @param message PointData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TimeSeriesData.PointData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PointData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a ListMonitoredResourceDescriptorsRequest. */ - class ListMonitoredResourceDescriptorsRequest implements IListMonitoredResourceDescriptorsRequest { + /** Properties of a LabelValue. */ + interface ILabelValue { + + /** LabelValue boolValue */ + boolValue?: (boolean|null); + + /** LabelValue int64Value */ + int64Value?: (number|Long|string|null); + + /** LabelValue stringValue */ + stringValue?: (string|null); + } + + /** Represents a LabelValue. */ + class LabelValue implements ILabelValue { /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new LabelValue. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest); + constructor(properties?: google.monitoring.v3.ILabelValue); - /** ListMonitoredResourceDescriptorsRequest name. */ - public name: string; + /** LabelValue boolValue. */ + public boolValue: boolean; - /** ListMonitoredResourceDescriptorsRequest filter. */ - public filter: string; + /** LabelValue int64Value. */ + public int64Value: (number|Long|string); - /** ListMonitoredResourceDescriptorsRequest pageSize. */ - public pageSize: number; + /** LabelValue stringValue. */ + public stringValue: string; - /** ListMonitoredResourceDescriptorsRequest pageToken. */ - public pageToken: string; + /** LabelValue value. */ + public value?: ("boolValue"|"int64Value"|"stringValue"); /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new LabelValue instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsRequest instance + * @returns LabelValue instance */ - public static create(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static create(properties?: google.monitoring.v3.ILabelValue): google.monitoring.v3.LabelValue; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified LabelValue message. Does not implicitly {@link google.monitoring.v3.LabelValue.verify|verify} messages. + * @param message LabelValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ILabelValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * Encodes the specified LabelValue message, length delimited. Does not implicitly {@link google.monitoring.v3.LabelValue.verify|verify} messages. + * @param message LabelValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ILabelValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a LabelValue 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 LabelValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.LabelValue; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a LabelValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsRequest + * @returns LabelValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.LabelValue; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a LabelValue message. * @param message Plain object 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 LabelValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsRequest + * @returns LabelValue */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.LabelValue; /** - * 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 LabelValue message. Also converts values to other types if specified. + * @param message LabelValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.LabelValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this LabelValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMonitoredResourceDescriptorsResponse. */ - interface IListMonitoredResourceDescriptorsResponse { + /** Properties of a QueryError. */ + interface IQueryError { - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors */ - resourceDescriptors?: (google.api.IMonitoredResourceDescriptor[]|null); + /** QueryError locator */ + locator?: (google.monitoring.v3.ITextLocator|null); - /** ListMonitoredResourceDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** QueryError message */ + message?: (string|null); } - /** Represents a ListMonitoredResourceDescriptorsResponse. */ - class ListMonitoredResourceDescriptorsResponse implements IListMonitoredResourceDescriptorsResponse { + /** Represents a QueryError. */ + class QueryError implements IQueryError { /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new QueryError. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse); + constructor(properties?: google.monitoring.v3.IQueryError); - /** ListMonitoredResourceDescriptorsResponse resourceDescriptors. */ - public resourceDescriptors: google.api.IMonitoredResourceDescriptor[]; + /** QueryError locator. */ + public locator?: (google.monitoring.v3.ITextLocator|null); - /** ListMonitoredResourceDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** QueryError message. */ + public message: string; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * Creates a new QueryError instance using the specified properties. * @param [properties] Properties to set - * @returns ListMonitoredResourceDescriptorsResponse instance + * @returns QueryError instance */ - public static create(properties?: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static create(properties?: google.monitoring.v3.IQueryError): google.monitoring.v3.QueryError; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified QueryError message. Does not implicitly {@link google.monitoring.v3.QueryError.verify|verify} messages. + * @param message QueryError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IQueryError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. - * @param message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * Encodes the specified QueryError message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryError.verify|verify} messages. + * @param message QueryError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IQueryError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a QueryError 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 QueryError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.QueryError; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a QueryError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMonitoredResourceDescriptorsResponse + * @returns QueryError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.QueryError; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a QueryError message. * @param message Plain object 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 QueryError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMonitoredResourceDescriptorsResponse + * @returns QueryError */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.QueryError; /** - * 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 QueryError message. Also converts values to other types if specified. + * @param message QueryError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.QueryError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this QueryError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetMonitoredResourceDescriptorRequest. */ - interface IGetMonitoredResourceDescriptorRequest { + /** Properties of a TextLocator. */ + interface ITextLocator { - /** GetMonitoredResourceDescriptorRequest name */ - name?: (string|null); + /** TextLocator source */ + source?: (string|null); + + /** TextLocator startPosition */ + startPosition?: (google.monitoring.v3.TextLocator.IPosition|null); + + /** TextLocator endPosition */ + endPosition?: (google.monitoring.v3.TextLocator.IPosition|null); + + /** TextLocator nestedLocator */ + nestedLocator?: (google.monitoring.v3.ITextLocator|null); + + /** TextLocator nestingReason */ + nestingReason?: (string|null); } - /** Represents a GetMonitoredResourceDescriptorRequest. */ - class GetMonitoredResourceDescriptorRequest implements IGetMonitoredResourceDescriptorRequest { + /** Represents a TextLocator. */ + class TextLocator implements ITextLocator { /** - * Constructs a new GetMonitoredResourceDescriptorRequest. + * Constructs a new TextLocator. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest); + constructor(properties?: google.monitoring.v3.ITextLocator); - /** GetMonitoredResourceDescriptorRequest name. */ - public name: string; + /** TextLocator source. */ + public source: string; + + /** TextLocator startPosition. */ + public startPosition?: (google.monitoring.v3.TextLocator.IPosition|null); + + /** TextLocator endPosition. */ + public endPosition?: (google.monitoring.v3.TextLocator.IPosition|null); + + /** TextLocator nestedLocator. */ + public nestedLocator?: (google.monitoring.v3.ITextLocator|null); + + /** TextLocator nestingReason. */ + public nestingReason: string; /** - * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * Creates a new TextLocator instance using the specified properties. * @param [properties] Properties to set - * @returns GetMonitoredResourceDescriptorRequest instance + * @returns TextLocator instance */ - public static create(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static create(properties?: google.monitoring.v3.ITextLocator): google.monitoring.v3.TextLocator; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. - * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * Encodes the specified TextLocator message. Does not implicitly {@link google.monitoring.v3.TextLocator.verify|verify} messages. + * @param message TextLocator message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ITextLocator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. - * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * Encodes the specified TextLocator message, length delimited. Does not implicitly {@link google.monitoring.v3.TextLocator.verify|verify} messages. + * @param message TextLocator message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ITextLocator, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * Decodes a TextLocator message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMonitoredResourceDescriptorRequest + * @returns TextLocator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TextLocator; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a TextLocator message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMonitoredResourceDescriptorRequest + * @returns TextLocator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TextLocator; /** - * Verifies a GetMonitoredResourceDescriptorRequest message. + * Verifies a TextLocator message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextLocator message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMonitoredResourceDescriptorRequest + * @returns TextLocator */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TextLocator; /** - * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. - * @param message GetMonitoredResourceDescriptorRequest + * Creates a plain object from a TextLocator message. Also converts values to other types if specified. + * @param message TextLocator * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetMonitoredResourceDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.TextLocator, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMonitoredResourceDescriptorRequest to JSON. + * Converts this TextLocator to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMetricDescriptorsRequest. */ - interface IListMetricDescriptorsRequest { + namespace TextLocator { - /** ListMetricDescriptorsRequest name */ - name?: (string|null); + /** Properties of a Position. */ + interface IPosition { - /** ListMetricDescriptorsRequest filter */ - filter?: (string|null); + /** Position line */ + line?: (number|null); - /** ListMetricDescriptorsRequest pageSize */ - pageSize?: (number|null); + /** Position column */ + column?: (number|null); + } - /** ListMetricDescriptorsRequest pageToken */ - pageToken?: (string|null); - } + /** Represents a Position. */ + class Position implements IPosition { - /** Represents a ListMetricDescriptorsRequest. */ - class ListMetricDescriptorsRequest implements IListMetricDescriptorsRequest { + /** + * Constructs a new Position. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.TextLocator.IPosition); - /** - * Constructs a new ListMetricDescriptorsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.IListMetricDescriptorsRequest); + /** Position line. */ + public line: number; - /** ListMetricDescriptorsRequest name. */ + /** Position column. */ + public column: number; + + /** + * Creates a new Position instance using the specified properties. + * @param [properties] Properties to set + * @returns Position instance + */ + public static create(properties?: google.monitoring.v3.TextLocator.IPosition): google.monitoring.v3.TextLocator.Position; + + /** + * Encodes the specified Position message. Does not implicitly {@link google.monitoring.v3.TextLocator.Position.verify|verify} messages. + * @param message Position message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.TextLocator.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Position message, length delimited. Does not implicitly {@link google.monitoring.v3.TextLocator.Position.verify|verify} messages. + * @param message Position message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.TextLocator.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Position message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.TextLocator.Position; + + /** + * Decodes a Position message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.TextLocator.Position; + + /** + * Verifies a Position message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Position message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Position + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.TextLocator.Position; + + /** + * Creates a plain object from a Position message. Also converts values to other types if specified. + * @param message Position + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.TextLocator.Position, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Position to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Represents a MetricService */ + class MetricService extends $protobuf.rpc.Service { + + /** + * Constructs a new MetricService 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 MetricService 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): MetricService; + + /** + * 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback): void; + + /** + * Calls ListMonitoredResourceDescriptors. + * @param request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns Promise + */ + public listMonitoredResourceDescriptors(request: google.monitoring.v3.IListMonitoredResourceDescriptorsRequest): Promise; + + /** + * Calls GetMonitoredResourceDescriptor. + * @param request GetMonitoredResourceDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + */ + public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback): void; + + /** + * Calls GetMonitoredResourceDescriptor. + * @param request GetMonitoredResourceDescriptorRequest message or plain object + * @returns Promise + */ + public getMonitoredResourceDescriptor(request: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): Promise; + + /** + * Calls ListMetricDescriptors. + * @param request ListMetricDescriptorsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + */ + public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest, callback: google.monitoring.v3.MetricService.ListMetricDescriptorsCallback): void; + + /** + * Calls ListMetricDescriptors. + * @param request ListMetricDescriptorsRequest message or plain object + * @returns Promise + */ + public listMetricDescriptors(request: google.monitoring.v3.IListMetricDescriptorsRequest): Promise; + + /** + * Calls GetMetricDescriptor. + * @param request GetMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetricDescriptor + */ + public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.GetMetricDescriptorCallback): void; + + /** + * Calls GetMetricDescriptor. + * @param request GetMetricDescriptorRequest message or plain object + * @returns Promise + */ + public getMetricDescriptor(request: google.monitoring.v3.IGetMetricDescriptorRequest): Promise; + + /** + * Calls CreateMetricDescriptor. + * @param request CreateMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MetricDescriptor + */ + public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.CreateMetricDescriptorCallback): void; + + /** + * Calls CreateMetricDescriptor. + * @param request CreateMetricDescriptorRequest message or plain object + * @returns Promise + */ + public createMetricDescriptor(request: google.monitoring.v3.ICreateMetricDescriptorRequest): Promise; + + /** + * Calls DeleteMetricDescriptor. + * @param request DeleteMetricDescriptorRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest, callback: google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback): void; + + /** + * Calls DeleteMetricDescriptor. + * @param request DeleteMetricDescriptorRequest message or plain object + * @returns Promise + */ + public deleteMetricDescriptor(request: google.monitoring.v3.IDeleteMetricDescriptorRequest): Promise; + + /** + * Calls ListTimeSeries. + * @param request ListTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + */ + public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest, callback: google.monitoring.v3.MetricService.ListTimeSeriesCallback): void; + + /** + * Calls ListTimeSeries. + * @param request ListTimeSeriesRequest message or plain object + * @returns Promise + */ + public listTimeSeries(request: google.monitoring.v3.IListTimeSeriesRequest): Promise; + + /** + * Calls CreateTimeSeries. + * @param request CreateTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest, callback: google.monitoring.v3.MetricService.CreateTimeSeriesCallback): void; + + /** + * Calls CreateTimeSeries. + * @param request CreateTimeSeriesRequest message or plain object + * @returns Promise + */ + public createTimeSeries(request: google.monitoring.v3.ICreateTimeSeriesRequest): Promise; + } + + namespace MetricService { + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * @param error Error, if any + * @param [response] ListMonitoredResourceDescriptorsResponse + */ + type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * @param error Error, if any + * @param [response] MonitoredResourceDescriptor + */ + type GetMonitoredResourceDescriptorCallback = (error: (Error|null), response?: google.api.MonitoredResourceDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. + * @param error Error, if any + * @param [response] ListMetricDescriptorsResponse + */ + type ListMetricDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMetricDescriptorsResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * @param error Error, if any + * @param [response] MetricDescriptor + */ + type GetMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * @param error Error, if any + * @param [response] MetricDescriptor + */ + type CreateMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMetricDescriptorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * @param error Error, if any + * @param [response] ListTimeSeriesResponse + */ + type ListTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.ListTimeSeriesResponse) => void; + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * @param error Error, if any + * @param [response] Empty + */ + type CreateTimeSeriesCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** Properties of a ListMonitoredResourceDescriptorsRequest. */ + interface IListMonitoredResourceDescriptorsRequest { + + /** ListMonitoredResourceDescriptorsRequest name */ + name?: (string|null); + + /** ListMonitoredResourceDescriptorsRequest filter */ + filter?: (string|null); + + /** 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest); + + /** ListMonitoredResourceDescriptorsRequest name. */ + public name: string; + + /** ListMonitoredResourceDescriptorsRequest filter. */ + public filter: string; + + /** 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest): google.monitoring.v3.ListMonitoredResourceDescriptorsRequest; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsResponse): google.monitoring.v3.ListMonitoredResourceDescriptorsResponse; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetMonitoredResourceDescriptorRequest. */ + interface IGetMonitoredResourceDescriptorRequest { + + /** GetMonitoredResourceDescriptorRequest name */ + name?: (string|null); + } + + /** Represents a GetMonitoredResourceDescriptorRequest. */ + class GetMonitoredResourceDescriptorRequest implements IGetMonitoredResourceDescriptorRequest { + + /** + * Constructs a new GetMonitoredResourceDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest); + + /** GetMonitoredResourceDescriptorRequest name. */ + public name: string; + + /** + * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMonitoredResourceDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * @param message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMonitoredResourceDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMonitoredResourceDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Verifies a GetMonitoredResourceDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMonitoredResourceDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMonitoredResourceDescriptorRequest; + + /** + * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. + * @param message GetMonitoredResourceDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetMonitoredResourceDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMonitoredResourceDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMetricDescriptorsRequest. */ + interface IListMetricDescriptorsRequest { + + /** ListMetricDescriptorsRequest name */ + name?: (string|null); + + /** ListMetricDescriptorsRequest filter */ + filter?: (string|null); + + /** ListMetricDescriptorsRequest pageSize */ + pageSize?: (number|null); + + /** ListMetricDescriptorsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMetricDescriptorsRequest. */ + class ListMetricDescriptorsRequest implements IListMetricDescriptorsRequest { + + /** + * Constructs a new ListMetricDescriptorsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListMetricDescriptorsRequest); + + /** ListMetricDescriptorsRequest name. */ + public name: string; + + /** ListMetricDescriptorsRequest filter. */ + public filter: string; + + /** ListMetricDescriptorsRequest pageSize. */ + public pageSize: number; + + /** ListMetricDescriptorsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMetricDescriptorsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetricDescriptorsRequest instance + */ + public static create(properties?: google.monitoring.v3.IListMetricDescriptorsRequest): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @param message ListMetricDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * @param message ListMetricDescriptorsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetricDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetricDescriptorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Verifies a ListMetricDescriptorsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetricDescriptorsRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsRequest; + + /** + * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. + * @param message ListMetricDescriptorsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListMetricDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMetricDescriptorsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMetricDescriptorsResponse. */ + interface IListMetricDescriptorsResponse { + + /** ListMetricDescriptorsResponse metricDescriptors */ + metricDescriptors?: (google.api.IMetricDescriptor[]|null); + + /** ListMetricDescriptorsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMetricDescriptorsResponse. */ + class ListMetricDescriptorsResponse implements IListMetricDescriptorsResponse { + + /** + * Constructs a new ListMetricDescriptorsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IListMetricDescriptorsResponse); + + /** ListMetricDescriptorsResponse metricDescriptors. */ + public metricDescriptors: google.api.IMetricDescriptor[]; + + /** ListMetricDescriptorsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMetricDescriptorsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMetricDescriptorsResponse instance + */ + public static create(properties?: google.monitoring.v3.IListMetricDescriptorsResponse): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @param message ListMetricDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. + * @param message ListMetricDescriptorsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMetricDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMetricDescriptorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Verifies a ListMetricDescriptorsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMetricDescriptorsResponse + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsResponse; + + /** + * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. + * @param message ListMetricDescriptorsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.ListMetricDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMetricDescriptorsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetMetricDescriptorRequest. */ + interface IGetMetricDescriptorRequest { + + /** GetMetricDescriptorRequest name */ + name?: (string|null); + } + + /** Represents a GetMetricDescriptorRequest. */ + class GetMetricDescriptorRequest implements IGetMetricDescriptorRequest { + + /** + * Constructs a new GetMetricDescriptorRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.IGetMetricDescriptorRequest); + + /** GetMetricDescriptorRequest name. */ public name: string; - /** ListMetricDescriptorsRequest filter. */ - public filter: string; + /** + * Creates a new GetMetricDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMetricDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.IGetMetricDescriptorRequest): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @param message GetMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * @param message GetMetricDescriptorRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMetricDescriptorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMetricDescriptorRequest; + + /** + * Verifies a GetMetricDescriptorRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMetricDescriptorRequest + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMetricDescriptorRequest; - /** ListMetricDescriptorsRequest pageSize. */ - public pageSize: number; + /** + * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message GetMetricDescriptorRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.GetMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListMetricDescriptorsRequest pageToken. */ - public pageToken: string; + /** + * Converts this GetMetricDescriptorRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateMetricDescriptorRequest. */ + interface ICreateMetricDescriptorRequest { + + /** CreateMetricDescriptorRequest name */ + name?: (string|null); + + /** CreateMetricDescriptorRequest metricDescriptor */ + metricDescriptor?: (google.api.IMetricDescriptor|null); + } + + /** Represents a CreateMetricDescriptorRequest. */ + class CreateMetricDescriptorRequest implements ICreateMetricDescriptorRequest { /** - * Creates a new ListMetricDescriptorsRequest instance using the specified properties. + * Constructs a new CreateMetricDescriptorRequest. * @param [properties] Properties to set - * @returns ListMetricDescriptorsRequest instance */ - public static create(properties?: google.monitoring.v3.IListMetricDescriptorsRequest): google.monitoring.v3.ListMetricDescriptorsRequest; + constructor(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest); + + /** CreateMetricDescriptorRequest name. */ + public name: string; + + /** CreateMetricDescriptorRequest metricDescriptor. */ + public metricDescriptor?: (google.api.IMetricDescriptor|null); /** - * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. - * @param message ListMetricDescriptorsRequest message or plain object to encode + * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMetricDescriptorRequest instance + */ + public static create(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest): google.monitoring.v3.CreateMetricDescriptorRequest; + + /** + * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @param message CreateMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. - * @param message ListMetricDescriptorsRequest message or plain object to encode + * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * @param message CreateMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMetricDescriptorsRequest + * @returns CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMetricDescriptorsRequest + * @returns CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Verifies a ListMetricDescriptorsRequest message. + * Verifies a CreateMetricDescriptorRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMetricDescriptorsRequest + * @returns CreateMetricDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateMetricDescriptorRequest; /** - * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. - * @param message ListMetricDescriptorsRequest + * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message CreateMetricDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListMetricDescriptorsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMetricDescriptorsRequest to JSON. + * Converts this CreateMetricDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMetricDescriptorsResponse. */ - interface IListMetricDescriptorsResponse { - - /** ListMetricDescriptorsResponse metricDescriptors */ - metricDescriptors?: (google.api.IMetricDescriptor[]|null); + /** Properties of a DeleteMetricDescriptorRequest. */ + interface IDeleteMetricDescriptorRequest { - /** ListMetricDescriptorsResponse nextPageToken */ - nextPageToken?: (string|null); + /** DeleteMetricDescriptorRequest name */ + name?: (string|null); } - /** Represents a ListMetricDescriptorsResponse. */ - class ListMetricDescriptorsResponse implements IListMetricDescriptorsResponse { + /** Represents a DeleteMetricDescriptorRequest. */ + class DeleteMetricDescriptorRequest implements IDeleteMetricDescriptorRequest { /** - * Constructs a new ListMetricDescriptorsResponse. + * Constructs a new DeleteMetricDescriptorRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListMetricDescriptorsResponse); - - /** ListMetricDescriptorsResponse metricDescriptors. */ - public metricDescriptors: google.api.IMetricDescriptor[]; + constructor(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest); - /** ListMetricDescriptorsResponse nextPageToken. */ - public nextPageToken: string; + /** DeleteMetricDescriptorRequest name. */ + public name: string; /** - * Creates a new ListMetricDescriptorsResponse instance using the specified properties. + * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMetricDescriptorsResponse instance + * @returns DeleteMetricDescriptorRequest instance */ - public static create(properties?: google.monitoring.v3.IListMetricDescriptorsResponse): google.monitoring.v3.ListMetricDescriptorsResponse; + public static create(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @param message ListMetricDescriptorsResponse message or plain object to encode + * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @param message DeleteMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @param message ListMetricDescriptorsResponse message or plain object to encode + * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * @param message DeleteMetricDescriptorRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListMetricDescriptorsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMetricDescriptorsResponse + * @returns DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListMetricDescriptorsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMetricDescriptorsResponse + * @returns DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListMetricDescriptorsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Verifies a ListMetricDescriptorsResponse message. + * Verifies a DeleteMetricDescriptorRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMetricDescriptorsResponse + * @returns DeleteMetricDescriptorRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListMetricDescriptorsResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteMetricDescriptorRequest; /** - * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. - * @param message ListMetricDescriptorsResponse + * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. + * @param message DeleteMetricDescriptorRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListMetricDescriptorsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.DeleteMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMetricDescriptorsResponse to JSON. + * Converts this DeleteMetricDescriptorRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetMetricDescriptorRequest. */ - interface IGetMetricDescriptorRequest { + /** Properties of a ListTimeSeriesRequest. */ + interface IListTimeSeriesRequest { - /** GetMetricDescriptorRequest name */ + /** ListTimeSeriesRequest name */ name?: (string|null); + + /** ListTimeSeriesRequest filter */ + filter?: (string|null); + + /** ListTimeSeriesRequest interval */ + interval?: (google.monitoring.v3.ITimeInterval|null); + + /** ListTimeSeriesRequest aggregation */ + aggregation?: (google.monitoring.v3.IAggregation|null); + + /** ListTimeSeriesRequest orderBy */ + orderBy?: (string|null); + + /** ListTimeSeriesRequest view */ + view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); + + /** ListTimeSeriesRequest pageSize */ + pageSize?: (number|null); + + /** ListTimeSeriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetMetricDescriptorRequest. */ - class GetMetricDescriptorRequest implements IGetMetricDescriptorRequest { + /** Represents a ListTimeSeriesRequest. */ + class ListTimeSeriesRequest implements IListTimeSeriesRequest { /** - * Constructs a new GetMetricDescriptorRequest. + * Constructs a new ListTimeSeriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IGetMetricDescriptorRequest); + constructor(properties?: google.monitoring.v3.IListTimeSeriesRequest); - /** GetMetricDescriptorRequest name. */ + /** ListTimeSeriesRequest name. */ public name: string; + /** ListTimeSeriesRequest filter. */ + public filter: string; + + /** ListTimeSeriesRequest interval. */ + public interval?: (google.monitoring.v3.ITimeInterval|null); + + /** ListTimeSeriesRequest aggregation. */ + public aggregation?: (google.monitoring.v3.IAggregation|null); + + /** ListTimeSeriesRequest orderBy. */ + public orderBy: string; + + /** ListTimeSeriesRequest view. */ + public view: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView); + + /** ListTimeSeriesRequest pageSize. */ + public pageSize: number; + + /** ListTimeSeriesRequest pageToken. */ + public pageToken: string; + /** - * Creates a new GetMetricDescriptorRequest instance using the specified properties. + * Creates a new ListTimeSeriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetMetricDescriptorRequest instance + * @returns ListTimeSeriesRequest instance */ - public static create(properties?: google.monitoring.v3.IGetMetricDescriptorRequest): google.monitoring.v3.GetMetricDescriptorRequest; + public static create(properties?: google.monitoring.v3.IListTimeSeriesRequest): google.monitoring.v3.ListTimeSeriesRequest; /** - * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. - * @param message GetMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @param message ListTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. - * @param message GetMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @param message ListTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IGetMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMetricDescriptorRequest + * @returns ListTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.GetMetricDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesRequest; /** - * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMetricDescriptorRequest + * @returns ListTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.GetMetricDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesRequest; /** - * Verifies a GetMetricDescriptorRequest message. + * Verifies a ListTimeSeriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMetricDescriptorRequest + * @returns ListTimeSeriesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.GetMetricDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesRequest; /** - * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. - * @param message GetMetricDescriptorRequest + * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. + * @param message ListTimeSeriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.GetMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMetricDescriptorRequest to JSON. + * Converts this ListTimeSeriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateMetricDescriptorRequest. */ - interface ICreateMetricDescriptorRequest { + namespace ListTimeSeriesRequest { - /** CreateMetricDescriptorRequest name */ - name?: (string|null); + /** TimeSeriesView enum. */ + enum TimeSeriesView { + FULL = 0, + HEADERS = 1 + } + } - /** CreateMetricDescriptorRequest metricDescriptor */ - metricDescriptor?: (google.api.IMetricDescriptor|null); + /** Properties of a ListTimeSeriesResponse. */ + interface IListTimeSeriesResponse { + + /** ListTimeSeriesResponse timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + + /** ListTimeSeriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTimeSeriesResponse executionErrors */ + executionErrors?: (google.rpc.IStatus[]|null); } - /** Represents a CreateMetricDescriptorRequest. */ - class CreateMetricDescriptorRequest implements ICreateMetricDescriptorRequest { + /** Represents a ListTimeSeriesResponse. */ + class ListTimeSeriesResponse implements IListTimeSeriesResponse { /** - * Constructs a new CreateMetricDescriptorRequest. + * Constructs a new ListTimeSeriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest); + constructor(properties?: google.monitoring.v3.IListTimeSeriesResponse); - /** CreateMetricDescriptorRequest name. */ - public name: string; + /** ListTimeSeriesResponse timeSeries. */ + public timeSeries: google.monitoring.v3.ITimeSeries[]; - /** CreateMetricDescriptorRequest metricDescriptor. */ - public metricDescriptor?: (google.api.IMetricDescriptor|null); + /** ListTimeSeriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTimeSeriesResponse executionErrors. */ + public executionErrors: google.rpc.IStatus[]; /** - * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * Creates a new ListTimeSeriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMetricDescriptorRequest instance + * @returns ListTimeSeriesResponse instance */ - public static create(properties?: google.monitoring.v3.ICreateMetricDescriptorRequest): google.monitoring.v3.CreateMetricDescriptorRequest; + public static create(properties?: google.monitoring.v3.IListTimeSeriesResponse): google.monitoring.v3.ListTimeSeriesResponse; /** - * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. - * @param message CreateMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @param message ListTimeSeriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. - * @param message CreateMetricDescriptorRequest message or plain object to encode + * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @param message ListTimeSeriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateMetricDescriptorRequest + * @returns ListTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateMetricDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesResponse; /** - * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateMetricDescriptorRequest + * @returns ListTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateMetricDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesResponse; /** - * Verifies a CreateMetricDescriptorRequest message. + * Verifies a ListTimeSeriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateMetricDescriptorRequest + * @returns ListTimeSeriesResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateMetricDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesResponse; /** - * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. - * @param message CreateMetricDescriptorRequest + * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * @param message ListTimeSeriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.ListTimeSeriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMetricDescriptorRequest to JSON. + * Converts this ListTimeSeriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteMetricDescriptorRequest. */ - interface IDeleteMetricDescriptorRequest { + /** Properties of a CreateTimeSeriesRequest. */ + interface ICreateTimeSeriesRequest { - /** DeleteMetricDescriptorRequest name */ + /** CreateTimeSeriesRequest name */ name?: (string|null); + + /** CreateTimeSeriesRequest timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); } - /** Represents a DeleteMetricDescriptorRequest. */ - class DeleteMetricDescriptorRequest implements IDeleteMetricDescriptorRequest { + /** Represents a CreateTimeSeriesRequest. */ + class CreateTimeSeriesRequest implements ICreateTimeSeriesRequest { /** - * Constructs a new DeleteMetricDescriptorRequest. + * Constructs a new CreateTimeSeriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest); + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesRequest); - /** DeleteMetricDescriptorRequest name. */ + /** CreateTimeSeriesRequest name. */ public name: string; + /** CreateTimeSeriesRequest timeSeries. */ + public timeSeries: google.monitoring.v3.ITimeSeries[]; + /** - * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. + * Creates a new CreateTimeSeriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteMetricDescriptorRequest instance + * @returns CreateTimeSeriesRequest instance */ - public static create(properties?: google.monitoring.v3.IDeleteMetricDescriptorRequest): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesRequest): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. - * @param message DeleteMetricDescriptorRequest message or plain object to encode + * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @param message CreateTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. - * @param message DeleteMetricDescriptorRequest message or plain object to encode + * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @param message CreateTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IDeleteMetricDescriptorRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteMetricDescriptorRequest + * @returns CreateTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteMetricDescriptorRequest + * @returns CreateTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Verifies a DeleteMetricDescriptorRequest message. + * Verifies a CreateTimeSeriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteMetricDescriptorRequest + * @returns CreateTimeSeriesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.DeleteMetricDescriptorRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesRequest; /** - * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. - * @param message DeleteMetricDescriptorRequest + * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * @param message CreateTimeSeriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.DeleteMetricDescriptorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteMetricDescriptorRequest to JSON. + * Converts this CreateTimeSeriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListTimeSeriesRequest. */ - interface IListTimeSeriesRequest { - - /** ListTimeSeriesRequest name */ - name?: (string|null); - - /** ListTimeSeriesRequest filter */ - filter?: (string|null); - - /** ListTimeSeriesRequest interval */ - interval?: (google.monitoring.v3.ITimeInterval|null); - - /** ListTimeSeriesRequest aggregation */ - aggregation?: (google.monitoring.v3.IAggregation|null); - - /** ListTimeSeriesRequest orderBy */ - orderBy?: (string|null); - - /** ListTimeSeriesRequest view */ - view?: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null); + /** Properties of a CreateTimeSeriesError. */ + interface ICreateTimeSeriesError { - /** ListTimeSeriesRequest pageSize */ - pageSize?: (number|null); + /** CreateTimeSeriesError timeSeries */ + timeSeries?: (google.monitoring.v3.ITimeSeries|null); - /** ListTimeSeriesRequest pageToken */ - pageToken?: (string|null); + /** CreateTimeSeriesError status */ + status?: (google.rpc.IStatus|null); } - /** Represents a ListTimeSeriesRequest. */ - class ListTimeSeriesRequest implements IListTimeSeriesRequest { + /** Represents a CreateTimeSeriesError. */ + class CreateTimeSeriesError implements ICreateTimeSeriesError { /** - * Constructs a new ListTimeSeriesRequest. + * Constructs a new CreateTimeSeriesError. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListTimeSeriesRequest); - - /** ListTimeSeriesRequest name. */ - public name: string; - - /** ListTimeSeriesRequest filter. */ - public filter: string; - - /** ListTimeSeriesRequest interval. */ - public interval?: (google.monitoring.v3.ITimeInterval|null); - - /** ListTimeSeriesRequest aggregation. */ - public aggregation?: (google.monitoring.v3.IAggregation|null); - - /** ListTimeSeriesRequest orderBy. */ - public orderBy: string; - - /** ListTimeSeriesRequest view. */ - public view: (google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|keyof typeof google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView); + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesError); - /** ListTimeSeriesRequest pageSize. */ - public pageSize: number; + /** CreateTimeSeriesError timeSeries. */ + public timeSeries?: (google.monitoring.v3.ITimeSeries|null); - /** ListTimeSeriesRequest pageToken. */ - public pageToken: string; + /** CreateTimeSeriesError status. */ + public status?: (google.rpc.IStatus|null); /** - * Creates a new ListTimeSeriesRequest instance using the specified properties. + * Creates a new CreateTimeSeriesError instance using the specified properties. * @param [properties] Properties to set - * @returns ListTimeSeriesRequest instance + * @returns CreateTimeSeriesError instance */ - public static create(properties?: google.monitoring.v3.IListTimeSeriesRequest): google.monitoring.v3.ListTimeSeriesRequest; + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesError): google.monitoring.v3.CreateTimeSeriesError; /** - * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. - * @param message ListTimeSeriesRequest message or plain object to encode + * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @param message CreateTimeSeriesError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. - * @param message ListTimeSeriesRequest message or plain object to encode + * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @param message CreateTimeSeriesError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * Decodes a CreateTimeSeriesError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTimeSeriesRequest + * @returns CreateTimeSeriesError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesError; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTimeSeriesRequest + * @returns CreateTimeSeriesError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesError; /** - * Verifies a ListTimeSeriesRequest message. + * Verifies a CreateTimeSeriesError message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTimeSeriesRequest + * @returns CreateTimeSeriesError */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesError; /** - * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. - * @param message ListTimeSeriesRequest + * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * @param message CreateTimeSeriesError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateTimeSeriesError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTimeSeriesRequest to JSON. + * Converts this CreateTimeSeriesError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListTimeSeriesRequest { - - /** TimeSeriesView enum. */ - enum TimeSeriesView { - FULL = 0, - HEADERS = 1 - } - } - - /** Properties of a ListTimeSeriesResponse. */ - interface IListTimeSeriesResponse { + /** Properties of a CreateTimeSeriesSummary. */ + interface ICreateTimeSeriesSummary { - /** ListTimeSeriesResponse timeSeries */ - timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + /** CreateTimeSeriesSummary totalPointCount */ + totalPointCount?: (number|null); - /** ListTimeSeriesResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreateTimeSeriesSummary successPointCount */ + successPointCount?: (number|null); - /** ListTimeSeriesResponse executionErrors */ - executionErrors?: (google.rpc.IStatus[]|null); + /** CreateTimeSeriesSummary errors */ + errors?: (google.monitoring.v3.CreateTimeSeriesSummary.IError[]|null); } - /** Represents a ListTimeSeriesResponse. */ - class ListTimeSeriesResponse implements IListTimeSeriesResponse { + /** Represents a CreateTimeSeriesSummary. */ + class CreateTimeSeriesSummary implements ICreateTimeSeriesSummary { /** - * Constructs a new ListTimeSeriesResponse. + * Constructs a new CreateTimeSeriesSummary. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.IListTimeSeriesResponse); + constructor(properties?: google.monitoring.v3.ICreateTimeSeriesSummary); - /** ListTimeSeriesResponse timeSeries. */ - public timeSeries: google.monitoring.v3.ITimeSeries[]; + /** CreateTimeSeriesSummary totalPointCount. */ + public totalPointCount: number; - /** ListTimeSeriesResponse nextPageToken. */ - public nextPageToken: string; + /** CreateTimeSeriesSummary successPointCount. */ + public successPointCount: number; - /** ListTimeSeriesResponse executionErrors. */ - public executionErrors: google.rpc.IStatus[]; + /** CreateTimeSeriesSummary errors. */ + public errors: google.monitoring.v3.CreateTimeSeriesSummary.IError[]; /** - * Creates a new ListTimeSeriesResponse instance using the specified properties. + * Creates a new CreateTimeSeriesSummary instance using the specified properties. * @param [properties] Properties to set - * @returns ListTimeSeriesResponse instance + * @returns CreateTimeSeriesSummary instance */ - public static create(properties?: google.monitoring.v3.IListTimeSeriesResponse): google.monitoring.v3.ListTimeSeriesResponse; + public static create(properties?: google.monitoring.v3.ICreateTimeSeriesSummary): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. - * @param message ListTimeSeriesResponse message or plain object to encode + * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @param message CreateTimeSeriesSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. - * @param message ListTimeSeriesResponse message or plain object to encode + * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @param message CreateTimeSeriesSummary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.IListTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTimeSeriesResponse + * @returns CreateTimeSeriesSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.ListTimeSeriesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTimeSeriesResponse + * @returns CreateTimeSeriesSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.ListTimeSeriesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Verifies a ListTimeSeriesResponse message. + * Verifies a CreateTimeSeriesSummary message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTimeSeriesResponse + * @returns CreateTimeSeriesSummary */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.ListTimeSeriesResponse; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary; /** - * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. - * @param message ListTimeSeriesResponse + * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * @param message CreateTimeSeriesSummary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.ListTimeSeriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTimeSeriesResponse to JSON. + * Converts this CreateTimeSeriesSummary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTimeSeriesRequest. */ - interface ICreateTimeSeriesRequest { + namespace CreateTimeSeriesSummary { - /** CreateTimeSeriesRequest name */ + /** Properties of an Error. */ + interface IError { + + /** Error status */ + status?: (google.rpc.IStatus|null); + + /** Error pointCount */ + pointCount?: (number|null); + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError); + + /** Error status. */ + public status?: (google.rpc.IStatus|null); + + /** Error pointCount. */ + public pointCount: number; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Verifies an Error message. + * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a QueryTimeSeriesRequest. */ + interface IQueryTimeSeriesRequest { + + /** QueryTimeSeriesRequest name */ name?: (string|null); - /** CreateTimeSeriesRequest timeSeries */ - timeSeries?: (google.monitoring.v3.ITimeSeries[]|null); + /** QueryTimeSeriesRequest query */ + query?: (string|null); + + /** QueryTimeSeriesRequest pageSize */ + pageSize?: (number|null); + + /** QueryTimeSeriesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CreateTimeSeriesRequest. */ - class CreateTimeSeriesRequest implements ICreateTimeSeriesRequest { + /** Represents a QueryTimeSeriesRequest. */ + class QueryTimeSeriesRequest implements IQueryTimeSeriesRequest { /** - * Constructs a new CreateTimeSeriesRequest. + * Constructs a new QueryTimeSeriesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateTimeSeriesRequest); + constructor(properties?: google.monitoring.v3.IQueryTimeSeriesRequest); - /** CreateTimeSeriesRequest name. */ + /** QueryTimeSeriesRequest name. */ public name: string; - /** CreateTimeSeriesRequest timeSeries. */ - public timeSeries: google.monitoring.v3.ITimeSeries[]; + /** QueryTimeSeriesRequest query. */ + public query: string; + + /** QueryTimeSeriesRequest pageSize. */ + public pageSize: number; + + /** QueryTimeSeriesRequest pageToken. */ + public pageToken: string; /** - * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * Creates a new QueryTimeSeriesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTimeSeriesRequest instance + * @returns QueryTimeSeriesRequest instance */ - public static create(properties?: google.monitoring.v3.ICreateTimeSeriesRequest): google.monitoring.v3.CreateTimeSeriesRequest; + public static create(properties?: google.monitoring.v3.IQueryTimeSeriesRequest): google.monitoring.v3.QueryTimeSeriesRequest; /** - * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. - * @param message CreateTimeSeriesRequest message or plain object to encode + * Encodes the specified QueryTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesRequest.verify|verify} messages. + * @param message QueryTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IQueryTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. - * @param message CreateTimeSeriesRequest message or plain object to encode + * Encodes the specified QueryTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesRequest.verify|verify} messages. + * @param message QueryTimeSeriesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IQueryTimeSeriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * Decodes a QueryTimeSeriesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTimeSeriesRequest + * @returns QueryTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.QueryTimeSeriesRequest; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a QueryTimeSeriesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTimeSeriesRequest + * @returns QueryTimeSeriesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.QueryTimeSeriesRequest; /** - * Verifies a CreateTimeSeriesRequest message. + * Verifies a QueryTimeSeriesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a QueryTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTimeSeriesRequest + * @returns QueryTimeSeriesRequest */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesRequest; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.QueryTimeSeriesRequest; /** - * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. - * @param message CreateTimeSeriesRequest + * Creates a plain object from a QueryTimeSeriesRequest message. Also converts values to other types if specified. + * @param message QueryTimeSeriesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.QueryTimeSeriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTimeSeriesRequest to JSON. + * Converts this QueryTimeSeriesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTimeSeriesError. */ - interface ICreateTimeSeriesError { + /** Properties of a QueryTimeSeriesResponse. */ + interface IQueryTimeSeriesResponse { - /** CreateTimeSeriesError timeSeries */ - timeSeries?: (google.monitoring.v3.ITimeSeries|null); + /** QueryTimeSeriesResponse timeSeriesDescriptor */ + timeSeriesDescriptor?: (google.monitoring.v3.ITimeSeriesDescriptor|null); - /** CreateTimeSeriesError status */ - status?: (google.rpc.IStatus|null); + /** QueryTimeSeriesResponse timeSeriesData */ + timeSeriesData?: (google.monitoring.v3.ITimeSeriesData[]|null); + + /** QueryTimeSeriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** QueryTimeSeriesResponse partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); } - /** Represents a CreateTimeSeriesError. */ - class CreateTimeSeriesError implements ICreateTimeSeriesError { + /** Represents a QueryTimeSeriesResponse. */ + class QueryTimeSeriesResponse implements IQueryTimeSeriesResponse { /** - * Constructs a new CreateTimeSeriesError. + * Constructs a new QueryTimeSeriesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateTimeSeriesError); + constructor(properties?: google.monitoring.v3.IQueryTimeSeriesResponse); - /** CreateTimeSeriesError timeSeries. */ - public timeSeries?: (google.monitoring.v3.ITimeSeries|null); + /** QueryTimeSeriesResponse timeSeriesDescriptor. */ + public timeSeriesDescriptor?: (google.monitoring.v3.ITimeSeriesDescriptor|null); - /** CreateTimeSeriesError status. */ - public status?: (google.rpc.IStatus|null); + /** QueryTimeSeriesResponse timeSeriesData. */ + public timeSeriesData: google.monitoring.v3.ITimeSeriesData[]; + + /** QueryTimeSeriesResponse nextPageToken. */ + public nextPageToken: string; + + /** QueryTimeSeriesResponse partialErrors. */ + public partialErrors: google.rpc.IStatus[]; /** - * Creates a new CreateTimeSeriesError instance using the specified properties. + * Creates a new QueryTimeSeriesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTimeSeriesError instance + * @returns QueryTimeSeriesResponse instance */ - public static create(properties?: google.monitoring.v3.ICreateTimeSeriesError): google.monitoring.v3.CreateTimeSeriesError; + public static create(properties?: google.monitoring.v3.IQueryTimeSeriesResponse): google.monitoring.v3.QueryTimeSeriesResponse; /** - * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. - * @param message CreateTimeSeriesError message or plain object to encode + * Encodes the specified QueryTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesResponse.verify|verify} messages. + * @param message QueryTimeSeriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IQueryTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. - * @param message CreateTimeSeriesError message or plain object to encode + * Encodes the specified QueryTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesResponse.verify|verify} messages. + * @param message QueryTimeSeriesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IQueryTimeSeriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * Decodes a QueryTimeSeriesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTimeSeriesError + * @returns QueryTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.QueryTimeSeriesResponse; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * Decodes a QueryTimeSeriesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTimeSeriesError + * @returns QueryTimeSeriesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.QueryTimeSeriesResponse; /** - * Verifies a CreateTimeSeriesError message. + * Verifies a QueryTimeSeriesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * Creates a QueryTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTimeSeriesError + * @returns QueryTimeSeriesResponse */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesError; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.QueryTimeSeriesResponse; /** - * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. - * @param message CreateTimeSeriesError + * Creates a plain object from a QueryTimeSeriesResponse message. Also converts values to other types if specified. + * @param message QueryTimeSeriesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.QueryTimeSeriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTimeSeriesError to JSON. + * Converts this QueryTimeSeriesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateTimeSeriesSummary. */ - interface ICreateTimeSeriesSummary { - - /** CreateTimeSeriesSummary totalPointCount */ - totalPointCount?: (number|null); + /** Properties of a QueryErrorList. */ + interface IQueryErrorList { - /** CreateTimeSeriesSummary successPointCount */ - successPointCount?: (number|null); + /** QueryErrorList errors */ + errors?: (google.monitoring.v3.IQueryError[]|null); - /** CreateTimeSeriesSummary errors */ - errors?: (google.monitoring.v3.CreateTimeSeriesSummary.IError[]|null); + /** QueryErrorList errorSummary */ + errorSummary?: (string|null); } - /** Represents a CreateTimeSeriesSummary. */ - class CreateTimeSeriesSummary implements ICreateTimeSeriesSummary { + /** Represents a QueryErrorList. */ + class QueryErrorList implements IQueryErrorList { /** - * Constructs a new CreateTimeSeriesSummary. + * Constructs a new QueryErrorList. * @param [properties] Properties to set */ - constructor(properties?: google.monitoring.v3.ICreateTimeSeriesSummary); + constructor(properties?: google.monitoring.v3.IQueryErrorList); - /** CreateTimeSeriesSummary totalPointCount. */ - public totalPointCount: number; - - /** CreateTimeSeriesSummary successPointCount. */ - public successPointCount: number; + /** QueryErrorList errors. */ + public errors: google.monitoring.v3.IQueryError[]; - /** CreateTimeSeriesSummary errors. */ - public errors: google.monitoring.v3.CreateTimeSeriesSummary.IError[]; + /** QueryErrorList errorSummary. */ + public errorSummary: string; /** - * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * Creates a new QueryErrorList instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTimeSeriesSummary instance + * @returns QueryErrorList instance */ - public static create(properties?: google.monitoring.v3.ICreateTimeSeriesSummary): google.monitoring.v3.CreateTimeSeriesSummary; + public static create(properties?: google.monitoring.v3.IQueryErrorList): google.monitoring.v3.QueryErrorList; /** - * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. - * @param message CreateTimeSeriesSummary message or plain object to encode + * Encodes the specified QueryErrorList message. Does not implicitly {@link google.monitoring.v3.QueryErrorList.verify|verify} messages. + * @param message QueryErrorList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.monitoring.v3.IQueryErrorList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. - * @param message CreateTimeSeriesSummary message or plain object to encode + * Encodes the specified QueryErrorList message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryErrorList.verify|verify} messages. + * @param message QueryErrorList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.monitoring.v3.ICreateTimeSeriesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.monitoring.v3.IQueryErrorList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * Decodes a QueryErrorList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTimeSeriesSummary + * @returns QueryErrorList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.QueryErrorList; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * Decodes a QueryErrorList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTimeSeriesSummary + * @returns QueryErrorList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.QueryErrorList; /** - * Verifies a CreateTimeSeriesSummary message. + * Verifies a QueryErrorList message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * Creates a QueryErrorList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTimeSeriesSummary + * @returns QueryErrorList */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary; + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.QueryErrorList; /** - * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. - * @param message CreateTimeSeriesSummary + * Creates a plain object from a QueryErrorList message. Also converts values to other types if specified. + * @param message QueryErrorList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.monitoring.v3.QueryErrorList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTimeSeriesSummary to JSON. + * Converts this QueryErrorList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CreateTimeSeriesSummary { - - /** Properties of an Error. */ - interface IError { - - /** Error status */ - status?: (google.rpc.IStatus|null); - - /** Error pointCount */ - pointCount?: (number|null); - } - - /** Represents an Error. */ - class Error implements IError { - - /** - * Constructs a new Error. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError); - - /** Error status. */ - public status?: (google.rpc.IStatus|null); - - /** Error pointCount. */ - public pointCount: number; - - /** - * Creates a new Error instance using the specified properties. - * @param [properties] Properties to set - * @returns Error instance - */ - public static create(properties?: google.monitoring.v3.CreateTimeSeriesSummary.IError): google.monitoring.v3.CreateTimeSeriesSummary.Error; - - /** - * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.CreateTimeSeriesSummary.IError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Error message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.CreateTimeSeriesSummary.Error; - - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.CreateTimeSeriesSummary.Error; - - /** - * Verifies an Error message. - * @param message Plain 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 Error message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Error - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.CreateTimeSeriesSummary.Error; - - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @param message Error - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.CreateTimeSeriesSummary.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Error to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - /** Properties of a NotificationChannelDescriptor. */ interface INotificationChannelDescriptor { @@ -6691,6 +7915,9 @@ export namespace google { /** Service clusterIstio */ clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + /** Service meshIstio */ + meshIstio?: (google.monitoring.v3.Service.IMeshIstio|null); + /** Service telemetry */ telemetry?: (google.monitoring.v3.Service.ITelemetry|null); } @@ -6722,11 +7949,14 @@ export namespace google { /** Service clusterIstio. */ public clusterIstio?: (google.monitoring.v3.Service.IClusterIstio|null); + /** Service meshIstio. */ + public meshIstio?: (google.monitoring.v3.Service.IMeshIstio|null); + /** Service telemetry. */ public telemetry?: (google.monitoring.v3.Service.ITelemetry|null); /** Service identifier. */ - public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"); + public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|"meshIstio"); /** * Creates a new Service instance using the specified properties. @@ -7173,6 +8403,108 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a MeshIstio. */ + interface IMeshIstio { + + /** MeshIstio meshUid */ + meshUid?: (string|null); + + /** MeshIstio serviceNamespace */ + serviceNamespace?: (string|null); + + /** MeshIstio serviceName */ + serviceName?: (string|null); + } + + /** Represents a MeshIstio. */ + class MeshIstio implements IMeshIstio { + + /** + * Constructs a new MeshIstio. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.IMeshIstio); + + /** MeshIstio meshUid. */ + public meshUid: string; + + /** MeshIstio serviceNamespace. */ + public serviceNamespace: string; + + /** MeshIstio serviceName. */ + public serviceName: string; + + /** + * Creates a new MeshIstio instance using the specified properties. + * @param [properties] Properties to set + * @returns MeshIstio instance + */ + public static create(properties?: google.monitoring.v3.Service.IMeshIstio): google.monitoring.v3.Service.MeshIstio; + + /** + * Encodes the specified MeshIstio message. Does not implicitly {@link google.monitoring.v3.Service.MeshIstio.verify|verify} messages. + * @param message MeshIstio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.IMeshIstio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MeshIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.MeshIstio.verify|verify} messages. + * @param message MeshIstio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.IMeshIstio, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MeshIstio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MeshIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.MeshIstio; + + /** + * Decodes a MeshIstio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MeshIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.MeshIstio; + + /** + * Verifies a MeshIstio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MeshIstio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MeshIstio + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.MeshIstio; + + /** + * Creates a plain object from a MeshIstio message. Also converts values to other types if specified. + * @param message MeshIstio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.MeshIstio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MeshIstio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Telemetry. */ interface ITelemetry { diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 315b349c3ed..d3b6ead07b0 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -791,6 +791,7 @@ * @property {string|null} [displayName] Condition displayName * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null} [conditionThreshold] Condition conditionThreshold * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null} [conditionAbsent] Condition conditionAbsent + * @property {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null} [conditionTimeSeriesQueryLanguage] Condition conditionTimeSeriesQueryLanguage */ /** @@ -840,17 +841,25 @@ */ Condition.prototype.conditionAbsent = null; + /** + * Condition conditionTimeSeriesQueryLanguage. + * @member {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null|undefined} conditionTimeSeriesQueryLanguage + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.conditionTimeSeriesQueryLanguage = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Condition condition. - * @member {"conditionThreshold"|"conditionAbsent"|undefined} condition + * @member {"conditionThreshold"|"conditionAbsent"|"conditionTimeSeriesQueryLanguage"|undefined} condition * @memberof google.monitoring.v3.AlertPolicy.Condition * @instance */ Object.defineProperty(Condition.prototype, "condition", { - get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent"]), + get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent", "conditionTimeSeriesQueryLanguage"]), set: $util.oneOfSetter($oneOfFields) }); @@ -886,6 +895,8 @@ writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); + if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) + $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.encode(message.conditionTimeSeriesQueryLanguage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -932,6 +943,9 @@ case 2: message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); break; + case 14: + message.conditionTimeSeriesQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -992,6 +1006,16 @@ return "conditionAbsent." + error; } } + if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) { + if (properties.condition === 1) + return "condition: multiple values"; + properties.condition = 1; + { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify(message.conditionTimeSeriesQueryLanguage); + if (error) + return "conditionTimeSeriesQueryLanguage." + error; + } + } return null; }; @@ -1021,6 +1045,11 @@ throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionAbsent: object expected"); message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.fromObject(object.conditionAbsent); } + if (object.conditionTimeSeriesQueryLanguage != null) { + if (typeof object.conditionTimeSeriesQueryLanguage !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionTimeSeriesQueryLanguage: object expected"); + message.conditionTimeSeriesQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.fromObject(object.conditionTimeSeriesQueryLanguage); + } return message; }; @@ -1055,6 +1084,11 @@ object.displayName = message.displayName; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) { + object.conditionTimeSeriesQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.toObject(message.conditionTimeSeriesQueryLanguage, options); + if (options.oneofs) + object.condition = "conditionTimeSeriesQueryLanguage"; + } return object; }; @@ -2022,6 +2056,216 @@ return MetricAbsence; })(); + Condition.TimeSeriesQueryLanguageCondition = (function() { + + /** + * Properties of a TimeSeriesQueryLanguageCondition. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface ITimeSeriesQueryLanguageCondition + * @property {string|null} [query] TimeSeriesQueryLanguageCondition query + * @property {string|null} [summary] TimeSeriesQueryLanguageCondition summary + */ + + /** + * Constructs a new TimeSeriesQueryLanguageCondition. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a TimeSeriesQueryLanguageCondition. + * @implements ITimeSeriesQueryLanguageCondition + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition=} [properties] Properties to set + */ + function TimeSeriesQueryLanguageCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeriesQueryLanguageCondition query. + * @member {string} query + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @instance + */ + TimeSeriesQueryLanguageCondition.prototype.query = ""; + + /** + * TimeSeriesQueryLanguageCondition summary. + * @member {string} summary + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @instance + */ + TimeSeriesQueryLanguageCondition.prototype.summary = ""; + + /** + * Creates a new TimeSeriesQueryLanguageCondition instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition instance + */ + TimeSeriesQueryLanguageCondition.create = function create(properties) { + return new TimeSeriesQueryLanguageCondition(properties); + }; + + /** + * Encodes the specified TimeSeriesQueryLanguageCondition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition} message TimeSeriesQueryLanguageCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQueryLanguageCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && message.hasOwnProperty("query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.summary != null && message.hasOwnProperty("summary")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); + return writer; + }; + + /** + * Encodes the specified TimeSeriesQueryLanguageCondition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition} message TimeSeriesQueryLanguageCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeriesQueryLanguageCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQueryLanguageCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.query = reader.string(); + break; + case 2: + message.summary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeriesQueryLanguageCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeriesQueryLanguageCondition message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeriesQueryLanguageCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.summary != null && message.hasOwnProperty("summary")) + if (!$util.isString(message.summary)) + return "summary: string expected"; + return null; + }; + + /** + * Creates a TimeSeriesQueryLanguageCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition + */ + TimeSeriesQueryLanguageCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition(); + if (object.query != null) + message.query = String(object.query); + if (object.summary != null) + message.summary = String(object.summary); + return message; + }; + + /** + * Creates a plain object from a TimeSeriesQueryLanguageCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} message TimeSeriesQueryLanguageCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeriesQueryLanguageCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.query = ""; + object.summary = ""; + } + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = message.summary; + return object; + }; + + /** + * Converts this TimeSeriesQueryLanguageCondition to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition + * @instance + * @returns {Object.} JSON object + */ + TimeSeriesQueryLanguageCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeSeriesQueryLanguageCondition; + })(); + return Condition; })(); @@ -8180,326 +8424,572 @@ return TimeSeries; })(); - v3.MetricService = (function() { + v3.TimeSeriesDescriptor = (function() { /** - * Constructs a new MetricService service. + * Properties of a TimeSeriesDescriptor. * @memberof google.monitoring.v3 - * @classdesc Represents a MetricService - * @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 MetricService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MetricService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricService; - - /** - * Creates new MetricService service using the specified rpc implementation. - * @function create - * @memberof google.monitoring.v3.MetricService - * @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 {MetricService} RPC service. Useful where requests and/or responses are streamed. + * @interface ITimeSeriesDescriptor + * @property {Array.|null} [labelDescriptors] TimeSeriesDescriptor labelDescriptors + * @property {Array.|null} [pointDescriptors] TimeSeriesDescriptor pointDescriptors */ - MetricService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. - * @memberof google.monitoring.v3.MetricService - * @typedef ListMonitoredResourceDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse + * Constructs a new TimeSeriesDescriptor. + * @memberof google.monitoring.v3 + * @classdesc Represents a TimeSeriesDescriptor. + * @implements ITimeSeriesDescriptor + * @constructor + * @param {google.monitoring.v3.ITimeSeriesDescriptor=} [properties] Properties to set */ + function TimeSeriesDescriptor(properties) { + this.labelDescriptors = []; + this.pointDescriptors = []; + if (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 ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.monitoring.v3.MetricService + * TimeSeriesDescriptor labelDescriptors. + * @member {Array.} labelDescriptors + * @memberof google.monitoring.v3.TimeSeriesDescriptor * @instance - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @param {google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(MetricService.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { - return this.rpcCall(listMonitoredResourceDescriptors, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, request, callback); - }, "name", { value: "ListMonitoredResourceDescriptors" }); + TimeSeriesDescriptor.prototype.labelDescriptors = $util.emptyArray; /** - * Calls ListMonitoredResourceDescriptors. - * @function listMonitoredResourceDescriptors - * @memberof google.monitoring.v3.MetricService + * TimeSeriesDescriptor pointDescriptors. + * @member {Array.} pointDescriptors + * @memberof google.monitoring.v3.TimeSeriesDescriptor * @instance - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TimeSeriesDescriptor.prototype.pointDescriptors = $util.emptyArray; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef GetMonitoredResourceDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.api.MonitoredResourceDescriptor} [response] MonitoredResourceDescriptor + * Creates a new TimeSeriesDescriptor instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {google.monitoring.v3.ITimeSeriesDescriptor=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeriesDescriptor} TimeSeriesDescriptor instance */ + TimeSeriesDescriptor.create = function create(properties) { + return new TimeSeriesDescriptor(properties); + }; /** - * Calls GetMonitoredResourceDescriptor. - * @function getMonitoredResourceDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback} callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor - * @returns {undefined} - * @variation 1 + * Encodes the specified TimeSeriesDescriptor message. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {google.monitoring.v3.ITimeSeriesDescriptor} message TimeSeriesDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetricService.prototype.getMonitoredResourceDescriptor = function getMonitoredResourceDescriptor(request, callback) { - return this.rpcCall(getMonitoredResourceDescriptor, $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest, $root.google.api.MonitoredResourceDescriptor, request, callback); - }, "name", { value: "GetMonitoredResourceDescriptor" }); + TimeSeriesDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labelDescriptors != null && message.labelDescriptors.length) + for (var i = 0; i < message.labelDescriptors.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labelDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pointDescriptors != null && message.pointDescriptors.length) + for (var i = 0; i < message.pointDescriptors.length; ++i) + $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.encode(message.pointDescriptors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; /** - * Calls GetMonitoredResourceDescriptor. - * @function getMonitoredResourceDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified TimeSeriesDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {google.monitoring.v3.ITimeSeriesDescriptor} message TimeSeriesDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + TimeSeriesDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. - * @memberof google.monitoring.v3.MetricService - * @typedef ListMetricDescriptorsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListMetricDescriptorsResponse} [response] ListMetricDescriptorsResponse - */ - - /** - * Calls ListMetricDescriptors. - * @function listMetricDescriptors - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object - * @param {google.monitoring.v3.MetricService.ListMetricDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.listMetricDescriptors = function listMetricDescriptors(request, callback) { - return this.rpcCall(listMetricDescriptors, $root.google.monitoring.v3.ListMetricDescriptorsRequest, $root.google.monitoring.v3.ListMetricDescriptorsResponse, request, callback); - }, "name", { value: "ListMetricDescriptors" }); - - /** - * Calls ListMetricDescriptors. - * @function listMetricDescriptors - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef GetMetricDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.api.MetricDescriptor} [response] MetricDescriptor + * Decodes a TimeSeriesDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeSeriesDescriptor} TimeSeriesDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + TimeSeriesDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.labelDescriptors && message.labelDescriptors.length)) + message.labelDescriptors = []; + message.labelDescriptors.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.pointDescriptors && message.pointDescriptors.length)) + message.pointDescriptors = []; + message.pointDescriptors.push($root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetMetricDescriptor. - * @function getMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.GetMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor - * @returns {undefined} - * @variation 1 + * Decodes a TimeSeriesDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeSeriesDescriptor} TimeSeriesDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(MetricService.prototype.getMetricDescriptor = function getMetricDescriptor(request, callback) { - return this.rpcCall(getMetricDescriptor, $root.google.monitoring.v3.GetMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); - }, "name", { value: "GetMetricDescriptor" }); + TimeSeriesDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetMetricDescriptor. - * @function getMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a TimeSeriesDescriptor message. + * @function verify + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + TimeSeriesDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labelDescriptors != null && message.hasOwnProperty("labelDescriptors")) { + if (!Array.isArray(message.labelDescriptors)) + return "labelDescriptors: array expected"; + for (var i = 0; i < message.labelDescriptors.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labelDescriptors[i]); + if (error) + return "labelDescriptors." + error; + } + } + if (message.pointDescriptors != null && message.hasOwnProperty("pointDescriptors")) { + if (!Array.isArray(message.pointDescriptors)) + return "pointDescriptors: array expected"; + for (var i = 0; i < message.pointDescriptors.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.verify(message.pointDescriptors[i]); + if (error) + return "pointDescriptors." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef CreateMetricDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.api.MetricDescriptor} [response] MetricDescriptor + * Creates a TimeSeriesDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeSeriesDescriptor} TimeSeriesDescriptor */ + TimeSeriesDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeriesDescriptor) + return object; + var message = new $root.google.monitoring.v3.TimeSeriesDescriptor(); + if (object.labelDescriptors) { + if (!Array.isArray(object.labelDescriptors)) + throw TypeError(".google.monitoring.v3.TimeSeriesDescriptor.labelDescriptors: array expected"); + message.labelDescriptors = []; + for (var i = 0; i < object.labelDescriptors.length; ++i) { + if (typeof object.labelDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeriesDescriptor.labelDescriptors: object expected"); + message.labelDescriptors[i] = $root.google.api.LabelDescriptor.fromObject(object.labelDescriptors[i]); + } + } + if (object.pointDescriptors) { + if (!Array.isArray(object.pointDescriptors)) + throw TypeError(".google.monitoring.v3.TimeSeriesDescriptor.pointDescriptors: array expected"); + message.pointDescriptors = []; + for (var i = 0; i < object.pointDescriptors.length; ++i) { + if (typeof object.pointDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeriesDescriptor.pointDescriptors: object expected"); + message.pointDescriptors[i] = $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.fromObject(object.pointDescriptors[i]); + } + } + return message; + }; /** - * Calls CreateMetricDescriptor. - * @function createMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.CreateMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor - * @returns {undefined} - * @variation 1 + * Creates a plain object from a TimeSeriesDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {google.monitoring.v3.TimeSeriesDescriptor} message TimeSeriesDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(MetricService.prototype.createMetricDescriptor = function createMetricDescriptor(request, callback) { - return this.rpcCall(createMetricDescriptor, $root.google.monitoring.v3.CreateMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); - }, "name", { value: "CreateMetricDescriptor" }); + TimeSeriesDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labelDescriptors = []; + object.pointDescriptors = []; + } + if (message.labelDescriptors && message.labelDescriptors.length) { + object.labelDescriptors = []; + for (var j = 0; j < message.labelDescriptors.length; ++j) + object.labelDescriptors[j] = $root.google.api.LabelDescriptor.toObject(message.labelDescriptors[j], options); + } + if (message.pointDescriptors && message.pointDescriptors.length) { + object.pointDescriptors = []; + for (var j = 0; j < message.pointDescriptors.length; ++j) + object.pointDescriptors[j] = $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.toObject(message.pointDescriptors[j], options); + } + return object; + }; /** - * Calls CreateMetricDescriptor. - * @function createMetricDescriptor - * @memberof google.monitoring.v3.MetricService + * Converts this TimeSeriesDescriptor to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeSeriesDescriptor * @instance - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + TimeSeriesDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. - * @memberof google.monitoring.v3.MetricService - * @typedef DeleteMetricDescriptorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + TimeSeriesDescriptor.ValueDescriptor = (function() { - /** - * Calls DeleteMetricDescriptor. - * @function deleteMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object - * @param {google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.deleteMetricDescriptor = function deleteMetricDescriptor(request, callback) { - return this.rpcCall(deleteMetricDescriptor, $root.google.monitoring.v3.DeleteMetricDescriptorRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteMetricDescriptor" }); + /** + * Properties of a ValueDescriptor. + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @interface IValueDescriptor + * @property {string|null} [key] ValueDescriptor key + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] ValueDescriptor valueType + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] ValueDescriptor metricKind + */ - /** - * Calls DeleteMetricDescriptor. - * @function deleteMetricDescriptor - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new ValueDescriptor. + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @classdesc Represents a ValueDescriptor. + * @implements IValueDescriptor + * @constructor + * @param {google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor=} [properties] Properties to set + */ + function ValueDescriptor(properties) { + if (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.monitoring.v3.MetricService#listTimeSeries}. - * @memberof google.monitoring.v3.MetricService - * @typedef ListTimeSeriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.monitoring.v3.ListTimeSeriesResponse} [response] ListTimeSeriesResponse - */ + /** + * ValueDescriptor key. + * @member {string} key + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @instance + */ + ValueDescriptor.prototype.key = ""; - /** - * Calls ListTimeSeries. - * @function listTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object - * @param {google.monitoring.v3.MetricService.ListTimeSeriesCallback} callback Node-style callback called with the error, if any, and ListTimeSeriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.listTimeSeries = function listTimeSeries(request, callback) { - return this.rpcCall(listTimeSeries, $root.google.monitoring.v3.ListTimeSeriesRequest, $root.google.monitoring.v3.ListTimeSeriesResponse, request, callback); - }, "name", { value: "ListTimeSeries" }); + /** + * ValueDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @instance + */ + ValueDescriptor.prototype.valueType = 0; - /** - * Calls ListTimeSeries. - * @function listTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ValueDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @instance + */ + ValueDescriptor.prototype.metricKind = 0; - /** - * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. - * @memberof google.monitoring.v3.MetricService - * @typedef CreateTimeSeriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Creates a new ValueDescriptor instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor} ValueDescriptor instance + */ + ValueDescriptor.create = function create(properties) { + return new ValueDescriptor(properties); + }; - /** - * Calls CreateTimeSeries. - * @function createTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object - * @param {google.monitoring.v3.MetricService.CreateTimeSeriesCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricService.prototype.createTimeSeries = function createTimeSeries(request, callback) { - return this.rpcCall(createTimeSeries, $root.google.monitoring.v3.CreateTimeSeriesRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CreateTimeSeries" }); + /** + * Encodes the specified ValueDescriptor message. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor} message ValueDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueDescriptor.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.metricKind != null && message.hasOwnProperty("metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + return writer; + }; - /** - * Calls CreateTimeSeries. - * @function createTimeSeries - * @memberof google.monitoring.v3.MetricService - * @instance - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified ValueDescriptor message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {google.monitoring.v3.TimeSeriesDescriptor.IValueDescriptor} message ValueDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return MetricService; + /** + * Decodes a ValueDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor} ValueDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor(); + 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.metricKind = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValueDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor} ValueDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueDescriptor message. + * @function verify + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueDescriptor.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: + case 3: + case 4: + case 5: + case 6: + break; + } + 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 ValueDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor} ValueDescriptor + */ + ValueDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor) + return object; + var message = new $root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor(); + if (object.key != null) + message.key = String(object.key); + 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; + } + 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; + } + return message; + }; + + /** + * Creates a plain object from a ValueDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor} message ValueDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.metricKind = options.enums === String ? "METRIC_KIND_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.MetricDescriptor.ValueType[message.valueType] : message.valueType; + if (message.metricKind != null && message.hasOwnProperty("metricKind")) + object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + return object; + }; + + /** + * Converts this ValueDescriptor to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @instance + * @returns {Object.} JSON object + */ + ValueDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValueDescriptor; + })(); + + return TimeSeriesDescriptor; })(); - v3.ListMonitoredResourceDescriptorsRequest = (function() { + v3.TimeSeriesData = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsRequest. + * Properties of a TimeSeriesData. * @memberof google.monitoring.v3 - * @interface IListMonitoredResourceDescriptorsRequest - * @property {string|null} [name] ListMonitoredResourceDescriptorsRequest name - * @property {string|null} [filter] ListMonitoredResourceDescriptorsRequest filter - * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + * @interface ITimeSeriesData + * @property {Array.|null} [labelValues] TimeSeriesData labelValues + * @property {Array.|null} [pointData] TimeSeriesData pointData */ /** - * Constructs a new ListMonitoredResourceDescriptorsRequest. + * Constructs a new TimeSeriesData. * @memberof google.monitoring.v3 - * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. - * @implements IListMonitoredResourceDescriptorsRequest + * @classdesc Represents a TimeSeriesData. + * @implements ITimeSeriesData * @constructor - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ITimeSeriesData=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsRequest(properties) { + function TimeSeriesData(properties) { + this.labelValues = []; + this.pointData = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8507,114 +8997,94 @@ } /** - * ListMonitoredResourceDescriptorsRequest name. - * @member {string} name - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.name = ""; - - /** - * ListMonitoredResourceDescriptorsRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest - * @instance - */ - ListMonitoredResourceDescriptorsRequest.prototype.filter = ""; - - /** - * ListMonitoredResourceDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * TimeSeriesData labelValues. + * @member {Array.} labelValues + * @memberof google.monitoring.v3.TimeSeriesData * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + TimeSeriesData.prototype.labelValues = $util.emptyArray; /** - * ListMonitoredResourceDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * TimeSeriesData pointData. + * @member {Array.} pointData + * @memberof google.monitoring.v3.TimeSeriesData * @instance */ - ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + TimeSeriesData.prototype.pointData = $util.emptyArray; /** - * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * Creates a new TimeSeriesData instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance + * @param {google.monitoring.v3.ITimeSeriesData=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeriesData} TimeSeriesData instance */ - ListMonitoredResourceDescriptorsRequest.create = function create(properties) { - return new ListMonitoredResourceDescriptorsRequest(properties); + TimeSeriesData.create = function create(properties) { + return new TimeSeriesData(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified TimeSeriesData message. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.ITimeSeriesData} message TimeSeriesData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { + TimeSeriesData.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.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.labelValues != null && message.labelValues.length) + for (var i = 0; i < message.labelValues.length; ++i) + $root.google.monitoring.v3.LabelValue.encode(message.labelValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pointData != null && message.pointData.length) + for (var i = 0; i < message.pointData.length; ++i) + $root.google.monitoring.v3.TimeSeriesData.PointData.encode(message.pointData[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. + * Encodes the specified TimeSeriesData message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.ITimeSeriesData} message TimeSeriesData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TimeSeriesData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. + * Decodes a TimeSeriesData message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.monitoring.v3.TimeSeriesData} TimeSeriesData * @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) { + TimeSeriesData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); + case 1: + if (!(message.labelValues && message.labelValues.length)) + message.labelValues = []; + message.labelValues.push($root.google.monitoring.v3.LabelValue.decode(reader, reader.uint32())); break; case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); + if (!(message.pointData && message.pointData.length)) + message.pointData = []; + message.pointData.push($root.google.monitoring.v3.TimeSeriesData.PointData.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -8625,134 +9095,388 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a TimeSeriesData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.monitoring.v3.TimeSeriesData} TimeSeriesData * @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) { + TimeSeriesData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsRequest message. + * Verifies a TimeSeriesData message. * @function verify - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @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) { + TimeSeriesData.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"; + if (message.labelValues != null && message.hasOwnProperty("labelValues")) { + if (!Array.isArray(message.labelValues)) + return "labelValues: array expected"; + for (var i = 0; i < message.labelValues.length; ++i) { + var error = $root.google.monitoring.v3.LabelValue.verify(message.labelValues[i]); + if (error) + return "labelValues." + error; + } + } + if (message.pointData != null && message.hasOwnProperty("pointData")) { + if (!Array.isArray(message.pointData)) + return "pointData: array expected"; + for (var i = 0; i < message.pointData.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeriesData.PointData.verify(message.pointData[i]); + if (error) + return "pointData." + error; + } + } return null; }; /** - * Creates a ListMonitoredResourceDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSeriesData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest + * @returns {google.monitoring.v3.TimeSeriesData} TimeSeriesData */ - ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest) + TimeSeriesData.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeriesData) return object; - var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); - 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); + var message = new $root.google.monitoring.v3.TimeSeriesData(); + if (object.labelValues) { + if (!Array.isArray(object.labelValues)) + throw TypeError(".google.monitoring.v3.TimeSeriesData.labelValues: array expected"); + message.labelValues = []; + for (var i = 0; i < object.labelValues.length; ++i) { + if (typeof object.labelValues[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeriesData.labelValues: object expected"); + message.labelValues[i] = $root.google.monitoring.v3.LabelValue.fromObject(object.labelValues[i]); + } + } + if (object.pointData) { + if (!Array.isArray(object.pointData)) + throw TypeError(".google.monitoring.v3.TimeSeriesData.pointData: array expected"); + message.pointData = []; + for (var i = 0; i < object.pointData.length; ++i) { + if (typeof object.pointData[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeriesData.pointData: object expected"); + message.pointData[i] = $root.google.monitoring.v3.TimeSeriesData.PointData.fromObject(object.pointData[i]); + } + } return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TimeSeriesData message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @static - * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest + * @param {google.monitoring.v3.TimeSeriesData} message TimeSeriesData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { + TimeSeriesData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; + if (options.arrays || options.defaults) { + object.labelValues = []; + object.pointData = []; + } + if (message.labelValues && message.labelValues.length) { + object.labelValues = []; + for (var j = 0; j < message.labelValues.length; ++j) + object.labelValues[j] = $root.google.monitoring.v3.LabelValue.toObject(message.labelValues[j], options); + } + if (message.pointData && message.pointData.length) { + object.pointData = []; + for (var j = 0; j < message.pointData.length; ++j) + object.pointData[j] = $root.google.monitoring.v3.TimeSeriesData.PointData.toObject(message.pointData[j], options); } - 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; }; /** - * Converts this ListMonitoredResourceDescriptorsRequest to JSON. + * Converts this TimeSeriesData to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @memberof google.monitoring.v3.TimeSeriesData * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { + TimeSeriesData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsRequest; + TimeSeriesData.PointData = (function() { + + /** + * Properties of a PointData. + * @memberof google.monitoring.v3.TimeSeriesData + * @interface IPointData + * @property {Array.|null} [values] PointData values + * @property {google.monitoring.v3.ITimeInterval|null} [timeInterval] PointData timeInterval + */ + + /** + * Constructs a new PointData. + * @memberof google.monitoring.v3.TimeSeriesData + * @classdesc Represents a PointData. + * @implements IPointData + * @constructor + * @param {google.monitoring.v3.TimeSeriesData.IPointData=} [properties] Properties to set + */ + function PointData(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]]; + } + + /** + * PointData values. + * @member {Array.} values + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @instance + */ + PointData.prototype.values = $util.emptyArray; + + /** + * PointData timeInterval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} timeInterval + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @instance + */ + PointData.prototype.timeInterval = null; + + /** + * Creates a new PointData instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {google.monitoring.v3.TimeSeriesData.IPointData=} [properties] Properties to set + * @returns {google.monitoring.v3.TimeSeriesData.PointData} PointData instance + */ + PointData.create = function create(properties) { + return new PointData(properties); + }; + + /** + * Encodes the specified PointData message. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.PointData.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {google.monitoring.v3.TimeSeriesData.IPointData} message PointData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PointData.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.monitoring.v3.TypedValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeInterval != null && message.hasOwnProperty("timeInterval")) + $root.google.monitoring.v3.TimeInterval.encode(message.timeInterval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PointData message, length delimited. Does not implicitly {@link google.monitoring.v3.TimeSeriesData.PointData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {google.monitoring.v3.TimeSeriesData.IPointData} message PointData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PointData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PointData message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TimeSeriesData.PointData} PointData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PointData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TimeSeriesData.PointData(); + 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.monitoring.v3.TypedValue.decode(reader, reader.uint32())); + break; + case 2: + message.timeInterval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PointData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TimeSeriesData.PointData} PointData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PointData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PointData message. + * @function verify + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PointData.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.monitoring.v3.TypedValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + if (message.timeInterval != null && message.hasOwnProperty("timeInterval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.timeInterval); + if (error) + return "timeInterval." + error; + } + return null; + }; + + /** + * Creates a PointData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TimeSeriesData.PointData} PointData + */ + PointData.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TimeSeriesData.PointData) + return object; + var message = new $root.google.monitoring.v3.TimeSeriesData.PointData(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.monitoring.v3.TimeSeriesData.PointData.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.monitoring.v3.TimeSeriesData.PointData.values: object expected"); + message.values[i] = $root.google.monitoring.v3.TypedValue.fromObject(object.values[i]); + } + } + if (object.timeInterval != null) { + if (typeof object.timeInterval !== "object") + throw TypeError(".google.monitoring.v3.TimeSeriesData.PointData.timeInterval: object expected"); + message.timeInterval = $root.google.monitoring.v3.TimeInterval.fromObject(object.timeInterval); + } + return message; + }; + + /** + * Creates a plain object from a PointData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {google.monitoring.v3.TimeSeriesData.PointData} message PointData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PointData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.timeInterval = null; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.monitoring.v3.TypedValue.toObject(message.values[j], options); + } + if (message.timeInterval != null && message.hasOwnProperty("timeInterval")) + object.timeInterval = $root.google.monitoring.v3.TimeInterval.toObject(message.timeInterval, options); + return object; + }; + + /** + * Converts this PointData to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @instance + * @returns {Object.} JSON object + */ + PointData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PointData; + })(); + + return TimeSeriesData; })(); - v3.ListMonitoredResourceDescriptorsResponse = (function() { + v3.LabelValue = (function() { /** - * Properties of a ListMonitoredResourceDescriptorsResponse. + * Properties of a LabelValue. * @memberof google.monitoring.v3 - * @interface IListMonitoredResourceDescriptorsResponse - * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors - * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken + * @interface ILabelValue + * @property {boolean|null} [boolValue] LabelValue boolValue + * @property {number|Long|null} [int64Value] LabelValue int64Value + * @property {string|null} [stringValue] LabelValue stringValue */ /** - * Constructs a new ListMonitoredResourceDescriptorsResponse. + * Constructs a new LabelValue. * @memberof google.monitoring.v3 - * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. - * @implements IListMonitoredResourceDescriptorsResponse + * @classdesc Represents a LabelValue. + * @implements ILabelValue * @constructor - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @param {google.monitoring.v3.ILabelValue=} [properties] Properties to set */ - function ListMonitoredResourceDescriptorsResponse(properties) { - this.resourceDescriptors = []; + function LabelValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8760,91 +9484,115 @@ } /** - * ListMonitoredResourceDescriptorsResponse resourceDescriptors. - * @member {Array.} resourceDescriptors - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * LabelValue boolValue. + * @member {boolean} boolValue + * @memberof google.monitoring.v3.LabelValue * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; + LabelValue.prototype.boolValue = false; /** - * ListMonitoredResourceDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * LabelValue int64Value. + * @member {number|Long} int64Value + * @memberof google.monitoring.v3.LabelValue * @instance */ - ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; + LabelValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. + * LabelValue stringValue. + * @member {string} stringValue + * @memberof google.monitoring.v3.LabelValue + * @instance + */ + LabelValue.prototype.stringValue = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LabelValue value. + * @member {"boolValue"|"int64Value"|"stringValue"|undefined} value + * @memberof google.monitoring.v3.LabelValue + * @instance + */ + Object.defineProperty(LabelValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "stringValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LabelValue instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance + * @param {google.monitoring.v3.ILabelValue=} [properties] Properties to set + * @returns {google.monitoring.v3.LabelValue} LabelValue instance */ - ListMonitoredResourceDescriptorsResponse.create = function create(properties) { - return new ListMonitoredResourceDescriptorsResponse(properties); + LabelValue.create = function create(properties) { + return new LabelValue(properties); }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified LabelValue message. Does not implicitly {@link google.monitoring.v3.LabelValue.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.monitoring.v3.ILabelValue} message LabelValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { + LabelValue.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.boolValue != null && message.hasOwnProperty("boolValue")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); + if (message.int64Value != null && message.hasOwnProperty("int64Value")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); return writer; }; /** - * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. + * Encodes the specified LabelValue message, length delimited. Does not implicitly {@link google.monitoring.v3.LabelValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static - * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode + * @param {google.monitoring.v3.ILabelValue} message LabelValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LabelValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. + * Decodes a LabelValue message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.monitoring.v3.LabelValue} LabelValue * @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) { + LabelValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.LabelValue(); 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.boolValue = reader.bool(); break; case 2: - message.nextPageToken = reader.string(); + message.int64Value = reader.int64(); + break; + case 3: + message.stringValue = reader.string(); break; default: reader.skipType(tag & 7); @@ -8855,133 +9603,150 @@ }; /** - * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer, length delimited. + * Decodes a LabelValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.monitoring.v3.LabelValue} LabelValue * @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) { + LabelValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMonitoredResourceDescriptorsResponse message. + * Verifies a LabelValue message. * @function verify - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @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) { + LabelValue.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; - } + var properties = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; } - 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 LabelValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse + * @returns {google.monitoring.v3.LabelValue} LabelValue */ - ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) + LabelValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.LabelValue) return object; - var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); - if (object.resourceDescriptors) { - if (!Array.isArray(object.resourceDescriptors)) - throw TypeError(".google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); - message.resourceDescriptors = []; - for (var i = 0; i < object.resourceDescriptors.length; ++i) { - if (typeof object.resourceDescriptors[i] !== "object") - throw TypeError(".google.monitoring.v3.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.monitoring.v3.LabelValue(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); return message; }; /** - * Creates a plain object from a ListMonitoredResourceDescriptorsResponse message. Also converts values to other types if specified. + * Creates a plain object from a LabelValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @static - * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse + * @param {google.monitoring.v3.LabelValue} message LabelValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { + LabelValue.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.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.value = "int64Value"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListMonitoredResourceDescriptorsResponse to JSON. + * Converts this LabelValue to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + * @memberof google.monitoring.v3.LabelValue * @instance * @returns {Object.} JSON object */ - ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { + LabelValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMonitoredResourceDescriptorsResponse; + return LabelValue; })(); - v3.GetMonitoredResourceDescriptorRequest = (function() { + v3.QueryError = (function() { /** - * Properties of a GetMonitoredResourceDescriptorRequest. + * Properties of a QueryError. * @memberof google.monitoring.v3 - * @interface IGetMonitoredResourceDescriptorRequest - * @property {string|null} [name] GetMonitoredResourceDescriptorRequest name + * @interface IQueryError + * @property {google.monitoring.v3.ITextLocator|null} [locator] QueryError locator + * @property {string|null} [message] QueryError message */ /** - * Constructs a new GetMonitoredResourceDescriptorRequest. + * Constructs a new QueryError. * @memberof google.monitoring.v3 - * @classdesc Represents a GetMonitoredResourceDescriptorRequest. - * @implements IGetMonitoredResourceDescriptorRequest + * @classdesc Represents a QueryError. + * @implements IQueryError * @constructor - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IQueryError=} [properties] Properties to set */ - function GetMonitoredResourceDescriptorRequest(properties) { + function QueryError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8989,75 +9754,88 @@ } /** - * GetMonitoredResourceDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * QueryError locator. + * @member {google.monitoring.v3.ITextLocator|null|undefined} locator + * @memberof google.monitoring.v3.QueryError * @instance */ - GetMonitoredResourceDescriptorRequest.prototype.name = ""; + QueryError.prototype.locator = null; /** - * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. + * QueryError message. + * @member {string} message + * @memberof google.monitoring.v3.QueryError + * @instance + */ + QueryError.prototype.message = ""; + + /** + * Creates a new QueryError instance using the specified properties. * @function create - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest instance + * @param {google.monitoring.v3.IQueryError=} [properties] Properties to set + * @returns {google.monitoring.v3.QueryError} QueryError instance */ - GetMonitoredResourceDescriptorRequest.create = function create(properties) { - return new GetMonitoredResourceDescriptorRequest(properties); + QueryError.create = function create(properties) { + return new QueryError(properties); }; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * Encodes the specified QueryError message. Does not implicitly {@link google.monitoring.v3.QueryError.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IQueryError} message QueryError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMonitoredResourceDescriptorRequest.encode = function encode(message, writer) { + QueryError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.locator != null && message.hasOwnProperty("locator")) + $root.google.monitoring.v3.TextLocator.encode(message.locator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); return writer; }; /** - * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. + * Encodes the specified QueryError message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryError.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static - * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IQueryError} message QueryError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMonitoredResourceDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + QueryError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. + * Decodes a QueryError message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @returns {google.monitoring.v3.QueryError} QueryError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMonitoredResourceDescriptorRequest.decode = function decode(reader, length) { + QueryError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.QueryError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + case 1: + message.locator = $root.google.monitoring.v3.TextLocator.decode(reader, reader.uint32()); + break; + case 2: + message.message = reader.string(); break; default: reader.skipType(tag & 7); @@ -9068,110 +9846,125 @@ }; /** - * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a QueryError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @returns {google.monitoring.v3.QueryError} QueryError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMonitoredResourceDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + QueryError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetMonitoredResourceDescriptorRequest message. + * Verifies a QueryError message. * @function verify - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMonitoredResourceDescriptorRequest.verify = function verify(message) { + QueryError.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.locator != null && message.hasOwnProperty("locator")) { + var error = $root.google.monitoring.v3.TextLocator.verify(message.locator); + if (error) + return "locator." + error; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a QueryError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest + * @returns {google.monitoring.v3.QueryError} QueryError */ - GetMonitoredResourceDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest) + QueryError.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.QueryError) return object; - var message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.monitoring.v3.QueryError(); + if (object.locator != null) { + if (typeof object.locator !== "object") + throw TypeError(".google.monitoring.v3.QueryError.locator: object expected"); + message.locator = $root.google.monitoring.v3.TextLocator.fromObject(object.locator); + } + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. + * Creates a plain object from a QueryError message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @static - * @param {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest + * @param {google.monitoring.v3.QueryError} message QueryError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMonitoredResourceDescriptorRequest.toObject = function toObject(message, options) { + QueryError.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.locator = null; + object.message = ""; + } + if (message.locator != null && message.hasOwnProperty("locator")) + object.locator = $root.google.monitoring.v3.TextLocator.toObject(message.locator, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this GetMonitoredResourceDescriptorRequest to JSON. + * Converts this QueryError to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @memberof google.monitoring.v3.QueryError * @instance * @returns {Object.} JSON object */ - GetMonitoredResourceDescriptorRequest.prototype.toJSON = function toJSON() { + QueryError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetMonitoredResourceDescriptorRequest; + return QueryError; })(); - v3.ListMetricDescriptorsRequest = (function() { + v3.TextLocator = (function() { /** - * Properties of a ListMetricDescriptorsRequest. + * Properties of a TextLocator. * @memberof google.monitoring.v3 - * @interface IListMetricDescriptorsRequest - * @property {string|null} [name] ListMetricDescriptorsRequest name - * @property {string|null} [filter] ListMetricDescriptorsRequest filter - * @property {number|null} [pageSize] ListMetricDescriptorsRequest pageSize - * @property {string|null} [pageToken] ListMetricDescriptorsRequest pageToken + * @interface ITextLocator + * @property {string|null} [source] TextLocator source + * @property {google.monitoring.v3.TextLocator.IPosition|null} [startPosition] TextLocator startPosition + * @property {google.monitoring.v3.TextLocator.IPosition|null} [endPosition] TextLocator endPosition + * @property {google.monitoring.v3.ITextLocator|null} [nestedLocator] TextLocator nestedLocator + * @property {string|null} [nestingReason] TextLocator nestingReason */ /** - * Constructs a new ListMetricDescriptorsRequest. + * Constructs a new TextLocator. * @memberof google.monitoring.v3 - * @classdesc Represents a ListMetricDescriptorsRequest. - * @implements IListMetricDescriptorsRequest + * @classdesc Represents a TextLocator. + * @implements ITextLocator * @constructor - * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set + * @param {google.monitoring.v3.ITextLocator=} [properties] Properties to set */ - function ListMetricDescriptorsRequest(properties) { + function TextLocator(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9179,114 +9972,127 @@ } /** - * ListMetricDescriptorsRequest name. - * @member {string} name - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TextLocator source. + * @member {string} source + * @memberof google.monitoring.v3.TextLocator * @instance */ - ListMetricDescriptorsRequest.prototype.name = ""; + TextLocator.prototype.source = ""; /** - * ListMetricDescriptorsRequest filter. - * @member {string} filter - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TextLocator startPosition. + * @member {google.monitoring.v3.TextLocator.IPosition|null|undefined} startPosition + * @memberof google.monitoring.v3.TextLocator * @instance */ - ListMetricDescriptorsRequest.prototype.filter = ""; + TextLocator.prototype.startPosition = null; /** - * ListMetricDescriptorsRequest pageSize. - * @member {number} pageSize - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TextLocator endPosition. + * @member {google.monitoring.v3.TextLocator.IPosition|null|undefined} endPosition + * @memberof google.monitoring.v3.TextLocator * @instance */ - ListMetricDescriptorsRequest.prototype.pageSize = 0; + TextLocator.prototype.endPosition = null; /** - * ListMetricDescriptorsRequest pageToken. - * @member {string} pageToken - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * TextLocator nestedLocator. + * @member {google.monitoring.v3.ITextLocator|null|undefined} nestedLocator + * @memberof google.monitoring.v3.TextLocator * @instance */ - ListMetricDescriptorsRequest.prototype.pageToken = ""; + TextLocator.prototype.nestedLocator = null; /** - * Creates a new ListMetricDescriptorsRequest instance using the specified properties. + * TextLocator nestingReason. + * @member {string} nestingReason + * @memberof google.monitoring.v3.TextLocator + * @instance + */ + TextLocator.prototype.nestingReason = ""; + + /** + * Creates a new TextLocator instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static - * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest instance + * @param {google.monitoring.v3.ITextLocator=} [properties] Properties to set + * @returns {google.monitoring.v3.TextLocator} TextLocator instance */ - ListMetricDescriptorsRequest.create = function create(properties) { - return new ListMetricDescriptorsRequest(properties); + TextLocator.create = function create(properties) { + return new TextLocator(properties); }; /** - * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * Encodes the specified TextLocator message. Does not implicitly {@link google.monitoring.v3.TextLocator.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.ITextLocator} message TextLocator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetricDescriptorsRequest.encode = function encode(message, writer) { + TextLocator.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.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); + if (message.source != null && message.hasOwnProperty("source")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.startPosition != null && message.hasOwnProperty("startPosition")) + $root.google.monitoring.v3.TextLocator.Position.encode(message.startPosition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endPosition != null && message.hasOwnProperty("endPosition")) + $root.google.monitoring.v3.TextLocator.Position.encode(message.endPosition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.nestedLocator != null && message.hasOwnProperty("nestedLocator")) + $root.google.monitoring.v3.TextLocator.encode(message.nestedLocator, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nestingReason != null && message.hasOwnProperty("nestingReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.nestingReason); return writer; }; /** - * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. + * Encodes the specified TextLocator message, length delimited. Does not implicitly {@link google.monitoring.v3.TextLocator.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static - * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode + * @param {google.monitoring.v3.ITextLocator} message TextLocator message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMetricDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + TextLocator.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. + * Decodes a TextLocator message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @returns {google.monitoring.v3.TextLocator} TextLocator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetricDescriptorsRequest.decode = function decode(reader, length) { + TextLocator.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TextLocator(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); + case 1: + message.source = reader.string(); break; case 2: - message.filter = reader.string(); + message.startPosition = $root.google.monitoring.v3.TextLocator.Position.decode(reader, reader.uint32()); break; case 3: - message.pageSize = reader.int32(); + message.endPosition = $root.google.monitoring.v3.TextLocator.Position.decode(reader, reader.uint32()); break; case 4: - message.pageToken = reader.string(); + message.nestedLocator = $root.google.monitoring.v3.TextLocator.decode(reader, reader.uint32()); + break; + case 5: + message.nestingReason = reader.string(); break; default: reader.skipType(tag & 7); @@ -9297,440 +10103,783 @@ }; /** - * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. + * Decodes a TextLocator message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @returns {google.monitoring.v3.TextLocator} TextLocator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMetricDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { + TextLocator.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMetricDescriptorsRequest message. + * Verifies a TextLocator message. * @function verify - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMetricDescriptorsRequest.verify = function verify(message) { + TextLocator.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"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.startPosition != null && message.hasOwnProperty("startPosition")) { + var error = $root.google.monitoring.v3.TextLocator.Position.verify(message.startPosition); + if (error) + return "startPosition." + error; + } + if (message.endPosition != null && message.hasOwnProperty("endPosition")) { + var error = $root.google.monitoring.v3.TextLocator.Position.verify(message.endPosition); + if (error) + return "endPosition." + error; + } + if (message.nestedLocator != null && message.hasOwnProperty("nestedLocator")) { + var error = $root.google.monitoring.v3.TextLocator.verify(message.nestedLocator); + if (error) + return "nestedLocator." + error; + } + if (message.nestingReason != null && message.hasOwnProperty("nestingReason")) + if (!$util.isString(message.nestingReason)) + return "nestingReason: string expected"; return null; }; /** - * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TextLocator message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest + * @returns {google.monitoring.v3.TextLocator} TextLocator */ - ListMetricDescriptorsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsRequest) + TextLocator.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TextLocator) return object; - var message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); - 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); + var message = new $root.google.monitoring.v3.TextLocator(); + if (object.source != null) + message.source = String(object.source); + if (object.startPosition != null) { + if (typeof object.startPosition !== "object") + throw TypeError(".google.monitoring.v3.TextLocator.startPosition: object expected"); + message.startPosition = $root.google.monitoring.v3.TextLocator.Position.fromObject(object.startPosition); + } + if (object.endPosition != null) { + if (typeof object.endPosition !== "object") + throw TypeError(".google.monitoring.v3.TextLocator.endPosition: object expected"); + message.endPosition = $root.google.monitoring.v3.TextLocator.Position.fromObject(object.endPosition); + } + if (object.nestedLocator != null) { + if (typeof object.nestedLocator !== "object") + throw TypeError(".google.monitoring.v3.TextLocator.nestedLocator: object expected"); + message.nestedLocator = $root.google.monitoring.v3.TextLocator.fromObject(object.nestedLocator); + } + if (object.nestingReason != null) + message.nestingReason = String(object.nestingReason); return message; }; /** - * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. + * Creates a plain object from a TextLocator message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @static - * @param {google.monitoring.v3.ListMetricDescriptorsRequest} message ListMetricDescriptorsRequest + * @param {google.monitoring.v3.TextLocator} message TextLocator * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMetricDescriptorsRequest.toObject = function toObject(message, options) { + TextLocator.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; + object.source = ""; + object.startPosition = null; + object.endPosition = null; + object.nestedLocator = null; + object.nestingReason = ""; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.startPosition != null && message.hasOwnProperty("startPosition")) + object.startPosition = $root.google.monitoring.v3.TextLocator.Position.toObject(message.startPosition, options); + if (message.endPosition != null && message.hasOwnProperty("endPosition")) + object.endPosition = $root.google.monitoring.v3.TextLocator.Position.toObject(message.endPosition, options); + if (message.nestedLocator != null && message.hasOwnProperty("nestedLocator")) + object.nestedLocator = $root.google.monitoring.v3.TextLocator.toObject(message.nestedLocator, options); + if (message.nestingReason != null && message.hasOwnProperty("nestingReason")) + object.nestingReason = message.nestingReason; return object; }; /** - * Converts this ListMetricDescriptorsRequest to JSON. + * Converts this TextLocator to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @memberof google.monitoring.v3.TextLocator * @instance * @returns {Object.} JSON object */ - ListMetricDescriptorsRequest.prototype.toJSON = function toJSON() { + TextLocator.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMetricDescriptorsRequest; + TextLocator.Position = (function() { + + /** + * Properties of a Position. + * @memberof google.monitoring.v3.TextLocator + * @interface IPosition + * @property {number|null} [line] Position line + * @property {number|null} [column] Position column + */ + + /** + * Constructs a new Position. + * @memberof google.monitoring.v3.TextLocator + * @classdesc Represents a Position. + * @implements IPosition + * @constructor + * @param {google.monitoring.v3.TextLocator.IPosition=} [properties] Properties to set + */ + function Position(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Position line. + * @member {number} line + * @memberof google.monitoring.v3.TextLocator.Position + * @instance + */ + Position.prototype.line = 0; + + /** + * Position column. + * @member {number} column + * @memberof google.monitoring.v3.TextLocator.Position + * @instance + */ + Position.prototype.column = 0; + + /** + * Creates a new Position instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {google.monitoring.v3.TextLocator.IPosition=} [properties] Properties to set + * @returns {google.monitoring.v3.TextLocator.Position} Position instance + */ + Position.create = function create(properties) { + return new Position(properties); + }; + + /** + * Encodes the specified Position message. Does not implicitly {@link google.monitoring.v3.TextLocator.Position.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {google.monitoring.v3.TextLocator.IPosition} message Position message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Position.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.line != null && message.hasOwnProperty("line")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.line); + if (message.column != null && message.hasOwnProperty("column")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.column); + return writer; + }; + + /** + * Encodes the specified Position message, length delimited. Does not implicitly {@link google.monitoring.v3.TextLocator.Position.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {google.monitoring.v3.TextLocator.IPosition} message Position message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Position.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Position message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.TextLocator.Position} Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Position.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.TextLocator.Position(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.line = reader.int32(); + break; + case 2: + message.column = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Position message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.TextLocator.Position} Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Position.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Position message. + * @function verify + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Position.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.line != null && message.hasOwnProperty("line")) + if (!$util.isInteger(message.line)) + return "line: integer expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isInteger(message.column)) + return "column: integer expected"; + return null; + }; + + /** + * Creates a Position message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.TextLocator.Position} Position + */ + Position.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.TextLocator.Position) + return object; + var message = new $root.google.monitoring.v3.TextLocator.Position(); + if (object.line != null) + message.line = object.line | 0; + if (object.column != null) + message.column = object.column | 0; + return message; + }; + + /** + * Creates a plain object from a Position message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {google.monitoring.v3.TextLocator.Position} message Position + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Position.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.line = 0; + object.column = 0; + } + if (message.line != null && message.hasOwnProperty("line")) + object.line = message.line; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + return object; + }; + + /** + * Converts this Position to JSON. + * @function toJSON + * @memberof google.monitoring.v3.TextLocator.Position + * @instance + * @returns {Object.} JSON object + */ + Position.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Position; + })(); + + return TextLocator; })(); - v3.ListMetricDescriptorsResponse = (function() { + v3.MetricService = (function() { /** - * Properties of a ListMetricDescriptorsResponse. + * Constructs a new MetricService service. * @memberof google.monitoring.v3 - * @interface IListMetricDescriptorsResponse - * @property {Array.|null} [metricDescriptors] ListMetricDescriptorsResponse metricDescriptors - * @property {string|null} [nextPageToken] ListMetricDescriptorsResponse nextPageToken + * @classdesc Represents a MetricService + * @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 MetricService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetricService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricService; /** - * Constructs a new ListMetricDescriptorsResponse. - * @memberof google.monitoring.v3 - * @classdesc Represents a ListMetricDescriptorsResponse. - * @implements IListMetricDescriptorsResponse - * @constructor - * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set + * Creates new MetricService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.MetricService + * @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 {MetricService} RPC service. Useful where requests and/or responses are streamed. */ - function ListMetricDescriptorsResponse(properties) { - this.metricDescriptors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + MetricService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListMetricDescriptorsResponse metricDescriptors. - * @member {Array.} metricDescriptors - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @instance + * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListMonitoredResourceDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} [response] ListMonitoredResourceDescriptorsResponse */ - ListMetricDescriptorsResponse.prototype.metricDescriptors = $util.emptyArray; /** - * ListMetricDescriptorsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.monitoring.v3.MetricService * @instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListMonitoredResourceDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMonitoredResourceDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.prototype.nextPageToken = ""; + Object.defineProperty(MetricService.prototype.listMonitoredResourceDescriptors = function listMonitoredResourceDescriptors(request, callback) { + return this.rpcCall(listMonitoredResourceDescriptors, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest, $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse, request, callback); + }, "name", { value: "ListMonitoredResourceDescriptors" }); /** - * Creates a new ListMetricDescriptorsResponse instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse instance + * Calls ListMonitoredResourceDescriptors. + * @function listMonitoredResourceDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} request ListMonitoredResourceDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetricDescriptorsResponse.create = function create(properties) { - return new ListMetricDescriptorsResponse(properties); - }; /** - * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef GetMonitoredResourceDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MonitoredResourceDescriptor} [response] MonitoredResourceDescriptor */ - ListMetricDescriptorsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metricDescriptors != null && message.metricDescriptors.length) - for (var i = 0; i < message.metricDescriptors.length; ++i) - $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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 ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetMonitoredResourceDescriptor. + * @function getMonitoredResourceDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.GetMonitoredResourceDescriptorCallback} callback Node-style callback called with the error, if any, and MonitoredResourceDescriptor + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(MetricService.prototype.getMonitoredResourceDescriptor = function getMonitoredResourceDescriptor(request, callback) { + return this.rpcCall(getMonitoredResourceDescriptor, $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest, $root.google.api.MonitoredResourceDescriptor, request, callback); + }, "name", { value: "GetMonitoredResourceDescriptor" }); /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetMonitoredResourceDescriptor. + * @function getMonitoredResourceDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} request GetMonitoredResourceDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetricDescriptorsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.metricDescriptors && message.metricDescriptors.length)) - message.metricDescriptors = []; - message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse - * @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.monitoring.v3.MetricService#listMetricDescriptors}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListMetricDescriptorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListMetricDescriptorsResponse} [response] ListMetricDescriptorsResponse */ - ListMetricDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListMetricDescriptorsResponse message. - * @function verify - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListMetricDescriptors. + * @function listMetricDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListMetricDescriptorsCallback} callback Node-style callback called with the error, if any, and ListMetricDescriptorsResponse + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metricDescriptors != null && message.hasOwnProperty("metricDescriptors")) { - if (!Array.isArray(message.metricDescriptors)) - return "metricDescriptors: array expected"; - for (var i = 0; i < message.metricDescriptors.length; ++i) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptors[i]); - if (error) - return "metricDescriptors." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(MetricService.prototype.listMetricDescriptors = function listMetricDescriptors(request, callback) { + return this.rpcCall(listMetricDescriptors, $root.google.monitoring.v3.ListMetricDescriptorsRequest, $root.google.monitoring.v3.ListMetricDescriptorsResponse, request, callback); + }, "name", { value: "ListMetricDescriptors" }); /** - * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse + * Calls ListMetricDescriptors. + * @function listMetricDescriptors + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} request ListMetricDescriptorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMetricDescriptorsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsResponse) - return object; - var message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); - if (object.metricDescriptors) { - if (!Array.isArray(object.metricDescriptors)) - throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: array expected"); - message.metricDescriptors = []; - for (var i = 0; i < object.metricDescriptors.length; ++i) { - if (typeof object.metricDescriptors[i] !== "object") - throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: object expected"); - message.metricDescriptors[i] = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptors[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse - * @static - * @param {google.monitoring.v3.ListMetricDescriptorsResponse} message ListMetricDescriptorsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef GetMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MetricDescriptor} [response] MetricDescriptor */ - ListMetricDescriptorsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metricDescriptors = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.metricDescriptors && message.metricDescriptors.length) { - object.metricDescriptors = []; - for (var j = 0; j < message.metricDescriptors.length; ++j) - object.metricDescriptors[j] = $root.google.api.MetricDescriptor.toObject(message.metricDescriptors[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListMetricDescriptorsResponse to JSON. - * @function toJSON - * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * Calls GetMetricDescriptor. + * @function getMetricDescriptor + * @memberof google.monitoring.v3.MetricService * @instance - * @returns {Object.} JSON object + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.GetMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor + * @returns {undefined} + * @variation 1 */ - ListMetricDescriptorsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListMetricDescriptorsResponse; - })(); + Object.defineProperty(MetricService.prototype.getMetricDescriptor = function getMetricDescriptor(request, callback) { + return this.rpcCall(getMetricDescriptor, $root.google.monitoring.v3.GetMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); + }, "name", { value: "GetMetricDescriptor" }); - v3.GetMetricDescriptorRequest = (function() { + /** + * Calls GetMetricDescriptor. + * @function getMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} request GetMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a GetMetricDescriptorRequest. - * @memberof google.monitoring.v3 - * @interface IGetMetricDescriptorRequest - * @property {string|null} [name] GetMetricDescriptorRequest name + * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef CreateMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.MetricDescriptor} [response] MetricDescriptor */ /** - * Constructs a new GetMetricDescriptorRequest. - * @memberof google.monitoring.v3 - * @classdesc Represents a GetMetricDescriptorRequest. - * @implements IGetMetricDescriptorRequest - * @constructor - * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set + * Calls CreateMetricDescriptor. + * @function createMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.CreateMetricDescriptorCallback} callback Node-style callback called with the error, if any, and MetricDescriptor + * @returns {undefined} + * @variation 1 */ - function GetMetricDescriptorRequest(properties) { - if (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(MetricService.prototype.createMetricDescriptor = function createMetricDescriptor(request, callback) { + return this.rpcCall(createMetricDescriptor, $root.google.monitoring.v3.CreateMetricDescriptorRequest, $root.google.api.MetricDescriptor, request, callback); + }, "name", { value: "CreateMetricDescriptor" }); /** - * GetMetricDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * Calls CreateMetricDescriptor. + * @function createMetricDescriptor + * @memberof google.monitoring.v3.MetricService * @instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} request CreateMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMetricDescriptorRequest.prototype.name = ""; /** - * Creates a new GetMetricDescriptorRequest instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * @memberof google.monitoring.v3.MetricService + * @typedef DeleteMetricDescriptorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMetricDescriptor. + * @function deleteMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object + * @param {google.monitoring.v3.MetricService.DeleteMetricDescriptorCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.deleteMetricDescriptor = function deleteMetricDescriptor(request, callback) { + return this.rpcCall(deleteMetricDescriptor, $root.google.monitoring.v3.DeleteMetricDescriptorRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMetricDescriptor" }); + + /** + * Calls DeleteMetricDescriptor. + * @function deleteMetricDescriptor + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} request DeleteMetricDescriptorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * @memberof google.monitoring.v3.MetricService + * @typedef ListTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.ListTimeSeriesResponse} [response] ListTimeSeriesResponse + */ + + /** + * Calls ListTimeSeries. + * @function listTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.MetricService.ListTimeSeriesCallback} callback Node-style callback called with the error, if any, and ListTimeSeriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.listTimeSeries = function listTimeSeries(request, callback) { + return this.rpcCall(listTimeSeries, $root.google.monitoring.v3.ListTimeSeriesRequest, $root.google.monitoring.v3.ListTimeSeriesResponse, request, callback); + }, "name", { value: "ListTimeSeries" }); + + /** + * Calls ListTimeSeries. + * @function listTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.IListTimeSeriesRequest} request ListTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * @memberof google.monitoring.v3.MetricService + * @typedef CreateTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CreateTimeSeries. + * @function createTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.MetricService.CreateTimeSeriesCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetricService.prototype.createTimeSeries = function createTimeSeries(request, callback) { + return this.rpcCall(createTimeSeries, $root.google.monitoring.v3.CreateTimeSeriesRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CreateTimeSeries" }); + + /** + * Calls CreateTimeSeries. + * @function createTimeSeries + * @memberof google.monitoring.v3.MetricService + * @instance + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} request CreateTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MetricService; + })(); + + v3.ListMonitoredResourceDescriptorsRequest = (function() { + + /** + * Properties of a ListMonitoredResourceDescriptorsRequest. + * @memberof google.monitoring.v3 + * @interface IListMonitoredResourceDescriptorsRequest + * @property {string|null} [name] ListMonitoredResourceDescriptorsRequest name + * @property {string|null} [filter] ListMonitoredResourceDescriptorsRequest filter + * @property {number|null} [pageSize] ListMonitoredResourceDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMonitoredResourceDescriptorsRequest pageToken + */ + + /** + * Constructs a new ListMonitoredResourceDescriptorsRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListMonitoredResourceDescriptorsRequest. + * @implements IListMonitoredResourceDescriptorsRequest + * @constructor + * @param {google.monitoring.v3.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 name. + * @member {string} name + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.name = ""; + + /** + * ListMonitoredResourceDescriptorsRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.filter = ""; + + /** + * ListMonitoredResourceDescriptorsRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageSize = 0; + + /** + * ListMonitoredResourceDescriptorsRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + * @instance + */ + ListMonitoredResourceDescriptorsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMonitoredResourceDescriptorsRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest instance */ - GetMetricDescriptorRequest.create = function create(properties) { - return new GetMetricDescriptorRequest(properties); + ListMonitoredResourceDescriptorsRequest.create = function create(properties) { + return new ListMonitoredResourceDescriptorsRequest(properties); }; /** - * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetricDescriptorRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; /** - * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMetricDescriptorRequest.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.monitoring.v3.GetMetricDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: + case 5: message.name = reader.string(); break; + case 2: + message.filter = reader.string(); + break; + case 3: + message.pageSize = reader.int32(); + break; + case 4: + message.pageToken = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -9740,108 +10889,134 @@ }; /** - * Decodes a GetMetricDescriptorRequest 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.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMetricDescriptorRequest.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 GetMetricDescriptorRequest message. + * Verifies a ListMonitoredResourceDescriptorsRequest message. * @function verify - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMetricDescriptorRequest.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.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 GetMetricDescriptorRequest 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.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} ListMonitoredResourceDescriptorsRequest */ - GetMetricDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.GetMetricDescriptorRequest) + ListMonitoredResourceDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest) return object; - var message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); + var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsRequest(); if (object.name != null) message.name = String(object.name); - return message; - }; - + 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; + }; + /** - * Creates a plain object from a GetMetricDescriptorRequest 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.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @static - * @param {google.monitoring.v3.GetMetricDescriptorRequest} message GetMetricDescriptorRequest + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsRequest} message ListMonitoredResourceDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMetricDescriptorRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + 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; }; /** - * Converts this GetMetricDescriptorRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsRequest * @instance * @returns {Object.} JSON object */ - GetMetricDescriptorRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetMetricDescriptorRequest; + return ListMonitoredResourceDescriptorsRequest; })(); - v3.CreateMetricDescriptorRequest = (function() { + v3.ListMonitoredResourceDescriptorsResponse = (function() { /** - * Properties of a CreateMetricDescriptorRequest. + * Properties of a ListMonitoredResourceDescriptorsResponse. * @memberof google.monitoring.v3 - * @interface ICreateMetricDescriptorRequest - * @property {string|null} [name] CreateMetricDescriptorRequest name - * @property {google.api.IMetricDescriptor|null} [metricDescriptor] CreateMetricDescriptorRequest metricDescriptor + * @interface IListMonitoredResourceDescriptorsResponse + * @property {Array.|null} [resourceDescriptors] ListMonitoredResourceDescriptorsResponse resourceDescriptors + * @property {string|null} [nextPageToken] ListMonitoredResourceDescriptorsResponse nextPageToken */ /** - * Constructs a new CreateMetricDescriptorRequest. + * Constructs a new ListMonitoredResourceDescriptorsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateMetricDescriptorRequest. - * @implements ICreateMetricDescriptorRequest + * @classdesc Represents a ListMonitoredResourceDescriptorsResponse. + * @implements IListMonitoredResourceDescriptorsResponse * @constructor - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set */ - function CreateMetricDescriptorRequest(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) @@ -9849,88 +11024,91 @@ } /** - * CreateMetricDescriptorRequest name. - * @member {string} name - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * ListMonitoredResourceDescriptorsResponse resourceDescriptors. + * @member {Array.} resourceDescriptors + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @instance */ - CreateMetricDescriptorRequest.prototype.name = ""; + ListMonitoredResourceDescriptorsResponse.prototype.resourceDescriptors = $util.emptyArray; /** - * CreateMetricDescriptorRequest metricDescriptor. - * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * ListMonitoredResourceDescriptorsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @instance */ - CreateMetricDescriptorRequest.prototype.metricDescriptor = null; + ListMonitoredResourceDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateMetricDescriptorRequest instance using the specified properties. + * Creates a new ListMonitoredResourceDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest instance + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse instance */ - CreateMetricDescriptorRequest.create = function create(properties) { - return new CreateMetricDescriptorRequest(properties); + ListMonitoredResourceDescriptorsResponse.create = function create(properties) { + return new ListMonitoredResourceDescriptorsResponse(properties); }; /** - * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetricDescriptorRequest.encode = function encode(message, writer) { + ListMonitoredResourceDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + 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 CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified ListMonitoredResourceDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMonitoredResourceDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a ListMonitoredResourceDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetricDescriptorRequest.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.monitoring.v3.CreateMetricDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); + 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.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -9941,121 +11119,133 @@ }; /** - * Decodes a CreateMetricDescriptorRequest 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.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMetricDescriptorRequest.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 CreateMetricDescriptorRequest message. + * Verifies a ListMonitoredResourceDescriptorsResponse message. * @function verify - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMetricDescriptorRequest.verify = function verify(message) { + ListMonitoredResourceDescriptorsResponse.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.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { - var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); - if (error) - return "metricDescriptor." + 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 CreateMetricDescriptorRequest 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.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest + * @returns {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} ListMonitoredResourceDescriptorsResponse */ - CreateMetricDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateMetricDescriptorRequest) + ListMonitoredResourceDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) return object; - var message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.metricDescriptor != null) { - if (typeof object.metricDescriptor !== "object") - throw TypeError(".google.monitoring.v3.CreateMetricDescriptorRequest.metricDescriptor: object expected"); - message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); + var message = new $root.google.monitoring.v3.ListMonitoredResourceDescriptorsResponse(); + if (object.resourceDescriptors) { + if (!Array.isArray(object.resourceDescriptors)) + throw TypeError(".google.monitoring.v3.ListMonitoredResourceDescriptorsResponse.resourceDescriptors: array expected"); + message.resourceDescriptors = []; + for (var i = 0; i < object.resourceDescriptors.length; ++i) { + if (typeof object.resourceDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.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 CreateMetricDescriptorRequest 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.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @static - * @param {google.monitoring.v3.CreateMetricDescriptorRequest} message CreateMetricDescriptorRequest + * @param {google.monitoring.v3.ListMonitoredResourceDescriptorsResponse} message ListMonitoredResourceDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMetricDescriptorRequest.toObject = function toObject(message, options) { + ListMonitoredResourceDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.metricDescriptor = null; - object.name = ""; + 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.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) - object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateMetricDescriptorRequest to JSON. + * Converts this ListMonitoredResourceDescriptorsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @memberof google.monitoring.v3.ListMonitoredResourceDescriptorsResponse * @instance * @returns {Object.} JSON object */ - CreateMetricDescriptorRequest.prototype.toJSON = function toJSON() { + ListMonitoredResourceDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateMetricDescriptorRequest; + return ListMonitoredResourceDescriptorsResponse; })(); - v3.DeleteMetricDescriptorRequest = (function() { + v3.GetMonitoredResourceDescriptorRequest = (function() { /** - * Properties of a DeleteMetricDescriptorRequest. + * Properties of a GetMonitoredResourceDescriptorRequest. * @memberof google.monitoring.v3 - * @interface IDeleteMetricDescriptorRequest - * @property {string|null} [name] DeleteMetricDescriptorRequest name + * @interface IGetMonitoredResourceDescriptorRequest + * @property {string|null} [name] GetMonitoredResourceDescriptorRequest name */ /** - * Constructs a new DeleteMetricDescriptorRequest. + * Constructs a new GetMonitoredResourceDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a DeleteMetricDescriptorRequest. - * @implements IDeleteMetricDescriptorRequest + * @classdesc Represents a GetMonitoredResourceDescriptorRequest. + * @implements IGetMonitoredResourceDescriptorRequest * @constructor - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set */ - function DeleteMetricDescriptorRequest(properties) { + function GetMonitoredResourceDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10063,35 +11253,35 @@ } /** - * DeleteMetricDescriptorRequest name. + * GetMonitoredResourceDescriptorRequest name. * @member {string} name - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @instance */ - DeleteMetricDescriptorRequest.prototype.name = ""; + GetMonitoredResourceDescriptorRequest.prototype.name = ""; /** - * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. + * Creates a new GetMonitoredResourceDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest instance + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest instance */ - DeleteMetricDescriptorRequest.create = function create(properties) { - return new DeleteMetricDescriptorRequest(properties); + GetMonitoredResourceDescriptorRequest.create = function create(properties) { + return new GetMonitoredResourceDescriptorRequest(properties); }; /** - * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified GetMonitoredResourceDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMetricDescriptorRequest.encode = function encode(message, writer) { + GetMonitoredResourceDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.hasOwnProperty("name")) @@ -10100,33 +11290,33 @@ }; /** - * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. + * Encodes the specified GetMonitoredResourceDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMonitoredResourceDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode + * @param {google.monitoring.v3.IGetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetMonitoredResourceDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMetricDescriptorRequest.decode = function decode(reader, length) { + GetMonitoredResourceDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10142,30 +11332,30 @@ }; /** - * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMonitoredResourceDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { + GetMonitoredResourceDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteMetricDescriptorRequest message. + * Verifies a GetMonitoredResourceDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteMetricDescriptorRequest.verify = function verify(message) { + GetMonitoredResourceDescriptorRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -10175,32 +11365,32 @@ }; /** - * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMonitoredResourceDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest + * @returns {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} GetMonitoredResourceDescriptorRequest */ - DeleteMetricDescriptorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.DeleteMetricDescriptorRequest) + GetMonitoredResourceDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); + var message = new $root.google.monitoring.v3.GetMonitoredResourceDescriptorRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetMonitoredResourceDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @static - * @param {google.monitoring.v3.DeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest + * @param {google.monitoring.v3.GetMonitoredResourceDescriptorRequest} message GetMonitoredResourceDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteMetricDescriptorRequest.toObject = function toObject(message, options) { + GetMonitoredResourceDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -10212,44 +11402,40 @@ }; /** - * Converts this DeleteMetricDescriptorRequest to JSON. + * Converts this GetMonitoredResourceDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest * @instance * @returns {Object.} JSON object */ - DeleteMetricDescriptorRequest.prototype.toJSON = function toJSON() { + GetMonitoredResourceDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteMetricDescriptorRequest; + return GetMonitoredResourceDescriptorRequest; })(); - v3.ListTimeSeriesRequest = (function() { + v3.ListMetricDescriptorsRequest = (function() { /** - * Properties of a ListTimeSeriesRequest. + * Properties of a ListMetricDescriptorsRequest. * @memberof google.monitoring.v3 - * @interface IListTimeSeriesRequest - * @property {string|null} [name] ListTimeSeriesRequest name - * @property {string|null} [filter] ListTimeSeriesRequest filter - * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListTimeSeriesRequest interval - * @property {google.monitoring.v3.IAggregation|null} [aggregation] ListTimeSeriesRequest aggregation - * @property {string|null} [orderBy] ListTimeSeriesRequest orderBy - * @property {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null} [view] ListTimeSeriesRequest view - * @property {number|null} [pageSize] ListTimeSeriesRequest pageSize - * @property {string|null} [pageToken] ListTimeSeriesRequest pageToken + * @interface IListMetricDescriptorsRequest + * @property {string|null} [name] ListMetricDescriptorsRequest name + * @property {string|null} [filter] ListMetricDescriptorsRequest filter + * @property {number|null} [pageSize] ListMetricDescriptorsRequest pageSize + * @property {string|null} [pageToken] ListMetricDescriptorsRequest pageToken */ /** - * Constructs a new ListTimeSeriesRequest. + * Constructs a new ListMetricDescriptorsRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a ListTimeSeriesRequest. - * @implements IListTimeSeriesRequest + * @classdesc Represents a ListMetricDescriptorsRequest. + * @implements IListMetricDescriptorsRequest * @constructor - * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set */ - function ListTimeSeriesRequest(properties) { + function ListMetricDescriptorsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10257,165 +11443,113 @@ } /** - * ListTimeSeriesRequest name. + * ListMetricDescriptorsRequest name. * @member {string} name - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesRequest.prototype.name = ""; + ListMetricDescriptorsRequest.prototype.name = ""; /** - * ListTimeSeriesRequest filter. + * ListMetricDescriptorsRequest filter. * @member {string} filter - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.filter = ""; - - /** - * ListTimeSeriesRequest interval. - * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.interval = null; - - /** - * ListTimeSeriesRequest aggregation. - * @member {google.monitoring.v3.IAggregation|null|undefined} aggregation - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.aggregation = null; - - /** - * ListTimeSeriesRequest orderBy. - * @member {string} orderBy - * @memberof google.monitoring.v3.ListTimeSeriesRequest - * @instance - */ - ListTimeSeriesRequest.prototype.orderBy = ""; - - /** - * ListTimeSeriesRequest view. - * @member {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} view - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesRequest.prototype.view = 0; + ListMetricDescriptorsRequest.prototype.filter = ""; /** - * ListTimeSeriesRequest pageSize. + * ListMetricDescriptorsRequest pageSize. * @member {number} pageSize - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesRequest.prototype.pageSize = 0; + ListMetricDescriptorsRequest.prototype.pageSize = 0; /** - * ListTimeSeriesRequest pageToken. + * ListMetricDescriptorsRequest pageToken. * @member {string} pageToken - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance */ - ListTimeSeriesRequest.prototype.pageToken = ""; + ListMetricDescriptorsRequest.prototype.pageToken = ""; /** - * Creates a new ListTimeSeriesRequest instance using the specified properties. + * Creates a new ListMetricDescriptorsRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest instance + * @param {google.monitoring.v3.IListMetricDescriptorsRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest instance */ - ListTimeSeriesRequest.create = function create(properties) { - return new ListTimeSeriesRequest(properties); + ListMetricDescriptorsRequest.create = function create(properties) { + return new ListMetricDescriptorsRequest(properties); }; /** - * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsRequest message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesRequest.encode = function encode(message, writer) { + ListMetricDescriptorsRequest.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.interval != null && message.hasOwnProperty("interval")) - $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.view != null && message.hasOwnProperty("view")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); if (message.pageSize != null && message.hasOwnProperty("pageSize")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && message.hasOwnProperty("pageToken")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; /** - * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsRequest} message ListMetricDescriptorsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMetricDescriptorsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesRequest.decode = function decode(reader, length) { + ListMetricDescriptorsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 10: + case 5: message.name = reader.string(); break; case 2: message.filter = reader.string(); break; - case 4: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; - case 5: - message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); - break; - case 6: - message.orderBy = reader.string(); - break; - case 7: - message.view = reader.int32(); - break; - case 8: + case 3: message.pageSize = reader.int32(); break; - case 9: + case 4: message.pageToken = reader.string(); break; default: @@ -10427,30 +11561,30 @@ }; /** - * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMetricDescriptorsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + ListMetricDescriptorsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTimeSeriesRequest message. + * Verifies a ListMetricDescriptorsRequest message. * @function verify - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTimeSeriesRequest.verify = function verify(message) { + ListMetricDescriptorsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -10459,27 +11593,6 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); - if (error) - return "interval." + error; - } - if (message.aggregation != null && message.hasOwnProperty("aggregation")) { - var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregation); - if (error) - return "aggregation." + error; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - break; - } if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -10490,43 +11603,21 @@ }; /** - * Creates a ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetricDescriptorsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @returns {google.monitoring.v3.ListMetricDescriptorsRequest} ListMetricDescriptorsRequest */ - ListTimeSeriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListTimeSeriesRequest) + ListMetricDescriptorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsRequest) return object; - var message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + var message = new $root.google.monitoring.v3.ListMetricDescriptorsRequest(); if (object.name != null) message.name = String(object.name); if (object.filter != null) message.filter = String(object.filter); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.interval: object expected"); - message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); - } - if (object.aggregation != null) { - if (typeof object.aggregation !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.aggregation: object expected"); - message.aggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregation); - } - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - switch (object.view) { - case "FULL": - case 0: - message.view = 0; - break; - case "HEADERS": - case 1: - message.view = 1; - break; - } if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -10535,38 +11626,26 @@ }; /** - * Creates a plain object from a ListTimeSeriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMetricDescriptorsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @static - * @param {google.monitoring.v3.ListTimeSeriesRequest} message ListTimeSeriesRequest + * @param {google.monitoring.v3.ListMetricDescriptorsRequest} message ListMetricDescriptorsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTimeSeriesRequest.toObject = function toObject(message, options) { + ListMetricDescriptorsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.filter = ""; - object.interval = null; - object.aggregation = null; - object.orderBy = ""; - object.view = options.enums === String ? "FULL" : 0; object.pageSize = 0; object.pageToken = ""; object.name = ""; } if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) - object.aggregation = $root.google.monitoring.v3.Aggregation.toObject(message.aggregation, options); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -10577,55 +11656,39 @@ }; /** - * Converts this ListTimeSeriesRequest to JSON. + * Converts this ListMetricDescriptorsRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest * @instance * @returns {Object.} JSON object */ - ListTimeSeriesRequest.prototype.toJSON = function toJSON() { + ListMetricDescriptorsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * TimeSeriesView enum. - * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView - * @enum {string} - * @property {number} FULL=0 FULL value - * @property {number} HEADERS=1 HEADERS value - */ - ListTimeSeriesRequest.TimeSeriesView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FULL"] = 0; - values[valuesById[1] = "HEADERS"] = 1; - return values; - })(); - - return ListTimeSeriesRequest; + return ListMetricDescriptorsRequest; })(); - v3.ListTimeSeriesResponse = (function() { + v3.ListMetricDescriptorsResponse = (function() { /** - * Properties of a ListTimeSeriesResponse. + * Properties of a ListMetricDescriptorsResponse. * @memberof google.monitoring.v3 - * @interface IListTimeSeriesResponse - * @property {Array.|null} [timeSeries] ListTimeSeriesResponse timeSeries - * @property {string|null} [nextPageToken] ListTimeSeriesResponse nextPageToken - * @property {Array.|null} [executionErrors] ListTimeSeriesResponse executionErrors + * @interface IListMetricDescriptorsResponse + * @property {Array.|null} [metricDescriptors] ListMetricDescriptorsResponse metricDescriptors + * @property {string|null} [nextPageToken] ListMetricDescriptorsResponse nextPageToken */ /** - * Constructs a new ListTimeSeriesResponse. + * Constructs a new ListMetricDescriptorsResponse. * @memberof google.monitoring.v3 - * @classdesc Represents a ListTimeSeriesResponse. - * @implements IListTimeSeriesResponse + * @classdesc Represents a ListMetricDescriptorsResponse. + * @implements IListMetricDescriptorsResponse * @constructor - * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set */ - function ListTimeSeriesResponse(properties) { - this.timeSeries = []; - this.executionErrors = []; + function ListMetricDescriptorsResponse(properties) { + this.metricDescriptors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10633,108 +11696,92 @@ } /** - * ListTimeSeriesResponse timeSeries. - * @member {Array.} timeSeries - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * ListMetricDescriptorsResponse metricDescriptors. + * @member {Array.} metricDescriptors + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @instance */ - ListTimeSeriesResponse.prototype.timeSeries = $util.emptyArray; + ListMetricDescriptorsResponse.prototype.metricDescriptors = $util.emptyArray; /** - * ListTimeSeriesResponse nextPageToken. + * ListMetricDescriptorsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.monitoring.v3.ListTimeSeriesResponse - * @instance - */ - ListTimeSeriesResponse.prototype.nextPageToken = ""; - - /** - * ListTimeSeriesResponse executionErrors. - * @member {Array.} executionErrors - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @instance */ - ListTimeSeriesResponse.prototype.executionErrors = $util.emptyArray; + ListMetricDescriptorsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListTimeSeriesResponse instance using the specified properties. + * Creates a new ListMetricDescriptorsResponse instance using the specified properties. * @function create - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse instance + * @param {google.monitoring.v3.IListMetricDescriptorsResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse instance */ - ListTimeSeriesResponse.create = function create(properties) { - return new ListTimeSeriesResponse(properties); + ListMetricDescriptorsResponse.create = function create(properties) { + return new ListMetricDescriptorsResponse(properties); }; /** - * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsResponse message. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesResponse.encode = function encode(message, writer) { + ListMetricDescriptorsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.timeSeries.length) - for (var i = 0; i < message.timeSeries.length; ++i) - $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricDescriptors != null && message.metricDescriptors.length) + for (var i = 0; i < message.metricDescriptors.length; ++i) + $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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.executionErrors != null && message.executionErrors.length) - for (var i = 0; i < message.executionErrors.length; ++i) - $root.google.rpc.Status.encode(message.executionErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * Encodes the specified ListMetricDescriptorsResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListMetricDescriptorsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {google.monitoring.v3.IListMetricDescriptorsResponse} message ListMetricDescriptorsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTimeSeriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListMetricDescriptorsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesResponse.decode = function decode(reader, length) { + ListMetricDescriptorsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.timeSeries && message.timeSeries.length)) - message.timeSeries = []; - message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + if (!(message.metricDescriptors && message.metricDescriptors.length)) + message.metricDescriptors = []; + message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); break; - case 3: - if (!(message.executionErrors && message.executionErrors.length)) - message.executionErrors = []; - message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -10744,161 +11791,133 @@ }; /** - * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListMetricDescriptorsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTimeSeriesResponse.decodeDelimited = function decodeDelimited(reader) { + ListMetricDescriptorsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTimeSeriesResponse message. + * Verifies a ListMetricDescriptorsResponse message. * @function verify - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTimeSeriesResponse.verify = function verify(message) { + ListMetricDescriptorsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { - if (!Array.isArray(message.timeSeries)) - return "timeSeries: array expected"; - for (var i = 0; i < message.timeSeries.length; ++i) { - var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (message.metricDescriptors != null && message.hasOwnProperty("metricDescriptors")) { + if (!Array.isArray(message.metricDescriptors)) + return "metricDescriptors: array expected"; + for (var i = 0; i < message.metricDescriptors.length; ++i) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptors[i]); if (error) - return "timeSeries." + error; + return "metricDescriptors." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; - if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { - if (!Array.isArray(message.executionErrors)) - return "executionErrors: array expected"; - for (var i = 0; i < message.executionErrors.length; ++i) { - var error = $root.google.rpc.Status.verify(message.executionErrors[i]); - if (error) - return "executionErrors." + error; - } - } return null; }; /** - * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListMetricDescriptorsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @returns {google.monitoring.v3.ListMetricDescriptorsResponse} ListMetricDescriptorsResponse */ - ListTimeSeriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.ListTimeSeriesResponse) + ListMetricDescriptorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListMetricDescriptorsResponse) return object; - var message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); - if (object.timeSeries) { - if (!Array.isArray(object.timeSeries)) - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: array expected"); - message.timeSeries = []; - for (var i = 0; i < object.timeSeries.length; ++i) { - if (typeof object.timeSeries[i] !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: object expected"); - message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + var message = new $root.google.monitoring.v3.ListMetricDescriptorsResponse(); + if (object.metricDescriptors) { + if (!Array.isArray(object.metricDescriptors)) + throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: array expected"); + message.metricDescriptors = []; + for (var i = 0; i < object.metricDescriptors.length; ++i) { + if (typeof object.metricDescriptors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListMetricDescriptorsResponse.metricDescriptors: object expected"); + message.metricDescriptors[i] = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptors[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); - if (object.executionErrors) { - if (!Array.isArray(object.executionErrors)) - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: array expected"); - message.executionErrors = []; - for (var i = 0; i < object.executionErrors.length; ++i) { - if (typeof object.executionErrors[i] !== "object") - throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: object expected"); - message.executionErrors[i] = $root.google.rpc.Status.fromObject(object.executionErrors[i]); - } - } return message; }; /** - * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListMetricDescriptorsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @static - * @param {google.monitoring.v3.ListTimeSeriesResponse} message ListTimeSeriesResponse + * @param {google.monitoring.v3.ListMetricDescriptorsResponse} message ListMetricDescriptorsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTimeSeriesResponse.toObject = function toObject(message, options) { + ListMetricDescriptorsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.timeSeries = []; - object.executionErrors = []; - } + if (options.arrays || options.defaults) + object.metricDescriptors = []; if (options.defaults) object.nextPageToken = ""; - if (message.timeSeries && message.timeSeries.length) { - object.timeSeries = []; - for (var j = 0; j < message.timeSeries.length; ++j) - object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + if (message.metricDescriptors && message.metricDescriptors.length) { + object.metricDescriptors = []; + for (var j = 0; j < message.metricDescriptors.length; ++j) + object.metricDescriptors[j] = $root.google.api.MetricDescriptor.toObject(message.metricDescriptors[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; - if (message.executionErrors && message.executionErrors.length) { - object.executionErrors = []; - for (var j = 0; j < message.executionErrors.length; ++j) - object.executionErrors[j] = $root.google.rpc.Status.toObject(message.executionErrors[j], options); - } return object; }; /** - * Converts this ListTimeSeriesResponse to JSON. + * Converts this ListMetricDescriptorsResponse to JSON. * @function toJSON - * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse * @instance * @returns {Object.} JSON object */ - ListTimeSeriesResponse.prototype.toJSON = function toJSON() { + ListMetricDescriptorsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListTimeSeriesResponse; + return ListMetricDescriptorsResponse; })(); - v3.CreateTimeSeriesRequest = (function() { + v3.GetMetricDescriptorRequest = (function() { /** - * Properties of a CreateTimeSeriesRequest. + * Properties of a GetMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @interface ICreateTimeSeriesRequest - * @property {string|null} [name] CreateTimeSeriesRequest name - * @property {Array.|null} [timeSeries] CreateTimeSeriesRequest timeSeries + * @interface IGetMetricDescriptorRequest + * @property {string|null} [name] GetMetricDescriptorRequest name */ /** - * Constructs a new CreateTimeSeriesRequest. + * Constructs a new GetMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateTimeSeriesRequest. - * @implements ICreateTimeSeriesRequest + * @classdesc Represents a GetMetricDescriptorRequest. + * @implements IGetMetricDescriptorRequest * @constructor - * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set */ - function CreateTimeSeriesRequest(properties) { - this.timeSeries = []; + function GetMetricDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10906,92 +11925,76 @@ } /** - * CreateTimeSeriesRequest name. + * GetMetricDescriptorRequest name. * @member {string} name - * @memberof google.monitoring.v3.CreateTimeSeriesRequest - * @instance - */ - CreateTimeSeriesRequest.prototype.name = ""; - - /** - * CreateTimeSeriesRequest timeSeries. - * @member {Array.} timeSeries - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @instance */ - CreateTimeSeriesRequest.prototype.timeSeries = $util.emptyArray; + GetMetricDescriptorRequest.prototype.name = ""; /** - * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * Creates a new GetMetricDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest instance + * @param {google.monitoring.v3.IGetMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest instance */ - CreateTimeSeriesRequest.create = function create(properties) { - return new CreateTimeSeriesRequest(properties); + GetMetricDescriptorRequest.create = function create(properties) { + return new GetMetricDescriptorRequest(properties); }; /** - * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * Encodes the specified GetMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesRequest.encode = function encode(message, writer) { + GetMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.timeSeries.length) - for (var i = 0; i < message.timeSeries.length; ++i) - $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * Encodes the specified GetMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.GetMetricDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {google.monitoring.v3.IGetMetricDescriptorRequest} message GetMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesRequest.decode = function decode(reader, length) { + GetMetricDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 3: message.name = reader.string(); break; - case 2: - if (!(message.timeSeries && message.timeSeries.length)) - message.timeSeries = []; - message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -11001,134 +12004,108 @@ }; /** - * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + GetMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTimeSeriesRequest message. + * Verifies a GetMetricDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTimeSeriesRequest.verify = function verify(message) { + GetMetricDescriptorRequest.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.timeSeries != null && message.hasOwnProperty("timeSeries")) { - if (!Array.isArray(message.timeSeries)) - return "timeSeries: array expected"; - for (var i = 0; i < message.timeSeries.length; ++i) { - var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); - if (error) - return "timeSeries." + error; - } - } return null; }; /** - * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @returns {google.monitoring.v3.GetMetricDescriptorRequest} GetMetricDescriptorRequest */ - CreateTimeSeriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesRequest) + GetMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.GetMetricDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + var message = new $root.google.monitoring.v3.GetMetricDescriptorRequest(); if (object.name != null) message.name = String(object.name); - if (object.timeSeries) { - if (!Array.isArray(object.timeSeries)) - throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: array expected"); - message.timeSeries = []; - for (var i = 0; i < object.timeSeries.length; ++i) { - if (typeof object.timeSeries[i] !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: object expected"); - message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); - } - } return message; }; /** - * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetMetricDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @static - * @param {google.monitoring.v3.CreateTimeSeriesRequest} message CreateTimeSeriesRequest + * @param {google.monitoring.v3.GetMetricDescriptorRequest} message GetMetricDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTimeSeriesRequest.toObject = function toObject(message, options) { + GetMetricDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.timeSeries = []; if (options.defaults) object.name = ""; - if (message.timeSeries && message.timeSeries.length) { - object.timeSeries = []; - for (var j = 0; j < message.timeSeries.length; ++j) - object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** - * Converts this CreateTimeSeriesRequest to JSON. + * Converts this GetMetricDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @memberof google.monitoring.v3.GetMetricDescriptorRequest * @instance * @returns {Object.} JSON object */ - CreateTimeSeriesRequest.prototype.toJSON = function toJSON() { + GetMetricDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTimeSeriesRequest; + return GetMetricDescriptorRequest; })(); - v3.CreateTimeSeriesError = (function() { + v3.CreateMetricDescriptorRequest = (function() { /** - * Properties of a CreateTimeSeriesError. + * Properties of a CreateMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @interface ICreateTimeSeriesError - * @property {google.monitoring.v3.ITimeSeries|null} [timeSeries] CreateTimeSeriesError timeSeries - * @property {google.rpc.IStatus|null} [status] CreateTimeSeriesError status + * @interface ICreateMetricDescriptorRequest + * @property {string|null} [name] CreateMetricDescriptorRequest name + * @property {google.api.IMetricDescriptor|null} [metricDescriptor] CreateMetricDescriptorRequest metricDescriptor */ /** - * Constructs a new CreateTimeSeriesError. + * Constructs a new CreateMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateTimeSeriesError. - * @implements ICreateTimeSeriesError + * @classdesc Represents a CreateMetricDescriptorRequest. + * @implements ICreateMetricDescriptorRequest * @constructor - * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set */ - function CreateTimeSeriesError(properties) { + function CreateMetricDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11136,88 +12113,88 @@ } /** - * CreateTimeSeriesError timeSeries. - * @member {google.monitoring.v3.ITimeSeries|null|undefined} timeSeries - * @memberof google.monitoring.v3.CreateTimeSeriesError + * CreateMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @instance */ - CreateTimeSeriesError.prototype.timeSeries = null; + CreateMetricDescriptorRequest.prototype.name = ""; /** - * CreateTimeSeriesError status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.monitoring.v3.CreateTimeSeriesError + * CreateMetricDescriptorRequest metricDescriptor. + * @member {google.api.IMetricDescriptor|null|undefined} metricDescriptor + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @instance */ - CreateTimeSeriesError.prototype.status = null; + CreateMetricDescriptorRequest.prototype.metricDescriptor = null; /** - * Creates a new CreateTimeSeriesError instance using the specified properties. + * Creates a new CreateMetricDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError instance + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest instance */ - CreateTimeSeriesError.create = function create(properties) { - return new CreateTimeSeriesError(properties); + CreateMetricDescriptorRequest.create = function create(properties) { + return new CreateMetricDescriptorRequest(properties); }; /** - * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * Encodes the specified CreateMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesError.encode = function encode(message, writer) { + CreateMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && message.hasOwnProperty("status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * Encodes the specified CreateMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateMetricDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {google.monitoring.v3.ICreateMetricDescriptorRequest} message CreateMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesError.encodeDelimited = function encodeDelimited(message, writer) { + CreateMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesError.decode = function decode(reader, length) { + CreateMetricDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); + case 3: + message.name = reader.string(); break; case 2: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -11228,129 +12205,121 @@ }; /** - * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * Decodes a CreateMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesError.decodeDelimited = function decodeDelimited(reader) { + CreateMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTimeSeriesError message. + * Verifies a CreateMetricDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTimeSeriesError.verify = function verify(message) { + CreateMetricDescriptorRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { - var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries); - if (error) - return "timeSeries." + error; - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) { + var error = $root.google.api.MetricDescriptor.verify(message.metricDescriptor); if (error) - return "status." + error; + return "metricDescriptor." + error; } return null; }; /** - * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @returns {google.monitoring.v3.CreateMetricDescriptorRequest} CreateMetricDescriptorRequest */ - CreateTimeSeriesError.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesError) + CreateMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateMetricDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesError(); - if (object.timeSeries != null) { - if (typeof object.timeSeries !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.timeSeries: object expected"); - message.timeSeries = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries); - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); + var message = new $root.google.monitoring.v3.CreateMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.metricDescriptor != null) { + if (typeof object.metricDescriptor !== "object") + throw TypeError(".google.monitoring.v3.CreateMetricDescriptorRequest.metricDescriptor: object expected"); + message.metricDescriptor = $root.google.api.MetricDescriptor.fromObject(object.metricDescriptor); } return message; }; /** - * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * Creates a plain object from a CreateMetricDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @static - * @param {google.monitoring.v3.CreateTimeSeriesError} message CreateTimeSeriesError + * @param {google.monitoring.v3.CreateMetricDescriptorRequest} message CreateMetricDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTimeSeriesError.toObject = function toObject(message, options) { + CreateMetricDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.timeSeries = null; - object.status = null; + object.metricDescriptor = null; + object.name = ""; } - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) - object.timeSeries = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) + object.metricDescriptor = $root.google.api.MetricDescriptor.toObject(message.metricDescriptor, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateTimeSeriesError to JSON. + * Converts this CreateMetricDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesError + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest * @instance * @returns {Object.} JSON object */ - CreateTimeSeriesError.prototype.toJSON = function toJSON() { + CreateMetricDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateTimeSeriesError; + return CreateMetricDescriptorRequest; })(); - v3.CreateTimeSeriesSummary = (function() { + v3.DeleteMetricDescriptorRequest = (function() { /** - * Properties of a CreateTimeSeriesSummary. + * Properties of a DeleteMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @interface ICreateTimeSeriesSummary - * @property {number|null} [totalPointCount] CreateTimeSeriesSummary totalPointCount - * @property {number|null} [successPointCount] CreateTimeSeriesSummary successPointCount - * @property {Array.|null} [errors] CreateTimeSeriesSummary errors + * @interface IDeleteMetricDescriptorRequest + * @property {string|null} [name] DeleteMetricDescriptorRequest name */ /** - * Constructs a new CreateTimeSeriesSummary. + * Constructs a new DeleteMetricDescriptorRequest. * @memberof google.monitoring.v3 - * @classdesc Represents a CreateTimeSeriesSummary. - * @implements ICreateTimeSeriesSummary + * @classdesc Represents a DeleteMetricDescriptorRequest. + * @implements IDeleteMetricDescriptorRequest * @constructor - * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set */ - function CreateTimeSeriesSummary(properties) { - this.errors = []; + function DeleteMetricDescriptorRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11358,104 +12327,75 @@ } /** - * CreateTimeSeriesSummary totalPointCount. - * @member {number} totalPointCount - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @instance - */ - CreateTimeSeriesSummary.prototype.totalPointCount = 0; - - /** - * CreateTimeSeriesSummary successPointCount. - * @member {number} successPointCount - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @instance - */ - CreateTimeSeriesSummary.prototype.successPointCount = 0; - - /** - * CreateTimeSeriesSummary errors. - * @member {Array.} errors - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * DeleteMetricDescriptorRequest name. + * @member {string} name + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @instance */ - CreateTimeSeriesSummary.prototype.errors = $util.emptyArray; + DeleteMetricDescriptorRequest.prototype.name = ""; /** - * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * Creates a new DeleteMetricDescriptorRequest instance using the specified properties. * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary instance + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest instance */ - CreateTimeSeriesSummary.create = function create(properties) { - return new CreateTimeSeriesSummary(properties); + DeleteMetricDescriptorRequest.create = function create(properties) { + return new DeleteMetricDescriptorRequest(properties); }; /** - * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * Encodes the specified DeleteMetricDescriptorRequest message. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesSummary.encode = function encode(message, writer) { + DeleteMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.encode(message.errors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; /** - * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * Encodes the specified DeleteMetricDescriptorRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.DeleteMetricDescriptorRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {google.monitoring.v3.IDeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTimeSeriesSummary.encodeDelimited = function encodeDelimited(message, writer) { + DeleteMetricDescriptorRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer. * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesSummary.decode = function decode(reader, length) { + DeleteMetricDescriptorRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.totalPointCount = reader.int32(); - break; - case 2: - message.successPointCount = reader.int32(); - break; case 3: - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -11466,277 +12406,1601 @@ }; /** - * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * Decodes a DeleteMetricDescriptorRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTimeSeriesSummary.decodeDelimited = function decodeDelimited(reader) { + DeleteMetricDescriptorRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTimeSeriesSummary message. + * Verifies a DeleteMetricDescriptorRequest message. * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTimeSeriesSummary.verify = function verify(message) { + DeleteMetricDescriptorRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) - if (!$util.isInteger(message.totalPointCount)) - return "totalPointCount: integer expected"; - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) - if (!$util.isInteger(message.successPointCount)) - return "successPointCount: integer expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteMetricDescriptorRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static * @param {Object.} object Plain object - * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @returns {google.monitoring.v3.DeleteMetricDescriptorRequest} DeleteMetricDescriptorRequest */ - CreateTimeSeriesSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary) + DeleteMetricDescriptorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.DeleteMetricDescriptorRequest) return object; - var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); - if (object.totalPointCount != null) - message.totalPointCount = object.totalPointCount | 0; - if (object.successPointCount != null) - message.successPointCount = object.successPointCount | 0; - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: object expected"); - message.errors[i] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.fromObject(object.errors[i]); - } - } + var message = new $root.google.monitoring.v3.DeleteMetricDescriptorRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * Creates a plain object from a DeleteMetricDescriptorRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary} message CreateTimeSeriesSummary + * @param {google.monitoring.v3.DeleteMetricDescriptorRequest} message DeleteMetricDescriptorRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTimeSeriesSummary.toObject = function toObject(message, options) { + DeleteMetricDescriptorRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.defaults) { - object.totalPointCount = 0; - object.successPointCount = 0; - } - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) - object.totalPointCount = message.totalPointCount; - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) - object.successPointCount = message.successPointCount; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.toObject(message.errors[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateTimeSeriesSummary to JSON. + * Converts this DeleteMetricDescriptorRequest to JSON. * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest * @instance * @returns {Object.} JSON object */ - CreateTimeSeriesSummary.prototype.toJSON = function toJSON() { + DeleteMetricDescriptorRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - CreateTimeSeriesSummary.Error = (function() { - - /** - * Properties of an Error. - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @interface IError - * @property {google.rpc.IStatus|null} [status] Error status - * @property {number|null} [pointCount] Error pointCount - */ + return DeleteMetricDescriptorRequest; + })(); - /** - * Constructs a new Error. - * @memberof google.monitoring.v3.CreateTimeSeriesSummary - * @classdesc Represents an Error. - * @implements IError - * @constructor - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set - */ - function Error(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v3.ListTimeSeriesRequest = (function() { - /** - * Error status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @instance - */ - Error.prototype.status = null; + /** + * Properties of a ListTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @interface IListTimeSeriesRequest + * @property {string|null} [name] ListTimeSeriesRequest name + * @property {string|null} [filter] ListTimeSeriesRequest filter + * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListTimeSeriesRequest interval + * @property {google.monitoring.v3.IAggregation|null} [aggregation] ListTimeSeriesRequest aggregation + * @property {string|null} [orderBy] ListTimeSeriesRequest orderBy + * @property {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null} [view] ListTimeSeriesRequest view + * @property {number|null} [pageSize] ListTimeSeriesRequest pageSize + * @property {string|null} [pageToken] ListTimeSeriesRequest pageToken + */ - /** - * Error pointCount. - * @member {number} pointCount - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @instance - */ - Error.prototype.pointCount = 0; + /** + * Constructs a new ListTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListTimeSeriesRequest. + * @implements IListTimeSeriesRequest + * @constructor + * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + */ + function ListTimeSeriesRequest(properties) { + if (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 Error instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error instance - */ - Error.create = function create(properties) { - return new Error(properties); - }; + /** + * ListTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.name = ""; - /** - * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && message.hasOwnProperty("status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pointCount != null && message.hasOwnProperty("pointCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); - return writer; - }; + /** + * ListTimeSeriesRequest filter. + * @member {string} filter + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.filter = ""; - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListTimeSeriesRequest interval. + * @member {google.monitoring.v3.ITimeInterval|null|undefined} interval + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.interval = null; - /** - * Decodes an Error message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 2: - message.pointCount = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListTimeSeriesRequest aggregation. + * @member {google.monitoring.v3.IAggregation|null|undefined} aggregation + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.aggregation = null; - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListTimeSeriesRequest orderBy. + * @member {string} orderBy + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.orderBy = ""; - /** - * Verifies an Error message. - * @function verify - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Error.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); - if (error) - return "status." + error; - } - if (message.pointCount != null && message.hasOwnProperty("pointCount")) - if (!$util.isInteger(message.pointCount)) - return "pointCount: integer expected"; - return null; - }; + /** + * ListTimeSeriesRequest view. + * @member {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView} view + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.view = 0; - /** + /** + * ListTimeSeriesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.pageSize = 0; + + /** + * ListTimeSeriesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListTimeSeriesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IListTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest instance + */ + ListTimeSeriesRequest.create = function create(properties) { + return new ListTimeSeriesRequest(properties); + }; + + /** + * Encodes the specified ListTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesRequest.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.interval != null && message.hasOwnProperty("interval")) + $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.view != null && message.hasOwnProperty("view")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IListTimeSeriesRequest} message ListTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: + message.name = reader.string(); + break; + case 2: + message.filter = reader.string(); + break; + case 4: + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + case 5: + message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); + break; + case 6: + message.orderBy = reader.string(); + break; + case 7: + message.view = reader.int32(); + break; + case 8: + message.pageSize = reader.int32(); + break; + case 9: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTimeSeriesRequest message. + * @function verify + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTimeSeriesRequest.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.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.monitoring.v3.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } + if (message.aggregation != null && message.hasOwnProperty("aggregation")) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.aggregation); + if (error) + return "aggregation." + error; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + break; + } + 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 ListTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListTimeSeriesRequest} ListTimeSeriesRequest + */ + ListTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListTimeSeriesRequest) + return object; + var message = new $root.google.monitoring.v3.ListTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.interval: object expected"); + message.interval = $root.google.monitoring.v3.TimeInterval.fromObject(object.interval); + } + if (object.aggregation != null) { + if (typeof object.aggregation !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.aggregation: object expected"); + message.aggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregation); + } + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + switch (object.view) { + case "FULL": + case 0: + message.view = 0; + break; + case "HEADERS": + case 1: + message.view = 1; + break; + } + 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 ListTimeSeriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ListTimeSeriesRequest} message ListTimeSeriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTimeSeriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.interval = null; + object.aggregation = null; + object.orderBy = ""; + object.view = options.enums === String ? "FULL" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.monitoring.v3.TimeInterval.toObject(message.interval, options); + if (message.aggregation != null && message.hasOwnProperty("aggregation")) + object.aggregation = $root.google.monitoring.v3.Aggregation.toObject(message.aggregation, options); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; + 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; + }; + + /** + * Converts this ListTimeSeriesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListTimeSeriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * TimeSeriesView enum. + * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView + * @enum {string} + * @property {number} FULL=0 FULL value + * @property {number} HEADERS=1 HEADERS value + */ + ListTimeSeriesRequest.TimeSeriesView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FULL"] = 0; + values[valuesById[1] = "HEADERS"] = 1; + return values; + })(); + + return ListTimeSeriesRequest; + })(); + + v3.ListTimeSeriesResponse = (function() { + + /** + * Properties of a ListTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @interface IListTimeSeriesResponse + * @property {Array.|null} [timeSeries] ListTimeSeriesResponse timeSeries + * @property {string|null} [nextPageToken] ListTimeSeriesResponse nextPageToken + * @property {Array.|null} [executionErrors] ListTimeSeriesResponse executionErrors + */ + + /** + * Constructs a new ListTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a ListTimeSeriesResponse. + * @implements IListTimeSeriesResponse + * @constructor + * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + */ + function ListTimeSeriesResponse(properties) { + this.timeSeries = []; + this.executionErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTimeSeriesResponse timeSeries. + * @member {Array.} timeSeries + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.timeSeries = $util.emptyArray; + + /** + * ListTimeSeriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.nextPageToken = ""; + + /** + * ListTimeSeriesResponse executionErrors. + * @member {Array.} executionErrors + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.executionErrors = $util.emptyArray; + + /** + * Creates a new ListTimeSeriesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IListTimeSeriesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse instance + */ + ListTimeSeriesResponse.create = function create(properties) { + return new ListTimeSeriesResponse(properties); + }; + + /** + * Encodes the specified ListTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.timeSeries.length) + for (var i = 0; i < message.timeSeries.length; ++i) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[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.executionErrors != null && message.executionErrors.length) + for (var i = 0; i < message.executionErrors.length; ++i) + $root.google.rpc.Status.encode(message.executionErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.ListTimeSeriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IListTimeSeriesResponse} message ListTimeSeriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTimeSeriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.executionErrors && message.executionErrors.length)) + message.executionErrors = []; + message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTimeSeriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTimeSeriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTimeSeriesResponse message. + * @function verify + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTimeSeriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { + if (!Array.isArray(message.timeSeries)) + return "timeSeries: array expected"; + for (var i = 0; i < message.timeSeries.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (error) + return "timeSeries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.executionErrors != null && message.hasOwnProperty("executionErrors")) { + if (!Array.isArray(message.executionErrors)) + return "executionErrors: array expected"; + for (var i = 0; i < message.executionErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.executionErrors[i]); + if (error) + return "executionErrors." + error; + } + } + return null; + }; + + /** + * Creates a ListTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.ListTimeSeriesResponse} ListTimeSeriesResponse + */ + ListTimeSeriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.ListTimeSeriesResponse) + return object; + var message = new $root.google.monitoring.v3.ListTimeSeriesResponse(); + if (object.timeSeries) { + if (!Array.isArray(object.timeSeries)) + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: array expected"); + message.timeSeries = []; + for (var i = 0; i < object.timeSeries.length; ++i) { + if (typeof object.timeSeries[i] !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.timeSeries: object expected"); + message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.executionErrors) { + if (!Array.isArray(object.executionErrors)) + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: array expected"); + message.executionErrors = []; + for (var i = 0; i < object.executionErrors.length; ++i) { + if (typeof object.executionErrors[i] !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesResponse.executionErrors: object expected"); + message.executionErrors[i] = $root.google.rpc.Status.fromObject(object.executionErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListTimeSeriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {google.monitoring.v3.ListTimeSeriesResponse} message ListTimeSeriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTimeSeriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.timeSeries = []; + object.executionErrors = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.timeSeries && message.timeSeries.length) { + object.timeSeries = []; + for (var j = 0; j < message.timeSeries.length; ++j) + object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.executionErrors && message.executionErrors.length) { + object.executionErrors = []; + for (var j = 0; j < message.executionErrors.length; ++j) + object.executionErrors[j] = $root.google.rpc.Status.toObject(message.executionErrors[j], options); + } + return object; + }; + + /** + * Converts this ListTimeSeriesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListTimeSeriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListTimeSeriesResponse; + })(); + + v3.CreateTimeSeriesRequest = (function() { + + /** + * Properties of a CreateTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @interface ICreateTimeSeriesRequest + * @property {string|null} [name] CreateTimeSeriesRequest name + * @property {Array.|null} [timeSeries] CreateTimeSeriesRequest timeSeries + */ + + /** + * Constructs a new CreateTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateTimeSeriesRequest. + * @implements ICreateTimeSeriesRequest + * @constructor + * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + */ + function CreateTimeSeriesRequest(properties) { + this.timeSeries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @instance + */ + CreateTimeSeriesRequest.prototype.name = ""; + + /** + * CreateTimeSeriesRequest timeSeries. + * @member {Array.} timeSeries + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @instance + */ + CreateTimeSeriesRequest.prototype.timeSeries = $util.emptyArray; + + /** + * Creates a new CreateTimeSeriesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest instance + */ + CreateTimeSeriesRequest.create = function create(properties) { + return new CreateTimeSeriesRequest(properties); + }; + + /** + * Encodes the specified CreateTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.timeSeries.length) + for (var i = 0; i < message.timeSeries.length; ++i) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified CreateTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesRequest} message CreateTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; + case 2: + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTimeSeriesRequest message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTimeSeriesRequest.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.timeSeries != null && message.hasOwnProperty("timeSeries")) { + if (!Array.isArray(message.timeSeries)) + return "timeSeries: array expected"; + for (var i = 0; i < message.timeSeries.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries[i]); + if (error) + return "timeSeries." + error; + } + } + return null; + }; + + /** + * Creates a CreateTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesRequest} CreateTimeSeriesRequest + */ + CreateTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesRequest) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeSeries) { + if (!Array.isArray(object.timeSeries)) + throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: array expected"); + message.timeSeries = []; + for (var i = 0; i < object.timeSeries.length; ++i) { + if (typeof object.timeSeries[i] !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesRequest.timeSeries: object expected"); + message.timeSeries[i] = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateTimeSeriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {google.monitoring.v3.CreateTimeSeriesRequest} message CreateTimeSeriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTimeSeriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.timeSeries = []; + if (options.defaults) + object.name = ""; + if (message.timeSeries && message.timeSeries.length) { + object.timeSeries = []; + for (var j = 0; j < message.timeSeries.length; ++j) + object.timeSeries[j] = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries[j], options); + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CreateTimeSeriesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTimeSeriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTimeSeriesRequest; + })(); + + v3.CreateTimeSeriesError = (function() { + + /** + * Properties of a CreateTimeSeriesError. + * @memberof google.monitoring.v3 + * @interface ICreateTimeSeriesError + * @property {google.monitoring.v3.ITimeSeries|null} [timeSeries] CreateTimeSeriesError timeSeries + * @property {google.rpc.IStatus|null} [status] CreateTimeSeriesError status + */ + + /** + * Constructs a new CreateTimeSeriesError. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateTimeSeriesError. + * @implements ICreateTimeSeriesError + * @constructor + * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + */ + function CreateTimeSeriesError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTimeSeriesError timeSeries. + * @member {google.monitoring.v3.ITimeSeries|null|undefined} timeSeries + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + */ + CreateTimeSeriesError.prototype.timeSeries = null; + + /** + * CreateTimeSeriesError status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + */ + CreateTimeSeriesError.prototype.status = null; + + /** + * Creates a new CreateTimeSeriesError instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesError=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError instance + */ + CreateTimeSeriesError.create = function create(properties) { + return new CreateTimeSeriesError(properties); + }; + + /** + * Encodes the specified CreateTimeSeriesError message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && message.hasOwnProperty("status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTimeSeriesError message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesError} message CreateTimeSeriesError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTimeSeriesError message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); + break; + case 2: + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTimeSeriesError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTimeSeriesError message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTimeSeriesError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { + var error = $root.google.monitoring.v3.TimeSeries.verify(message.timeSeries); + if (error) + return "timeSeries." + error; + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates a CreateTimeSeriesError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesError} CreateTimeSeriesError + */ + CreateTimeSeriesError.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesError) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesError(); + if (object.timeSeries != null) { + if (typeof object.timeSeries !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.timeSeries: object expected"); + message.timeSeries = $root.google.monitoring.v3.TimeSeries.fromObject(object.timeSeries); + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesError.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + return message; + }; + + /** + * Creates a plain object from a CreateTimeSeriesError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {google.monitoring.v3.CreateTimeSeriesError} message CreateTimeSeriesError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTimeSeriesError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.timeSeries = null; + object.status = null; + } + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + object.timeSeries = $root.google.monitoring.v3.TimeSeries.toObject(message.timeSeries, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + return object; + }; + + /** + * Converts this CreateTimeSeriesError to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @instance + * @returns {Object.} JSON object + */ + CreateTimeSeriesError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateTimeSeriesError; + })(); + + v3.CreateTimeSeriesSummary = (function() { + + /** + * Properties of a CreateTimeSeriesSummary. + * @memberof google.monitoring.v3 + * @interface ICreateTimeSeriesSummary + * @property {number|null} [totalPointCount] CreateTimeSeriesSummary totalPointCount + * @property {number|null} [successPointCount] CreateTimeSeriesSummary successPointCount + * @property {Array.|null} [errors] CreateTimeSeriesSummary errors + */ + + /** + * Constructs a new CreateTimeSeriesSummary. + * @memberof google.monitoring.v3 + * @classdesc Represents a CreateTimeSeriesSummary. + * @implements ICreateTimeSeriesSummary + * @constructor + * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + */ + function CreateTimeSeriesSummary(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateTimeSeriesSummary totalPointCount. + * @member {number} totalPointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.totalPointCount = 0; + + /** + * CreateTimeSeriesSummary successPointCount. + * @member {number} successPointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.successPointCount = 0; + + /** + * CreateTimeSeriesSummary errors. + * @member {Array.} errors + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + */ + CreateTimeSeriesSummary.prototype.errors = $util.emptyArray; + + /** + * Creates a new CreateTimeSeriesSummary instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesSummary=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary instance + */ + CreateTimeSeriesSummary.create = function create(properties) { + return new CreateTimeSeriesSummary(properties); + }; + + /** + * Encodes the specified CreateTimeSeriesSummary message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.encode(message.errors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateTimeSeriesSummary message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.ICreateTimeSeriesSummary} message CreateTimeSeriesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTimeSeriesSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.totalPointCount = reader.int32(); + break; + case 2: + message.successPointCount = reader.int32(); + break; + case 3: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTimeSeriesSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTimeSeriesSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTimeSeriesSummary message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTimeSeriesSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + if (!$util.isInteger(message.totalPointCount)) + return "totalPointCount: integer expected"; + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + if (!$util.isInteger(message.successPointCount)) + return "successPointCount: integer expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates a CreateTimeSeriesSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.CreateTimeSeriesSummary} CreateTimeSeriesSummary + */ + CreateTimeSeriesSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.CreateTimeSeriesSummary) + return object; + var message = new $root.google.monitoring.v3.CreateTimeSeriesSummary(); + if (object.totalPointCount != null) + message.totalPointCount = object.totalPointCount | 0; + if (object.successPointCount != null) + message.successPointCount = object.successPointCount | 0; + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.errors: object expected"); + message.errors[i] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CreateTimeSeriesSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary} message CreateTimeSeriesSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTimeSeriesSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) { + object.totalPointCount = 0; + object.successPointCount = 0; + } + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + object.totalPointCount = message.totalPointCount; + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + object.successPointCount = message.successPointCount; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.monitoring.v3.CreateTimeSeriesSummary.Error.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this CreateTimeSeriesSummary to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @instance + * @returns {Object.} JSON object + */ + CreateTimeSeriesSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CreateTimeSeriesSummary.Error = (function() { + + /** + * Properties of an Error. + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @interface IError + * @property {google.rpc.IStatus|null} [status] Error status + * @property {number|null} [pointCount] Error pointCount + */ + + /** + * Constructs a new Error. + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set + */ + function Error(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Error status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + */ + Error.prototype.status = null; + + /** + * Error pointCount. + * @member {number} pointCount + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + */ + Error.prototype.pointCount = 0; + + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError=} [properties] Properties to set + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && message.hasOwnProperty("status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); + return writer; + }; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.monitoring.v3.CreateTimeSeriesSummary.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.CreateTimeSeriesSummary.Error(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 2: + message.pointCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.CreateTimeSeriesSummary.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + if (!$util.isInteger(message.pointCount)) + return "pointCount: integer expected"; + return null; + }; + + /** * Creates an Error message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error @@ -11753,50 +14017,838 @@ throw TypeError(".google.monitoring.v3.CreateTimeSeriesSummary.Error.status: object expected"); message.status = $root.google.rpc.Status.fromObject(object.status); } - if (object.pointCount != null) - message.pointCount = object.pointCount | 0; - return message; - }; + if (object.pointCount != null) + message.pointCount = object.pointCount | 0; + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {google.monitoring.v3.CreateTimeSeriesSummary.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = null; + object.pointCount = 0; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.pointCount != null && message.hasOwnProperty("pointCount")) + object.pointCount = message.pointCount; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Error; + })(); + + return CreateTimeSeriesSummary; + })(); + + v3.QueryTimeSeriesRequest = (function() { + + /** + * Properties of a QueryTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @interface IQueryTimeSeriesRequest + * @property {string|null} [name] QueryTimeSeriesRequest name + * @property {string|null} [query] QueryTimeSeriesRequest query + * @property {number|null} [pageSize] QueryTimeSeriesRequest pageSize + * @property {string|null} [pageToken] QueryTimeSeriesRequest pageToken + */ + + /** + * Constructs a new QueryTimeSeriesRequest. + * @memberof google.monitoring.v3 + * @classdesc Represents a QueryTimeSeriesRequest. + * @implements IQueryTimeSeriesRequest + * @constructor + * @param {google.monitoring.v3.IQueryTimeSeriesRequest=} [properties] Properties to set + */ + function QueryTimeSeriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryTimeSeriesRequest name. + * @member {string} name + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @instance + */ + QueryTimeSeriesRequest.prototype.name = ""; + + /** + * QueryTimeSeriesRequest query. + * @member {string} query + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @instance + */ + QueryTimeSeriesRequest.prototype.query = ""; + + /** + * QueryTimeSeriesRequest pageSize. + * @member {number} pageSize + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @instance + */ + QueryTimeSeriesRequest.prototype.pageSize = 0; + + /** + * QueryTimeSeriesRequest pageToken. + * @member {string} pageToken + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @instance + */ + QueryTimeSeriesRequest.prototype.pageToken = ""; + + /** + * Creates a new QueryTimeSeriesRequest instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IQueryTimeSeriesRequest=} [properties] Properties to set + * @returns {google.monitoring.v3.QueryTimeSeriesRequest} QueryTimeSeriesRequest instance + */ + QueryTimeSeriesRequest.create = function create(properties) { + return new QueryTimeSeriesRequest(properties); + }; + + /** + * Encodes the specified QueryTimeSeriesRequest message. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesRequest.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IQueryTimeSeriesRequest} message QueryTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTimeSeriesRequest.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.query != null && message.hasOwnProperty("query")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.query); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified QueryTimeSeriesRequest message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {google.monitoring.v3.IQueryTimeSeriesRequest} message QueryTimeSeriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTimeSeriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTimeSeriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.QueryTimeSeriesRequest} QueryTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTimeSeriesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.QueryTimeSeriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 7: + message.query = reader.string(); + break; + case 9: + message.pageSize = reader.int32(); + break; + case 10: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTimeSeriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.QueryTimeSeriesRequest} QueryTimeSeriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTimeSeriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTimeSeriesRequest message. + * @function verify + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTimeSeriesRequest.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.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: 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 QueryTimeSeriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.QueryTimeSeriesRequest} QueryTimeSeriesRequest + */ + QueryTimeSeriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.QueryTimeSeriesRequest) + return object; + var message = new $root.google.monitoring.v3.QueryTimeSeriesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.query != null) + message.query = String(object.query); + 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 QueryTimeSeriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {google.monitoring.v3.QueryTimeSeriesRequest} message QueryTimeSeriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTimeSeriesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.query = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + 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 QueryTimeSeriesRequest to JSON. + * @function toJSON + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryTimeSeriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTimeSeriesRequest; + })(); + + v3.QueryTimeSeriesResponse = (function() { + + /** + * Properties of a QueryTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @interface IQueryTimeSeriesResponse + * @property {google.monitoring.v3.ITimeSeriesDescriptor|null} [timeSeriesDescriptor] QueryTimeSeriesResponse timeSeriesDescriptor + * @property {Array.|null} [timeSeriesData] QueryTimeSeriesResponse timeSeriesData + * @property {string|null} [nextPageToken] QueryTimeSeriesResponse nextPageToken + * @property {Array.|null} [partialErrors] QueryTimeSeriesResponse partialErrors + */ + + /** + * Constructs a new QueryTimeSeriesResponse. + * @memberof google.monitoring.v3 + * @classdesc Represents a QueryTimeSeriesResponse. + * @implements IQueryTimeSeriesResponse + * @constructor + * @param {google.monitoring.v3.IQueryTimeSeriesResponse=} [properties] Properties to set + */ + function QueryTimeSeriesResponse(properties) { + this.timeSeriesData = []; + this.partialErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryTimeSeriesResponse timeSeriesDescriptor. + * @member {google.monitoring.v3.ITimeSeriesDescriptor|null|undefined} timeSeriesDescriptor + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @instance + */ + QueryTimeSeriesResponse.prototype.timeSeriesDescriptor = null; + + /** + * QueryTimeSeriesResponse timeSeriesData. + * @member {Array.} timeSeriesData + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @instance + */ + QueryTimeSeriesResponse.prototype.timeSeriesData = $util.emptyArray; + + /** + * QueryTimeSeriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @instance + */ + QueryTimeSeriesResponse.prototype.nextPageToken = ""; + + /** + * QueryTimeSeriesResponse partialErrors. + * @member {Array.} partialErrors + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @instance + */ + QueryTimeSeriesResponse.prototype.partialErrors = $util.emptyArray; + + /** + * Creates a new QueryTimeSeriesResponse instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IQueryTimeSeriesResponse=} [properties] Properties to set + * @returns {google.monitoring.v3.QueryTimeSeriesResponse} QueryTimeSeriesResponse instance + */ + QueryTimeSeriesResponse.create = function create(properties) { + return new QueryTimeSeriesResponse(properties); + }; + + /** + * Encodes the specified QueryTimeSeriesResponse message. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesResponse.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IQueryTimeSeriesResponse} message QueryTimeSeriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTimeSeriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timeSeriesDescriptor != null && message.hasOwnProperty("timeSeriesDescriptor")) + $root.google.monitoring.v3.TimeSeriesDescriptor.encode(message.timeSeriesDescriptor, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timeSeriesData != null && message.timeSeriesData.length) + for (var i = 0; i < message.timeSeriesData.length; ++i) + $root.google.monitoring.v3.TimeSeriesData.encode(message.timeSeriesData[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.nextPageToken); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryTimeSeriesResponse message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryTimeSeriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {google.monitoring.v3.IQueryTimeSeriesResponse} message QueryTimeSeriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTimeSeriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTimeSeriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.QueryTimeSeriesResponse} QueryTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTimeSeriesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.QueryTimeSeriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: + message.timeSeriesDescriptor = $root.google.monitoring.v3.TimeSeriesDescriptor.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.timeSeriesData && message.timeSeriesData.length)) + message.timeSeriesData = []; + message.timeSeriesData.push($root.google.monitoring.v3.TimeSeriesData.decode(reader, reader.uint32())); + break; + case 10: + message.nextPageToken = reader.string(); + break; + case 11: + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @static - * @param {google.monitoring.v3.CreateTimeSeriesSummary.Error} message Error - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Error.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.status = null; - object.pointCount = 0; + /** + * Decodes a QueryTimeSeriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.QueryTimeSeriesResponse} QueryTimeSeriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTimeSeriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTimeSeriesResponse message. + * @function verify + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTimeSeriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timeSeriesDescriptor != null && message.hasOwnProperty("timeSeriesDescriptor")) { + var error = $root.google.monitoring.v3.TimeSeriesDescriptor.verify(message.timeSeriesDescriptor); + if (error) + return "timeSeriesDescriptor." + error; + } + if (message.timeSeriesData != null && message.hasOwnProperty("timeSeriesData")) { + if (!Array.isArray(message.timeSeriesData)) + return "timeSeriesData: array expected"; + for (var i = 0; i < message.timeSeriesData.length; ++i) { + var error = $root.google.monitoring.v3.TimeSeriesData.verify(message.timeSeriesData[i]); + if (error) + return "timeSeriesData." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } + } + return null; + }; + + /** + * Creates a QueryTimeSeriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.QueryTimeSeriesResponse} QueryTimeSeriesResponse + */ + QueryTimeSeriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.QueryTimeSeriesResponse) + return object; + var message = new $root.google.monitoring.v3.QueryTimeSeriesResponse(); + if (object.timeSeriesDescriptor != null) { + if (typeof object.timeSeriesDescriptor !== "object") + throw TypeError(".google.monitoring.v3.QueryTimeSeriesResponse.timeSeriesDescriptor: object expected"); + message.timeSeriesDescriptor = $root.google.monitoring.v3.TimeSeriesDescriptor.fromObject(object.timeSeriesDescriptor); + } + if (object.timeSeriesData) { + if (!Array.isArray(object.timeSeriesData)) + throw TypeError(".google.monitoring.v3.QueryTimeSeriesResponse.timeSeriesData: array expected"); + message.timeSeriesData = []; + for (var i = 0; i < object.timeSeriesData.length; ++i) { + if (typeof object.timeSeriesData[i] !== "object") + throw TypeError(".google.monitoring.v3.QueryTimeSeriesResponse.timeSeriesData: object expected"); + message.timeSeriesData[i] = $root.google.monitoring.v3.TimeSeriesData.fromObject(object.timeSeriesData[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.monitoring.v3.QueryTimeSeriesResponse.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.monitoring.v3.QueryTimeSeriesResponse.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryTimeSeriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {google.monitoring.v3.QueryTimeSeriesResponse} message QueryTimeSeriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTimeSeriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.timeSeriesData = []; + object.partialErrors = []; + } + if (options.defaults) { + object.timeSeriesDescriptor = null; + object.nextPageToken = ""; + } + if (message.timeSeriesDescriptor != null && message.hasOwnProperty("timeSeriesDescriptor")) + object.timeSeriesDescriptor = $root.google.monitoring.v3.TimeSeriesDescriptor.toObject(message.timeSeriesDescriptor, options); + if (message.timeSeriesData && message.timeSeriesData.length) { + object.timeSeriesData = []; + for (var j = 0; j < message.timeSeriesData.length; ++j) + object.timeSeriesData[j] = $root.google.monitoring.v3.TimeSeriesData.toObject(message.timeSeriesData[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); + } + return object; + }; + + /** + * Converts this QueryTimeSeriesResponse to JSON. + * @function toJSON + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryTimeSeriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTimeSeriesResponse; + })(); + + v3.QueryErrorList = (function() { + + /** + * Properties of a QueryErrorList. + * @memberof google.monitoring.v3 + * @interface IQueryErrorList + * @property {Array.|null} [errors] QueryErrorList errors + * @property {string|null} [errorSummary] QueryErrorList errorSummary + */ + + /** + * Constructs a new QueryErrorList. + * @memberof google.monitoring.v3 + * @classdesc Represents a QueryErrorList. + * @implements IQueryErrorList + * @constructor + * @param {google.monitoring.v3.IQueryErrorList=} [properties] Properties to set + */ + function QueryErrorList(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryErrorList errors. + * @member {Array.} errors + * @memberof google.monitoring.v3.QueryErrorList + * @instance + */ + QueryErrorList.prototype.errors = $util.emptyArray; + + /** + * QueryErrorList errorSummary. + * @member {string} errorSummary + * @memberof google.monitoring.v3.QueryErrorList + * @instance + */ + QueryErrorList.prototype.errorSummary = ""; + + /** + * Creates a new QueryErrorList instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {google.monitoring.v3.IQueryErrorList=} [properties] Properties to set + * @returns {google.monitoring.v3.QueryErrorList} QueryErrorList instance + */ + QueryErrorList.create = function create(properties) { + return new QueryErrorList(properties); + }; + + /** + * Encodes the specified QueryErrorList message. Does not implicitly {@link google.monitoring.v3.QueryErrorList.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {google.monitoring.v3.IQueryErrorList} message QueryErrorList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryErrorList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.monitoring.v3.QueryError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorSummary != null && message.hasOwnProperty("errorSummary")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorSummary); + return writer; + }; + + /** + * Encodes the specified QueryErrorList message, length delimited. Does not implicitly {@link google.monitoring.v3.QueryErrorList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {google.monitoring.v3.IQueryErrorList} message QueryErrorList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryErrorList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryErrorList message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.QueryErrorList} QueryErrorList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryErrorList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.QueryErrorList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.monitoring.v3.QueryError.decode(reader, reader.uint32())); + break; + case 2: + message.errorSummary = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryErrorList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.QueryErrorList} QueryErrorList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryErrorList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryErrorList message. + * @function verify + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryErrorList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.monitoring.v3.QueryError.verify(message.errors[i]); + if (error) + return "errors." + error; } - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); - if (message.pointCount != null && message.hasOwnProperty("pointCount")) - object.pointCount = message.pointCount; + } + if (message.errorSummary != null && message.hasOwnProperty("errorSummary")) + if (!$util.isString(message.errorSummary)) + return "errorSummary: string expected"; + return null; + }; + + /** + * Creates a QueryErrorList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.QueryErrorList} QueryErrorList + */ + QueryErrorList.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.QueryErrorList) return object; - }; + var message = new $root.google.monitoring.v3.QueryErrorList(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.monitoring.v3.QueryErrorList.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.monitoring.v3.QueryErrorList.errors: object expected"); + message.errors[i] = $root.google.monitoring.v3.QueryError.fromObject(object.errors[i]); + } + } + if (object.errorSummary != null) + message.errorSummary = String(object.errorSummary); + return message; + }; - /** - * Converts this Error to JSON. - * @function toJSON - * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error - * @instance - * @returns {Object.} JSON object - */ - Error.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a QueryErrorList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {google.monitoring.v3.QueryErrorList} message QueryErrorList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryErrorList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) + object.errorSummary = ""; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.monitoring.v3.QueryError.toObject(message.errors[j], options); + } + if (message.errorSummary != null && message.hasOwnProperty("errorSummary")) + object.errorSummary = message.errorSummary; + return object; + }; - return Error; - })(); + /** + * Converts this QueryErrorList to JSON. + * @function toJSON + * @memberof google.monitoring.v3.QueryErrorList + * @instance + * @returns {Object.} JSON object + */ + QueryErrorList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return CreateTimeSeriesSummary; + return QueryErrorList; })(); v3.NotificationChannelDescriptor = (function() { @@ -15836,6 +18888,7 @@ * @property {google.monitoring.v3.Service.IAppEngine|null} [appEngine] Service appEngine * @property {google.monitoring.v3.Service.ICloudEndpoints|null} [cloudEndpoints] Service cloudEndpoints * @property {google.monitoring.v3.Service.IClusterIstio|null} [clusterIstio] Service clusterIstio + * @property {google.monitoring.v3.Service.IMeshIstio|null} [meshIstio] Service meshIstio * @property {google.monitoring.v3.Service.ITelemetry|null} [telemetry] Service telemetry */ @@ -15902,6 +18955,14 @@ */ Service.prototype.clusterIstio = null; + /** + * Service meshIstio. + * @member {google.monitoring.v3.Service.IMeshIstio|null|undefined} meshIstio + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.meshIstio = null; + /** * Service telemetry. * @member {google.monitoring.v3.Service.ITelemetry|null|undefined} telemetry @@ -15915,12 +18976,12 @@ /** * Service identifier. - * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|undefined} identifier + * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|"meshIstio"|undefined} identifier * @memberof google.monitoring.v3.Service * @instance */ Object.defineProperty(Service.prototype, "identifier", { - get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio"]), + get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio", "meshIstio"]), set: $util.oneOfSetter($oneOfFields) }); @@ -15960,6 +19021,8 @@ $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.meshIstio != null && message.hasOwnProperty("meshIstio")) + $root.google.monitoring.v3.Service.MeshIstio.encode(message.meshIstio, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.telemetry != null && message.hasOwnProperty("telemetry")) $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; @@ -16014,6 +19077,9 @@ case 9: message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.decode(reader, reader.uint32()); break; + case 10: + message.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.decode(reader, reader.uint32()); + break; case 13: message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); break; @@ -16097,6 +19163,16 @@ return "clusterIstio." + error; } } + if (message.meshIstio != null && message.hasOwnProperty("meshIstio")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.MeshIstio.verify(message.meshIstio); + if (error) + return "meshIstio." + error; + } + } if (message.telemetry != null && message.hasOwnProperty("telemetry")) { var error = $root.google.monitoring.v3.Service.Telemetry.verify(message.telemetry); if (error) @@ -16141,6 +19217,11 @@ throw TypeError(".google.monitoring.v3.Service.clusterIstio: object expected"); message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.fromObject(object.clusterIstio); } + if (object.meshIstio != null) { + if (typeof object.meshIstio !== "object") + throw TypeError(".google.monitoring.v3.Service.meshIstio: object expected"); + message.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.fromObject(object.meshIstio); + } if (object.telemetry != null) { if (typeof object.telemetry !== "object") throw TypeError(".google.monitoring.v3.Service.telemetry: object expected"); @@ -16191,6 +19272,11 @@ if (options.oneofs) object.identifier = "clusterIstio"; } + if (message.meshIstio != null && message.hasOwnProperty("meshIstio")) { + object.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.toObject(message.meshIstio, options); + if (options.oneofs) + object.identifier = "meshIstio"; + } if (message.telemetry != null && message.hasOwnProperty("telemetry")) object.telemetry = $root.google.monitoring.v3.Service.Telemetry.toObject(message.telemetry, options); return object; @@ -16995,6 +20081,238 @@ return ClusterIstio; })(); + Service.MeshIstio = (function() { + + /** + * Properties of a MeshIstio. + * @memberof google.monitoring.v3.Service + * @interface IMeshIstio + * @property {string|null} [meshUid] MeshIstio meshUid + * @property {string|null} [serviceNamespace] MeshIstio serviceNamespace + * @property {string|null} [serviceName] MeshIstio serviceName + */ + + /** + * Constructs a new MeshIstio. + * @memberof google.monitoring.v3.Service + * @classdesc Represents a MeshIstio. + * @implements IMeshIstio + * @constructor + * @param {google.monitoring.v3.Service.IMeshIstio=} [properties] Properties to set + */ + function MeshIstio(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MeshIstio meshUid. + * @member {string} meshUid + * @memberof google.monitoring.v3.Service.MeshIstio + * @instance + */ + MeshIstio.prototype.meshUid = ""; + + /** + * MeshIstio serviceNamespace. + * @member {string} serviceNamespace + * @memberof google.monitoring.v3.Service.MeshIstio + * @instance + */ + MeshIstio.prototype.serviceNamespace = ""; + + /** + * MeshIstio serviceName. + * @member {string} serviceName + * @memberof google.monitoring.v3.Service.MeshIstio + * @instance + */ + MeshIstio.prototype.serviceName = ""; + + /** + * Creates a new MeshIstio instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {google.monitoring.v3.Service.IMeshIstio=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.MeshIstio} MeshIstio instance + */ + MeshIstio.create = function create(properties) { + return new MeshIstio(properties); + }; + + /** + * Encodes the specified MeshIstio message. Does not implicitly {@link google.monitoring.v3.Service.MeshIstio.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {google.monitoring.v3.Service.IMeshIstio} message MeshIstio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeshIstio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.meshUid != null && message.hasOwnProperty("meshUid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.meshUid); + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); + return writer; + }; + + /** + * Encodes the specified MeshIstio message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.MeshIstio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {google.monitoring.v3.Service.IMeshIstio} message MeshIstio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeshIstio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MeshIstio message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.MeshIstio} MeshIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeshIstio.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.MeshIstio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.meshUid = reader.string(); + break; + case 3: + message.serviceNamespace = reader.string(); + break; + case 4: + message.serviceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MeshIstio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.MeshIstio} MeshIstio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeshIstio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MeshIstio message. + * @function verify + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MeshIstio.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.meshUid != null && message.hasOwnProperty("meshUid")) + if (!$util.isString(message.meshUid)) + return "meshUid: string expected"; + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (!$util.isString(message.serviceNamespace)) + return "serviceNamespace: string expected"; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (!$util.isString(message.serviceName)) + return "serviceName: string expected"; + return null; + }; + + /** + * Creates a MeshIstio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.MeshIstio} MeshIstio + */ + MeshIstio.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.MeshIstio) + return object; + var message = new $root.google.monitoring.v3.Service.MeshIstio(); + if (object.meshUid != null) + message.meshUid = String(object.meshUid); + if (object.serviceNamespace != null) + message.serviceNamespace = String(object.serviceNamespace); + if (object.serviceName != null) + message.serviceName = String(object.serviceName); + return message; + }; + + /** + * Creates a plain object from a MeshIstio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {google.monitoring.v3.Service.MeshIstio} message MeshIstio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MeshIstio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.meshUid = ""; + object.serviceNamespace = ""; + object.serviceName = ""; + } + if (message.meshUid != null && message.hasOwnProperty("meshUid")) + object.meshUid = message.meshUid; + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + object.serviceNamespace = message.serviceNamespace; + if (message.serviceName != null && message.hasOwnProperty("serviceName")) + object.serviceName = message.serviceName; + return object; + }; + + /** + * Converts this MeshIstio to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.MeshIstio + * @instance + * @returns {Object.} JSON object + */ + MeshIstio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MeshIstio; + })(); + Service.Telemetry = (function() { /** diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index e8c542d299c..96677e461e6 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -93,7 +93,8 @@ "condition": { "oneof": [ "conditionThreshold", - "conditionAbsent" + "conditionAbsent", + "conditionTimeSeriesQueryLanguage" ] } }, @@ -113,6 +114,10 @@ "conditionAbsent": { "type": "MetricAbsence", "id": 2 + }, + "conditionTimeSeriesQueryLanguage": { + "type": "TimeSeriesQueryLanguageCondition", + "id": 14 } }, "nested": { @@ -194,6 +199,18 @@ "id": 3 } } + }, + "TimeSeriesQueryLanguageCondition": { + "fields": { + "query": { + "type": "string", + "id": 1 + }, + "summary": { + "type": "string", + "id": 2 + } + } } } }, @@ -810,6 +827,142 @@ } } }, + "TimeSeriesDescriptor": { + "fields": { + "labelDescriptors": { + "rule": "repeated", + "type": "google.api.LabelDescriptor", + "id": 1 + }, + "pointDescriptors": { + "rule": "repeated", + "type": "ValueDescriptor", + "id": 5 + } + }, + "nested": { + "ValueDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "google.api.MetricDescriptor.ValueType", + "id": 2 + }, + "metricKind": { + "type": "google.api.MetricDescriptor.MetricKind", + "id": 3 + } + } + } + } + }, + "TimeSeriesData": { + "fields": { + "labelValues": { + "rule": "repeated", + "type": "LabelValue", + "id": 1 + }, + "pointData": { + "rule": "repeated", + "type": "PointData", + "id": 2 + } + }, + "nested": { + "PointData": { + "fields": { + "values": { + "rule": "repeated", + "type": "TypedValue", + "id": 1 + }, + "timeInterval": { + "type": "TimeInterval", + "id": 2 + } + } + } + } + }, + "LabelValue": { + "oneofs": { + "value": { + "oneof": [ + "boolValue", + "int64Value", + "stringValue" + ] + } + }, + "fields": { + "boolValue": { + "type": "bool", + "id": 1 + }, + "int64Value": { + "type": "int64", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + } + } + }, + "QueryError": { + "fields": { + "locator": { + "type": "TextLocator", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + } + } + }, + "TextLocator": { + "fields": { + "source": { + "type": "string", + "id": 1 + }, + "startPosition": { + "type": "Position", + "id": 2 + }, + "endPosition": { + "type": "Position", + "id": 3 + }, + "nestedLocator": { + "type": "TextLocator", + "id": 4 + }, + "nestingReason": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Position": { + "fields": { + "line": { + "type": "int32", + "id": 1 + }, + "column": { + "type": "int32", + "id": 2 + } + } + } + } + }, "MetricService": { "options": { "(google.api.default_host)": "monitoring.googleapis.com", @@ -1157,6 +1310,61 @@ } } }, + "QueryTimeSeriesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "query": { + "type": "string", + "id": 7 + }, + "pageSize": { + "type": "int32", + "id": 9 + }, + "pageToken": { + "type": "string", + "id": 10 + } + } + }, + "QueryTimeSeriesResponse": { + "fields": { + "timeSeriesDescriptor": { + "type": "TimeSeriesDescriptor", + "id": 8 + }, + "timeSeriesData": { + "rule": "repeated", + "type": "TimeSeriesData", + "id": 9 + }, + "nextPageToken": { + "type": "string", + "id": 10 + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 11 + } + } + }, + "QueryErrorList": { + "fields": { + "errors": { + "rule": "repeated", + "type": "QueryError", + "id": 1 + }, + "errorSummary": { + "type": "string", + "id": 2 + } + } + }, "NotificationChannelDescriptor": { "options": { "(google.api.resource).type": "monitoring.googleapis.com/NotificationChannelDescriptor", @@ -1560,7 +1768,8 @@ "custom", "appEngine", "cloudEndpoints", - "clusterIstio" + "clusterIstio", + "meshIstio" ] } }, @@ -1587,7 +1796,14 @@ }, "clusterIstio": { "type": "ClusterIstio", - "id": 9 + "id": 9, + "options": { + "deprecated": true + } + }, + "meshIstio": { + "type": "MeshIstio", + "id": 10 }, "telemetry": { "type": "Telemetry", @@ -1615,6 +1831,9 @@ } }, "ClusterIstio": { + "options": { + "deprecated": true + }, "fields": { "location": { "type": "string", @@ -1634,6 +1853,22 @@ } } }, + "MeshIstio": { + "fields": { + "meshUid": { + "type": "string", + "id": 1 + }, + "serviceNamespace": { + "type": "string", + "id": 3 + }, + "serviceName": { + "type": "string", + "id": 4 + } + } + }, "Telemetry": { "fields": { "resourceName": { diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 9f161a1bffb..67e614417bc 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -446,7 +446,7 @@ export class MetricServiceClient { > ): void; /** - * Gets a single monitored resource descriptor. This method does not require a Stackdriver account. + * Gets a single monitored resource descriptor. This method does not require a Workspace. * * @param {Object} request * The request object that will be sent. @@ -546,7 +546,7 @@ export class MetricServiceClient { > ): void; /** - * Gets a single metric descriptor. This method does not require a Stackdriver account. + * Gets a single metric descriptor. This method does not require a Workspace. * * @param {Object} request * The request object that will be sent. @@ -933,7 +933,7 @@ export class MetricServiceClient { > ): void; /** - * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account. + * Lists monitored resource descriptors that match a filter. This method does not require a Workspace. * * @param {Object} request * The request object that will be sent. @@ -1163,7 +1163,7 @@ export class MetricServiceClient { > ): void; /** - * Lists metric descriptors that match a filter. This method does not require a Stackdriver account. + * Lists metric descriptors that match a filter. This method does not require a Workspace. * * @param {Object} request * The request object that will be sent. @@ -1391,7 +1391,7 @@ export class MetricServiceClient { > ): void; /** - * Lists time series that match a filter. This method does not require a Stackdriver account. + * Lists time series that match a filter. This method does not require a Workspace. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index 99b6bb76f32..09bee37b8e6 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -35,7 +35,7 @@ import * as gapicConfig from './service_monitoring_service_client_config.json'; const version = require('../../../package.json').version; /** - * The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for + * The Cloud Monitoring Service-Oriented Monitoring API has endpoints for * managing and querying aspects of a workspace's services. These include the * `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy * of categorized Health Metrics. @@ -426,11 +426,12 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent workspace. - * Of the form `projects/{project_id}`. + * Required. Resource name of the parent workspace. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {string} request.serviceId * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern [a-z0-9\-]+ + * generated instead. Must match the pattern `[a-z0-9\-]+` * @param {google.monitoring.v3.Service} request.service * Required. The `Service` to create. * @param {object} [options] @@ -512,8 +513,9 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. + * Required. Resource name of the `Service`. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_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. @@ -676,8 +678,9 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the `Service` to delete. - * Of the form `projects/{project_id}/services/{service_id}`. + * Required. Resource name of the `Service` to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_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. @@ -764,12 +767,13 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. + * Required. Resource name of the parent `Service`. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * @param {string} request.serviceLevelObjectiveId * Optional. The ServiceLevelObjective id to use for this * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern [a-z0-9\-]+ + * match the pattern `[a-z0-9\-]+` * @param {google.monitoring.v3.ServiceLevelObjective} request.serviceLevelObjective * Required. The `ServiceLevelObjective` to create. * The provided `name` will be respected if no `ServiceLevelObjective` exists @@ -868,9 +872,9 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the `ServiceLevelObjective` to get. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @param {google.monitoring.v3.ServiceLevelObjective.View} request.view * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the @@ -1071,9 +1075,9 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name of the `ServiceLevelObjective` to delete. - * Of the form - * `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`. + * Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @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. @@ -1165,8 +1169,11 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Workspace`. - * Of the form `projects/{project_id}`. + * Required. Resource name of the parent containing the listed services, either a + * project or a Monitoring Workspace. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @param {string} request.filter * A filter specifying what `Service`s to return. The filter currently * supports the following fields: @@ -1265,8 +1272,11 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Workspace`. - * Of the form `projects/{project_id}`. + * Required. Resource name of the parent containing the listed services, either a + * project or a Monitoring Workspace. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @param {string} request.filter * A filter specifying what `Service`s to return. The filter currently * supports the following fields: @@ -1325,8 +1335,11 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Workspace`. - * Of the form `projects/{project_id}`. + * Required. Resource name of the parent containing the listed services, either a + * project or a Monitoring Workspace. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @param {string} request.filter * A filter specifying what `Service`s to return. The filter currently * supports the following fields: @@ -1414,8 +1427,11 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Workspace. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * @param {string} request.filter * A filter specifying what `ServiceLevelObjective`s to return. * @param {number} request.pageSize @@ -1513,8 +1529,11 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Workspace. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * @param {string} request.filter * A filter specifying what `ServiceLevelObjective`s to return. * @param {number} request.pageSize @@ -1564,8 +1583,11 @@ export class ServiceMonitoringServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent `Service`. - * Of the form `projects/{project_id}/services/{service_id}`. + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Workspace. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * @param {string} request.filter * A filter specifying what `ServiceLevelObjective`s to return. * @param {number} request.pageSize diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index 0d982a41405..bfb5d4944ef 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -428,8 +428,9 @@ export class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Uptime check configuration to retrieve. The format - * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * Required. The Uptime check configuration to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_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. @@ -517,8 +518,9 @@ export class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project in which to create the Uptime check. The format - * is `projects/[PROJECT_ID]`. + * Required. The project in which to create the Uptime check. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {google.monitoring.v3.UptimeCheckConfig} request.uptimeCheckConfig * Required. The new Uptime check configuration. * @param {object} [options] @@ -724,8 +726,9 @@ export class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Uptime check configuration to delete. The format - * is `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`. + * Required. The Uptime check configuration to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_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. @@ -819,8 +822,9 @@ export class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project whose Uptime check configurations are listed. The format - * is `projects/[PROJECT_ID]`. + * Required. The project whose Uptime check configurations are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {number} request.pageSize * The maximum number of results to return in a single response. The server * may further constrain the maximum number of results returned in a single @@ -913,8 +917,9 @@ export class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project whose Uptime check configurations are listed. The format - * is `projects/[PROJECT_ID]`. + * Required. The project whose Uptime check configurations are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {number} request.pageSize * The maximum number of results to return in a single response. The server * may further constrain the maximum number of results returned in a single @@ -959,8 +964,9 @@ export class UptimeCheckServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project whose Uptime check configurations are listed. The format - * is `projects/[PROJECT_ID]`. + * Required. The project whose Uptime check configurations are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] * @param {number} request.pageSize * The maximum number of results to return in a single response. The server * may further constrain the maximum number of results returned in a single diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 1c1b8835642..a8c83e608ed 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,5 +1,22 @@ { - "updateTime": "2020-03-31T19:49:37.802729Z", + "updateTime": "2020-04-02T11:45:04.492573Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "75047719f704d61f405cac6d7439637ab36c1232", + "internalRef": "304305096" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + } + } + ], "destinations": [ { "client": { From b1d576f7552ffbe18af6d96a4bc5644ca49f9333 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 3 Apr 2020 12:19:16 -0700 Subject: [PATCH 282/422] test: handle a couple more flaky tests (#405) --- .../google-cloud-monitoring/samples/test/quickstart.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js index 82bee1637c7..5ffed8283f4 100644 --- a/packages/google-cloud-monitoring/samples/test/quickstart.test.js +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -19,9 +19,9 @@ const {describe, it} = require('mocha'); const cp = require('child_process'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -// A helper for delaying integration tests with an exponential backoff. -// See examples like: https://github.com/googleapis/nodejs-monitoring/issues/190, -// https://github.com/googleapis/nodejs-monitoring/issues/191. +// Tests in this suite can trigger the upstream error, +// "points were written more frequently than the maximum +// sampling period configured for the metric": const delay = async test => { const retries = test.currentRetry(); if (retries === 0) return; // no retry on the first failure. From 6ec23976e579c2fbbe76fef172d0515a0570dd36 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 5 Apr 2020 12:49:21 -0700 Subject: [PATCH 283/422] chore: remove duplicate mocha config (#409) --- packages/google-cloud-monitoring/.mocharc.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/google-cloud-monitoring/.mocharc.json diff --git a/packages/google-cloud-monitoring/.mocharc.json b/packages/google-cloud-monitoring/.mocharc.json deleted file mode 100644 index 670c5e2c24b..00000000000 --- a/packages/google-cloud-monitoring/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From 60ee3d8b1d461cae24b65b5268f01aac71c03088 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 6 Apr 2020 17:29:10 -0700 Subject: [PATCH 284/422] chore: update doc comments, unit tests, and minor fixes (#408) --- packages/google-cloud-monitoring/.jsdoc.js | 2 +- .../protos/google/monitoring/v3/alert.proto | 11 ++++---- .../protos/google/monitoring/v3/common.proto | 4 +-- .../google/monitoring/v3/metric_service.proto | 2 +- .../google-cloud-monitoring/protos/protos.js | 2 +- .../google-cloud-monitoring/synth.metadata | 7 +++-- .../test/gapic_alert_policy_service_v3.ts | 14 +++++----- .../test/gapic_group_service_v3.ts | 20 ++++++------- .../test/gapic_metric_service_v3.ts | 28 +++++++++---------- .../gapic_notification_channel_service_v3.ts | 28 +++++++++---------- .../gapic_service_monitoring_service_v3.ts | 28 +++++++++---------- .../test/gapic_uptime_check_service_v3.ts | 20 ++++++------- 12 files changed, 83 insertions(+), 83 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 43fd3e0d540..25faf92bd80 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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/monitoring', diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index d569c1153de..56d257a59a0 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -214,12 +214,11 @@ message AlertPolicy { Trigger trigger = 3; } - // A condition type that allows alert policies to be defined using the - // time series query language. + // A condition type that allows alert policies to be defined using + // Monitoring Query Language. message TimeSeriesQueryLanguageCondition { - // A query in the time series query language format that generates time - // series indicating points in time that the condition should be - // considered active. + // Monitoring Query Language query that generates time series data and + // describes a condition for alerting on that data. string query = 1; // A short explanation of what the query represents. For example: @@ -269,7 +268,7 @@ message AlertPolicy { // receive new data points. MetricAbsence condition_absent = 2; - // A condition that uses the time series query language format to define + // A condition that uses the Monitoring Query Language to define // alerts. // If set, no other conditions can be present. TimeSeriesQueryLanguageCondition condition_time_series_query_language = 14; diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index f3068849278..4067560f898 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -102,8 +102,8 @@ message TimeInterval { // 95% latency across the average of all tasks in a cluster". This // representative data can be more easily graphed and comprehended, and the // individual time series data is still available for later drilldown. For more -// details, see [Aggregating Time -// Series](https://cloud.google.com/monitoring/api/v3/metrics#aggregating_time_series). +// details, see [Filtering and +// aggregation](https://cloud.google.com/monitoring/api/v3/aggregation). message Aggregation { // The `Aligner` specifies the operation that will be applied to the data // points in each alignment period in a time series. Except for diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index d03c052afe3..0dc1fbc3486 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -423,7 +423,7 @@ message QueryTimeSeriesRequest { // projects/[PROJECT_ID_OR_NUMBER] string name = 1; - // Required. The query in the time series query language format. The default + // Required. The query in the monitoring query language format. The default // time zone is in UTC. string query = 7; diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index d3b6ead07b0..e6857a971c1 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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_monitoring_1_7_0_protos || ($protobuf.roots._google_cloud_monitoring_1_7_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index a8c83e608ed..b31ca98746c 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-04-02T11:45:04.492573Z", + "updateTime": "2020-04-04T11:35:38.942200Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "75047719f704d61f405cac6d7439637ab36c1232", - "internalRef": "304305096" + "sha": "1346f5c11a0376bc82c5c03259b304de52671518", + "internalRef": "304467075", + "log": "1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n" } }, { diff --git a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts index 16017316657..c24ec72d2f6 100644 --- a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts @@ -299,7 +299,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getAlertPolicy(request); }, expectedError); assert( @@ -413,7 +413,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createAlertPolicy(request); }, expectedError); assert( @@ -527,7 +527,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteAlertPolicy(request); }, expectedError); assert( @@ -644,7 +644,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateAlertPolicy(request); }, expectedError); assert( @@ -762,7 +762,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listAlertPolicies(request); }, expectedError); assert( @@ -855,7 +855,7 @@ describe('v3.AlertPolicyServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -928,7 +928,7 @@ describe('v3.AlertPolicyServiceClient', () => { expectedError ); const iterable = client.listAlertPoliciesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IAlertPolicy[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts index 5ba251ff679..f3c32c5e8b2 100644 --- a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts @@ -294,7 +294,7 @@ describe('v3.GroupServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getGroup = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getGroup(request); }, expectedError); assert( @@ -408,7 +408,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createGroup(request); }, expectedError); assert( @@ -525,7 +525,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateGroup(request); }, expectedError); assert( @@ -639,7 +639,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteGroup(request); }, expectedError); assert( @@ -757,7 +757,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listGroups(request); }, expectedError); assert( @@ -843,7 +843,7 @@ describe('v3.GroupServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -915,7 +915,7 @@ describe('v3.GroupServiceClient', () => { expectedError ); const iterable = client.listGroupsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IGroup[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1043,7 +1043,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listGroupMembers(request); }, expectedError); assert( @@ -1130,7 +1130,7 @@ describe('v3.GroupServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1203,7 +1203,7 @@ describe('v3.GroupServiceClient', () => { expectedError ); const iterable = client.listGroupMembersAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.api.IMonitoredResource[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts index 142d8e0ec7f..6821da4a04c 100644 --- a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts @@ -299,7 +299,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getMonitoredResourceDescriptor(request); }, expectedError); assert( @@ -415,7 +415,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getMetricDescriptor(request); }, expectedError); assert( @@ -531,7 +531,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createMetricDescriptor(request); }, expectedError); assert( @@ -647,7 +647,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteMetricDescriptor(request); }, expectedError); assert( @@ -761,7 +761,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createTimeSeries(request); }, expectedError); assert( @@ -893,7 +893,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listMonitoredResourceDescriptors(request); }, expectedError); assert( @@ -996,7 +996,7 @@ describe('v3.MetricServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1079,7 +1079,7 @@ describe('v3.MetricServiceClient', () => { 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!); @@ -1209,7 +1209,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listMetricDescriptors(request); }, expectedError); assert( @@ -1297,7 +1297,7 @@ describe('v3.MetricServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1371,7 +1371,7 @@ describe('v3.MetricServiceClient', () => { expectedError ); const iterable = client.listMetricDescriptorsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.api.IMetricDescriptor[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1499,7 +1499,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listTimeSeries(request); }, expectedError); assert( @@ -1592,7 +1592,7 @@ describe('v3.MetricServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1665,7 +1665,7 @@ describe('v3.MetricServiceClient', () => { expectedError ); const iterable = client.listTimeSeriesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.ITimeSeries[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts index 863d9437538..1df6a1f9b52 100644 --- a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts @@ -320,7 +320,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getNotificationChannelDescriptor(request); }, expectedError); assert( @@ -442,7 +442,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getNotificationChannel(request); }, expectedError); assert( @@ -564,7 +564,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createNotificationChannel(request); }, expectedError); assert( @@ -689,7 +689,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateNotificationChannel(request); }, expectedError); assert( @@ -811,7 +811,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteNotificationChannel(request); }, expectedError); assert( @@ -937,7 +937,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.sendNotificationChannelVerificationCode(request); }, expectedError); assert( @@ -1064,7 +1064,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getNotificationChannelVerificationCode(request); }, expectedError); assert( @@ -1187,7 +1187,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.verifyNotificationChannel(request); }, expectedError); assert( @@ -1329,7 +1329,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listNotificationChannelDescriptors(request); }, expectedError); assert( @@ -1440,7 +1440,7 @@ describe('v3.NotificationChannelServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1527,7 +1527,7 @@ describe('v3.NotificationChannelServiceClient', () => { expectedError ); const iterable = client.listNotificationChannelDescriptorsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1675,7 +1675,7 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listNotificationChannels(request); }, expectedError); assert( @@ -1779,7 +1779,7 @@ describe('v3.NotificationChannelServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1863,7 +1863,7 @@ describe('v3.NotificationChannelServiceClient', () => { expectedError ); const iterable = client.listNotificationChannelsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.INotificationChannel[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts index ab41526c84d..4b915b6d377 100644 --- a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts @@ -318,7 +318,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createService(request); }, expectedError); assert( @@ -438,7 +438,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getService(request); }, expectedError); assert( @@ -561,7 +561,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateService(request); }, expectedError); assert( @@ -681,7 +681,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteService(request); }, expectedError); assert( @@ -803,7 +803,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createServiceLevelObjective(request); }, expectedError); assert( @@ -925,7 +925,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getServiceLevelObjective(request); }, expectedError); assert( @@ -1050,7 +1050,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateServiceLevelObjective(request); }, expectedError); assert( @@ -1172,7 +1172,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteServiceLevelObjective(request); }, expectedError); assert( @@ -1296,7 +1296,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listServices(request); }, expectedError); assert( @@ -1387,7 +1387,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1464,7 +1464,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { expectedError ); const iterable = client.listServicesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IService[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1612,7 +1612,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listServiceLevelObjectives(request); }, expectedError); assert( @@ -1716,7 +1716,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1800,7 +1800,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { expectedError ); const iterable = client.listServiceLevelObjectivesAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = []; for await (const resource of iterable) { responses.push(resource!); diff --git a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts index 494d1d134cc..c02e471cb80 100644 --- a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts @@ -301,7 +301,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getUptimeCheckConfig(request); }, expectedError); assert( @@ -417,7 +417,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createUptimeCheckConfig(request); }, expectedError); assert( @@ -536,7 +536,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateUptimeCheckConfig(request); }, expectedError); assert( @@ -652,7 +652,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteUptimeCheckConfig(request); }, expectedError); assert( @@ -784,7 +784,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listUptimeCheckConfigs(request); }, expectedError); assert( @@ -884,7 +884,7 @@ describe('v3.UptimeCheckServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -964,7 +964,7 @@ describe('v3.UptimeCheckServiceClient', () => { expectedError ); const iterable = client.listUptimeCheckConfigsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IUptimeCheckConfig[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1070,7 +1070,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listUptimeCheckIps(request); }, expectedError); assert( @@ -1152,7 +1152,7 @@ describe('v3.UptimeCheckServiceClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1207,7 +1207,7 @@ describe('v3.UptimeCheckServiceClient', () => { expectedError ); const iterable = client.listUptimeCheckIpsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IUptimeCheckIp[] = []; for await (const resource of iterable) { responses.push(resource!); From 3e1880aeff2508106f72a1cb627c131f1eff0ac7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Apr 2020 20:57:41 +0200 Subject: [PATCH 285/422] chore(deps): update dependency gts to v2.0.0 (#414) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 338edf3555e..3b60ee5a890 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -54,7 +54,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.0", - "gts": "2.0.0-alpha.9", + "gts": "2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", From 3989fce4e54a0b574665a9608085a54911d85b50 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 10 Apr 2020 18:49:59 -0700 Subject: [PATCH 286/422] fix: remove eslint, update gax, fix generated protos, run the generator (#415) Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint. --- packages/google-cloud-monitoring/.prettierrc.js | 2 +- packages/google-cloud-monitoring/package.json | 14 +++++--------- .../protos/google/monitoring/v3/alert.proto | 1 + .../google/monitoring/v3/alert_service.proto | 1 + .../protos/google/monitoring/v3/common.proto | 1 + .../google/monitoring/v3/dropped_labels.proto | 1 + .../protos/google/monitoring/v3/group.proto | 1 + .../google/monitoring/v3/group_service.proto | 1 + .../protos/google/monitoring/v3/metric.proto | 1 + .../google/monitoring/v3/metric_service.proto | 1 + .../google/monitoring/v3/mutation_record.proto | 1 + .../protos/google/monitoring/v3/notification.proto | 1 + .../monitoring/v3/notification_service.proto | 1 + .../protos/google/monitoring/v3/service.proto | 1 + .../google/monitoring/v3/service_service.proto | 1 + .../protos/google/monitoring/v3/span_context.proto | 1 + .../protos/google/monitoring/v3/uptime.proto | 1 + .../google/monitoring/v3/uptime_service.proto | 1 + .../google-cloud-monitoring/protos/protos.json | 2 ++ packages/google-cloud-monitoring/synth.metadata | 9 ++++----- packages/google-cloud-monitoring/synth.py | 2 +- 21 files changed, 29 insertions(+), 16 deletions(-) diff --git a/packages/google-cloud-monitoring/.prettierrc.js b/packages/google-cloud-monitoring/.prettierrc.js index 08cba3775be..d1b95106f4c 100644 --- a/packages/google-cloud-monitoring/.prettierrc.js +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 3b60ee5a890..b83549fc1d1 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -28,21 +28,21 @@ ], "scripts": { "docs": "jsdoc -c .jsdoc.js", - "lint": "gts fix && eslint --fix samples/*.js", + "lint": "gts fix", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "mocha build/system-test", "test": "c8 mocha build/test", - "fix": "gts fix && eslint 'samples/**/*.js' --fix", + "fix": "gts fix", "docs-test": "linkinator docs", "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm i", + "prelint": "cd samples; npm link ../; npm install", "clean": "gts clean", "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile" }, "dependencies": { - "google-gax": "^2.0.1" + "google-gax": "^2.1.0" }, "devDependencies": { "@types/mocha": "^7.0.0", @@ -50,11 +50,7 @@ "@types/sinon": "^9.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.0.0", - "gts": "2.0.0", + "gts": "^2.0.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 56d257a59a0..830a514d1f9 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -29,6 +29,7 @@ option java_multiple_files = true; option java_outer_classname = "AlertProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A description of the conditions under which some aspect of your system is // considered to be "unhealthy" and the ways to notify people or services about diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index 18a4b053f68..ea0c5ada302 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -30,6 +30,7 @@ option java_multiple_files = true; option java_outer_classname = "AlertServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The AlertPolicyService API is used to manage (list, create, delete, // edit) alert policies in Stackdriver Monitoring. An alerting policy is diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 4067560f898..638ef4a616f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -26,6 +26,7 @@ option java_multiple_files = true; option java_outer_classname = "CommonProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A single strongly-typed value. message TypedValue { diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index 769b25b325b..ce6e46e1f09 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -22,6 +22,7 @@ option java_multiple_files = true; option java_outer_classname = "DroppedLabelsProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A set of (label, value) pairs which were dropped during aggregation, attached // to google.api.Distribution.Exemplars in google.api.Distribution values during diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index 2d31af193b6..2d1ffbb61f9 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -24,6 +24,7 @@ option java_multiple_files = true; option java_outer_classname = "GroupProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The description of a dynamic collection of monitored resources. Each group // has a filter that is matched against monitored resources and their associated diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 5e804040775..0163ab36efd 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -31,6 +31,7 @@ option java_multiple_files = true; option java_outer_classname = "GroupServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The Group API lets you inspect and manage your // [groups](#google.monitoring.v3.Group). diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index fa5e7d4e616..5a4833b19b5 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -29,6 +29,7 @@ option java_multiple_files = true; option java_outer_classname = "MetricProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A single data point in a time series. message Point { diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 0dc1fbc3486..119990358a7 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -35,6 +35,7 @@ option java_multiple_files = true; option java_outer_classname = "MetricServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; option (google.api.resource_definition) = { type: "monitoring.googleapis.com/MetricDescriptor" pattern: "projects/{project}/metricDescriptors/{metric_descriptor=**}" diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index e12ef2e163c..b830eb626f0 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto @@ -24,6 +24,7 @@ option java_multiple_files = true; option java_outer_classname = "MutationRecordProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // Describes a change made to a configuration. message MutationRecord { diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index 814cac1a842..897a14c046e 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -28,6 +28,7 @@ option java_multiple_files = true; option java_outer_classname = "NotificationProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A description of a notification channel. The descriptor includes // the properties of the channel and the set of labels or fields that diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index a9d06152164..20c9a8e9ba5 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -32,6 +32,7 @@ option java_multiple_files = true; option java_outer_classname = "NotificationServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The Notification Channel API provides access to configuration that // controls how messages related to incidents are sent. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto index 47acd0c301e..a89c007c95f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto @@ -28,6 +28,7 @@ option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // A `Service` is a discrete, autonomous, and network-accessible unit, designed // to solve an individual concern diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto index 467e5d77b98..cd5f7db6750 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto @@ -30,6 +30,7 @@ option java_multiple_files = true; option java_outer_classname = "ServiceMonitoringServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The Cloud Monitoring Service-Oriented Monitoring API has endpoints for // managing and querying aspects of a workspace's services. These include the diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto index 9e109460d29..72cce35f12f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto @@ -22,6 +22,7 @@ option java_multiple_files = true; option java_outer_classname = "SpanContextProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The context of a span, attached to // [Exemplars][google.api.Distribution.Exemplars] diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index c6094ce09ec..6ef4e0dd4d4 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -26,6 +26,7 @@ option java_multiple_files = true; option java_outer_classname = "UptimeProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The regions from which an Uptime check can be run. enum UptimeCheckRegion { diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index cbccffc7c41..5e53934edce 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -31,6 +31,7 @@ option java_multiple_files = true; option java_outer_classname = "UptimeServiceProto"; option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; // The UptimeCheckService API is used to manage (list, create, delete, edit) // Uptime check configurations in the Stackdriver Monitoring product. An Uptime diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 96677e461e6..2054c2c59e2 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -12,6 +12,7 @@ "java_outer_classname": "UptimeProto", "java_package": "com.google.monitoring.v3", "php_namespace": "Google\\Cloud\\Monitoring\\V3", + "ruby_package": "Google::Cloud::Monitoring::V3", "(google.api.resource_definition).type": "monitoring.googleapis.com/MonitoredResourceDescriptor", "(google.api.resource_definition).pattern": "*", "(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN" @@ -4460,6 +4461,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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index b31ca98746c..d9c6483c321 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,20 +1,19 @@ { - "updateTime": "2020-04-04T11:35:38.942200Z", + "updateTime": "2020-04-11T01:36:38.708200Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1346f5c11a0376bc82c5c03259b304de52671518", - "internalRef": "304467075", - "log": "1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n" + "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", + "internalRef": "305974465" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" } } ], diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index a62a6a94733..6f8a59072db 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -44,5 +44,5 @@ s.copy(templates) subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "fix"]) +subprocess.run(["npm", "run", "lint"]) subprocess.run(['npx', 'compileProtos', 'src']) From 58c800c1121cb4e97526bc1c1f356048c4637805 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 11 Apr 2020 19:15:15 -0700 Subject: [PATCH 287/422] build: remove unused codecov config (#416) --- packages/google-cloud-monitoring/codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/google-cloud-monitoring/codecov.yaml diff --git a/packages/google-cloud-monitoring/codecov.yaml b/packages/google-cloud-monitoring/codecov.yaml deleted file mode 100644 index 5724ea9478d..00000000000 --- a/packages/google-cloud-monitoring/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com From d1f5240a29d32787bd882d89f6aafcee1488d434 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 14:54:52 -0700 Subject: [PATCH 288/422] chore: update lint ignore files (#417) --- packages/google-cloud-monitoring/.eslintignore | 3 ++- packages/google-cloud-monitoring/.prettierignore | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/.eslintignore b/packages/google-cloud-monitoring/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/packages/google-cloud-monitoring/.eslintignore +++ b/packages/google-cloud-monitoring/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-cloud-monitoring/.prettierignore b/packages/google-cloud-monitoring/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/packages/google-cloud-monitoring/.prettierignore +++ b/packages/google-cloud-monitoring/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ From 7a9ac20c8eff85417b2164f14e4e38e8aed7a522 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 19:32:51 -0700 Subject: [PATCH 289/422] chore: remove tslint.json (#418) --- packages/google-cloud-monitoring/tslint.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packages/google-cloud-monitoring/tslint.json diff --git a/packages/google-cloud-monitoring/tslint.json b/packages/google-cloud-monitoring/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/packages/google-cloud-monitoring/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -} From 45e8c3051cd593ec0cba7c8f096a2c34a83a2c5e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Apr 2020 09:55:00 -0700 Subject: [PATCH 290/422] chore: remove unused dev packages (#419) --- packages/google-cloud-monitoring/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b83549fc1d1..b2d1bc6ae18 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -58,7 +58,6 @@ "mocha": "^7.0.1", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", - "prettier": "^1.13.7", "sinon": "^9.0.1", "ts-loader": "^6.2.1", "typescript": "^3.8.3", From 9900aab84fc6fd1b69ca270fa6efa55ac681739f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 17:32:53 +0200 Subject: [PATCH 291/422] chore(deps): update dependency ts-loader to v7 (#420) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b2d1bc6ae18..f91aedcfa31 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "ts-loader": "^6.2.1", + "ts-loader": "^7.0.0", "typescript": "^3.8.3", "webpack": "^4.41.6", "webpack-cli": "^3.3.11" From 5457190b8d6b1b3af239cb98f18dd4c06e375f24 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 15 Apr 2020 18:32:09 +0200 Subject: [PATCH 292/422] chore(deps): update dependency null-loader to v4 (#422) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f91aedcfa31..be309b9e255 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -56,7 +56,7 @@ "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", "mocha": "^7.0.1", - "null-loader": "^3.0.0", + "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", "ts-loader": "^7.0.0", From bf5c885947a9e3258c5067b808fbb33076f48794 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 15 Apr 2020 15:30:42 -0700 Subject: [PATCH 293/422] clean up (#423) --- packages/google-cloud-monitoring/synth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index 6f8a59072db..cec6ebf5a0a 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -30,8 +30,8 @@ version, generator_args={ "grpc-service-config": f"google/monitoring/{version}/monitoring_grpc_service_config.json", - "package-name": f"@google-cloud/monitoring", - "main-service": f"monitoring" + "package-name": "@google-cloud/monitoring", + "main-service": "monitoring" }, proto_path=f'/google/monitoring/{version}', extra_proto_files=['google/cloud/common_resources.proto'] From e42c26df6e7d1f724ca115582da4b7b8c5a02950 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Apr 2020 11:13:00 -0700 Subject: [PATCH 294/422] feat: Update public client library for Cloud Monitoring to introduce new Uptime check feature. Uptime HTTP(S) checks can now be GET or POST (#425) --- .../protos/google/monitoring/v3/common.proto | 2 +- .../protos/google/monitoring/v3/uptime.proto | 114 +- .../protos/protos.d.ts | 63 +- .../google-cloud-monitoring/protos/protos.js | 1216 +++++++++-------- .../protos/protos.json | 57 +- .../samples/test/quickstart.test.js | 2 +- .../google-cloud-monitoring/synth.metadata | 14 +- .../system-test/install.ts | 4 +- 8 files changed, 854 insertions(+), 618 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 638ef4a616f..f1b38c2349b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -64,7 +64,7 @@ message TypedValue { // than the end time. // // * In all cases, the start time of the next interval must be -// at least a microsecond after the end time of the previous interval. +// at least a millisecond after the end time of the previous interval. // Because the interval is closed, if the start time of a new interval // is the same as the end time of the previous interval, data written // at the new start time could overwrite data written at the previous diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 6ef4e0dd4d4..54a9b11e119 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -28,27 +28,6 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; option ruby_package = "Google::Cloud::Monitoring::V3"; -// The regions from which an Uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in Uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - // An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { @@ -105,6 +84,27 @@ message InternalChecker { State state = 7; } +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { @@ -142,6 +142,34 @@ message UptimeCheckConfig { string password = 2; } + // The HTTP request method options. + enum RequestMethod { + // No request method specified. + METHOD_UNSPECIFIED = 0; + + // GET request. + GET = 1; + + // POST request. + POST = 2; + } + + // Header options corresponding to the Content-Type of the body in HTTP + // requests. Note that a `Content-Type` header cannot be present in the + // `headers` field if this field is specified. + enum ContentType { + // No content type specified. If the request method is POST, an + // unspecified content type results in a check creation rejection. + TYPE_UNSPECIFIED = 0; + + // `body` is in URL-encoded form. Equivalent to setting the `Content-Type` + // to `application/x-www-form-urlencoded` in the HTTP request. + URL_ENCODED = 1; + } + + // The HTTP request method to use for the check. + RequestMethod request_method = 8; + // If `true`, use HTTPS instead of HTTP to run the check. bool use_ssl = 1; @@ -180,11 +208,21 @@ message UptimeCheckConfig { // The maximum number of headers allowed is 100. map headers = 6; + // The content type to use for the check. + ContentType content_type = 9; + // Boolean specifying whether to include SSL certificate validation as a // part of the Uptime check. Only applies to checks where // `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, // setting `validate_ssl` to `true` has no effect. bool validate_ssl = 7; + + // The request body associated with the HTTP request. If `content_type` is + // `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + // a `Content-Length` header via the `headers` field or the API will do + // so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + // JSON representations are base64 encoded. + bytes body = 10; } // Information required for a TCP Uptime check request. @@ -314,23 +352,6 @@ message UptimeCheckConfig { repeated InternalChecker internal_checkers = 14 [deprecated = true]; } -// The supported resource types that can be used as values of -// `group_resource.resource_type`. -// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. -// The resource types `gae_app` and `uptime_url` are not valid here because -// group checks on App Engine modules and URLs are not allowed. -enum GroupResourceType { - // Default value (not valid). - RESOURCE_TYPE_UNSPECIFIED = 0; - - // A group of instances from Google Cloud Platform (GCP) or - // Amazon Web Services (AWS). - INSTANCE = 1; - - // A group of Amazon ELB load balancers. - AWS_ELB_LOAD_BALANCER = 2; -} - // Contains the region, location, and list of IP // addresses where checkers in the location run from. message UptimeCheckIp { @@ -349,3 +370,20 @@ message UptimeCheckIp { // interpreting this field in either IPv4 or IPv6 format. string ip_address = 3; } + +// The supported resource types that can be used as values of +// `group_resource.resource_type`. +// `INSTANCE` includes `gce_instance` and `aws_ec2_instance` resource types. +// The resource types `gae_app` and `uptime_url` are not valid here because +// group checks on App Engine modules and URLs are not allowed. +enum GroupResourceType { + // Default value (not valid). + RESOURCE_TYPE_UNSPECIFIED = 0; + + // A group of instances from Google Cloud Platform (GCP) or + // Amazon Web Services (AWS). + INSTANCE = 1; + + // A group of Amazon ELB load balancers. + AWS_ELB_LOAD_BALANCER = 2; +} diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 18e53a845e3..f9d88bfaf34 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -11342,15 +11342,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** UptimeCheckRegion enum. */ - enum UptimeCheckRegion { - REGION_UNSPECIFIED = 0, - USA = 1, - EUROPE = 2, - SOUTH_AMERICA = 3, - ASIA_PACIFIC = 4 - } - /** Properties of an InternalChecker. */ interface IInternalChecker { @@ -11481,6 +11472,15 @@ export namespace google { } } + /** UptimeCheckRegion enum. */ + enum UptimeCheckRegion { + REGION_UNSPECIFIED = 0, + USA = 1, + EUROPE = 2, + SOUTH_AMERICA = 3, + ASIA_PACIFIC = 4 + } + /** Properties of an UptimeCheckConfig. */ interface IUptimeCheckConfig { @@ -11744,6 +11744,9 @@ export namespace google { /** Properties of a HttpCheck. */ interface IHttpCheck { + /** HttpCheck requestMethod */ + requestMethod?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod|keyof typeof google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod|null); + /** HttpCheck useSsl */ useSsl?: (boolean|null); @@ -11762,8 +11765,14 @@ export namespace google { /** HttpCheck headers */ headers?: ({ [k: string]: string }|null); + /** HttpCheck contentType */ + contentType?: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType|keyof typeof google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType|null); + /** HttpCheck validateSsl */ validateSsl?: (boolean|null); + + /** HttpCheck body */ + body?: (Uint8Array|string|null); } /** Represents a HttpCheck. */ @@ -11775,6 +11784,9 @@ export namespace google { */ constructor(properties?: google.monitoring.v3.UptimeCheckConfig.IHttpCheck); + /** HttpCheck requestMethod. */ + public requestMethod: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod|keyof typeof google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod); + /** HttpCheck useSsl. */ public useSsl: boolean; @@ -11793,9 +11805,15 @@ export namespace google { /** HttpCheck headers. */ public headers: { [k: string]: string }; + /** HttpCheck contentType. */ + public contentType: (google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType|keyof typeof google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType); + /** HttpCheck validateSsl. */ public validateSsl: boolean; + /** HttpCheck body. */ + public body: (Uint8Array|string); + /** * Creates a new HttpCheck instance using the specified properties. * @param [properties] Properties to set @@ -11964,6 +11982,19 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** RequestMethod enum. */ + enum RequestMethod { + METHOD_UNSPECIFIED = 0, + GET = 1, + POST = 2 + } + + /** ContentType enum. */ + enum ContentType { + TYPE_UNSPECIFIED = 0, + URL_ENCODED = 1 + } } /** Properties of a TcpCheck. */ @@ -12165,13 +12196,6 @@ export namespace google { } } - /** GroupResourceType enum. */ - enum GroupResourceType { - RESOURCE_TYPE_UNSPECIFIED = 0, - INSTANCE = 1, - AWS_ELB_LOAD_BALANCER = 2 - } - /** Properties of an UptimeCheckIp. */ interface IUptimeCheckIp { @@ -12274,6 +12298,13 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** GroupResourceType enum. */ + enum GroupResourceType { + RESOURCE_TYPE_UNSPECIFIED = 0, + INSTANCE = 1, + AWS_ELB_LOAD_BALANCER = 2 + } + /** Represents an UptimeCheckService */ class UptimeCheckService extends $protobuf.rpc.Service { diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index e6857a971c1..fb334bde389 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -206,30 +206,30 @@ AlertPolicy.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.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.combiner != null && message.hasOwnProperty("combiner")) + if (message.combiner != null && Object.hasOwnProperty.call(message, "combiner")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.combiner); - if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + if (message.creationRecord != null && Object.hasOwnProperty.call(message, "creationRecord")) $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) + if (message.mutationRecord != null && Object.hasOwnProperty.call(message, "mutationRecord")) $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecord, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.conditions != null && message.conditions.length) for (var i = 0; i < message.conditions.length; ++i) $root.google.monitoring.v3.AlertPolicy.Condition.encode(message.conditions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.documentation != null && message.hasOwnProperty("documentation")) + if (message.documentation != null && Object.hasOwnProperty.call(message, "documentation")) $root.google.monitoring.v3.AlertPolicy.Documentation.encode(message.documentation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).string(message.notificationChannels[i]); - 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 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.validity != null && message.hasOwnProperty("validity")) + if (message.validity != null && Object.hasOwnProperty.call(message, "validity")) $root.google.rpc.Status.encode(message.validity, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -636,9 +636,9 @@ Documentation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); return writer; }; @@ -887,15 +887,15 @@ Condition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) + if (message.conditionThreshold != null && Object.hasOwnProperty.call(message, "conditionThreshold")) $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.encode(message.conditionThreshold, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) + if (message.conditionAbsent != null && Object.hasOwnProperty.call(message, "conditionAbsent")) $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.encode(message.conditionAbsent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); - if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) + if (message.conditionTimeSeriesQueryLanguage != null && Object.hasOwnProperty.call(message, "conditionTimeSeriesQueryLanguage")) $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.encode(message.conditionTimeSeriesQueryLanguage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -1182,9 +1182,9 @@ Trigger.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).int32(message.count); - if (message.percent != null && message.hasOwnProperty("percent")) + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.percent); return writer; }; @@ -1457,20 +1457,20 @@ MetricThreshold.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.comparison != null && message.hasOwnProperty("comparison")) + if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.comparison); - if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + if (message.thresholdValue != null && Object.hasOwnProperty.call(message, "thresholdValue")) writer.uint32(/* id 5, wireType 1 =*/41).double(message.thresholdValue); - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.trigger != null && message.hasOwnProperty("trigger")) + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.aggregations != null && message.aggregations.length) for (var i = 0; i < message.aggregations.length; ++i) $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + if (message.denominatorFilter != null && Object.hasOwnProperty.call(message, "denominatorFilter")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.denominatorFilter); if (message.denominatorAggregations != null && message.denominatorAggregations.length) for (var i = 0; i < message.denominatorAggregations.length; ++i) @@ -1854,11 +1854,11 @@ MetricAbsence.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 1, wireType 2 =*/10).string(message.filter); - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trigger != null && message.hasOwnProperty("trigger")) + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.aggregations != null && message.aggregations.length) for (var i = 0; i < message.aggregations.length; ++i) @@ -2121,9 +2121,9 @@ TimeSeriesQueryLanguageCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.summary != null && message.hasOwnProperty("summary")) + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); return writer; }; @@ -2272,7 +2272,7 @@ /** * ConditionCombinerType enum. * @name google.monitoring.v3.AlertPolicy.ConditionCombinerType - * @enum {string} + * @enum {number} * @property {number} COMBINE_UNSPECIFIED=0 COMBINE_UNSPECIFIED value * @property {number} AND=1 AND value * @property {number} OR=2 OR value @@ -2396,15 +2396,15 @@ TypedValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && message.hasOwnProperty("int64Value")) + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) + if (message.distributionValue != null && Object.hasOwnProperty.call(message, "distributionValue")) $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -2688,9 +2688,9 @@ TimeInterval.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) + 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 && message.hasOwnProperty("endTime")) + 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(); return writer; }; @@ -2927,11 +2927,11 @@ Aggregation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); if (message.groupByFields != null && message.groupByFields.length) for (var i = 0; i < message.groupByFields.length; ++i) @@ -3290,7 +3290,7 @@ /** * Aligner enum. * @name google.monitoring.v3.Aggregation.Aligner - * @enum {string} + * @enum {number} * @property {number} ALIGN_NONE=0 ALIGN_NONE value * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value * @property {number} ALIGN_RATE=2 ALIGN_RATE value @@ -3338,7 +3338,7 @@ /** * Reducer enum. * @name google.monitoring.v3.Aggregation.Reducer - * @enum {string} + * @enum {number} * @property {number} REDUCE_NONE=0 REDUCE_NONE value * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value * @property {number} REDUCE_MIN=2 REDUCE_MIN value @@ -3379,7 +3379,7 @@ /** * ComparisonType enum. * @name google.monitoring.v3.ComparisonType - * @enum {string} + * @enum {number} * @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value * @property {number} COMPARISON_GT=1 COMPARISON_GT value * @property {number} COMPARISON_GE=2 COMPARISON_GE value @@ -3403,7 +3403,7 @@ /** * ServiceTier enum. * @name google.monitoring.v3.ServiceTier - * @enum {string} + * @enum {number} * @property {number} SERVICE_TIER_UNSPECIFIED=0 SERVICE_TIER_UNSPECIFIED value * @property {number} SERVICE_TIER_BASIC=1 SERVICE_TIER_BASIC value * @property {number} SERVICE_TIER_PREMIUM=2 SERVICE_TIER_PREMIUM value @@ -3481,9 +3481,9 @@ MutationRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) + if (message.mutateTime != null && Object.hasOwnProperty.call(message, "mutateTime")) $root.google.protobuf.Timestamp.encode(message.mutateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + if (message.mutatedBy != null && Object.hasOwnProperty.call(message, "mutatedBy")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.mutatedBy); return writer; }; @@ -3896,9 +3896,9 @@ CreateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + if (message.alertPolicy != null && Object.hasOwnProperty.call(message, "alertPolicy")) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -4102,7 +4102,7 @@ GetAlertPolicyRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -4325,15 +4325,15 @@ ListAlertPoliciesRequest.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 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); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - 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.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); return writer; }; @@ -4575,7 +4575,7 @@ ListAlertPoliciesResponse.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.alertPolicies != null && message.alertPolicies.length) for (var i = 0; i < message.alertPolicies.length; ++i) @@ -4805,9 +4805,9 @@ UpdateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + if (message.alertPolicy != null && Object.hasOwnProperty.call(message, "alertPolicy")) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -5016,7 +5016,7 @@ DeleteAlertPolicyRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -5204,7 +5204,7 @@ DroppedLabels.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) for (var keys = Object.keys(message.label), i = 0; i < keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.label[keys[i]]).ldelim(); return writer; @@ -5447,15 +5447,15 @@ Group.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.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.parentName != null && message.hasOwnProperty("parentName")) + if (message.parentName != null && Object.hasOwnProperty.call(message, "parentName")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentName); - 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.isCluster != null && message.hasOwnProperty("isCluster")) + if (message.isCluster != null && Object.hasOwnProperty.call(message, "isCluster")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isCluster); return writer; }; @@ -5979,17 +5979,17 @@ ListGroupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) + if (message.childrenOfGroup != null && Object.hasOwnProperty.call(message, "childrenOfGroup")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childrenOfGroup); - if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) + if (message.ancestorsOfGroup != null && Object.hasOwnProperty.call(message, "ancestorsOfGroup")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorsOfGroup); - if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) + if (message.descendantsOfGroup != null && Object.hasOwnProperty.call(message, "descendantsOfGroup")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.descendantsOfGroup); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -6262,7 +6262,7 @@ if (message.group != null && message.group.length) for (var i = 0; i < message.group.length; ++i) $root.google.monitoring.v3.Group.encode(message.group[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; }; @@ -6480,7 +6480,7 @@ GetGroupRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -6685,11 +6685,11 @@ CreateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && message.hasOwnProperty("group")) + if (message.group != null && Object.hasOwnProperty.call(message, "group")) $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -6913,9 +6913,9 @@ UpdateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && message.hasOwnProperty("group")) + if (message.group != null && Object.hasOwnProperty.call(message, "group")) $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; @@ -7128,9 +7128,9 @@ DeleteGroupRequest.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 3, wireType 2 =*/26).string(message.name); - if (message.recursive != null && message.hasOwnProperty("recursive")) + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); return writer; }; @@ -7365,15 +7365,15 @@ ListGroupMembersRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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.interval != null && message.hasOwnProperty("interval")) + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -7632,9 +7632,9 @@ if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) $root.google.api.MonitoredResource.encode(message.members[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); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; @@ -7873,9 +7873,9 @@ Point.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.interval != null && message.hasOwnProperty("interval")) + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) $root.google.monitoring.v3.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8130,18 +8130,18 @@ TimeSeries.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metric != null && message.hasOwnProperty("metric")) + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) $root.google.api.Metric.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).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 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.points != null && message.points.length) for (var i = 0; i < message.points.length; ++i) $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -8747,11 +8747,11 @@ ValueDescriptor.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.metricKind != null && message.hasOwnProperty("metricKind")) + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); return writer; }; @@ -9287,7 +9287,7 @@ if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) $root.google.monitoring.v3.TypedValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeInterval != null && message.hasOwnProperty("timeInterval")) + if (message.timeInterval != null && Object.hasOwnProperty.call(message, "timeInterval")) $root.google.monitoring.v3.TimeInterval.encode(message.timeInterval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -9545,11 +9545,11 @@ LabelValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && message.hasOwnProperty("int64Value")) + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - 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); return writer; }; @@ -9793,9 +9793,9 @@ QueryError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.locator != null && message.hasOwnProperty("locator")) + if (message.locator != null && Object.hasOwnProperty.call(message, "locator")) $root.google.monitoring.v3.TextLocator.encode(message.locator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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); return writer; }; @@ -10035,15 +10035,15 @@ TextLocator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); - if (message.startPosition != null && message.hasOwnProperty("startPosition")) + if (message.startPosition != null && Object.hasOwnProperty.call(message, "startPosition")) $root.google.monitoring.v3.TextLocator.Position.encode(message.startPosition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endPosition != null && message.hasOwnProperty("endPosition")) + if (message.endPosition != null && Object.hasOwnProperty.call(message, "endPosition")) $root.google.monitoring.v3.TextLocator.Position.encode(message.endPosition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.nestedLocator != null && message.hasOwnProperty("nestedLocator")) + if (message.nestedLocator != null && Object.hasOwnProperty.call(message, "nestedLocator")) $root.google.monitoring.v3.TextLocator.encode(message.nestedLocator, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nestingReason != null && message.hasOwnProperty("nestingReason")) + if (message.nestingReason != null && Object.hasOwnProperty.call(message, "nestingReason")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.nestingReason); return writer; }; @@ -10296,9 +10296,9 @@ Position.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.line != null && message.hasOwnProperty("line")) + if (message.line != null && Object.hasOwnProperty.call(message, "line")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.line); - if (message.column != null && message.hasOwnProperty("column")) + if (message.column != null && Object.hasOwnProperty.call(message, "column")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.column); return writer; }; @@ -10826,13 +10826,13 @@ ListMonitoredResourceDescriptorsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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); return writer; }; @@ -11066,7 +11066,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; }; @@ -11284,7 +11284,7 @@ GetMonitoredResourceDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -11498,13 +11498,13 @@ ListMetricDescriptorsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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); return writer; }; @@ -11738,7 +11738,7 @@ if (message.metricDescriptors != null && message.metricDescriptors.length) for (var i = 0; i < message.metricDescriptors.length; ++i) $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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; }; @@ -11956,7 +11956,7 @@ GetMetricDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12152,9 +12152,9 @@ CreateMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12358,7 +12358,7 @@ DeleteMetricDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12608,21 +12608,21 @@ ListTimeSeriesRequest.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.interval != null && message.hasOwnProperty("interval")) + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) + if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); return writer; }; @@ -12854,7 +12854,7 @@ /** * TimeSeriesView enum. * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView - * @enum {string} + * @enum {number} * @property {number} FULL=0 FULL value * @property {number} HEADERS=1 HEADERS value */ @@ -12947,7 +12947,7 @@ if (message.timeSeries != null && message.timeSeries.length) for (var i = 0; i < message.timeSeries.length; ++i) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[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); if (message.executionErrors != null && message.executionErrors.length) for (var i = 0; i < message.executionErrors.length; ++i) @@ -13212,7 +13212,7 @@ if (message.timeSeries != null && message.timeSeries.length) for (var i = 0; i < message.timeSeries.length; ++i) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -13439,9 +13439,9 @@ CreateTimeSeriesError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -13669,9 +13669,9 @@ CreateTimeSeriesSummary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + if (message.totalPointCount != null && Object.hasOwnProperty.call(message, "totalPointCount")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + if (message.successPointCount != null && Object.hasOwnProperty.call(message, "successPointCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) @@ -13910,9 +13910,9 @@ Error.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pointCount != null && message.hasOwnProperty("pointCount")) + if (message.pointCount != null && Object.hasOwnProperty.call(message, "pointCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); return writer; }; @@ -14146,13 +14146,13 @@ QueryTimeSeriesRequest.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.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.query); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.pageToken); return writer; }; @@ -14402,12 +14402,12 @@ QueryTimeSeriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesDescriptor != null && message.hasOwnProperty("timeSeriesDescriptor")) + if (message.timeSeriesDescriptor != null && Object.hasOwnProperty.call(message, "timeSeriesDescriptor")) $root.google.monitoring.v3.TimeSeriesDescriptor.encode(message.timeSeriesDescriptor, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.timeSeriesData != null && message.timeSeriesData.length) for (var i = 0; i < message.timeSeriesData.length; ++i) $root.google.monitoring.v3.TimeSeriesData.encode(message.timeSeriesData[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.nextPageToken); if (message.partialErrors != null && message.partialErrors.length) for (var i = 0; i < message.partialErrors.length; ++i) @@ -14689,7 +14689,7 @@ if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) $root.google.monitoring.v3.QueryError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorSummary != null && message.hasOwnProperty("errorSummary")) + if (message.errorSummary != null && Object.hasOwnProperty.call(message, "errorSummary")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorSummary); return writer; }; @@ -14963,11 +14963,11 @@ NotificationChannelDescriptor.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) @@ -14978,9 +14978,9 @@ writer.int32(message.supportedTiers[i]); writer.ldelim(); } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 6, wireType 2 =*/50).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; }; @@ -15392,23 +15392,23 @@ NotificationChannel.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 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - 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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - 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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + if (message.verificationStatus != null && Object.hasOwnProperty.call(message, "verificationStatus")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -15679,7 +15679,7 @@ /** * VerificationStatus enum. * @name google.monitoring.v3.NotificationChannel.VerificationStatus - * @enum {string} + * @enum {number} * @property {number} VERIFICATION_STATUS_UNSPECIFIED=0 VERIFICATION_STATUS_UNSPECIFIED value * @property {number} UNVERIFIED=1 UNVERIFIED value * @property {number} VERIFIED=2 VERIFIED value @@ -16134,11 +16134,11 @@ ListNotificationChannelDescriptorsRequest.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 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); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -16361,7 +16361,7 @@ if (message.channelDescriptors != null && message.channelDescriptors.length) for (var i = 0; i < message.channelDescriptors.length; ++i) $root.google.monitoring.v3.NotificationChannelDescriptor.encode(message.channelDescriptors[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; }; @@ -16579,7 +16579,7 @@ GetNotificationChannelDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -16775,9 +16775,9 @@ CreateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + if (message.notificationChannel != null && Object.hasOwnProperty.call(message, "notificationChannel")) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -17017,15 +17017,15 @@ ListNotificationChannelsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); return writer; }; @@ -17267,7 +17267,7 @@ ListNotificationChannelsResponse.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.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) @@ -17488,7 +17488,7 @@ GetNotificationChannelRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -17684,9 +17684,9 @@ UpdateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + if (message.notificationChannel != null && Object.hasOwnProperty.call(message, "notificationChannel")) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -17904,9 +17904,9 @@ DeleteNotificationChannelRequest.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 3, wireType 2 =*/26).string(message.name); - if (message.force != null && message.hasOwnProperty("force")) + if (message.force != null && Object.hasOwnProperty.call(message, "force")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; @@ -18105,7 +18105,7 @@ SendNotificationChannelVerificationCodeRequest.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; }; @@ -18301,9 +18301,9 @@ GetNotificationChannelVerificationCodeRequest.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.expireTime != null && message.hasOwnProperty("expireTime")) + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -18516,9 +18516,9 @@ GetNotificationChannelVerificationCodeResponse.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 2 =*/10).string(message.code); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -18731,9 +18731,9 @@ VerifyNotificationChannelRequest.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.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); return writer; }; @@ -19009,21 +19009,21 @@ Service.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.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.custom != null && message.hasOwnProperty("custom")) + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) $root.google.monitoring.v3.Service.Custom.encode(message.custom, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appEngine != null && message.hasOwnProperty("appEngine")) + if (message.appEngine != null && Object.hasOwnProperty.call(message, "appEngine")) $root.google.monitoring.v3.Service.AppEngine.encode(message.appEngine, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) + if (message.cloudEndpoints != null && Object.hasOwnProperty.call(message, "cloudEndpoints")) $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) + if (message.clusterIstio != null && Object.hasOwnProperty.call(message, "clusterIstio")) $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.meshIstio != null && message.hasOwnProperty("meshIstio")) + if (message.meshIstio != null && Object.hasOwnProperty.call(message, "meshIstio")) $root.google.monitoring.v3.Service.MeshIstio.encode(message.meshIstio, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.telemetry != null && message.hasOwnProperty("telemetry")) + if (message.telemetry != null && Object.hasOwnProperty.call(message, "telemetry")) $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -19509,7 +19509,7 @@ AppEngine.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.moduleId != null && message.hasOwnProperty("moduleId")) + if (message.moduleId != null && Object.hasOwnProperty.call(message, "moduleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.moduleId); return writer; }; @@ -19696,7 +19696,7 @@ CloudEndpoints.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); return writer; }; @@ -19910,13 +19910,13 @@ ClusterIstio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.clusterName != null && message.hasOwnProperty("clusterName")) + if (message.clusterName != null && Object.hasOwnProperty.call(message, "clusterName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterName); - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (message.serviceNamespace != null && Object.hasOwnProperty.call(message, "serviceNamespace")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); return writer; }; @@ -20155,11 +20155,11 @@ MeshIstio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.meshUid != null && message.hasOwnProperty("meshUid")) + if (message.meshUid != null && Object.hasOwnProperty.call(message, "meshUid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.meshUid); - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (message.serviceNamespace != null && Object.hasOwnProperty.call(message, "serviceNamespace")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); return writer; }; @@ -20369,7 +20369,7 @@ Telemetry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); return writer; }; @@ -20618,17 +20618,17 @@ ServiceLevelObjective.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.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) + if (message.serviceLevelIndicator != null && Object.hasOwnProperty.call(message, "serviceLevelIndicator")) $root.google.monitoring.v3.ServiceLevelIndicator.encode(message.serviceLevelIndicator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.goal != null && message.hasOwnProperty("goal")) + if (message.goal != null && Object.hasOwnProperty.call(message, "goal")) writer.uint32(/* id 4, wireType 1 =*/33).double(message.goal); - if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) + if (message.rollingPeriod != null && Object.hasOwnProperty.call(message, "rollingPeriod")) $root.google.protobuf.Duration.encode(message.rollingPeriod, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) + if (message.calendarPeriod != null && Object.hasOwnProperty.call(message, "calendarPeriod")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.calendarPeriod); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); return writer; }; @@ -20880,7 +20880,7 @@ /** * View enum. * @name google.monitoring.v3.ServiceLevelObjective.View - * @enum {string} + * @enum {number} * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value * @property {number} FULL=2 FULL value * @property {number} EXPLICIT=1 EXPLICIT value @@ -20984,11 +20984,11 @@ ServiceLevelIndicator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestBased != null && message.hasOwnProperty("requestBased")) + if (message.requestBased != null && Object.hasOwnProperty.call(message, "requestBased")) $root.google.monitoring.v3.RequestBasedSli.encode(message.requestBased, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) + if (message.windowsBased != null && Object.hasOwnProperty.call(message, "windowsBased")) $root.google.monitoring.v3.WindowsBasedSli.encode(message.windowsBased, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.basicSli != null && message.hasOwnProperty("basicSli")) + if (message.basicSli != null && Object.hasOwnProperty.call(message, "basicSli")) $root.google.monitoring.v3.BasicSli.encode(message.basicSli, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -21284,9 +21284,9 @@ BasicSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.availability != null && message.hasOwnProperty("availability")) + if (message.availability != null && Object.hasOwnProperty.call(message, "availability")) $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.encode(message.availability, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.latency != null && message.hasOwnProperty("latency")) + if (message.latency != null && Object.hasOwnProperty.call(message, "latency")) $root.google.monitoring.v3.BasicSli.LatencyCriteria.encode(message.latency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) @@ -21749,7 +21749,7 @@ LatencyCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threshold != null && message.hasOwnProperty("threshold")) + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) $root.google.protobuf.Duration.encode(message.threshold, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -21953,9 +21953,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; }; @@ -22177,9 +22177,9 @@ RequestBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) + if (message.goodTotalRatio != null && Object.hasOwnProperty.call(message, "goodTotalRatio")) $root.google.monitoring.v3.TimeSeriesRatio.encode(message.goodTotalRatio, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) + if (message.distributionCut != null && Object.hasOwnProperty.call(message, "distributionCut")) $root.google.monitoring.v3.DistributionCut.encode(message.distributionCut, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -22417,11 +22417,11 @@ TimeSeriesRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + if (message.goodServiceFilter != null && Object.hasOwnProperty.call(message, "goodServiceFilter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.goodServiceFilter); - if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + if (message.badServiceFilter != null && Object.hasOwnProperty.call(message, "badServiceFilter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.badServiceFilter); - if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + if (message.totalServiceFilter != null && Object.hasOwnProperty.call(message, "totalServiceFilter")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.totalServiceFilter); return writer; }; @@ -22640,9 +22640,9 @@ DistributionCut.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + if (message.distributionFilter != null && Object.hasOwnProperty.call(message, "distributionFilter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.distributionFilter); - if (message.range != null && message.hasOwnProperty("range")) + if (message.range != null && Object.hasOwnProperty.call(message, "range")) $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -22896,15 +22896,15 @@ WindowsBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) + if (message.goodTotalRatioThreshold != null && Object.hasOwnProperty.call(message, "goodTotalRatioThreshold")) $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.encode(message.goodTotalRatioThreshold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) + if (message.windowPeriod != null && Object.hasOwnProperty.call(message, "windowPeriod")) $root.google.protobuf.Duration.encode(message.windowPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) + if (message.goodBadMetricFilter != null && Object.hasOwnProperty.call(message, "goodBadMetricFilter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.goodBadMetricFilter); - if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) + if (message.metricMeanInRange != null && Object.hasOwnProperty.call(message, "metricMeanInRange")) $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricMeanInRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) + if (message.metricSumInRange != null && Object.hasOwnProperty.call(message, "metricSumInRange")) $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricSumInRange, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -23210,11 +23210,11 @@ PerformanceThreshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.performance != null && message.hasOwnProperty("performance")) + if (message.performance != null && Object.hasOwnProperty.call(message, "performance")) $root.google.monitoring.v3.RequestBasedSli.encode(message.performance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.threshold != null && message.hasOwnProperty("threshold")) + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.threshold); - if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) + if (message.basicSliPerformance != null && Object.hasOwnProperty.call(message, "basicSliPerformance")) $root.google.monitoring.v3.BasicSli.encode(message.basicSliPerformance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23455,9 +23455,9 @@ MetricRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeSeries); - if (message.range != null && message.hasOwnProperty("range")) + if (message.range != null && Object.hasOwnProperty.call(message, "range")) $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -24047,11 +24047,11 @@ CreateServiceRequest.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.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceId); return writer; }; @@ -24266,7 +24266,7 @@ GetServiceRequest.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; }; @@ -24480,13 +24480,13 @@ ListServicesRequest.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.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; @@ -24720,7 +24720,7 @@ if (message.services != null && message.services.length) for (var i = 0; i < message.services.length; ++i) $root.google.monitoring.v3.Service.encode(message.services[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; }; @@ -24947,9 +24947,9 @@ UpdateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).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 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -25158,7 +25158,7 @@ DeleteServiceRequest.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; }; @@ -25363,11 +25363,11 @@ CreateServiceLevelObjectiveRequest.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.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + if (message.serviceLevelObjective != null && Object.hasOwnProperty.call(message, "serviceLevelObjective")) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + if (message.serviceLevelObjectiveId != null && Object.hasOwnProperty.call(message, "serviceLevelObjectiveId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceLevelObjectiveId); return writer; }; @@ -25591,9 +25591,9 @@ GetServiceLevelObjectiveRequest.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.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; @@ -25846,15 +25846,15 @@ ListServiceLevelObjectivesRequest.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.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); return writer; }; @@ -26117,7 +26117,7 @@ if (message.serviceLevelObjectives != null && message.serviceLevelObjectives.length) for (var i = 0; i < message.serviceLevelObjectives.length; ++i) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjectives[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; }; @@ -26344,9 +26344,9 @@ UpdateServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + if (message.serviceLevelObjective != null && Object.hasOwnProperty.call(message, "serviceLevelObjective")) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 1, wireType 2 =*/10).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 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -26555,7 +26555,7 @@ DeleteServiceLevelObjectiveRequest.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; }; @@ -26742,7 +26742,7 @@ SpanContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.spanName != null && message.hasOwnProperty("spanName")) + if (message.spanName != null && Object.hasOwnProperty.call(message, "spanName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanName); return writer; }; @@ -26873,26 +26873,6 @@ return SpanContext; })(); - /** - * UptimeCheckRegion enum. - * @name google.monitoring.v3.UptimeCheckRegion - * @enum {string} - * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value - * @property {number} USA=1 USA value - * @property {number} EUROPE=2 EUROPE value - * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value - * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value - */ - v3.UptimeCheckRegion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USA"] = 1; - values[valuesById[2] = "EUROPE"] = 2; - values[valuesById[3] = "SOUTH_AMERICA"] = 3; - values[valuesById[4] = "ASIA_PACIFIC"] = 4; - return values; - })(); - v3.InternalChecker = (function() { /** @@ -26994,17 +26974,17 @@ InternalChecker.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.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.network != null && message.hasOwnProperty("network")) + if (message.network != null && Object.hasOwnProperty.call(message, "network")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); - if (message.gcpZone != null && message.hasOwnProperty("gcpZone")) + if (message.gcpZone != null && Object.hasOwnProperty.call(message, "gcpZone")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcpZone); - if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) + if (message.peerProjectId != null && Object.hasOwnProperty.call(message, "peerProjectId")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerProjectId); - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); return writer; }; @@ -27209,7 +27189,7 @@ /** * State enum. * @name google.monitoring.v3.InternalChecker.State - * @enum {string} + * @enum {number} * @property {number} UNSPECIFIED=0 UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} RUNNING=2 RUNNING value @@ -27225,6 +27205,26 @@ return InternalChecker; })(); + /** + * UptimeCheckRegion enum. + * @name google.monitoring.v3.UptimeCheckRegion + * @enum {number} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} USA=1 USA value + * @property {number} EUROPE=2 EUROPE value + * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value + * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + */ + v3.UptimeCheckRegion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USA"] = 1; + values[valuesById[2] = "EUROPE"] = 2; + values[valuesById[3] = "SOUTH_AMERICA"] = 3; + values[valuesById[4] = "ASIA_PACIFIC"] = 4; + return values; + })(); + v3.UptimeCheckConfig = (function() { /** @@ -27408,21 +27408,21 @@ UptimeCheckConfig.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.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.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) $root.google.api.MonitoredResource.encode(message.monitoredResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.encode(message.resourceGroup, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.httpCheck != null && message.hasOwnProperty("httpCheck")) + if (message.httpCheck != null && Object.hasOwnProperty.call(message, "httpCheck")) $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.encode(message.httpCheck, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tcpCheck != null && message.hasOwnProperty("tcpCheck")) + if (message.tcpCheck != null && Object.hasOwnProperty.call(message, "tcpCheck")) $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.encode(message.tcpCheck, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.period != null && message.hasOwnProperty("period")) + if (message.period != null && Object.hasOwnProperty.call(message, "period")) $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.contentMatchers != null && message.contentMatchers.length) for (var i = 0; i < message.contentMatchers.length; ++i) @@ -27436,7 +27436,7 @@ if (message.internalCheckers != null && message.internalCheckers.length) for (var i = 0; i < message.internalCheckers.length; ++i) $root.google.monitoring.v3.InternalChecker.encode(message.internalCheckers[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.isInternal != null && message.hasOwnProperty("isInternal")) + if (message.isInternal != null && Object.hasOwnProperty.call(message, "isInternal")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.isInternal); return writer; }; @@ -27895,9 +27895,9 @@ ResourceGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupId != null && message.hasOwnProperty("groupId")) + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId); - if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); return writer; }; @@ -28064,13 +28064,16 @@ * Properties of a HttpCheck. * @memberof google.monitoring.v3.UptimeCheckConfig * @interface IHttpCheck + * @property {google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod|null} [requestMethod] HttpCheck requestMethod * @property {boolean|null} [useSsl] HttpCheck useSsl * @property {string|null} [path] HttpCheck path * @property {number|null} [port] HttpCheck port * @property {google.monitoring.v3.UptimeCheckConfig.HttpCheck.IBasicAuthentication|null} [authInfo] HttpCheck authInfo * @property {boolean|null} [maskHeaders] HttpCheck maskHeaders * @property {Object.|null} [headers] HttpCheck headers + * @property {google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType|null} [contentType] HttpCheck contentType * @property {boolean|null} [validateSsl] HttpCheck validateSsl + * @property {Uint8Array|null} [body] HttpCheck body */ /** @@ -28089,6 +28092,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * HttpCheck requestMethod. + * @member {google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod} requestMethod + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.requestMethod = 0; + /** * HttpCheck useSsl. * @member {boolean} useSsl @@ -28137,6 +28148,14 @@ */ HttpCheck.prototype.headers = $util.emptyObject; + /** + * HttpCheck contentType. + * @member {google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType} contentType + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.contentType = 0; + /** * HttpCheck validateSsl. * @member {boolean} validateSsl @@ -28145,6 +28164,14 @@ */ HttpCheck.prototype.validateSsl = false; + /** + * HttpCheck body. + * @member {Uint8Array} body + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @instance + */ + HttpCheck.prototype.body = $util.newBuffer([]); + /** * Creates a new HttpCheck instance using the specified properties. * @function create @@ -28169,21 +28196,27 @@ HttpCheck.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.useSsl != null && message.hasOwnProperty("useSsl")) + if (message.useSsl != null && Object.hasOwnProperty.call(message, "useSsl")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useSsl); - 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); - if (message.port != null && message.hasOwnProperty("port")) + if (message.port != null && Object.hasOwnProperty.call(message, "port")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); - if (message.authInfo != null && message.hasOwnProperty("authInfo")) + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.encode(message.authInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maskHeaders != null && message.hasOwnProperty("maskHeaders")) + if (message.maskHeaders != null && Object.hasOwnProperty.call(message, "maskHeaders")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.maskHeaders); - if (message.headers != null && message.hasOwnProperty("headers")) + if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); - if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) + if (message.validateSsl != null && Object.hasOwnProperty.call(message, "validateSsl")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.validateSsl); + if (message.requestMethod != null && Object.hasOwnProperty.call(message, "requestMethod")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.requestMethod); + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.contentType); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.body); return writer; }; @@ -28218,6 +28251,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 8: + message.requestMethod = reader.int32(); + break; case 1: message.useSsl = reader.bool(); break; @@ -28241,9 +28277,15 @@ reader.pos++; message.headers[key] = reader.string(); break; + case 9: + message.contentType = reader.int32(); + break; case 7: message.validateSsl = reader.bool(); break; + case 10: + message.body = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -28279,6 +28321,15 @@ HttpCheck.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + switch (message.requestMethod) { + default: + return "requestMethod: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.useSsl != null && message.hasOwnProperty("useSsl")) if (typeof message.useSsl !== "boolean") return "useSsl: boolean expected"; @@ -28304,9 +28355,20 @@ if (!$util.isString(message.headers[key[i]])) return "headers: string{k:string} expected"; } + if (message.contentType != null && message.hasOwnProperty("contentType")) + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + break; + } if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) if (typeof message.validateSsl !== "boolean") return "validateSsl: boolean expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) + return "body: buffer expected"; return null; }; @@ -28322,6 +28384,20 @@ if (object instanceof $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck) return object; var message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck(); + switch (object.requestMethod) { + case "METHOD_UNSPECIFIED": + case 0: + message.requestMethod = 0; + break; + case "GET": + case 1: + message.requestMethod = 1; + break; + case "POST": + case 2: + message.requestMethod = 2; + break; + } if (object.useSsl != null) message.useSsl = Boolean(object.useSsl); if (object.path != null) @@ -28342,8 +28418,23 @@ for (var keys = Object.keys(object.headers), i = 0; i < keys.length; ++i) message.headers[keys[i]] = String(object.headers[keys[i]]); } + switch (object.contentType) { + case "TYPE_UNSPECIFIED": + case 0: + message.contentType = 0; + break; + case "URL_ENCODED": + case 1: + message.contentType = 1; + break; + } if (object.validateSsl != null) message.validateSsl = Boolean(object.validateSsl); + if (object.body != null) + if (typeof object.body === "string") + $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); + else if (object.body.length) + message.body = object.body; return message; }; @@ -28369,6 +28460,15 @@ object.authInfo = null; object.maskHeaders = false; object.validateSsl = false; + object.requestMethod = options.enums === String ? "METHOD_UNSPECIFIED" : 0; + object.contentType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.body = ""; + else { + object.body = []; + if (options.bytes !== Array) + object.body = $util.newBuffer(object.body); + } } if (message.useSsl != null && message.hasOwnProperty("useSsl")) object.useSsl = message.useSsl; @@ -28388,6 +28488,12 @@ } if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) object.validateSsl = message.validateSsl; + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + object.requestMethod = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod[message.requestMethod] : message.requestMethod; + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType[message.contentType] : message.contentType; + if (message.body != null && message.hasOwnProperty("body")) + object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; return object; }; @@ -28467,9 +28573,9 @@ BasicAuthentication.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.password != null && message.hasOwnProperty("password")) + if (message.password != null && Object.hasOwnProperty.call(message, "password")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); return writer; }; @@ -28612,6 +28718,36 @@ return BasicAuthentication; })(); + /** + * RequestMethod enum. + * @name google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod + * @enum {number} + * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value + * @property {number} GET=1 GET value + * @property {number} POST=2 POST value + */ + HttpCheck.RequestMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "GET"] = 1; + values[valuesById[2] = "POST"] = 2; + return values; + })(); + + /** + * ContentType enum. + * @name google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} URL_ENCODED=1 URL_ENCODED value + */ + HttpCheck.ContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "URL_ENCODED"] = 1; + return values; + })(); + return HttpCheck; })(); @@ -28671,7 +28807,7 @@ TcpCheck.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.port != null && message.hasOwnProperty("port")) + if (message.port != null && Object.hasOwnProperty.call(message, "port")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.port); return writer; }; @@ -28867,9 +29003,9 @@ ContentMatcher.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.matcher != null && message.hasOwnProperty("matcher")) + if (message.matcher != null && Object.hasOwnProperty.call(message, "matcher")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matcher); return writer; }; @@ -29040,7 +29176,7 @@ /** * ContentMatcherOption enum. * @name google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption - * @enum {string} + * @enum {number} * @property {number} CONTENT_MATCHER_OPTION_UNSPECIFIED=0 CONTENT_MATCHER_OPTION_UNSPECIFIED value * @property {number} CONTAINS_STRING=1 CONTAINS_STRING value * @property {number} NOT_CONTAINS_STRING=2 NOT_CONTAINS_STRING value @@ -29063,22 +29199,6 @@ return UptimeCheckConfig; })(); - /** - * GroupResourceType enum. - * @name google.monitoring.v3.GroupResourceType - * @enum {string} - * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value - */ - v3.GroupResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "AWS_ELB_LOAD_BALANCER"] = 2; - return values; - })(); - v3.UptimeCheckIp = (function() { /** @@ -29153,11 +29273,11 @@ UptimeCheckIp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.region != null && message.hasOwnProperty("region")) + if (message.region != null && Object.hasOwnProperty.call(message, "region")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.region); - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); return writer; }; @@ -29339,6 +29459,22 @@ return UptimeCheckIp; })(); + /** + * GroupResourceType enum. + * @name google.monitoring.v3.GroupResourceType + * @enum {number} + * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value + */ + v3.GroupResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "AWS_ELB_LOAD_BALANCER"] = 2; + return values; + })(); + v3.UptimeCheckService = (function() { /** @@ -29646,11 +29782,11 @@ ListUptimeCheckConfigsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; @@ -29882,9 +30018,9 @@ if (message.uptimeCheckConfigs != null && message.uptimeCheckConfigs.length) for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfigs[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); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; @@ -30114,7 +30250,7 @@ GetUptimeCheckConfigRequest.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; }; @@ -30310,9 +30446,9 @@ CreateUptimeCheckConfigRequest.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + if (message.uptimeCheckConfig != null && Object.hasOwnProperty.call(message, "uptimeCheckConfig")) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -30525,9 +30661,9 @@ UpdateUptimeCheckConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + if (message.uptimeCheckConfig != null && Object.hasOwnProperty.call(message, "uptimeCheckConfig")) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -30736,7 +30872,7 @@ DeleteUptimeCheckConfigRequest.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; }; @@ -30932,9 +31068,9 @@ ListUptimeCheckIpsRequest.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 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; }; @@ -31146,7 +31282,7 @@ if (message.uptimeCheckIps != null && message.uptimeCheckIps.length) for (var i = 0; i < message.uptimeCheckIps.length; ++i) $root.google.monitoring.v3.UptimeCheckIp.encode(message.uptimeCheckIps[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; }; @@ -31425,18 +31561,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; }; @@ -31656,7 +31792,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 @@ -31737,9 +31873,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; }; @@ -31994,15 +32130,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(); @@ -32345,9 +32481,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; }; @@ -32578,11 +32714,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; }; @@ -32840,11 +32976,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; }; @@ -33072,11 +33208,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; }; @@ -33519,9 +33655,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) @@ -33775,7 +33911,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; }; @@ -34089,26 +34225,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; }; @@ -34465,9 +34601,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; }; @@ -34613,7 +34749,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 @@ -34734,18 +34870,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; }; @@ -35051,9 +35187,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; @@ -35282,9 +35418,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; @@ -35526,11 +35662,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; }; @@ -35702,7 +35838,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 @@ -35721,7 +35857,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 @@ -35878,26 +36014,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; }; @@ -36318,11 +36454,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; }; @@ -36522,7 +36658,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 @@ -36540,7 +36676,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 @@ -36630,10 +36766,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; }; @@ -37177,9 +37313,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) @@ -37196,9 +37332,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) @@ -37206,7 +37342,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; }; @@ -37744,7 +37880,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) @@ -37761,7 +37897,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) @@ -38226,11 +38362,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; }; @@ -38454,9 +38590,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; }; @@ -38947,25 +39083,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; }; @@ -39312,7 +39448,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 @@ -39358,7 +39494,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 @@ -39439,9 +39575,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; }; @@ -39684,12 +39820,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) @@ -39992,9 +40128,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; }; @@ -40214,11 +40350,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; }; @@ -40452,12 +40588,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; }; @@ -40737,17 +40873,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; }; @@ -41186,45 +41322,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) @@ -41651,7 +41787,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 @@ -41769,18 +41905,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; }; @@ -42122,17 +42258,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) @@ -42143,7 +42279,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; }; @@ -42479,7 +42615,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 @@ -42495,7 +42631,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 @@ -42794,9 +42930,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) @@ -43039,7 +43175,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) @@ -43288,14 +43424,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; }; @@ -43574,9 +43710,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) @@ -43584,7 +43720,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; }; @@ -43818,7 +43954,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 @@ -43948,17 +44084,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; }; @@ -44735,9 +44871,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) @@ -45268,11 +45404,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; }; @@ -45525,9 +45661,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; }; @@ -45744,9 +45880,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; }; @@ -45968,9 +46104,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; }; @@ -46183,7 +46319,7 @@ DoubleValue.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); return writer; }; @@ -46370,7 +46506,7 @@ FloatValue.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 5 =*/13).float(message.value); return writer; }; @@ -46557,7 +46693,7 @@ Int64Value.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 0 =*/8).int64(message.value); return writer; }; @@ -46758,7 +46894,7 @@ UInt64Value.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 0 =*/8).uint64(message.value); return writer; }; @@ -46959,7 +47095,7 @@ Int32Value.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 0 =*/8).int32(message.value); return writer; }; @@ -47146,7 +47282,7 @@ UInt32Value.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 0 =*/8).uint32(message.value); return writer; }; @@ -47333,7 +47469,7 @@ BoolValue.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 0 =*/8).bool(message.value); return writer; }; @@ -47520,7 +47656,7 @@ StringValue.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 2 =*/10).string(message.value); return writer; }; @@ -47707,7 +47843,7 @@ BytesValue.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 2 =*/10).bytes(message.value); return writer; }; @@ -47904,7 +48040,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(); @@ -48177,17 +48313,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; }; @@ -48430,7 +48566,7 @@ /** * NullValue enum. * @name google.protobuf.NullValue - * @enum {string} + * @enum {number} * @property {number} NULL_VALUE=0 NULL_VALUE value */ protobuf.NullValue = (function() { @@ -49097,9 +49233,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) @@ -49291,7 +49427,7 @@ /** * CalendarPeriod enum. * @name google.type.CalendarPeriod - * @enum {string} + * @enum {number} * @property {number} CALENDAR_PERIOD_UNSPECIFIED=0 CALENDAR_PERIOD_UNSPECIFIED value * @property {number} DAY=1 DAY value * @property {number} WEEK=2 WEEK value diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 2054c2c59e2..3c34f2cace9 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -2441,15 +2441,6 @@ } } }, - "UptimeCheckRegion": { - "values": { - "REGION_UNSPECIFIED": 0, - "USA": 1, - "EUROPE": 2, - "SOUTH_AMERICA": 3, - "ASIA_PACIFIC": 4 - } - }, "InternalChecker": { "options": { "deprecated": true @@ -2490,6 +2481,15 @@ } } }, + "UptimeCheckRegion": { + "values": { + "REGION_UNSPECIFIED": 0, + "USA": 1, + "EUROPE": 2, + "SOUTH_AMERICA": 3, + "ASIA_PACIFIC": 4 + } + }, "UptimeCheckConfig": { "options": { "(google.api.resource).type": "monitoring.googleapis.com/UptimeCheckConfig", @@ -2583,6 +2583,10 @@ }, "HttpCheck": { "fields": { + "requestMethod": { + "type": "RequestMethod", + "id": 8 + }, "useSsl": { "type": "bool", "id": 1 @@ -2608,9 +2612,17 @@ "type": "string", "id": 6 }, + "contentType": { + "type": "ContentType", + "id": 9 + }, "validateSsl": { "type": "bool", "id": 7 + }, + "body": { + "type": "bytes", + "id": 10 } }, "nested": { @@ -2625,6 +2637,19 @@ "id": 2 } } + }, + "RequestMethod": { + "values": { + "METHOD_UNSPECIFIED": 0, + "GET": 1, + "POST": 2 + } + }, + "ContentType": { + "values": { + "TYPE_UNSPECIFIED": 0, + "URL_ENCODED": 1 + } } } }, @@ -2661,13 +2686,6 @@ } } }, - "GroupResourceType": { - "values": { - "RESOURCE_TYPE_UNSPECIFIED": 0, - "INSTANCE": 1, - "AWS_ELB_LOAD_BALANCER": 2 - } - }, "UptimeCheckIp": { "fields": { "region": { @@ -2684,6 +2702,13 @@ } } }, + "GroupResourceType": { + "values": { + "RESOURCE_TYPE_UNSPECIFIED": 0, + "INSTANCE": 1, + "AWS_ELB_LOAD_BALANCER": 2 + } + }, "UptimeCheckService": { "options": { "(google.api.default_host)": "monitoring.googleapis.com", diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js index 5ffed8283f4..20258cc46ca 100644 --- a/packages/google-cloud-monitoring/samples/test/quickstart.test.js +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -33,7 +33,7 @@ const delay = async test => { }); }; describe('quickstart', () => { - it('should run the quickstart', async function() { + it('should run the quickstart', async function () { this.retries(8); await delay(this.test); // delay the start of the test, if this is a retry. const result = execSync('node quickstart'); diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index d9c6483c321..487bab751d0 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -1,19 +1,25 @@ { - "updateTime": "2020-04-11T01:36:38.708200Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/nodejs-monitoring.git", + "sha": "c956dade7f103dc785ccb4d3c65b09e287f49199" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", - "internalRef": "305974465" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" } } ], diff --git a/packages/google-cloud-monitoring/system-test/install.ts b/packages/google-cloud-monitoring/system-test/install.ts index c4d80e9c0c8..4c1ba3eb79a 100644 --- a/packages/google-cloud-monitoring/system-test/install.ts +++ b/packages/google-cloud-monitoring/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. From 8eeca1f16193825b5bf8f595c56e55eefef1c8d3 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 23 Apr 2020 19:31:30 -0700 Subject: [PATCH 295/422] chore: update npm scripts and synth.py (#426) Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool. --- packages/google-cloud-monitoring/package.json | 5 +++-- packages/google-cloud-monitoring/synth.py | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index be309b9e255..3a2f9fa56d8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -28,7 +28,7 @@ ], "scripts": { "docs": "jsdoc -c .jsdoc.js", - "lint": "gts fix", + "lint": "gts check", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", "system-test": "mocha build/system-test", "test": "c8 mocha build/test", @@ -39,7 +39,8 @@ "clean": "gts clean", "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile" + "prepare": "npm run compile", + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.1.0" diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index cec6ebf5a0a..f3b5169b62e 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -16,7 +16,7 @@ import synthtool as s import synthtool.gcp as gcp -import subprocess +import synthtool.languages.node as node import logging logging.basicConfig(level=logging.DEBUG) @@ -43,6 +43,4 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates) -subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "lint"]) -subprocess.run(['npx', 'compileProtos', 'src']) +node.postprocess_gapic_library() From 9ac4c0f361dd459d44b1eff7969054507dc288bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 May 2020 21:24:19 +0200 Subject: [PATCH 296/422] chore(deps): update dependency uuid to v8 (#428) 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-monitoring). --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 4698ed8fc0d..e959cf50af3 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -20,6 +20,6 @@ "devDependencies": { "chai": "^4.2.0", "mocha": "^7.0.0", - "uuid": "^7.0.0" + "uuid": "^8.0.0" } } From 47ba8663350449435bc1c854f1a0949f55b1772a Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 20:00:21 -0700 Subject: [PATCH 297/422] fix: regen protos and tests, formatting (#429) --- .../google-cloud-monitoring/protos/protos.js | 1022 ++++++++--------- .../google-cloud-monitoring/synth.metadata | 14 +- .../test/gapic_alert_policy_service_v3.ts | 24 +- .../test/gapic_group_service_v3.ts | 32 +- .../test/gapic_metric_service_v3.ts | 59 +- .../gapic_notification_channel_service_v3.ts | 78 +- .../gapic_service_monitoring_service_v3.ts | 63 +- .../test/gapic_uptime_check_service_v3.ts | 44 +- 8 files changed, 643 insertions(+), 693 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index fb334bde389..be668108446 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -206,30 +206,30 @@ AlertPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.combiner != null && Object.hasOwnProperty.call(message, "combiner")) + if (message.combiner != null && message.hasOwnProperty("combiner")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.combiner); - if (message.creationRecord != null && Object.hasOwnProperty.call(message, "creationRecord")) + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.mutationRecord != null && Object.hasOwnProperty.call(message, "mutationRecord")) + if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecord, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.conditions != null && message.conditions.length) for (var i = 0; i < message.conditions.length; ++i) $root.google.monitoring.v3.AlertPolicy.Condition.encode(message.conditions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.documentation != null && Object.hasOwnProperty.call(message, "documentation")) + if (message.documentation != null && message.hasOwnProperty("documentation")) $root.google.monitoring.v3.AlertPolicy.Documentation.encode(message.documentation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).string(message.notificationChannels[i]); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + if (message.userLabels != null && message.hasOwnProperty("userLabels")) for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + if (message.enabled != null && message.hasOwnProperty("enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.validity != null && Object.hasOwnProperty.call(message, "validity")) + if (message.validity != null && message.hasOwnProperty("validity")) $root.google.rpc.Status.encode(message.validity, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -636,9 +636,9 @@ Documentation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) + if (message.content != null && message.hasOwnProperty("content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + if (message.mimeType != null && message.hasOwnProperty("mimeType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); return writer; }; @@ -887,15 +887,15 @@ Condition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionThreshold != null && Object.hasOwnProperty.call(message, "conditionThreshold")) + if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.encode(message.conditionThreshold, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conditionAbsent != null && Object.hasOwnProperty.call(message, "conditionAbsent")) + if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.encode(message.conditionAbsent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); - if (message.conditionTimeSeriesQueryLanguage != null && Object.hasOwnProperty.call(message, "conditionTimeSeriesQueryLanguage")) + if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.encode(message.conditionTimeSeriesQueryLanguage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -1182,9 +1182,9 @@ Trigger.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) + if (message.count != null && message.hasOwnProperty("count")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + if (message.percent != null && message.hasOwnProperty("percent")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.percent); return writer; }; @@ -1457,20 +1457,20 @@ MetricThreshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) + if (message.comparison != null && message.hasOwnProperty("comparison")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.comparison); - if (message.thresholdValue != null && Object.hasOwnProperty.call(message, "thresholdValue")) + if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) writer.uint32(/* id 5, wireType 1 =*/41).double(message.thresholdValue); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + if (message.duration != null && message.hasOwnProperty("duration")) $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + if (message.trigger != null && message.hasOwnProperty("trigger")) $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.aggregations != null && message.aggregations.length) for (var i = 0; i < message.aggregations.length; ++i) $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.denominatorFilter != null && Object.hasOwnProperty.call(message, "denominatorFilter")) + if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.denominatorFilter); if (message.denominatorAggregations != null && message.denominatorAggregations.length) for (var i = 0; i < message.denominatorAggregations.length; ++i) @@ -1854,11 +1854,11 @@ MetricAbsence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + if (message.duration != null && message.hasOwnProperty("duration")) $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + if (message.trigger != null && message.hasOwnProperty("trigger")) $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.aggregations != null && message.aggregations.length) for (var i = 0; i < message.aggregations.length; ++i) @@ -2121,9 +2121,9 @@ TimeSeriesQueryLanguageCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) + if (message.query != null && message.hasOwnProperty("query")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + if (message.summary != null && message.hasOwnProperty("summary")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); return writer; }; @@ -2272,7 +2272,7 @@ /** * ConditionCombinerType enum. * @name google.monitoring.v3.AlertPolicy.ConditionCombinerType - * @enum {number} + * @enum {string} * @property {number} COMBINE_UNSPECIFIED=0 COMBINE_UNSPECIFIED value * @property {number} AND=1 AND value * @property {number} OR=2 OR value @@ -2396,15 +2396,15 @@ TypedValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + if (message.boolValue != null && message.hasOwnProperty("boolValue")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + if (message.int64Value != null && message.hasOwnProperty("int64Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.distributionValue != null && Object.hasOwnProperty.call(message, "distributionValue")) + if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -2688,9 +2688,9 @@ TimeInterval.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + if (message.startTime != null && message.hasOwnProperty("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")) + if (message.endTime != null && message.hasOwnProperty("endTime")) $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -2927,11 +2927,11 @@ Aggregation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) + if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) + if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) + if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); if (message.groupByFields != null && message.groupByFields.length) for (var i = 0; i < message.groupByFields.length; ++i) @@ -3290,7 +3290,7 @@ /** * Aligner enum. * @name google.monitoring.v3.Aggregation.Aligner - * @enum {number} + * @enum {string} * @property {number} ALIGN_NONE=0 ALIGN_NONE value * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value * @property {number} ALIGN_RATE=2 ALIGN_RATE value @@ -3338,7 +3338,7 @@ /** * Reducer enum. * @name google.monitoring.v3.Aggregation.Reducer - * @enum {number} + * @enum {string} * @property {number} REDUCE_NONE=0 REDUCE_NONE value * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value * @property {number} REDUCE_MIN=2 REDUCE_MIN value @@ -3379,7 +3379,7 @@ /** * ComparisonType enum. * @name google.monitoring.v3.ComparisonType - * @enum {number} + * @enum {string} * @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value * @property {number} COMPARISON_GT=1 COMPARISON_GT value * @property {number} COMPARISON_GE=2 COMPARISON_GE value @@ -3403,7 +3403,7 @@ /** * ServiceTier enum. * @name google.monitoring.v3.ServiceTier - * @enum {number} + * @enum {string} * @property {number} SERVICE_TIER_UNSPECIFIED=0 SERVICE_TIER_UNSPECIFIED value * @property {number} SERVICE_TIER_BASIC=1 SERVICE_TIER_BASIC value * @property {number} SERVICE_TIER_PREMIUM=2 SERVICE_TIER_PREMIUM value @@ -3481,9 +3481,9 @@ MutationRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mutateTime != null && Object.hasOwnProperty.call(message, "mutateTime")) + if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) $root.google.protobuf.Timestamp.encode(message.mutateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mutatedBy != null && Object.hasOwnProperty.call(message, "mutatedBy")) + if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.mutatedBy); return writer; }; @@ -3896,9 +3896,9 @@ CreateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alertPolicy != null && Object.hasOwnProperty.call(message, "alertPolicy")) + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -4102,7 +4102,7 @@ GetAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -4325,15 +4325,15 @@ ListAlertPoliciesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + if (message.orderBy != null && message.hasOwnProperty("orderBy")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); return writer; }; @@ -4575,7 +4575,7 @@ ListAlertPoliciesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); if (message.alertPolicies != null && message.alertPolicies.length) for (var i = 0; i < message.alertPolicies.length; ++i) @@ -4805,9 +4805,9 @@ UpdateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.alertPolicy != null && Object.hasOwnProperty.call(message, "alertPolicy")) + if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -5016,7 +5016,7 @@ DeleteAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -5204,7 +5204,7 @@ DroppedLabels.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && message.hasOwnProperty("label")) for (var keys = Object.keys(message.label), i = 0; i < keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.label[keys[i]]).ldelim(); return writer; @@ -5447,15 +5447,15 @@ Group.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.parentName != null && Object.hasOwnProperty.call(message, "parentName")) + if (message.parentName != null && message.hasOwnProperty("parentName")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentName); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.isCluster != null && Object.hasOwnProperty.call(message, "isCluster")) + if (message.isCluster != null && message.hasOwnProperty("isCluster")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isCluster); return writer; }; @@ -5979,17 +5979,17 @@ ListGroupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.childrenOfGroup != null && Object.hasOwnProperty.call(message, "childrenOfGroup")) + if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childrenOfGroup); - if (message.ancestorsOfGroup != null && Object.hasOwnProperty.call(message, "ancestorsOfGroup")) + if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorsOfGroup); - if (message.descendantsOfGroup != null && Object.hasOwnProperty.call(message, "descendantsOfGroup")) + if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.descendantsOfGroup); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -6262,7 +6262,7 @@ if (message.group != null && message.group.length) for (var i = 0; i < message.group.length; ++i) $root.google.monitoring.v3.Group.encode(message.group[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -6480,7 +6480,7 @@ GetGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -6685,11 +6685,11 @@ CreateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && Object.hasOwnProperty.call(message, "group")) + if (message.group != null && message.hasOwnProperty("group")) $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -6913,9 +6913,9 @@ UpdateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && Object.hasOwnProperty.call(message, "group")) + if (message.group != null && message.hasOwnProperty("group")) $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; @@ -7128,9 +7128,9 @@ DeleteGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) + if (message.recursive != null && message.hasOwnProperty("recursive")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); return writer; }; @@ -7365,15 +7365,15 @@ ListGroupMembersRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + if (message.interval != null && message.hasOwnProperty("interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -7632,9 +7632,9 @@ if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) $root.google.api.MonitoredResource.encode(message.members[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + if (message.totalSize != null && message.hasOwnProperty("totalSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; @@ -7873,9 +7873,9 @@ Point.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + if (message.interval != null && message.hasOwnProperty("interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) $root.google.monitoring.v3.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8130,18 +8130,18 @@ TimeSeries.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + if (message.metric != null && message.hasOwnProperty("metric")) $root.google.api.Metric.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + 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.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + if (message.metricKind != null && message.hasOwnProperty("metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + if (message.valueType != null && message.hasOwnProperty("valueType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); if (message.points != null && message.points.length) for (var i = 0; i < message.points.length; ++i) $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + if (message.metadata != null && message.hasOwnProperty("metadata")) $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -8747,11 +8747,11 @@ ValueDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (message.key != null && message.hasOwnProperty("key")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + if (message.valueType != null && message.hasOwnProperty("valueType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + if (message.metricKind != null && message.hasOwnProperty("metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); return writer; }; @@ -9287,7 +9287,7 @@ if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) $root.google.monitoring.v3.TypedValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeInterval != null && Object.hasOwnProperty.call(message, "timeInterval")) + if (message.timeInterval != null && message.hasOwnProperty("timeInterval")) $root.google.monitoring.v3.TimeInterval.encode(message.timeInterval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -9545,11 +9545,11 @@ LabelValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + if (message.boolValue != null && message.hasOwnProperty("boolValue")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + if (message.int64Value != null && message.hasOwnProperty("int64Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); return writer; }; @@ -9793,9 +9793,9 @@ QueryError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.locator != null && Object.hasOwnProperty.call(message, "locator")) + if (message.locator != null && message.hasOwnProperty("locator")) $root.google.monitoring.v3.TextLocator.encode(message.locator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (message.message != null && message.hasOwnProperty("message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); return writer; }; @@ -10035,15 +10035,15 @@ TextLocator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) + if (message.source != null && message.hasOwnProperty("source")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); - if (message.startPosition != null && Object.hasOwnProperty.call(message, "startPosition")) + if (message.startPosition != null && message.hasOwnProperty("startPosition")) $root.google.monitoring.v3.TextLocator.Position.encode(message.startPosition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endPosition != null && Object.hasOwnProperty.call(message, "endPosition")) + if (message.endPosition != null && message.hasOwnProperty("endPosition")) $root.google.monitoring.v3.TextLocator.Position.encode(message.endPosition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.nestedLocator != null && Object.hasOwnProperty.call(message, "nestedLocator")) + if (message.nestedLocator != null && message.hasOwnProperty("nestedLocator")) $root.google.monitoring.v3.TextLocator.encode(message.nestedLocator, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nestingReason != null && Object.hasOwnProperty.call(message, "nestingReason")) + if (message.nestingReason != null && message.hasOwnProperty("nestingReason")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.nestingReason); return writer; }; @@ -10296,9 +10296,9 @@ Position.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.line != null && Object.hasOwnProperty.call(message, "line")) + if (message.line != null && message.hasOwnProperty("line")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.line); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) + if (message.column != null && message.hasOwnProperty("column")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.column); return writer; }; @@ -10826,13 +10826,13 @@ ListMonitoredResourceDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; @@ -11066,7 +11066,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 && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -11284,7 +11284,7 @@ GetMonitoredResourceDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -11498,13 +11498,13 @@ ListMetricDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; @@ -11738,7 +11738,7 @@ if (message.metricDescriptors != null && message.metricDescriptors.length) for (var i = 0; i < message.metricDescriptors.length; ++i) $root.google.api.MetricDescriptor.encode(message.metricDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -11956,7 +11956,7 @@ GetMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12152,9 +12152,9 @@ CreateMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metricDescriptor != null && Object.hasOwnProperty.call(message, "metricDescriptor")) + if (message.metricDescriptor != null && message.hasOwnProperty("metricDescriptor")) $root.google.api.MetricDescriptor.encode(message.metricDescriptor, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12358,7 +12358,7 @@ DeleteMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12608,21 +12608,21 @@ ListTimeSeriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + if (message.interval != null && message.hasOwnProperty("interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) + if (message.aggregation != null && message.hasOwnProperty("aggregation")) $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + if (message.orderBy != null && message.hasOwnProperty("orderBy")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) + if (message.view != null && message.hasOwnProperty("view")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); return writer; }; @@ -12854,7 +12854,7 @@ /** * TimeSeriesView enum. * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView - * @enum {number} + * @enum {string} * @property {number} FULL=0 FULL value * @property {number} HEADERS=1 HEADERS value */ @@ -12947,7 +12947,7 @@ if (message.timeSeries != null && message.timeSeries.length) for (var i = 0; i < message.timeSeries.length; ++i) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); if (message.executionErrors != null && message.executionErrors.length) for (var i = 0; i < message.executionErrors.length; ++i) @@ -13212,7 +13212,7 @@ if (message.timeSeries != null && message.timeSeries.length) for (var i = 0; i < message.timeSeries.length; ++i) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -13439,9 +13439,9 @@ CreateTimeSeriesError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (message.status != null && message.hasOwnProperty("status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -13669,9 +13669,9 @@ CreateTimeSeriesSummary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalPointCount != null && Object.hasOwnProperty.call(message, "totalPointCount")) + if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); - if (message.successPointCount != null && Object.hasOwnProperty.call(message, "successPointCount")) + if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) @@ -13910,9 +13910,9 @@ Error.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) + if (message.status != null && message.hasOwnProperty("status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pointCount != null && Object.hasOwnProperty.call(message, "pointCount")) + if (message.pointCount != null && message.hasOwnProperty("pointCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); return writer; }; @@ -14146,13 +14146,13 @@ QueryTimeSeriesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) + if (message.query != null && message.hasOwnProperty("query")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.query); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.pageToken); return writer; }; @@ -14402,12 +14402,12 @@ QueryTimeSeriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesDescriptor != null && Object.hasOwnProperty.call(message, "timeSeriesDescriptor")) + if (message.timeSeriesDescriptor != null && message.hasOwnProperty("timeSeriesDescriptor")) $root.google.monitoring.v3.TimeSeriesDescriptor.encode(message.timeSeriesDescriptor, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.timeSeriesData != null && message.timeSeriesData.length) for (var i = 0; i < message.timeSeriesData.length; ++i) $root.google.monitoring.v3.TimeSeriesData.encode(message.timeSeriesData[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.nextPageToken); if (message.partialErrors != null && message.partialErrors.length) for (var i = 0; i < message.partialErrors.length; ++i) @@ -14689,7 +14689,7 @@ if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) $root.google.monitoring.v3.QueryError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorSummary != null && Object.hasOwnProperty.call(message, "errorSummary")) + if (message.errorSummary != null && message.hasOwnProperty("errorSummary")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorSummary); return writer; }; @@ -14963,11 +14963,11 @@ NotificationChannelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + 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) @@ -14978,9 +14978,9 @@ writer.int32(message.supportedTiers[i]); writer.ldelim(); } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + if (message.launchStage != null && message.hasOwnProperty("launchStage")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; @@ -15392,23 +15392,23 @@ NotificationChannel.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (message.description != null && message.hasOwnProperty("description")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + if (message.labels != null && message.hasOwnProperty("labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + if (message.userLabels != null && message.hasOwnProperty("userLabels")) for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.verificationStatus != null && Object.hasOwnProperty.call(message, "verificationStatus")) + if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + if (message.enabled != null && message.hasOwnProperty("enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -15679,7 +15679,7 @@ /** * VerificationStatus enum. * @name google.monitoring.v3.NotificationChannel.VerificationStatus - * @enum {number} + * @enum {string} * @property {number} VERIFICATION_STATUS_UNSPECIFIED=0 VERIFICATION_STATUS_UNSPECIFIED value * @property {number} UNVERIFIED=1 UNVERIFIED value * @property {number} VERIFIED=2 VERIFIED value @@ -16134,11 +16134,11 @@ ListNotificationChannelDescriptorsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -16361,7 +16361,7 @@ if (message.channelDescriptors != null && message.channelDescriptors.length) for (var i = 0; i < message.channelDescriptors.length; ++i) $root.google.monitoring.v3.NotificationChannelDescriptor.encode(message.channelDescriptors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -16579,7 +16579,7 @@ GetNotificationChannelDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -16775,9 +16775,9 @@ CreateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationChannel != null && Object.hasOwnProperty.call(message, "notificationChannel")) + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -17017,15 +17017,15 @@ ListNotificationChannelsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + if (message.orderBy != null && message.hasOwnProperty("orderBy")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); return writer; }; @@ -17267,7 +17267,7 @@ ListNotificationChannelsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); if (message.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) @@ -17488,7 +17488,7 @@ GetNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -17684,9 +17684,9 @@ UpdateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notificationChannel != null && Object.hasOwnProperty.call(message, "notificationChannel")) + if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -17904,9 +17904,9 @@ DeleteNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) + if (message.force != null && message.hasOwnProperty("force")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; @@ -18105,7 +18105,7 @@ SendNotificationChannelVerificationCodeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -18301,9 +18301,9 @@ GetNotificationChannelVerificationCodeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + if (message.expireTime != null && message.hasOwnProperty("expireTime")) $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -18516,9 +18516,9 @@ GetNotificationChannelVerificationCodeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && message.hasOwnProperty("code")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.code); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + if (message.expireTime != null && message.hasOwnProperty("expireTime")) $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -18731,9 +18731,9 @@ VerifyNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && message.hasOwnProperty("code")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); return writer; }; @@ -19009,21 +19009,21 @@ Service.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + if (message.custom != null && message.hasOwnProperty("custom")) $root.google.monitoring.v3.Service.Custom.encode(message.custom, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appEngine != null && Object.hasOwnProperty.call(message, "appEngine")) + if (message.appEngine != null && message.hasOwnProperty("appEngine")) $root.google.monitoring.v3.Service.AppEngine.encode(message.appEngine, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cloudEndpoints != null && Object.hasOwnProperty.call(message, "cloudEndpoints")) + if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.clusterIstio != null && Object.hasOwnProperty.call(message, "clusterIstio")) + if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.meshIstio != null && Object.hasOwnProperty.call(message, "meshIstio")) + if (message.meshIstio != null && message.hasOwnProperty("meshIstio")) $root.google.monitoring.v3.Service.MeshIstio.encode(message.meshIstio, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.telemetry != null && Object.hasOwnProperty.call(message, "telemetry")) + if (message.telemetry != null && message.hasOwnProperty("telemetry")) $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -19509,7 +19509,7 @@ AppEngine.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.moduleId != null && Object.hasOwnProperty.call(message, "moduleId")) + if (message.moduleId != null && message.hasOwnProperty("moduleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.moduleId); return writer; }; @@ -19696,7 +19696,7 @@ CloudEndpoints.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) + if (message.service != null && message.hasOwnProperty("service")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); return writer; }; @@ -19910,13 +19910,13 @@ ClusterIstio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) + if (message.location != null && message.hasOwnProperty("location")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.clusterName != null && Object.hasOwnProperty.call(message, "clusterName")) + if (message.clusterName != null && message.hasOwnProperty("clusterName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterName); - if (message.serviceNamespace != null && Object.hasOwnProperty.call(message, "serviceNamespace")) + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + if (message.serviceName != null && message.hasOwnProperty("serviceName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); return writer; }; @@ -20155,11 +20155,11 @@ MeshIstio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.meshUid != null && Object.hasOwnProperty.call(message, "meshUid")) + if (message.meshUid != null && message.hasOwnProperty("meshUid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.meshUid); - if (message.serviceNamespace != null && Object.hasOwnProperty.call(message, "serviceNamespace")) + if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) + if (message.serviceName != null && message.hasOwnProperty("serviceName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); return writer; }; @@ -20369,7 +20369,7 @@ Telemetry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + if (message.resourceName != null && message.hasOwnProperty("resourceName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); return writer; }; @@ -20618,17 +20618,17 @@ ServiceLevelObjective.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.serviceLevelIndicator != null && Object.hasOwnProperty.call(message, "serviceLevelIndicator")) + if (message.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) $root.google.monitoring.v3.ServiceLevelIndicator.encode(message.serviceLevelIndicator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.goal != null && Object.hasOwnProperty.call(message, "goal")) + if (message.goal != null && message.hasOwnProperty("goal")) writer.uint32(/* id 4, wireType 1 =*/33).double(message.goal); - if (message.rollingPeriod != null && Object.hasOwnProperty.call(message, "rollingPeriod")) + if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) $root.google.protobuf.Duration.encode(message.rollingPeriod, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.calendarPeriod != null && Object.hasOwnProperty.call(message, "calendarPeriod")) + if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.calendarPeriod); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); return writer; }; @@ -20880,7 +20880,7 @@ /** * View enum. * @name google.monitoring.v3.ServiceLevelObjective.View - * @enum {number} + * @enum {string} * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value * @property {number} FULL=2 FULL value * @property {number} EXPLICIT=1 EXPLICIT value @@ -20984,11 +20984,11 @@ ServiceLevelIndicator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestBased != null && Object.hasOwnProperty.call(message, "requestBased")) + if (message.requestBased != null && message.hasOwnProperty("requestBased")) $root.google.monitoring.v3.RequestBasedSli.encode(message.requestBased, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.windowsBased != null && Object.hasOwnProperty.call(message, "windowsBased")) + if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) $root.google.monitoring.v3.WindowsBasedSli.encode(message.windowsBased, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.basicSli != null && Object.hasOwnProperty.call(message, "basicSli")) + if (message.basicSli != null && message.hasOwnProperty("basicSli")) $root.google.monitoring.v3.BasicSli.encode(message.basicSli, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -21284,9 +21284,9 @@ BasicSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.availability != null && Object.hasOwnProperty.call(message, "availability")) + if (message.availability != null && message.hasOwnProperty("availability")) $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.encode(message.availability, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.latency != null && Object.hasOwnProperty.call(message, "latency")) + if (message.latency != null && message.hasOwnProperty("latency")) $root.google.monitoring.v3.BasicSli.LatencyCriteria.encode(message.latency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) @@ -21749,7 +21749,7 @@ LatencyCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + if (message.threshold != null && message.hasOwnProperty("threshold")) $root.google.protobuf.Duration.encode(message.threshold, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -21953,9 +21953,9 @@ Range.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) + if (message.min != null && message.hasOwnProperty("min")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) + if (message.max != null && message.hasOwnProperty("max")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); return writer; }; @@ -22177,9 +22177,9 @@ RequestBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatio != null && Object.hasOwnProperty.call(message, "goodTotalRatio")) + if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) $root.google.monitoring.v3.TimeSeriesRatio.encode(message.goodTotalRatio, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.distributionCut != null && Object.hasOwnProperty.call(message, "distributionCut")) + if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) $root.google.monitoring.v3.DistributionCut.encode(message.distributionCut, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -22417,11 +22417,11 @@ TimeSeriesRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodServiceFilter != null && Object.hasOwnProperty.call(message, "goodServiceFilter")) + if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.goodServiceFilter); - if (message.badServiceFilter != null && Object.hasOwnProperty.call(message, "badServiceFilter")) + if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.badServiceFilter); - if (message.totalServiceFilter != null && Object.hasOwnProperty.call(message, "totalServiceFilter")) + if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.totalServiceFilter); return writer; }; @@ -22640,9 +22640,9 @@ DistributionCut.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.distributionFilter != null && Object.hasOwnProperty.call(message, "distributionFilter")) + if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.distributionFilter); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) + if (message.range != null && message.hasOwnProperty("range")) $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -22896,15 +22896,15 @@ WindowsBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatioThreshold != null && Object.hasOwnProperty.call(message, "goodTotalRatioThreshold")) + if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.encode(message.goodTotalRatioThreshold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.windowPeriod != null && Object.hasOwnProperty.call(message, "windowPeriod")) + if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) $root.google.protobuf.Duration.encode(message.windowPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.goodBadMetricFilter != null && Object.hasOwnProperty.call(message, "goodBadMetricFilter")) + if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.goodBadMetricFilter); - if (message.metricMeanInRange != null && Object.hasOwnProperty.call(message, "metricMeanInRange")) + if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricMeanInRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metricSumInRange != null && Object.hasOwnProperty.call(message, "metricSumInRange")) + if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricSumInRange, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -23210,11 +23210,11 @@ PerformanceThreshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.performance != null && Object.hasOwnProperty.call(message, "performance")) + if (message.performance != null && message.hasOwnProperty("performance")) $root.google.monitoring.v3.RequestBasedSli.encode(message.performance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + if (message.threshold != null && message.hasOwnProperty("threshold")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.threshold); - if (message.basicSliPerformance != null && Object.hasOwnProperty.call(message, "basicSliPerformance")) + if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) $root.google.monitoring.v3.BasicSli.encode(message.basicSliPerformance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23455,9 +23455,9 @@ MetricRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeSeries); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) + if (message.range != null && message.hasOwnProperty("range")) $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -24047,11 +24047,11 @@ CreateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) + if (message.service != null && message.hasOwnProperty("service")) $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) + if (message.serviceId != null && message.hasOwnProperty("serviceId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceId); return writer; }; @@ -24266,7 +24266,7 @@ GetServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -24480,13 +24480,13 @@ ListServicesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; @@ -24720,7 +24720,7 @@ if (message.services != null && message.services.length) for (var i = 0; i < message.services.length; ++i) $root.google.monitoring.v3.Service.encode(message.services[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -24947,9 +24947,9 @@ UpdateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) + if (message.service != null && message.hasOwnProperty("service")) $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -25158,7 +25158,7 @@ DeleteServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -25363,11 +25363,11 @@ CreateServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.serviceLevelObjective != null && Object.hasOwnProperty.call(message, "serviceLevelObjective")) + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceLevelObjectiveId != null && Object.hasOwnProperty.call(message, "serviceLevelObjectiveId")) + if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceLevelObjectiveId); return writer; }; @@ -25591,9 +25591,9 @@ GetServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) + if (message.view != null && message.hasOwnProperty("view")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; @@ -25846,15 +25846,15 @@ ListServiceLevelObjectivesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) + if (message.view != null && message.hasOwnProperty("view")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); return writer; }; @@ -26117,7 +26117,7 @@ if (message.serviceLevelObjectives != null && message.serviceLevelObjectives.length) for (var i = 0; i < message.serviceLevelObjectives.length; ++i) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjectives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -26344,9 +26344,9 @@ UpdateServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.serviceLevelObjective != null && Object.hasOwnProperty.call(message, "serviceLevelObjective")) + if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -26555,7 +26555,7 @@ DeleteServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -26742,7 +26742,7 @@ SpanContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.spanName != null && Object.hasOwnProperty.call(message, "spanName")) + if (message.spanName != null && message.hasOwnProperty("spanName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanName); return writer; }; @@ -26974,17 +26974,17 @@ InternalChecker.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) + if (message.network != null && message.hasOwnProperty("network")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); - if (message.gcpZone != null && Object.hasOwnProperty.call(message, "gcpZone")) + if (message.gcpZone != null && message.hasOwnProperty("gcpZone")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcpZone); - if (message.peerProjectId != null && Object.hasOwnProperty.call(message, "peerProjectId")) + if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerProjectId); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); return writer; }; @@ -27189,7 +27189,7 @@ /** * State enum. * @name google.monitoring.v3.InternalChecker.State - * @enum {number} + * @enum {string} * @property {number} UNSPECIFIED=0 UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} RUNNING=2 RUNNING value @@ -27208,7 +27208,7 @@ /** * UptimeCheckRegion enum. * @name google.monitoring.v3.UptimeCheckRegion - * @enum {number} + * @enum {string} * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value * @property {number} USA=1 USA value * @property {number} EUROPE=2 EUROPE value @@ -27408,21 +27408,21 @@ UptimeCheckConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) + if (message.monitoredResource != null && message.hasOwnProperty("monitoredResource")) $root.google.api.MonitoredResource.encode(message.monitoredResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) + if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.encode(message.resourceGroup, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.httpCheck != null && Object.hasOwnProperty.call(message, "httpCheck")) + if (message.httpCheck != null && message.hasOwnProperty("httpCheck")) $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.encode(message.httpCheck, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tcpCheck != null && Object.hasOwnProperty.call(message, "tcpCheck")) + if (message.tcpCheck != null && message.hasOwnProperty("tcpCheck")) $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.encode(message.tcpCheck, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.period != null && Object.hasOwnProperty.call(message, "period")) + if (message.period != null && message.hasOwnProperty("period")) $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + if (message.timeout != null && message.hasOwnProperty("timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.contentMatchers != null && message.contentMatchers.length) for (var i = 0; i < message.contentMatchers.length; ++i) @@ -27436,7 +27436,7 @@ if (message.internalCheckers != null && message.internalCheckers.length) for (var i = 0; i < message.internalCheckers.length; ++i) $root.google.monitoring.v3.InternalChecker.encode(message.internalCheckers[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.isInternal != null && Object.hasOwnProperty.call(message, "isInternal")) + if (message.isInternal != null && message.hasOwnProperty("isInternal")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.isInternal); return writer; }; @@ -27895,9 +27895,9 @@ ResourceGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + if (message.groupId != null && message.hasOwnProperty("groupId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + if (message.resourceType != null && message.hasOwnProperty("resourceType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); return writer; }; @@ -28196,26 +28196,26 @@ HttpCheck.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.useSsl != null && Object.hasOwnProperty.call(message, "useSsl")) + if (message.useSsl != null && message.hasOwnProperty("useSsl")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useSsl); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) + if (message.path != null && message.hasOwnProperty("path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) + if (message.port != null && message.hasOwnProperty("port")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); - if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) + if (message.authInfo != null && message.hasOwnProperty("authInfo")) $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.encode(message.authInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maskHeaders != null && Object.hasOwnProperty.call(message, "maskHeaders")) + if (message.maskHeaders != null && message.hasOwnProperty("maskHeaders")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.maskHeaders); - if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) + if (message.headers != null && message.hasOwnProperty("headers")) for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); - if (message.validateSsl != null && Object.hasOwnProperty.call(message, "validateSsl")) + if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.validateSsl); - if (message.requestMethod != null && Object.hasOwnProperty.call(message, "requestMethod")) + if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.requestMethod); - if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + if (message.contentType != null && message.hasOwnProperty("contentType")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.contentType); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (message.body != null && message.hasOwnProperty("body")) writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.body); return writer; }; @@ -28573,9 +28573,9 @@ BasicAuthentication.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) + if (message.username != null && message.hasOwnProperty("username")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) + if (message.password != null && message.hasOwnProperty("password")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); return writer; }; @@ -28721,7 +28721,7 @@ /** * RequestMethod enum. * @name google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod - * @enum {number} + * @enum {string} * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value * @property {number} GET=1 GET value * @property {number} POST=2 POST value @@ -28737,7 +28737,7 @@ /** * ContentType enum. * @name google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType - * @enum {number} + * @enum {string} * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value * @property {number} URL_ENCODED=1 URL_ENCODED value */ @@ -28807,7 +28807,7 @@ TcpCheck.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) + if (message.port != null && message.hasOwnProperty("port")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.port); return writer; }; @@ -29003,9 +29003,9 @@ ContentMatcher.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) + if (message.content != null && message.hasOwnProperty("content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.matcher != null && Object.hasOwnProperty.call(message, "matcher")) + if (message.matcher != null && message.hasOwnProperty("matcher")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matcher); return writer; }; @@ -29176,7 +29176,7 @@ /** * ContentMatcherOption enum. * @name google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption - * @enum {number} + * @enum {string} * @property {number} CONTENT_MATCHER_OPTION_UNSPECIFIED=0 CONTENT_MATCHER_OPTION_UNSPECIFIED value * @property {number} CONTAINS_STRING=1 CONTAINS_STRING value * @property {number} NOT_CONTAINS_STRING=2 NOT_CONTAINS_STRING value @@ -29273,11 +29273,11 @@ UptimeCheckIp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) + if (message.region != null && message.hasOwnProperty("region")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.region); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) + if (message.location != null && message.hasOwnProperty("location")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); return writer; }; @@ -29462,7 +29462,7 @@ /** * GroupResourceType enum. * @name google.monitoring.v3.GroupResourceType - * @enum {number} + * @enum {string} * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value * @property {number} INSTANCE=1 INSTANCE value * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value @@ -29782,11 +29782,11 @@ ListUptimeCheckConfigsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; @@ -30018,9 +30018,9 @@ if (message.uptimeCheckConfigs != null && message.uptimeCheckConfigs.length) for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + if (message.totalSize != null && message.hasOwnProperty("totalSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; @@ -30250,7 +30250,7 @@ GetUptimeCheckConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -30446,9 +30446,9 @@ CreateUptimeCheckConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.uptimeCheckConfig != null && Object.hasOwnProperty.call(message, "uptimeCheckConfig")) + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -30661,9 +30661,9 @@ UpdateUptimeCheckConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uptimeCheckConfig != null && Object.hasOwnProperty.call(message, "uptimeCheckConfig")) + if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -30872,7 +30872,7 @@ DeleteUptimeCheckConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -31068,9 +31068,9 @@ ListUptimeCheckIpsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -31282,7 +31282,7 @@ if (message.uptimeCheckIps != null && message.uptimeCheckIps.length) for (var i = 0; i < message.uptimeCheckIps.length; ++i) $root.google.monitoring.v3.UptimeCheckIp.encode(message.uptimeCheckIps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -31561,18 +31561,18 @@ ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + 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 && Object.hasOwnProperty.call(message, "nameField")) + if (message.nameField != null && message.hasOwnProperty("nameField")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) + if (message.history != null && message.hasOwnProperty("history")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + if (message.plural != null && message.hasOwnProperty("plural")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + if (message.singular != null && message.hasOwnProperty("singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; @@ -31792,7 +31792,7 @@ /** * History enum. * @name google.api.ResourceDescriptor.History - * @enum {number} + * @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 @@ -31873,9 +31873,9 @@ ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + if (message.childType != null && message.hasOwnProperty("childType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; @@ -32130,15 +32130,15 @@ Distribution.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) + if (message.count != null && message.hasOwnProperty("count")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + if (message.mean != null && message.hasOwnProperty("mean")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) + 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 && Object.hasOwnProperty.call(message, "bucketOptions")) + 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(); @@ -32481,9 +32481,9 @@ Range.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) + if (message.min != null && message.hasOwnProperty("min")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) + if (message.max != null && message.hasOwnProperty("max")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); return writer; }; @@ -32714,11 +32714,11 @@ BucketOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) + 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 && Object.hasOwnProperty.call(message, "exponentialBuckets")) + 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 && Object.hasOwnProperty.call(message, "explicitBuckets")) + 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; }; @@ -32976,11 +32976,11 @@ Linear.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) + if (message.width != null && message.hasOwnProperty("width")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + if (message.offset != null && message.hasOwnProperty("offset")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); return writer; }; @@ -33208,11 +33208,11 @@ Exponential.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + if (message.scale != null && message.hasOwnProperty("scale")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); return writer; }; @@ -33655,9 +33655,9 @@ Exemplar.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + 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) @@ -33911,7 +33911,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 && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -34225,26 +34225,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (message.selector != null && message.hasOwnProperty("selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) + if (message.get != null && message.hasOwnProperty("get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) + if (message.put != null && message.hasOwnProperty("put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) + if (message.post != null && message.hasOwnProperty("post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + if (message["delete"] != null && message.hasOwnProperty("delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + if (message.patch != null && message.hasOwnProperty("patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (message.body != null && message.hasOwnProperty("body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + 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 && Object.hasOwnProperty.call(message, "responseBody")) + if (message.responseBody != null && message.hasOwnProperty("responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -34601,9 +34601,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + if (message.kind != null && message.hasOwnProperty("kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) + if (message.path != null && message.hasOwnProperty("path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -34749,7 +34749,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {number} + * @enum {string} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -34870,18 +34870,18 @@ MonitoredResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + 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 && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + if (message.launchStage != null && message.hasOwnProperty("launchStage")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.launchStage); return writer; }; @@ -35187,9 +35187,9 @@ MonitoredResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + 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; @@ -35418,9 +35418,9 @@ MonitoredResourceMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemLabels != null && Object.hasOwnProperty.call(message, "systemLabels")) + 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 && Object.hasOwnProperty.call(message, "userLabels")) + 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; @@ -35662,11 +35662,11 @@ LabelDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (message.key != null && message.hasOwnProperty("key")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + if (message.valueType != null && message.hasOwnProperty("valueType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (message.description != null && message.hasOwnProperty("description")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); return writer; }; @@ -35838,7 +35838,7 @@ /** * ValueType enum. * @name google.api.LabelDescriptor.ValueType - * @enum {number} + * @enum {string} * @property {number} STRING=0 STRING value * @property {number} BOOL=1 BOOL value * @property {number} INT64=2 INT64 value @@ -35857,7 +35857,7 @@ /** * LaunchStage enum. * @name google.api.LaunchStage - * @enum {number} + * @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 @@ -36014,26 +36014,26 @@ MetricDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + 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 && Object.hasOwnProperty.call(message, "metricKind")) + if (message.metricKind != null && message.hasOwnProperty("metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + if (message.valueType != null && message.hasOwnProperty("valueType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + if (message.unit != null && message.hasOwnProperty("unit")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) + if (message.description != null && message.hasOwnProperty("description")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + 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 && Object.hasOwnProperty.call(message, "launchStage")) + if (message.launchStage != null && message.hasOwnProperty("launchStage")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); return writer; }; @@ -36454,11 +36454,11 @@ MetricDescriptorMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + if (message.launchStage != null && message.hasOwnProperty("launchStage")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + 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 && Object.hasOwnProperty.call(message, "ingestDelay")) + 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; }; @@ -36658,7 +36658,7 @@ /** * MetricKind enum. * @name google.api.MetricDescriptor.MetricKind - * @enum {number} + * @enum {string} * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value * @property {number} GAUGE=1 GAUGE value * @property {number} DELTA=2 DELTA value @@ -36676,7 +36676,7 @@ /** * ValueType enum. * @name google.api.MetricDescriptor.ValueType - * @enum {number} + * @enum {string} * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value * @property {number} BOOL=1 BOOL value * @property {number} INT64=2 INT64 value @@ -36766,10 +36766,10 @@ Metric.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + 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 && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; @@ -37313,9 +37313,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + 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) @@ -37332,9 +37332,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 && Object.hasOwnProperty.call(message, "options")) + 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 && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + 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) @@ -37342,7 +37342,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 && Object.hasOwnProperty.call(message, "syntax")) + if (message.syntax != null && message.hasOwnProperty("syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -37880,7 +37880,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + 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) @@ -37897,7 +37897,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 && Object.hasOwnProperty.call(message, "options")) + 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) @@ -38362,11 +38362,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + 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; }; @@ -38590,9 +38590,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -39083,25 +39083,25 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && message.hasOwnProperty("extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && message.hasOwnProperty("label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + if (message.typeName != null && message.hasOwnProperty("typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + 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 && Object.hasOwnProperty.call(message, "oneofIndex")) + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + if (message.jsonName != null && message.hasOwnProperty("jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); return writer; }; @@ -39448,7 +39448,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} + * @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 @@ -39494,7 +39494,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} + * @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 @@ -39575,9 +39575,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + 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; }; @@ -39820,12 +39820,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + 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 && Object.hasOwnProperty.call(message, "options")) + 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) @@ -40128,9 +40128,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -40350,11 +40350,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + 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; }; @@ -40588,12 +40588,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + 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 && Object.hasOwnProperty.call(message, "options")) + 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; }; @@ -40873,17 +40873,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + if (message.inputType != null && message.hasOwnProperty("inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + if (message.outputType != null && message.hasOwnProperty("outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + 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 && Object.hasOwnProperty.call(message, "clientStreaming")) + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -41322,45 +41322,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + if (message.goPackage != null && message.hasOwnProperty("goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + 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) @@ -41787,7 +41787,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} + * @enum {string} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -41905,18 +41905,18 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + 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 && Object.hasOwnProperty.call(message, ".google.api.resource")) + 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; }; @@ -42258,17 +42258,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (message.ctype != null && message.hasOwnProperty("ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && message.hasOwnProperty("packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + if (message.lazy != null && message.hasOwnProperty("lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + if (message.jstype != null && message.hasOwnProperty("jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + 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) @@ -42279,7 +42279,7 @@ writer.int32(message[".google.api.fieldBehavior"][i]); writer.ldelim(); } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + 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; }; @@ -42615,7 +42615,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {number} + * @enum {string} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -42631,7 +42631,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {number} + * @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 @@ -42930,9 +42930,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + 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) @@ -43175,7 +43175,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + 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) @@ -43424,14 +43424,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + 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 && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + 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 && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + 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; }; @@ -43710,9 +43710,9 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + 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) @@ -43720,7 +43720,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 && Object.hasOwnProperty.call(message, ".google.api.http")) + 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; }; @@ -43954,7 +43954,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} + * @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 @@ -44084,17 +44084,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 && Object.hasOwnProperty.call(message, "identifierValue")) + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -44871,9 +44871,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + 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) @@ -45404,11 +45404,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + if (message.begin != null && message.hasOwnProperty("begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -45661,9 +45661,9 @@ Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + if (message.type_url != null && message.hasOwnProperty("type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; @@ -45880,9 +45880,9 @@ Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (message.seconds != null && message.hasOwnProperty("seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -46104,9 +46104,9 @@ Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (message.seconds != null && message.hasOwnProperty("seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -46319,7 +46319,7 @@ DoubleValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; }; @@ -46506,7 +46506,7 @@ FloatValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; }; @@ -46693,7 +46693,7 @@ Int64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; }; @@ -46894,7 +46894,7 @@ UInt64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; }; @@ -47095,7 +47095,7 @@ Int32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); return writer; }; @@ -47282,7 +47282,7 @@ UInt32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; }; @@ -47469,7 +47469,7 @@ BoolValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); return writer; }; @@ -47656,7 +47656,7 @@ StringValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; @@ -47843,7 +47843,7 @@ BytesValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; }; @@ -48040,7 +48040,7 @@ Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + 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(); @@ -48313,17 +48313,17 @@ Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + if (message.nullValue != null && message.hasOwnProperty("nullValue")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + if (message.numberValue != null && message.hasOwnProperty("numberValue")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + if (message.boolValue != null && message.hasOwnProperty("boolValue")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + 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 && Object.hasOwnProperty.call(message, "listValue")) + 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; }; @@ -48566,7 +48566,7 @@ /** * NullValue enum. * @name google.protobuf.NullValue - * @enum {number} + * @enum {string} * @property {number} NULL_VALUE=0 NULL_VALUE value */ protobuf.NullValue = (function() { @@ -49233,9 +49233,9 @@ Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && message.hasOwnProperty("code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + 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) @@ -49427,7 +49427,7 @@ /** * CalendarPeriod enum. * @name google.type.CalendarPeriod - * @enum {number} + * @enum {string} * @property {number} CALENDAR_PERIOD_UNSPECIFIED=0 CALENDAR_PERIOD_UNSPECIFIED value * @property {number} DAY=1 DAY value * @property {number} WEEK=2 WEEK value diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 487bab751d0..61a560f7ea6 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "c956dade7f103dc785ccb4d3c65b09e287f49199" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", - "internalRef": "307114445" + "remote": "git@github.com:googleapis/nodejs-monitoring.git", + "sha": "6866afc07f6e9f6256193f6f71bc3c29bc78087d" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts index c24ec72d2f6..4d82ca932e4 100644 --- a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts @@ -299,9 +299,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getAlertPolicy(request); - }, expectedError); + await assert.rejects(client.getAlertPolicy(request), expectedError); assert( (client.innerApiCalls.getAlertPolicy as SinonStub) .getCall(0) @@ -413,9 +411,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createAlertPolicy(request); - }, expectedError); + await assert.rejects(client.createAlertPolicy(request), expectedError); assert( (client.innerApiCalls.createAlertPolicy as SinonStub) .getCall(0) @@ -527,9 +523,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteAlertPolicy(request); - }, expectedError); + await assert.rejects(client.deleteAlertPolicy(request), expectedError); assert( (client.innerApiCalls.deleteAlertPolicy as SinonStub) .getCall(0) @@ -644,9 +638,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateAlertPolicy(request); - }, expectedError); + await assert.rejects(client.updateAlertPolicy(request), expectedError); assert( (client.innerApiCalls.updateAlertPolicy as SinonStub) .getCall(0) @@ -762,9 +754,7 @@ describe('v3.AlertPolicyServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listAlertPolicies(request); - }, expectedError); + await assert.rejects(client.listAlertPolicies(request), expectedError); assert( (client.innerApiCalls.listAlertPolicies as SinonStub) .getCall(0) @@ -855,9 +845,7 @@ describe('v3.AlertPolicyServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listAlertPolicies.createStream as SinonStub) .getCall(0) diff --git a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts index f3c32c5e8b2..b96b4217407 100644 --- a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts @@ -294,9 +294,7 @@ describe('v3.GroupServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getGroup = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getGroup(request); - }, expectedError); + await assert.rejects(client.getGroup(request), expectedError); assert( (client.innerApiCalls.getGroup as SinonStub) .getCall(0) @@ -408,9 +406,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createGroup(request); - }, expectedError); + await assert.rejects(client.createGroup(request), expectedError); assert( (client.innerApiCalls.createGroup as SinonStub) .getCall(0) @@ -525,9 +521,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateGroup(request); - }, expectedError); + await assert.rejects(client.updateGroup(request), expectedError); assert( (client.innerApiCalls.updateGroup as SinonStub) .getCall(0) @@ -639,9 +633,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteGroup(request); - }, expectedError); + await assert.rejects(client.deleteGroup(request), expectedError); assert( (client.innerApiCalls.deleteGroup as SinonStub) .getCall(0) @@ -757,9 +749,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listGroups(request); - }, expectedError); + await assert.rejects(client.listGroups(request), expectedError); assert( (client.innerApiCalls.listGroups as SinonStub) .getCall(0) @@ -843,9 +833,7 @@ describe('v3.GroupServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listGroups.createStream as SinonStub) .getCall(0) @@ -1043,9 +1031,7 @@ describe('v3.GroupServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listGroupMembers(request); - }, expectedError); + await assert.rejects(client.listGroupMembers(request), expectedError); assert( (client.innerApiCalls.listGroupMembers as SinonStub) .getCall(0) @@ -1130,9 +1116,7 @@ describe('v3.GroupServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listGroupMembers.createStream as SinonStub) .getCall(0) diff --git a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts index 6821da4a04c..3a95c9ae2b1 100644 --- a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts @@ -299,9 +299,10 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getMonitoredResourceDescriptor(request); - }, expectedError); + await assert.rejects( + client.getMonitoredResourceDescriptor(request), + expectedError + ); assert( (client.innerApiCalls.getMonitoredResourceDescriptor as SinonStub) .getCall(0) @@ -415,9 +416,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getMetricDescriptor(request); - }, expectedError); + await assert.rejects(client.getMetricDescriptor(request), expectedError); assert( (client.innerApiCalls.getMetricDescriptor as SinonStub) .getCall(0) @@ -531,9 +530,10 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createMetricDescriptor(request); - }, expectedError); + await assert.rejects( + client.createMetricDescriptor(request), + expectedError + ); assert( (client.innerApiCalls.createMetricDescriptor as SinonStub) .getCall(0) @@ -647,9 +647,10 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteMetricDescriptor(request); - }, expectedError); + await assert.rejects( + client.deleteMetricDescriptor(request), + expectedError + ); assert( (client.innerApiCalls.deleteMetricDescriptor as SinonStub) .getCall(0) @@ -761,9 +762,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createTimeSeries(request); - }, expectedError); + await assert.rejects(client.createTimeSeries(request), expectedError); assert( (client.innerApiCalls.createTimeSeries as SinonStub) .getCall(0) @@ -893,9 +892,10 @@ describe('v3.MetricServiceClient', () => { 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) @@ -996,9 +996,7 @@ describe('v3.MetricServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listMonitoredResourceDescriptors .createStream as SinonStub) @@ -1209,9 +1207,10 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listMetricDescriptors(request); - }, expectedError); + await assert.rejects( + client.listMetricDescriptors(request), + expectedError + ); assert( (client.innerApiCalls.listMetricDescriptors as SinonStub) .getCall(0) @@ -1297,9 +1296,7 @@ describe('v3.MetricServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listMetricDescriptors .createStream as SinonStub) @@ -1499,9 +1496,7 @@ describe('v3.MetricServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listTimeSeries(request); - }, expectedError); + await assert.rejects(client.listTimeSeries(request), expectedError); assert( (client.innerApiCalls.listTimeSeries as SinonStub) .getCall(0) @@ -1592,9 +1587,7 @@ describe('v3.MetricServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listTimeSeries.createStream as SinonStub) .getCall(0) diff --git a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts index 1df6a1f9b52..5caefabc0f7 100644 --- a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts @@ -320,9 +320,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getNotificationChannelDescriptor(request); - }, expectedError); + await assert.rejects( + client.getNotificationChannelDescriptor(request), + expectedError + ); assert( (client.innerApiCalls.getNotificationChannelDescriptor as SinonStub) .getCall(0) @@ -442,9 +443,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getNotificationChannel(request); - }, expectedError); + await assert.rejects( + client.getNotificationChannel(request), + expectedError + ); assert( (client.innerApiCalls.getNotificationChannel as SinonStub) .getCall(0) @@ -564,9 +566,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createNotificationChannel(request); - }, expectedError); + await assert.rejects( + client.createNotificationChannel(request), + expectedError + ); assert( (client.innerApiCalls.createNotificationChannel as SinonStub) .getCall(0) @@ -689,9 +692,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateNotificationChannel(request); - }, expectedError); + await assert.rejects( + client.updateNotificationChannel(request), + expectedError + ); assert( (client.innerApiCalls.updateNotificationChannel as SinonStub) .getCall(0) @@ -811,9 +815,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteNotificationChannel(request); - }, expectedError); + await assert.rejects( + client.deleteNotificationChannel(request), + expectedError + ); assert( (client.innerApiCalls.deleteNotificationChannel as SinonStub) .getCall(0) @@ -937,9 +942,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.sendNotificationChannelVerificationCode(request); - }, expectedError); + await assert.rejects( + client.sendNotificationChannelVerificationCode(request), + expectedError + ); assert( (client.innerApiCalls .sendNotificationChannelVerificationCode as SinonStub) @@ -1064,9 +1070,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getNotificationChannelVerificationCode(request); - }, expectedError); + await assert.rejects( + client.getNotificationChannelVerificationCode(request), + expectedError + ); assert( (client.innerApiCalls .getNotificationChannelVerificationCode as SinonStub) @@ -1187,9 +1194,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.verifyNotificationChannel(request); - }, expectedError); + await assert.rejects( + client.verifyNotificationChannel(request), + expectedError + ); assert( (client.innerApiCalls.verifyNotificationChannel as SinonStub) .getCall(0) @@ -1329,9 +1337,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listNotificationChannelDescriptors(request); - }, expectedError); + await assert.rejects( + client.listNotificationChannelDescriptors(request), + expectedError + ); assert( (client.innerApiCalls.listNotificationChannelDescriptors as SinonStub) .getCall(0) @@ -1440,9 +1449,7 @@ describe('v3.NotificationChannelServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listNotificationChannelDescriptors .createStream as SinonStub) @@ -1675,9 +1682,10 @@ describe('v3.NotificationChannelServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listNotificationChannels(request); - }, expectedError); + await assert.rejects( + client.listNotificationChannels(request), + expectedError + ); assert( (client.innerApiCalls.listNotificationChannels as SinonStub) .getCall(0) @@ -1779,9 +1787,7 @@ describe('v3.NotificationChannelServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listNotificationChannels .createStream as SinonStub) diff --git a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts index 4b915b6d377..431c0d00138 100644 --- a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts @@ -318,9 +318,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createService(request); - }, expectedError); + await assert.rejects(client.createService(request), expectedError); assert( (client.innerApiCalls.createService as SinonStub) .getCall(0) @@ -438,9 +436,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getService(request); - }, expectedError); + await assert.rejects(client.getService(request), expectedError); assert( (client.innerApiCalls.getService as SinonStub) .getCall(0) @@ -561,9 +557,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateService(request); - }, expectedError); + await assert.rejects(client.updateService(request), expectedError); assert( (client.innerApiCalls.updateService as SinonStub) .getCall(0) @@ -681,9 +675,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteService(request); - }, expectedError); + await assert.rejects(client.deleteService(request), expectedError); assert( (client.innerApiCalls.deleteService as SinonStub) .getCall(0) @@ -803,9 +795,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createServiceLevelObjective(request); - }, expectedError); + await assert.rejects( + client.createServiceLevelObjective(request), + expectedError + ); assert( (client.innerApiCalls.createServiceLevelObjective as SinonStub) .getCall(0) @@ -925,9 +918,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getServiceLevelObjective(request); - }, expectedError); + await assert.rejects( + client.getServiceLevelObjective(request), + expectedError + ); assert( (client.innerApiCalls.getServiceLevelObjective as SinonStub) .getCall(0) @@ -1050,9 +1044,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateServiceLevelObjective(request); - }, expectedError); + await assert.rejects( + client.updateServiceLevelObjective(request), + expectedError + ); assert( (client.innerApiCalls.updateServiceLevelObjective as SinonStub) .getCall(0) @@ -1172,9 +1167,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteServiceLevelObjective(request); - }, expectedError); + await assert.rejects( + client.deleteServiceLevelObjective(request), + expectedError + ); assert( (client.innerApiCalls.deleteServiceLevelObjective as SinonStub) .getCall(0) @@ -1296,9 +1292,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listServices(request); - }, expectedError); + await assert.rejects(client.listServices(request), expectedError); assert( (client.innerApiCalls.listServices as SinonStub) .getCall(0) @@ -1387,9 +1381,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listServices.createStream as SinonStub) .getCall(0) @@ -1612,9 +1604,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listServiceLevelObjectives(request); - }, expectedError); + await assert.rejects( + client.listServiceLevelObjectives(request), + expectedError + ); assert( (client.innerApiCalls.listServiceLevelObjectives as SinonStub) .getCall(0) @@ -1716,9 +1709,7 @@ describe('v3.ServiceMonitoringServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listServiceLevelObjectives .createStream as SinonStub) diff --git a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts index c02e471cb80..a50fd767fd6 100644 --- a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts @@ -301,9 +301,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getUptimeCheckConfig(request); - }, expectedError); + await assert.rejects(client.getUptimeCheckConfig(request), expectedError); assert( (client.innerApiCalls.getUptimeCheckConfig as SinonStub) .getCall(0) @@ -417,9 +415,10 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createUptimeCheckConfig(request); - }, expectedError); + await assert.rejects( + client.createUptimeCheckConfig(request), + expectedError + ); assert( (client.innerApiCalls.createUptimeCheckConfig as SinonStub) .getCall(0) @@ -536,9 +535,10 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateUptimeCheckConfig(request); - }, expectedError); + await assert.rejects( + client.updateUptimeCheckConfig(request), + expectedError + ); assert( (client.innerApiCalls.updateUptimeCheckConfig as SinonStub) .getCall(0) @@ -652,9 +652,10 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteUptimeCheckConfig(request); - }, expectedError); + await assert.rejects( + client.deleteUptimeCheckConfig(request), + expectedError + ); assert( (client.innerApiCalls.deleteUptimeCheckConfig as SinonStub) .getCall(0) @@ -784,9 +785,10 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listUptimeCheckConfigs(request); - }, expectedError); + await assert.rejects( + client.listUptimeCheckConfigs(request), + expectedError + ); assert( (client.innerApiCalls.listUptimeCheckConfigs as SinonStub) .getCall(0) @@ -884,9 +886,7 @@ describe('v3.UptimeCheckServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listUptimeCheckConfigs .createStream as SinonStub) @@ -1070,9 +1070,7 @@ describe('v3.UptimeCheckServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listUptimeCheckIps(request); - }, expectedError); + await assert.rejects(client.listUptimeCheckIps(request), expectedError); assert( (client.innerApiCalls.listUptimeCheckIps as SinonStub) .getCall(0) @@ -1152,9 +1150,7 @@ describe('v3.UptimeCheckServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listUptimeCheckIps.createStream as SinonStub) .getCall(0) From a708a6de94c8241104f20ec289adbdf30230ce90 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 6 May 2020 13:34:16 -0700 Subject: [PATCH 298/422] refactor!: Drop support for TimeSeriesQueryLanguageCondition as an alert condition type BREAKING_CHANGE: Removing TimeSeriesQueryLanguageCondition as an alert condition type. The condition type is unsupported and unused. It was originally added for the Monitoring Query Language Alpha feature. --- .../protos/google/monitoring/v3/alert.proto | 18 - .../protos/protos.d.ts | 104 +- .../google-cloud-monitoring/protos/protos.js | 1264 +++++++---------- .../protos/protos.json | 19 +- .../google-cloud-monitoring/synth.metadata | 12 +- 5 files changed, 522 insertions(+), 895 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 830a514d1f9..6662304d706 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -215,19 +215,6 @@ message AlertPolicy { Trigger trigger = 3; } - // A condition type that allows alert policies to be defined using - // Monitoring Query Language. - message TimeSeriesQueryLanguageCondition { - // Monitoring Query Language query that generates time series data and - // describes a condition for alerting on that data. - string query = 1; - - // A short explanation of what the query represents. For example: - // - // "Error ratio exceeds 15% for >5% of servers in >2 regions" - string summary = 2; - } - // Required if the condition exists. The unique resource name for this // condition. Its format is: // @@ -268,11 +255,6 @@ message AlertPolicy { // A condition that checks that a time series continues to // receive new data points. MetricAbsence condition_absent = 2; - - // A condition that uses the Monitoring Query Language to define - // alerts. - // If set, no other conditions can be present. - TimeSeriesQueryLanguageCondition condition_time_series_query_language = 14; } } diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index f9d88bfaf34..37434fe1367 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -285,9 +285,6 @@ export namespace google { /** Condition conditionAbsent */ conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); - - /** Condition conditionTimeSeriesQueryLanguage */ - conditionTimeSeriesQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null); } /** Represents a Condition. */ @@ -311,11 +308,8 @@ export namespace google { /** Condition conditionAbsent. */ public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); - /** Condition conditionTimeSeriesQueryLanguage. */ - public conditionTimeSeriesQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null); - /** Condition condition. */ - public condition?: ("conditionThreshold"|"conditionAbsent"|"conditionTimeSeriesQueryLanguage"); + public condition?: ("conditionThreshold"|"conditionAbsent"); /** * Creates a new Condition instance using the specified properties. @@ -728,102 +722,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** Properties of a TimeSeriesQueryLanguageCondition. */ - interface ITimeSeriesQueryLanguageCondition { - - /** TimeSeriesQueryLanguageCondition query */ - query?: (string|null); - - /** TimeSeriesQueryLanguageCondition summary */ - summary?: (string|null); - } - - /** Represents a TimeSeriesQueryLanguageCondition. */ - class TimeSeriesQueryLanguageCondition implements ITimeSeriesQueryLanguageCondition { - - /** - * Constructs a new TimeSeriesQueryLanguageCondition. - * @param [properties] Properties to set - */ - constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition); - - /** TimeSeriesQueryLanguageCondition query. */ - public query: string; - - /** TimeSeriesQueryLanguageCondition summary. */ - public summary: string; - - /** - * Creates a new TimeSeriesQueryLanguageCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeSeriesQueryLanguageCondition instance - */ - public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; - - /** - * Encodes the specified TimeSeriesQueryLanguageCondition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. - * @param message TimeSeriesQueryLanguageCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeSeriesQueryLanguageCondition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. - * @param message TimeSeriesQueryLanguageCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeSeriesQueryLanguageCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; - - /** - * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeSeriesQueryLanguageCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; - - /** - * Verifies a TimeSeriesQueryLanguageCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TimeSeriesQueryLanguageCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeSeriesQueryLanguageCondition - */ - public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition; - - /** - * Creates a plain object from a TimeSeriesQueryLanguageCondition message. Also converts values to other types if specified. - * @param message TimeSeriesQueryLanguageCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeSeriesQueryLanguageCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** ConditionCombinerType enum. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index be668108446..c120a65984c 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -206,30 +206,30 @@ AlertPolicy.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.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.combiner != null && message.hasOwnProperty("combiner")) + if (message.combiner != null && Object.hasOwnProperty.call(message, "combiner")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.combiner); - if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + if (message.creationRecord != null && Object.hasOwnProperty.call(message, "creationRecord")) $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) + if (message.mutationRecord != null && Object.hasOwnProperty.call(message, "mutationRecord")) $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecord, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.conditions != null && message.conditions.length) for (var i = 0; i < message.conditions.length; ++i) $root.google.monitoring.v3.AlertPolicy.Condition.encode(message.conditions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.documentation != null && message.hasOwnProperty("documentation")) + if (message.documentation != null && Object.hasOwnProperty.call(message, "documentation")) $root.google.monitoring.v3.AlertPolicy.Documentation.encode(message.documentation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).string(message.notificationChannels[i]); - 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 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.validity != null && message.hasOwnProperty("validity")) + if (message.validity != null && Object.hasOwnProperty.call(message, "validity")) $root.google.rpc.Status.encode(message.validity, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -636,9 +636,9 @@ Documentation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); return writer; }; @@ -791,7 +791,6 @@ * @property {string|null} [displayName] Condition displayName * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null} [conditionThreshold] Condition conditionThreshold * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null} [conditionAbsent] Condition conditionAbsent - * @property {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null} [conditionTimeSeriesQueryLanguage] Condition conditionTimeSeriesQueryLanguage */ /** @@ -841,25 +840,17 @@ */ Condition.prototype.conditionAbsent = null; - /** - * Condition conditionTimeSeriesQueryLanguage. - * @member {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition|null|undefined} conditionTimeSeriesQueryLanguage - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @instance - */ - Condition.prototype.conditionTimeSeriesQueryLanguage = null; - // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Condition condition. - * @member {"conditionThreshold"|"conditionAbsent"|"conditionTimeSeriesQueryLanguage"|undefined} condition + * @member {"conditionThreshold"|"conditionAbsent"|undefined} condition * @memberof google.monitoring.v3.AlertPolicy.Condition * @instance */ Object.defineProperty(Condition.prototype, "condition", { - get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent", "conditionTimeSeriesQueryLanguage"]), + get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent"]), set: $util.oneOfSetter($oneOfFields) }); @@ -887,16 +878,14 @@ Condition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conditionThreshold != null && message.hasOwnProperty("conditionThreshold")) + if (message.conditionThreshold != null && Object.hasOwnProperty.call(message, "conditionThreshold")) $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.encode(message.conditionThreshold, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conditionAbsent != null && message.hasOwnProperty("conditionAbsent")) + if (message.conditionAbsent != null && Object.hasOwnProperty.call(message, "conditionAbsent")) $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.encode(message.conditionAbsent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); - if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) - $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.encode(message.conditionTimeSeriesQueryLanguage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -943,9 +932,6 @@ case 2: message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); break; - case 14: - message.conditionTimeSeriesQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -1006,16 +992,6 @@ return "conditionAbsent." + error; } } - if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) { - if (properties.condition === 1) - return "condition: multiple values"; - properties.condition = 1; - { - var error = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify(message.conditionTimeSeriesQueryLanguage); - if (error) - return "conditionTimeSeriesQueryLanguage." + error; - } - } return null; }; @@ -1045,11 +1021,6 @@ throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionAbsent: object expected"); message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.fromObject(object.conditionAbsent); } - if (object.conditionTimeSeriesQueryLanguage != null) { - if (typeof object.conditionTimeSeriesQueryLanguage !== "object") - throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionTimeSeriesQueryLanguage: object expected"); - message.conditionTimeSeriesQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.fromObject(object.conditionTimeSeriesQueryLanguage); - } return message; }; @@ -1084,11 +1055,6 @@ object.displayName = message.displayName; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.conditionTimeSeriesQueryLanguage != null && message.hasOwnProperty("conditionTimeSeriesQueryLanguage")) { - object.conditionTimeSeriesQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.toObject(message.conditionTimeSeriesQueryLanguage, options); - if (options.oneofs) - object.condition = "conditionTimeSeriesQueryLanguage"; - } return object; }; @@ -1182,9 +1148,9 @@ Trigger.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).int32(message.count); - if (message.percent != null && message.hasOwnProperty("percent")) + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.percent); return writer; }; @@ -1457,20 +1423,20 @@ MetricThreshold.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.comparison != null && message.hasOwnProperty("comparison")) + if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.comparison); - if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) + if (message.thresholdValue != null && Object.hasOwnProperty.call(message, "thresholdValue")) writer.uint32(/* id 5, wireType 1 =*/41).double(message.thresholdValue); - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.trigger != null && message.hasOwnProperty("trigger")) + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.aggregations != null && message.aggregations.length) for (var i = 0; i < message.aggregations.length; ++i) $root.google.monitoring.v3.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.denominatorFilter != null && message.hasOwnProperty("denominatorFilter")) + if (message.denominatorFilter != null && Object.hasOwnProperty.call(message, "denominatorFilter")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.denominatorFilter); if (message.denominatorAggregations != null && message.denominatorAggregations.length) for (var i = 0; i < message.denominatorAggregations.length; ++i) @@ -1854,11 +1820,11 @@ MetricAbsence.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 1, wireType 2 =*/10).string(message.filter); - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trigger != null && message.hasOwnProperty("trigger")) + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.aggregations != null && message.aggregations.length) for (var i = 0; i < message.aggregations.length; ++i) @@ -2056,223 +2022,13 @@ return MetricAbsence; })(); - Condition.TimeSeriesQueryLanguageCondition = (function() { - - /** - * Properties of a TimeSeriesQueryLanguageCondition. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @interface ITimeSeriesQueryLanguageCondition - * @property {string|null} [query] TimeSeriesQueryLanguageCondition query - * @property {string|null} [summary] TimeSeriesQueryLanguageCondition summary - */ - - /** - * Constructs a new TimeSeriesQueryLanguageCondition. - * @memberof google.monitoring.v3.AlertPolicy.Condition - * @classdesc Represents a TimeSeriesQueryLanguageCondition. - * @implements ITimeSeriesQueryLanguageCondition - * @constructor - * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition=} [properties] Properties to set - */ - function TimeSeriesQueryLanguageCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimeSeriesQueryLanguageCondition query. - * @member {string} query - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @instance - */ - TimeSeriesQueryLanguageCondition.prototype.query = ""; - - /** - * TimeSeriesQueryLanguageCondition summary. - * @member {string} summary - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @instance - */ - TimeSeriesQueryLanguageCondition.prototype.summary = ""; - - /** - * Creates a new TimeSeriesQueryLanguageCondition instance using the specified properties. - * @function create - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition=} [properties] Properties to set - * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition instance - */ - TimeSeriesQueryLanguageCondition.create = function create(properties) { - return new TimeSeriesQueryLanguageCondition(properties); - }; - - /** - * Encodes the specified TimeSeriesQueryLanguageCondition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. - * @function encode - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition} message TimeSeriesQueryLanguageCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesQueryLanguageCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && message.hasOwnProperty("query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.summary != null && message.hasOwnProperty("summary")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.summary); - return writer; - }; - - /** - * Encodes the specified TimeSeriesQueryLanguageCondition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.ITimeSeriesQueryLanguageCondition} message TimeSeriesQueryLanguageCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeriesQueryLanguageCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer. - * @function decode - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesQueryLanguageCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query = reader.string(); - break; - case 2: - message.summary = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeSeriesQueryLanguageCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeSeriesQueryLanguageCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeSeriesQueryLanguageCondition message. - * @function verify - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeSeriesQueryLanguageCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - return null; - }; - - /** - * Creates a TimeSeriesQueryLanguageCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {Object.} object Plain object - * @returns {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} TimeSeriesQueryLanguageCondition - */ - TimeSeriesQueryLanguageCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition) - return object; - var message = new $root.google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition(); - if (object.query != null) - message.query = String(object.query); - if (object.summary != null) - message.summary = String(object.summary); - return message; - }; - - /** - * Creates a plain object from a TimeSeriesQueryLanguageCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @static - * @param {google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition} message TimeSeriesQueryLanguageCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeriesQueryLanguageCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.query = ""; - object.summary = ""; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - return object; - }; - - /** - * Converts this TimeSeriesQueryLanguageCondition to JSON. - * @function toJSON - * @memberof google.monitoring.v3.AlertPolicy.Condition.TimeSeriesQueryLanguageCondition - * @instance - * @returns {Object.} JSON object - */ - TimeSeriesQueryLanguageCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TimeSeriesQueryLanguageCondition; - })(); - return Condition; })(); /** * ConditionCombinerType enum. * @name google.monitoring.v3.AlertPolicy.ConditionCombinerType - * @enum {string} + * @enum {number} * @property {number} COMBINE_UNSPECIFIED=0 COMBINE_UNSPECIFIED value * @property {number} AND=1 AND value * @property {number} OR=2 OR value @@ -2396,15 +2152,15 @@ TypedValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && message.hasOwnProperty("int64Value")) + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.distributionValue != null && message.hasOwnProperty("distributionValue")) + if (message.distributionValue != null && Object.hasOwnProperty.call(message, "distributionValue")) $root.google.api.Distribution.encode(message.distributionValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -2688,9 +2444,9 @@ TimeInterval.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) + 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 && message.hasOwnProperty("endTime")) + 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(); return writer; }; @@ -2927,11 +2683,11 @@ Aggregation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) + if (message.alignmentPeriod != null && Object.hasOwnProperty.call(message, "alignmentPeriod")) $root.google.protobuf.Duration.encode(message.alignmentPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) + if (message.perSeriesAligner != null && Object.hasOwnProperty.call(message, "perSeriesAligner")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.perSeriesAligner); - if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) + if (message.crossSeriesReducer != null && Object.hasOwnProperty.call(message, "crossSeriesReducer")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.crossSeriesReducer); if (message.groupByFields != null && message.groupByFields.length) for (var i = 0; i < message.groupByFields.length; ++i) @@ -3290,7 +3046,7 @@ /** * Aligner enum. * @name google.monitoring.v3.Aggregation.Aligner - * @enum {string} + * @enum {number} * @property {number} ALIGN_NONE=0 ALIGN_NONE value * @property {number} ALIGN_DELTA=1 ALIGN_DELTA value * @property {number} ALIGN_RATE=2 ALIGN_RATE value @@ -3338,7 +3094,7 @@ /** * Reducer enum. * @name google.monitoring.v3.Aggregation.Reducer - * @enum {string} + * @enum {number} * @property {number} REDUCE_NONE=0 REDUCE_NONE value * @property {number} REDUCE_MEAN=1 REDUCE_MEAN value * @property {number} REDUCE_MIN=2 REDUCE_MIN value @@ -3379,7 +3135,7 @@ /** * ComparisonType enum. * @name google.monitoring.v3.ComparisonType - * @enum {string} + * @enum {number} * @property {number} COMPARISON_UNSPECIFIED=0 COMPARISON_UNSPECIFIED value * @property {number} COMPARISON_GT=1 COMPARISON_GT value * @property {number} COMPARISON_GE=2 COMPARISON_GE value @@ -3403,7 +3159,7 @@ /** * ServiceTier enum. * @name google.monitoring.v3.ServiceTier - * @enum {string} + * @enum {number} * @property {number} SERVICE_TIER_UNSPECIFIED=0 SERVICE_TIER_UNSPECIFIED value * @property {number} SERVICE_TIER_BASIC=1 SERVICE_TIER_BASIC value * @property {number} SERVICE_TIER_PREMIUM=2 SERVICE_TIER_PREMIUM value @@ -3481,9 +3237,9 @@ MutationRecord.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mutateTime != null && message.hasOwnProperty("mutateTime")) + if (message.mutateTime != null && Object.hasOwnProperty.call(message, "mutateTime")) $root.google.protobuf.Timestamp.encode(message.mutateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mutatedBy != null && message.hasOwnProperty("mutatedBy")) + if (message.mutatedBy != null && Object.hasOwnProperty.call(message, "mutatedBy")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.mutatedBy); return writer; }; @@ -3896,9 +3652,9 @@ CreateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + if (message.alertPolicy != null && Object.hasOwnProperty.call(message, "alertPolicy")) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -4102,7 +3858,7 @@ GetAlertPolicyRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -4325,15 +4081,15 @@ ListAlertPoliciesRequest.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 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); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - 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.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); return writer; }; @@ -4575,7 +4331,7 @@ ListAlertPoliciesResponse.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.alertPolicies != null && message.alertPolicies.length) for (var i = 0; i < message.alertPolicies.length; ++i) @@ -4805,9 +4561,9 @@ UpdateAlertPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.alertPolicy != null && message.hasOwnProperty("alertPolicy")) + if (message.alertPolicy != null && Object.hasOwnProperty.call(message, "alertPolicy")) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -5016,7 +4772,7 @@ DeleteAlertPolicyRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -5204,7 +4960,7 @@ DroppedLabels.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) for (var keys = Object.keys(message.label), i = 0; i < keys.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.label[keys[i]]).ldelim(); return writer; @@ -5447,15 +5203,15 @@ Group.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.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.parentName != null && message.hasOwnProperty("parentName")) + if (message.parentName != null && Object.hasOwnProperty.call(message, "parentName")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.parentName); - 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.isCluster != null && message.hasOwnProperty("isCluster")) + if (message.isCluster != null && Object.hasOwnProperty.call(message, "isCluster")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isCluster); return writer; }; @@ -5979,17 +5735,17 @@ ListGroupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.childrenOfGroup != null && message.hasOwnProperty("childrenOfGroup")) + if (message.childrenOfGroup != null && Object.hasOwnProperty.call(message, "childrenOfGroup")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childrenOfGroup); - if (message.ancestorsOfGroup != null && message.hasOwnProperty("ancestorsOfGroup")) + if (message.ancestorsOfGroup != null && Object.hasOwnProperty.call(message, "ancestorsOfGroup")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorsOfGroup); - if (message.descendantsOfGroup != null && message.hasOwnProperty("descendantsOfGroup")) + if (message.descendantsOfGroup != null && Object.hasOwnProperty.call(message, "descendantsOfGroup")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.descendantsOfGroup); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -6262,7 +6018,7 @@ if (message.group != null && message.group.length) for (var i = 0; i < message.group.length; ++i) $root.google.monitoring.v3.Group.encode(message.group[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; }; @@ -6480,7 +6236,7 @@ GetGroupRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -6685,11 +6441,11 @@ CreateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && message.hasOwnProperty("group")) + if (message.group != null && Object.hasOwnProperty.call(message, "group")) $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -6913,9 +6669,9 @@ UpdateGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.group != null && message.hasOwnProperty("group")) + if (message.group != null && Object.hasOwnProperty.call(message, "group")) $root.google.monitoring.v3.Group.encode(message.group, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; @@ -7128,9 +6884,9 @@ DeleteGroupRequest.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 3, wireType 2 =*/26).string(message.name); - if (message.recursive != null && message.hasOwnProperty("recursive")) + if (message.recursive != null && Object.hasOwnProperty.call(message, "recursive")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.recursive); return writer; }; @@ -7365,15 +7121,15 @@ ListGroupMembersRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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.interval != null && message.hasOwnProperty("interval")) + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -7632,9 +7388,9 @@ if (message.members != null && message.members.length) for (var i = 0; i < message.members.length; ++i) $root.google.api.MonitoredResource.encode(message.members[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); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; @@ -7873,9 +7629,9 @@ Point.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.interval != null && message.hasOwnProperty("interval")) + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) $root.google.monitoring.v3.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8130,18 +7886,18 @@ TimeSeries.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metric != null && message.hasOwnProperty("metric")) + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) $root.google.api.Metric.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).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 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.points != null && message.points.length) for (var i = 0; i < message.points.length; ++i) $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -8747,11 +8503,11 @@ ValueDescriptor.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.metricKind != null && message.hasOwnProperty("metricKind")) + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); return writer; }; @@ -9287,7 +9043,7 @@ if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) $root.google.monitoring.v3.TypedValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeInterval != null && message.hasOwnProperty("timeInterval")) + if (message.timeInterval != null && Object.hasOwnProperty.call(message, "timeInterval")) $root.google.monitoring.v3.TimeInterval.encode(message.timeInterval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -9545,11 +9301,11 @@ LabelValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boolValue != null && message.hasOwnProperty("boolValue")) + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); - if (message.int64Value != null && message.hasOwnProperty("int64Value")) + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.int64Value); - 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); return writer; }; @@ -9793,9 +9549,9 @@ QueryError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.locator != null && message.hasOwnProperty("locator")) + if (message.locator != null && Object.hasOwnProperty.call(message, "locator")) $root.google.monitoring.v3.TextLocator.encode(message.locator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - 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); return writer; }; @@ -10035,15 +9791,15 @@ TextLocator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && Object.hasOwnProperty.call(message, "source")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); - if (message.startPosition != null && message.hasOwnProperty("startPosition")) + if (message.startPosition != null && Object.hasOwnProperty.call(message, "startPosition")) $root.google.monitoring.v3.TextLocator.Position.encode(message.startPosition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endPosition != null && message.hasOwnProperty("endPosition")) + if (message.endPosition != null && Object.hasOwnProperty.call(message, "endPosition")) $root.google.monitoring.v3.TextLocator.Position.encode(message.endPosition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.nestedLocator != null && message.hasOwnProperty("nestedLocator")) + if (message.nestedLocator != null && Object.hasOwnProperty.call(message, "nestedLocator")) $root.google.monitoring.v3.TextLocator.encode(message.nestedLocator, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nestingReason != null && message.hasOwnProperty("nestingReason")) + if (message.nestingReason != null && Object.hasOwnProperty.call(message, "nestingReason")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.nestingReason); return writer; }; @@ -10296,9 +10052,9 @@ Position.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.line != null && message.hasOwnProperty("line")) + if (message.line != null && Object.hasOwnProperty.call(message, "line")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.line); - if (message.column != null && message.hasOwnProperty("column")) + if (message.column != null && Object.hasOwnProperty.call(message, "column")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.column); return writer; }; @@ -10826,13 +10582,13 @@ ListMonitoredResourceDescriptorsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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); return writer; }; @@ -11066,7 +10822,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; }; @@ -11284,7 +11040,7 @@ GetMonitoredResourceDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -11498,13 +11254,13 @@ ListMetricDescriptorsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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); return writer; }; @@ -11738,7 +11494,7 @@ if (message.metricDescriptors != null && message.metricDescriptors.length) for (var i = 0; i < message.metricDescriptors.length; ++i) $root.google.api.MetricDescriptor.encode(message.metricDescriptors[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; }; @@ -11956,7 +11712,7 @@ GetMetricDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12152,9 +11908,9 @@ CreateMetricDescriptorRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12358,7 +12114,7 @@ DeleteMetricDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -12608,21 +12364,21 @@ ListTimeSeriesRequest.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.interval != null && message.hasOwnProperty("interval")) + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) $root.google.monitoring.v3.TimeInterval.encode(message.interval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.aggregation != null && message.hasOwnProperty("aggregation")) + if (message.aggregation != null && Object.hasOwnProperty.call(message, "aggregation")) $root.google.monitoring.v3.Aggregation.encode(message.aggregation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); return writer; }; @@ -12854,7 +12610,7 @@ /** * TimeSeriesView enum. * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView - * @enum {string} + * @enum {number} * @property {number} FULL=0 FULL value * @property {number} HEADERS=1 HEADERS value */ @@ -12947,7 +12703,7 @@ if (message.timeSeries != null && message.timeSeries.length) for (var i = 0; i < message.timeSeries.length; ++i) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[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); if (message.executionErrors != null && message.executionErrors.length) for (var i = 0; i < message.executionErrors.length; ++i) @@ -13212,7 +12968,7 @@ if (message.timeSeries != null && message.timeSeries.length) for (var i = 0; i < message.timeSeries.length; ++i) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -13439,9 +13195,9 @@ CreateTimeSeriesError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) $root.google.monitoring.v3.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -13669,9 +13425,9 @@ CreateTimeSeriesSummary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalPointCount != null && message.hasOwnProperty("totalPointCount")) + if (message.totalPointCount != null && Object.hasOwnProperty.call(message, "totalPointCount")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalPointCount); - if (message.successPointCount != null && message.hasOwnProperty("successPointCount")) + if (message.successPointCount != null && Object.hasOwnProperty.call(message, "successPointCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successPointCount); if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) @@ -13910,9 +13666,9 @@ Error.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pointCount != null && message.hasOwnProperty("pointCount")) + if (message.pointCount != null && Object.hasOwnProperty.call(message, "pointCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pointCount); return writer; }; @@ -14146,13 +13902,13 @@ QueryTimeSeriesRequest.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.query != null && message.hasOwnProperty("query")) + if (message.query != null && Object.hasOwnProperty.call(message, "query")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.query); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.pageToken); return writer; }; @@ -14402,12 +14158,12 @@ QueryTimeSeriesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeriesDescriptor != null && message.hasOwnProperty("timeSeriesDescriptor")) + if (message.timeSeriesDescriptor != null && Object.hasOwnProperty.call(message, "timeSeriesDescriptor")) $root.google.monitoring.v3.TimeSeriesDescriptor.encode(message.timeSeriesDescriptor, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.timeSeriesData != null && message.timeSeriesData.length) for (var i = 0; i < message.timeSeriesData.length; ++i) $root.google.monitoring.v3.TimeSeriesData.encode(message.timeSeriesData[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.nextPageToken); if (message.partialErrors != null && message.partialErrors.length) for (var i = 0; i < message.partialErrors.length; ++i) @@ -14689,7 +14445,7 @@ if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) $root.google.monitoring.v3.QueryError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorSummary != null && message.hasOwnProperty("errorSummary")) + if (message.errorSummary != null && Object.hasOwnProperty.call(message, "errorSummary")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorSummary); return writer; }; @@ -14963,11 +14719,11 @@ NotificationChannelDescriptor.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) @@ -14978,9 +14734,9 @@ writer.int32(message.supportedTiers[i]); writer.ldelim(); } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 6, wireType 2 =*/50).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; }; @@ -15392,23 +15148,23 @@ NotificationChannel.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 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - 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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - 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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) + if (message.verificationStatus != null && Object.hasOwnProperty.call(message, "verificationStatus")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); - if (message.enabled != null && message.hasOwnProperty("enabled")) + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -15679,7 +15435,7 @@ /** * VerificationStatus enum. * @name google.monitoring.v3.NotificationChannel.VerificationStatus - * @enum {string} + * @enum {number} * @property {number} VERIFICATION_STATUS_UNSPECIFIED=0 VERIFICATION_STATUS_UNSPECIFIED value * @property {number} UNVERIFIED=1 UNVERIFIED value * @property {number} VERIFIED=2 VERIFIED value @@ -16134,11 +15890,11 @@ ListNotificationChannelDescriptorsRequest.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 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); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -16361,7 +16117,7 @@ if (message.channelDescriptors != null && message.channelDescriptors.length) for (var i = 0; i < message.channelDescriptors.length; ++i) $root.google.monitoring.v3.NotificationChannelDescriptor.encode(message.channelDescriptors[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; }; @@ -16579,7 +16335,7 @@ GetNotificationChannelDescriptorRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -16775,9 +16531,9 @@ CreateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + if (message.notificationChannel != null && Object.hasOwnProperty.call(message, "notificationChannel")) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -17017,15 +16773,15 @@ ListNotificationChannelsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - 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.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.filter); - if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); return writer; }; @@ -17267,7 +17023,7 @@ ListNotificationChannelsResponse.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.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) @@ -17488,7 +17244,7 @@ GetNotificationChannelRequest.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 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -17684,9 +17440,9 @@ UpdateNotificationChannelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.notificationChannel != null && message.hasOwnProperty("notificationChannel")) + if (message.notificationChannel != null && Object.hasOwnProperty.call(message, "notificationChannel")) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -17904,9 +17660,9 @@ DeleteNotificationChannelRequest.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 3, wireType 2 =*/26).string(message.name); - if (message.force != null && message.hasOwnProperty("force")) + if (message.force != null && Object.hasOwnProperty.call(message, "force")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; @@ -18105,7 +17861,7 @@ SendNotificationChannelVerificationCodeRequest.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; }; @@ -18301,9 +18057,9 @@ GetNotificationChannelVerificationCodeRequest.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.expireTime != null && message.hasOwnProperty("expireTime")) + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -18516,9 +18272,9 @@ GetNotificationChannelVerificationCodeResponse.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 2 =*/10).string(message.code); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -18731,9 +18487,9 @@ VerifyNotificationChannelRequest.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.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); return writer; }; @@ -19009,21 +18765,21 @@ Service.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.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.custom != null && message.hasOwnProperty("custom")) + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) $root.google.monitoring.v3.Service.Custom.encode(message.custom, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appEngine != null && message.hasOwnProperty("appEngine")) + if (message.appEngine != null && Object.hasOwnProperty.call(message, "appEngine")) $root.google.monitoring.v3.Service.AppEngine.encode(message.appEngine, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.cloudEndpoints != null && message.hasOwnProperty("cloudEndpoints")) + if (message.cloudEndpoints != null && Object.hasOwnProperty.call(message, "cloudEndpoints")) $root.google.monitoring.v3.Service.CloudEndpoints.encode(message.cloudEndpoints, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.clusterIstio != null && message.hasOwnProperty("clusterIstio")) + if (message.clusterIstio != null && Object.hasOwnProperty.call(message, "clusterIstio")) $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.meshIstio != null && message.hasOwnProperty("meshIstio")) + if (message.meshIstio != null && Object.hasOwnProperty.call(message, "meshIstio")) $root.google.monitoring.v3.Service.MeshIstio.encode(message.meshIstio, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.telemetry != null && message.hasOwnProperty("telemetry")) + if (message.telemetry != null && Object.hasOwnProperty.call(message, "telemetry")) $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -19509,7 +19265,7 @@ AppEngine.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.moduleId != null && message.hasOwnProperty("moduleId")) + if (message.moduleId != null && Object.hasOwnProperty.call(message, "moduleId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.moduleId); return writer; }; @@ -19696,7 +19452,7 @@ CloudEndpoints.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); return writer; }; @@ -19910,13 +19666,13 @@ ClusterIstio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.clusterName != null && message.hasOwnProperty("clusterName")) + if (message.clusterName != null && Object.hasOwnProperty.call(message, "clusterName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterName); - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (message.serviceNamespace != null && Object.hasOwnProperty.call(message, "serviceNamespace")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); return writer; }; @@ -20155,11 +19911,11 @@ MeshIstio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.meshUid != null && message.hasOwnProperty("meshUid")) + if (message.meshUid != null && Object.hasOwnProperty.call(message, "meshUid")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.meshUid); - if (message.serviceNamespace != null && message.hasOwnProperty("serviceNamespace")) + if (message.serviceNamespace != null && Object.hasOwnProperty.call(message, "serviceNamespace")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNamespace); - if (message.serviceName != null && message.hasOwnProperty("serviceName")) + if (message.serviceName != null && Object.hasOwnProperty.call(message, "serviceName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.serviceName); return writer; }; @@ -20369,7 +20125,7 @@ Telemetry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); return writer; }; @@ -20618,17 +20374,17 @@ ServiceLevelObjective.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.serviceLevelIndicator != null && message.hasOwnProperty("serviceLevelIndicator")) + if (message.serviceLevelIndicator != null && Object.hasOwnProperty.call(message, "serviceLevelIndicator")) $root.google.monitoring.v3.ServiceLevelIndicator.encode(message.serviceLevelIndicator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.goal != null && message.hasOwnProperty("goal")) + if (message.goal != null && Object.hasOwnProperty.call(message, "goal")) writer.uint32(/* id 4, wireType 1 =*/33).double(message.goal); - if (message.rollingPeriod != null && message.hasOwnProperty("rollingPeriod")) + if (message.rollingPeriod != null && Object.hasOwnProperty.call(message, "rollingPeriod")) $root.google.protobuf.Duration.encode(message.rollingPeriod, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) + if (message.calendarPeriod != null && Object.hasOwnProperty.call(message, "calendarPeriod")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.calendarPeriod); - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); return writer; }; @@ -20880,7 +20636,7 @@ /** * View enum. * @name google.monitoring.v3.ServiceLevelObjective.View - * @enum {string} + * @enum {number} * @property {number} VIEW_UNSPECIFIED=0 VIEW_UNSPECIFIED value * @property {number} FULL=2 FULL value * @property {number} EXPLICIT=1 EXPLICIT value @@ -20984,11 +20740,11 @@ ServiceLevelIndicator.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requestBased != null && message.hasOwnProperty("requestBased")) + if (message.requestBased != null && Object.hasOwnProperty.call(message, "requestBased")) $root.google.monitoring.v3.RequestBasedSli.encode(message.requestBased, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.windowsBased != null && message.hasOwnProperty("windowsBased")) + if (message.windowsBased != null && Object.hasOwnProperty.call(message, "windowsBased")) $root.google.monitoring.v3.WindowsBasedSli.encode(message.windowsBased, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.basicSli != null && message.hasOwnProperty("basicSli")) + if (message.basicSli != null && Object.hasOwnProperty.call(message, "basicSli")) $root.google.monitoring.v3.BasicSli.encode(message.basicSli, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -21284,9 +21040,9 @@ BasicSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.availability != null && message.hasOwnProperty("availability")) + if (message.availability != null && Object.hasOwnProperty.call(message, "availability")) $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.encode(message.availability, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.latency != null && message.hasOwnProperty("latency")) + if (message.latency != null && Object.hasOwnProperty.call(message, "latency")) $root.google.monitoring.v3.BasicSli.LatencyCriteria.encode(message.latency, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) @@ -21749,7 +21505,7 @@ LatencyCriteria.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threshold != null && message.hasOwnProperty("threshold")) + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) $root.google.protobuf.Duration.encode(message.threshold, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -21953,9 +21709,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; }; @@ -22177,9 +21933,9 @@ RequestBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatio != null && message.hasOwnProperty("goodTotalRatio")) + if (message.goodTotalRatio != null && Object.hasOwnProperty.call(message, "goodTotalRatio")) $root.google.monitoring.v3.TimeSeriesRatio.encode(message.goodTotalRatio, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.distributionCut != null && message.hasOwnProperty("distributionCut")) + if (message.distributionCut != null && Object.hasOwnProperty.call(message, "distributionCut")) $root.google.monitoring.v3.DistributionCut.encode(message.distributionCut, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -22417,11 +22173,11 @@ TimeSeriesRatio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodServiceFilter != null && message.hasOwnProperty("goodServiceFilter")) + if (message.goodServiceFilter != null && Object.hasOwnProperty.call(message, "goodServiceFilter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.goodServiceFilter); - if (message.badServiceFilter != null && message.hasOwnProperty("badServiceFilter")) + if (message.badServiceFilter != null && Object.hasOwnProperty.call(message, "badServiceFilter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.badServiceFilter); - if (message.totalServiceFilter != null && message.hasOwnProperty("totalServiceFilter")) + if (message.totalServiceFilter != null && Object.hasOwnProperty.call(message, "totalServiceFilter")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.totalServiceFilter); return writer; }; @@ -22640,9 +22396,9 @@ DistributionCut.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.distributionFilter != null && message.hasOwnProperty("distributionFilter")) + if (message.distributionFilter != null && Object.hasOwnProperty.call(message, "distributionFilter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.distributionFilter); - if (message.range != null && message.hasOwnProperty("range")) + if (message.range != null && Object.hasOwnProperty.call(message, "range")) $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -22896,15 +22652,15 @@ WindowsBasedSli.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.goodTotalRatioThreshold != null && message.hasOwnProperty("goodTotalRatioThreshold")) + if (message.goodTotalRatioThreshold != null && Object.hasOwnProperty.call(message, "goodTotalRatioThreshold")) $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.encode(message.goodTotalRatioThreshold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.windowPeriod != null && message.hasOwnProperty("windowPeriod")) + if (message.windowPeriod != null && Object.hasOwnProperty.call(message, "windowPeriod")) $root.google.protobuf.Duration.encode(message.windowPeriod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.goodBadMetricFilter != null && message.hasOwnProperty("goodBadMetricFilter")) + if (message.goodBadMetricFilter != null && Object.hasOwnProperty.call(message, "goodBadMetricFilter")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.goodBadMetricFilter); - if (message.metricMeanInRange != null && message.hasOwnProperty("metricMeanInRange")) + if (message.metricMeanInRange != null && Object.hasOwnProperty.call(message, "metricMeanInRange")) $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricMeanInRange, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metricSumInRange != null && message.hasOwnProperty("metricSumInRange")) + if (message.metricSumInRange != null && Object.hasOwnProperty.call(message, "metricSumInRange")) $root.google.monitoring.v3.WindowsBasedSli.MetricRange.encode(message.metricSumInRange, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -23210,11 +22966,11 @@ PerformanceThreshold.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.performance != null && message.hasOwnProperty("performance")) + if (message.performance != null && Object.hasOwnProperty.call(message, "performance")) $root.google.monitoring.v3.RequestBasedSli.encode(message.performance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.threshold != null && message.hasOwnProperty("threshold")) + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) writer.uint32(/* id 2, wireType 1 =*/17).double(message.threshold); - if (message.basicSliPerformance != null && message.hasOwnProperty("basicSliPerformance")) + if (message.basicSliPerformance != null && Object.hasOwnProperty.call(message, "basicSliPerformance")) $root.google.monitoring.v3.BasicSli.encode(message.basicSliPerformance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23455,9 +23211,9 @@ MetricRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.timeSeries); - if (message.range != null && message.hasOwnProperty("range")) + if (message.range != null && Object.hasOwnProperty.call(message, "range")) $root.google.monitoring.v3.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -24047,11 +23803,11 @@ CreateServiceRequest.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.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceId != null && message.hasOwnProperty("serviceId")) + if (message.serviceId != null && Object.hasOwnProperty.call(message, "serviceId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceId); return writer; }; @@ -24266,7 +24022,7 @@ GetServiceRequest.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; }; @@ -24480,13 +24236,13 @@ ListServicesRequest.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.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; @@ -24720,7 +24476,7 @@ if (message.services != null && message.services.length) for (var i = 0; i < message.services.length; ++i) $root.google.monitoring.v3.Service.encode(message.services[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; }; @@ -24947,9 +24703,9 @@ UpdateServiceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && message.hasOwnProperty("service")) + if (message.service != null && Object.hasOwnProperty.call(message, "service")) $root.google.monitoring.v3.Service.encode(message.service, writer.uint32(/* id 1, wireType 2 =*/10).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 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -25158,7 +24914,7 @@ DeleteServiceRequest.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; }; @@ -25363,11 +25119,11 @@ CreateServiceLevelObjectiveRequest.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.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + if (message.serviceLevelObjective != null && Object.hasOwnProperty.call(message, "serviceLevelObjective")) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serviceLevelObjectiveId != null && message.hasOwnProperty("serviceLevelObjectiveId")) + if (message.serviceLevelObjectiveId != null && Object.hasOwnProperty.call(message, "serviceLevelObjectiveId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceLevelObjectiveId); return writer; }; @@ -25591,9 +25347,9 @@ GetServiceLevelObjectiveRequest.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.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; @@ -25846,15 +25602,15 @@ ListServiceLevelObjectivesRequest.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.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.view != null && message.hasOwnProperty("view")) + if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); return writer; }; @@ -26117,7 +25873,7 @@ if (message.serviceLevelObjectives != null && message.serviceLevelObjectives.length) for (var i = 0; i < message.serviceLevelObjectives.length; ++i) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjectives[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; }; @@ -26344,9 +26100,9 @@ UpdateServiceLevelObjectiveRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.serviceLevelObjective != null && message.hasOwnProperty("serviceLevelObjective")) + if (message.serviceLevelObjective != null && Object.hasOwnProperty.call(message, "serviceLevelObjective")) $root.google.monitoring.v3.ServiceLevelObjective.encode(message.serviceLevelObjective, writer.uint32(/* id 1, wireType 2 =*/10).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 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -26555,7 +26311,7 @@ DeleteServiceLevelObjectiveRequest.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; }; @@ -26742,7 +26498,7 @@ SpanContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.spanName != null && message.hasOwnProperty("spanName")) + if (message.spanName != null && Object.hasOwnProperty.call(message, "spanName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanName); return writer; }; @@ -26974,17 +26730,17 @@ InternalChecker.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.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.network != null && message.hasOwnProperty("network")) + if (message.network != null && Object.hasOwnProperty.call(message, "network")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); - if (message.gcpZone != null && message.hasOwnProperty("gcpZone")) + if (message.gcpZone != null && Object.hasOwnProperty.call(message, "gcpZone")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcpZone); - if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) + if (message.peerProjectId != null && Object.hasOwnProperty.call(message, "peerProjectId")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerProjectId); - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); return writer; }; @@ -27189,7 +26945,7 @@ /** * State enum. * @name google.monitoring.v3.InternalChecker.State - * @enum {string} + * @enum {number} * @property {number} UNSPECIFIED=0 UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} RUNNING=2 RUNNING value @@ -27208,7 +26964,7 @@ /** * UptimeCheckRegion enum. * @name google.monitoring.v3.UptimeCheckRegion - * @enum {string} + * @enum {number} * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value * @property {number} USA=1 USA value * @property {number} EUROPE=2 EUROPE value @@ -27408,21 +27164,21 @@ UptimeCheckConfig.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.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.monitoredResource != null && message.hasOwnProperty("monitoredResource")) + if (message.monitoredResource != null && Object.hasOwnProperty.call(message, "monitoredResource")) $root.google.api.MonitoredResource.encode(message.monitoredResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup")) + if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.encode(message.resourceGroup, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.httpCheck != null && message.hasOwnProperty("httpCheck")) + if (message.httpCheck != null && Object.hasOwnProperty.call(message, "httpCheck")) $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.encode(message.httpCheck, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tcpCheck != null && message.hasOwnProperty("tcpCheck")) + if (message.tcpCheck != null && Object.hasOwnProperty.call(message, "tcpCheck")) $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.encode(message.tcpCheck, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.period != null && message.hasOwnProperty("period")) + if (message.period != null && Object.hasOwnProperty.call(message, "period")) $root.google.protobuf.Duration.encode(message.period, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.contentMatchers != null && message.contentMatchers.length) for (var i = 0; i < message.contentMatchers.length; ++i) @@ -27436,7 +27192,7 @@ if (message.internalCheckers != null && message.internalCheckers.length) for (var i = 0; i < message.internalCheckers.length; ++i) $root.google.monitoring.v3.InternalChecker.encode(message.internalCheckers[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.isInternal != null && message.hasOwnProperty("isInternal")) + if (message.isInternal != null && Object.hasOwnProperty.call(message, "isInternal")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.isInternal); return writer; }; @@ -27895,9 +27651,9 @@ ResourceGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupId != null && message.hasOwnProperty("groupId")) + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId); - if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resourceType); return writer; }; @@ -28196,26 +27952,26 @@ HttpCheck.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.useSsl != null && message.hasOwnProperty("useSsl")) + if (message.useSsl != null && Object.hasOwnProperty.call(message, "useSsl")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useSsl); - 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); - if (message.port != null && message.hasOwnProperty("port")) + if (message.port != null && Object.hasOwnProperty.call(message, "port")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); - if (message.authInfo != null && message.hasOwnProperty("authInfo")) + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.encode(message.authInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.maskHeaders != null && message.hasOwnProperty("maskHeaders")) + if (message.maskHeaders != null && Object.hasOwnProperty.call(message, "maskHeaders")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.maskHeaders); - if (message.headers != null && message.hasOwnProperty("headers")) + if (message.headers != null && Object.hasOwnProperty.call(message, "headers")) for (var keys = Object.keys(message.headers), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.headers[keys[i]]).ldelim(); - if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) + if (message.validateSsl != null && Object.hasOwnProperty.call(message, "validateSsl")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.validateSsl); - if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) + if (message.requestMethod != null && Object.hasOwnProperty.call(message, "requestMethod")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.requestMethod); - if (message.contentType != null && message.hasOwnProperty("contentType")) + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.contentType); - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.body); return writer; }; @@ -28573,9 +28329,9 @@ BasicAuthentication.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && Object.hasOwnProperty.call(message, "username")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); - if (message.password != null && message.hasOwnProperty("password")) + if (message.password != null && Object.hasOwnProperty.call(message, "password")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); return writer; }; @@ -28721,7 +28477,7 @@ /** * RequestMethod enum. * @name google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod - * @enum {string} + * @enum {number} * @property {number} METHOD_UNSPECIFIED=0 METHOD_UNSPECIFIED value * @property {number} GET=1 GET value * @property {number} POST=2 POST value @@ -28737,7 +28493,7 @@ /** * ContentType enum. * @name google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType - * @enum {string} + * @enum {number} * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value * @property {number} URL_ENCODED=1 URL_ENCODED value */ @@ -28807,7 +28563,7 @@ TcpCheck.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.port != null && message.hasOwnProperty("port")) + if (message.port != null && Object.hasOwnProperty.call(message, "port")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.port); return writer; }; @@ -29003,9 +28759,9 @@ ContentMatcher.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); - if (message.matcher != null && message.hasOwnProperty("matcher")) + if (message.matcher != null && Object.hasOwnProperty.call(message, "matcher")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.matcher); return writer; }; @@ -29176,7 +28932,7 @@ /** * ContentMatcherOption enum. * @name google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption - * @enum {string} + * @enum {number} * @property {number} CONTENT_MATCHER_OPTION_UNSPECIFIED=0 CONTENT_MATCHER_OPTION_UNSPECIFIED value * @property {number} CONTAINS_STRING=1 CONTAINS_STRING value * @property {number} NOT_CONTAINS_STRING=2 NOT_CONTAINS_STRING value @@ -29273,11 +29029,11 @@ UptimeCheckIp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.region != null && message.hasOwnProperty("region")) + if (message.region != null && Object.hasOwnProperty.call(message, "region")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.region); - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); return writer; }; @@ -29462,7 +29218,7 @@ /** * GroupResourceType enum. * @name google.monitoring.v3.GroupResourceType - * @enum {string} + * @enum {number} * @property {number} RESOURCE_TYPE_UNSPECIFIED=0 RESOURCE_TYPE_UNSPECIFIED value * @property {number} INSTANCE=1 INSTANCE value * @property {number} AWS_ELB_LOAD_BALANCER=2 AWS_ELB_LOAD_BALANCER value @@ -29782,11 +29538,11 @@ ListUptimeCheckConfigsRequest.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 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; @@ -30018,9 +29774,9 @@ if (message.uptimeCheckConfigs != null && message.uptimeCheckConfigs.length) for (var i = 0; i < message.uptimeCheckConfigs.length; ++i) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfigs[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); - if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); return writer; }; @@ -30250,7 +30006,7 @@ GetUptimeCheckConfigRequest.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; }; @@ -30446,9 +30202,9 @@ CreateUptimeCheckConfigRequest.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.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + if (message.uptimeCheckConfig != null && Object.hasOwnProperty.call(message, "uptimeCheckConfig")) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -30661,9 +30417,9 @@ UpdateUptimeCheckConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uptimeCheckConfig != null && message.hasOwnProperty("uptimeCheckConfig")) + if (message.uptimeCheckConfig != null && Object.hasOwnProperty.call(message, "uptimeCheckConfig")) $root.google.monitoring.v3.UptimeCheckConfig.encode(message.uptimeCheckConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -30872,7 +30628,7 @@ DeleteUptimeCheckConfigRequest.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; }; @@ -31068,9 +30824,9 @@ ListUptimeCheckIpsRequest.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 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; }; @@ -31282,7 +31038,7 @@ if (message.uptimeCheckIps != null && message.uptimeCheckIps.length) for (var i = 0; i < message.uptimeCheckIps.length; ++i) $root.google.monitoring.v3.UptimeCheckIp.encode(message.uptimeCheckIps[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; }; @@ -31561,18 +31317,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; }; @@ -31792,7 +31548,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 @@ -31873,9 +31629,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; }; @@ -32130,15 +31886,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(); @@ -32481,9 +32237,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; }; @@ -32714,11 +32470,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; }; @@ -32976,11 +32732,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; }; @@ -33208,11 +32964,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; }; @@ -33655,9 +33411,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) @@ -33911,7 +33667,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; }; @@ -34225,26 +33981,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; }; @@ -34601,9 +34357,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; }; @@ -34749,7 +34505,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 @@ -34870,18 +34626,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; }; @@ -35187,9 +34943,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; @@ -35418,9 +35174,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; @@ -35662,11 +35418,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; }; @@ -35838,7 +35594,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 @@ -35857,7 +35613,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 @@ -36014,26 +35770,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; }; @@ -36454,11 +36210,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; }; @@ -36658,7 +36414,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 @@ -36676,7 +36432,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 @@ -36766,10 +36522,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; }; @@ -37313,9 +37069,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) @@ -37332,9 +37088,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) @@ -37342,7 +37098,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; }; @@ -37880,7 +37636,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) @@ -37897,7 +37653,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) @@ -38362,11 +38118,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; }; @@ -38590,9 +38346,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; }; @@ -39083,25 +38839,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; }; @@ -39448,7 +39204,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 @@ -39494,7 +39250,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 @@ -39575,9 +39331,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; }; @@ -39820,12 +39576,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) @@ -40128,9 +39884,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; }; @@ -40350,11 +40106,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; }; @@ -40588,12 +40344,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; }; @@ -40873,17 +40629,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; }; @@ -41322,45 +41078,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) @@ -41787,7 +41543,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 @@ -41905,18 +41661,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; }; @@ -42258,17 +42014,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) @@ -42279,7 +42035,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; }; @@ -42615,7 +42371,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 @@ -42631,7 +42387,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 @@ -42930,9 +42686,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) @@ -43175,7 +42931,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) @@ -43424,14 +43180,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; }; @@ -43710,9 +43466,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) @@ -43720,7 +43476,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; }; @@ -43954,7 +43710,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 @@ -44084,17 +43840,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; }; @@ -44871,9 +44627,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) @@ -45404,11 +45160,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; }; @@ -45661,9 +45417,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; }; @@ -45880,9 +45636,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; }; @@ -46104,9 +45860,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; }; @@ -46319,7 +46075,7 @@ DoubleValue.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); return writer; }; @@ -46506,7 +46262,7 @@ FloatValue.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 5 =*/13).float(message.value); return writer; }; @@ -46693,7 +46449,7 @@ Int64Value.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 0 =*/8).int64(message.value); return writer; }; @@ -46894,7 +46650,7 @@ UInt64Value.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 0 =*/8).uint64(message.value); return writer; }; @@ -47095,7 +46851,7 @@ Int32Value.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 0 =*/8).int32(message.value); return writer; }; @@ -47282,7 +47038,7 @@ UInt32Value.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 0 =*/8).uint32(message.value); return writer; }; @@ -47469,7 +47225,7 @@ BoolValue.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 0 =*/8).bool(message.value); return writer; }; @@ -47656,7 +47412,7 @@ StringValue.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 2 =*/10).string(message.value); return writer; }; @@ -47843,7 +47599,7 @@ BytesValue.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 2 =*/10).bytes(message.value); return writer; }; @@ -48040,7 +47796,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(); @@ -48313,17 +48069,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; }; @@ -48566,7 +48322,7 @@ /** * NullValue enum. * @name google.protobuf.NullValue - * @enum {string} + * @enum {number} * @property {number} NULL_VALUE=0 NULL_VALUE value */ protobuf.NullValue = (function() { @@ -49233,9 +48989,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) @@ -49427,7 +49183,7 @@ /** * CalendarPeriod enum. * @name google.type.CalendarPeriod - * @enum {string} + * @enum {number} * @property {number} CALENDAR_PERIOD_UNSPECIFIED=0 CALENDAR_PERIOD_UNSPECIFIED value * @property {number} DAY=1 DAY value * @property {number} WEEK=2 WEEK value diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 3c34f2cace9..fcccb5c697b 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -94,8 +94,7 @@ "condition": { "oneof": [ "conditionThreshold", - "conditionAbsent", - "conditionTimeSeriesQueryLanguage" + "conditionAbsent" ] } }, @@ -115,10 +114,6 @@ "conditionAbsent": { "type": "MetricAbsence", "id": 2 - }, - "conditionTimeSeriesQueryLanguage": { - "type": "TimeSeriesQueryLanguageCondition", - "id": 14 } }, "nested": { @@ -200,18 +195,6 @@ "id": 3 } } - }, - "TimeSeriesQueryLanguageCondition": { - "fields": { - "query": { - "type": "string", - "id": 1 - }, - "summary": { - "type": "string", - "id": 2 - } - } } } }, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 61a560f7ea6..3e7c5c6fef8 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring.git", - "sha": "6866afc07f6e9f6256193f6f71bc3c29bc78087d" + "remote": "https://github.com/googleapis/nodejs-monitoring.git", + "sha": "9e6afc87cc0fcc323539f3bf8dc8e15d66c144b7" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "a3a0bf0f6291d69f2ff3df7fcd63d28ee20ac727", + "internalRef": "310060413" } }, { From 82815807d04b9af97cb1187c1d6784285b3203a4 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 7 May 2020 10:33:15 -0700 Subject: [PATCH 299/422] fix: synth.py clean up for multiple version (#431) --- packages/google-cloud-monitoring/src/index.ts | 10 +++++----- packages/google-cloud-monitoring/synth.metadata | 2 +- packages/google-cloud-monitoring/synth.py | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts index 09facd7d5f3..8ed785d32a8 100644 --- a/packages/google-cloud-monitoring/src/index.ts +++ b/packages/google-cloud-monitoring/src/index.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. @@ -12,17 +12,19 @@ // 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 ** +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** import * as v3 from './v3'; + const AlertPolicyServiceClient = v3.AlertPolicyServiceClient; const GroupServiceClient = v3.GroupServiceClient; const MetricServiceClient = v3.MetricServiceClient; const NotificationChannelServiceClient = v3.NotificationChannelServiceClient; const ServiceMonitoringServiceClient = v3.ServiceMonitoringServiceClient; const UptimeCheckServiceClient = v3.UptimeCheckServiceClient; + export { v3, AlertPolicyServiceClient, @@ -32,8 +34,6 @@ export { ServiceMonitoringServiceClient, UptimeCheckServiceClient, }; -// For compatibility with JavaScript libraries we need to provide this default export: -// tslint:disable-next-line no-default-export export default { v3, AlertPolicyServiceClient, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 3e7c5c6fef8..389c28514fc 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" } } ], diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index f3b5169b62e..43620f53f81 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -37,10 +37,11 @@ extra_proto_files=['google/cloud/common_resources.proto'] ) -s.copy(library, excludes=["src/index.ts", "README.md", "package.json"]) +s.copy(library, excludes=["README.md", "package.json"]) common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') +templates = common_templates.node_library( + source_location="build/src", versions=["v3"], default_version="v3") s.copy(templates) node.postprocess_gapic_library() From 4e0509ff78e803000bcc73de8bb9eb4fdb458684 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 May 2020 11:28:01 -0700 Subject: [PATCH 300/422] build: do not fail builds on codecov errors (#528) (#433) 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 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 389c28514fc..740cbf43f86 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "9e6afc87cc0fcc323539f3bf8dc8e15d66c144b7" + "sha": "4e0e5bb3c6bc2cb3f3a368c3199f605f24c21dda" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "756bc4dfc24e8bc4c5dd4116daa41a0440ebf5a0" + "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" } } ], From 5fff1767faf9699fd1754349a8d113a759057129 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 18 May 2020 13:15:53 -0700 Subject: [PATCH 301/422] chore: release 2.0.0 (#377) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-cloud-monitoring/CHANGELOG.md | 31 +++++++++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 2ff50195b90..565970c326b 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,37 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [2.0.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.7.0...v2.0.0) (2020-05-08) + + +### ⚠ BREAKING CHANGES + +* Drop support for TimeSeriesQueryLanguageCondition as an alert condition type +* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. +* monitoring convert to typescript (#360) + +### Features + +* deferred client initialization ([#378](https://www.github.com/googleapis/nodejs-monitoring/issues/378)) ([61eca6a](https://www.github.com/googleapis/nodejs-monitoring/commit/61eca6a6f4447fe5a8d30ee6c40034fb1f7bbb60)) +* drop node8 support, support for async iterators ([#396](https://www.github.com/googleapis/nodejs-monitoring/issues/396)) ([d65e8fb](https://www.github.com/googleapis/nodejs-monitoring/commit/d65e8fb8e8901d7023dba3c226a09ec3782fc0c5)) +* export protos in src/index.ts ([#369](https://www.github.com/googleapis/nodejs-monitoring/issues/369)) ([b0af4b1](https://www.github.com/googleapis/nodejs-monitoring/commit/b0af4b1b48254f91ec9aa9cead1ff0a6714a6393)) +* monitoring convert to typescript ([#360](https://www.github.com/googleapis/nodejs-monitoring/issues/360)) ([5bbd963](https://www.github.com/googleapis/nodejs-monitoring/commit/5bbd96307cc47066b00048e494bfa566ea58650d)) +* refresh monitoring client libraries ([#401](https://www.github.com/googleapis/nodejs-monitoring/issues/401)) ([efd6e6f](https://www.github.com/googleapis/nodejs-monitoring/commit/efd6e6f4e1596ba4e5a3ba63f12c868735d4c571)) +* Update public client library for Cloud Monitoring to introduce new Uptime check feature. Uptime HTTP(S) checks can now be GET or POST ([#425](https://www.github.com/googleapis/nodejs-monitoring/issues/425)) ([103afde](https://www.github.com/googleapis/nodejs-monitoring/commit/103afdedfc6a874f71f866c9e07ef8cbfa70fb8b)) + + +### Bug Fixes + +* regen protos and tests, formatting ([#429](https://www.github.com/googleapis/nodejs-monitoring/issues/429)) ([9e6afc8](https://www.github.com/googleapis/nodejs-monitoring/commit/9e6afc87cc0fcc323539f3bf8dc8e15d66c144b7)) +* remove eslint, update gax, fix generated protos, run the generator ([#415](https://www.github.com/googleapis/nodejs-monitoring/issues/415)) ([ed8d95e](https://www.github.com/googleapis/nodejs-monitoring/commit/ed8d95efec1820a41d893273443172e3fbd2781c)) +* synth.py clean up for multiple version ([#431](https://www.github.com/googleapis/nodejs-monitoring/issues/431)) ([4e0e5bb](https://www.github.com/googleapis/nodejs-monitoring/commit/4e0e5bb3c6bc2cb3f3a368c3199f605f24c21dda)) +* updated proto files with new proto annotations ([cf8cc77](https://www.github.com/googleapis/nodejs-monitoring/commit/cf8cc770ec5fa17874fd67df1469ffa3b2724628)) + + +### Code Refactoring + +* Drop support for TimeSeriesQueryLanguageCondition as an alert condition type ([866c028](https://www.github.com/googleapis/nodejs-monitoring/commit/866c0282ca2da53b0f9b42a2a1977446f7e368ae)) + ## [1.7.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.6.1...v1.7.0) (2019-12-31) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 3a2f9fa56d8..4ce4c6d1e02 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "1.7.0", + "version": "2.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index e959cf50af3..2be9be979ef 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^1.7.0", + "@google-cloud/monitoring": "^2.0.0", "yargs": "^15.0.0" }, "devDependencies": { From 2ca41e580e613078d23566f4f8c7444acd43c87c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 May 2020 09:48:55 -0700 Subject: [PATCH 302/422] changes without context (#434) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- packages/google-cloud-monitoring/protos/protos.js | 2 +- packages/google-cloud-monitoring/synth.metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index c120a65984c..802170e9dfd 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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_monitoring_1_7_0_protos || ($protobuf.roots._google_cloud_monitoring_1_7_0_protos = {}); + var $root = $protobuf.roots._google_cloud_monitoring_2_0_0_protos || ($protobuf.roots._google_cloud_monitoring_2_0_0_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 740cbf43f86..1374e530cad 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "4e0e5bb3c6bc2cb3f3a368c3199f605f24c21dda" + "sha": "4945b6c0bac9783e3432ee395b7dee70693fa591" } }, { From d92eb86e95675e354daad8e588fcd67e6855b44f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 8 Jun 2020 21:22:12 -0700 Subject: [PATCH 303/422] build: update protos.js (#436) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/041f5df7-f5d3-4b2a-9ede-0752bf41c185/targets --- .../protos/protos.d.ts | 6 +++++ .../google-cloud-monitoring/protos/protos.js | 26 +++++++++++++++++-- .../protos/protos.json | 6 ++++- .../google-cloud-monitoring/synth.metadata | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 37434fe1367..8f11bab8f48 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -15945,6 +15945,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -15986,6 +15989,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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 802170e9dfd..66bf33fddb5 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -38718,6 +38718,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 */ /** @@ -38815,6 +38816,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 @@ -38859,6 +38868,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; }; @@ -38923,6 +38934,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; @@ -39017,6 +39031,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -39139,6 +39156,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; }; @@ -39166,6 +39185,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -39187,6 +39207,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; }; @@ -40980,7 +41002,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -41466,7 +41488,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/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index fcccb5c697b..9c508bf23e7 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -3614,6 +3614,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -3849,7 +3853,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 1374e530cad..cab232128e6 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "4945b6c0bac9783e3432ee395b7dee70693fa591" + "sha": "dc4ca8ae954b1600e4c1987f96c27ef965383467" } }, { From c129bd028cc492cc7f36f0c289711d8ddfb638e1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:40:45 -0700 Subject: [PATCH 304/422] feat: move ts target to es2018 from es2016 (#440) 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 --- packages/google-cloud-monitoring/protos/protos.js | 2 +- .../src/v3/alert_policy_service_client.ts | 7 +++++++ .../google-cloud-monitoring/src/v3/group_service_client.ts | 7 +++++++ .../src/v3/metric_service_client.ts | 7 +++++++ .../src/v3/notification_channel_service_client.ts | 7 +++++++ .../src/v3/service_monitoring_service_client.ts | 7 +++++++ .../src/v3/uptime_check_service_client.ts | 7 +++++++ packages/google-cloud-monitoring/synth.metadata | 4 ++-- packages/google-cloud-monitoring/tsconfig.json | 2 +- 9 files changed, 46 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 66bf33fddb5..2db7d82c7ba 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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_monitoring_2_0_0_protos || ($protobuf.roots._google_cloud_monitoring_2_0_0_protos = {}); + var $root = $protobuf.roots._google_cloud_monitoring_protos || ($protobuf.roots._google_cloud_monitoring_protos = {}); $root.google = (function() { diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 20c6d51dd9d..512a3fe21ca 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -107,6 +107,13 @@ export class AlertPolicyServiceClient { } 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/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index 605c5c110df..2038e6ec036 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -110,6 +110,13 @@ export class GroupServiceClient { } 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/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 67e614417bc..ee8f68fa305 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -100,6 +100,13 @@ export class MetricServiceClient { } 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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index 52ec8bc9f21..24b4e202800 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -101,6 +101,13 @@ export class NotificationChannelServiceClient { } 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/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index 09bee37b8e6..a283dc14973 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -103,6 +103,13 @@ export class ServiceMonitoringServiceClient { } 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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index bfb5d4944ef..eabf9de7057 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -106,6 +106,13 @@ export class UptimeCheckServiceClient { } 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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index cab232128e6..ddfbdacb442 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "dc4ca8ae954b1600e4c1987f96c27ef965383467" + "sha": "94432225e75fa8c1c97edbbd8aae2600d2f0affe" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/packages/google-cloud-monitoring/tsconfig.json b/packages/google-cloud-monitoring/tsconfig.json index 613d35597b5..c78f1c884ef 100644 --- a/packages/google-cloud-monitoring/tsconfig.json +++ b/packages/google-cloud-monitoring/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From 2477b6c1fc389797b7a44e3c15c8f74c67f7ee84 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 09:02:26 -0700 Subject: [PATCH 305/422] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#442) 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 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index ddfbdacb442..f3166cdd89e 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "94432225e75fa8c1c97edbbd8aae2600d2f0affe" + "sha": "f57200d611a52fe1ba4c3646978f3034ee6df412" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From ea26e683315784debc05cd9cce502a1181f89af5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 15 Jun 2020 11:22:47 -0700 Subject: [PATCH 306/422] fix: proper fallback option handling autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .../src/v3/alert_policy_service_client.ts | 13 +++++-------- .../src/v3/group_service_client.ts | 13 +++++-------- .../src/v3/metric_service_client.ts | 13 +++++-------- .../src/v3/notification_channel_service_client.ts | 13 +++++-------- .../src/v3/service_monitoring_service_client.ts | 13 +++++-------- .../src/v3/uptime_check_service_client.ts | 13 +++++-------- packages/google-cloud-monitoring/synth.metadata | 2 +- 7 files changed, 31 insertions(+), 49 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 512a3fe21ca..380cf806ebb 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -116,14 +116,11 @@ export class AlertPolicyServiceClient { // 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 AlertPolicyServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index 2038e6ec036..e7631de19ff 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -119,14 +119,11 @@ export class GroupServiceClient { // 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 GroupServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index ee8f68fa305..55ce1ae1ae4 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -109,14 +109,11 @@ export class MetricServiceClient { // 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 MetricServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index 24b4e202800..a8931cf4e4b 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -110,14 +110,11 @@ export class NotificationChannelServiceClient { // 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 NotificationChannelServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index a283dc14973..a7c80ad92e9 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -112,14 +112,11 @@ export class ServiceMonitoringServiceClient { // 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 ServiceMonitoringServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index eabf9de7057..8c4773b9646 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -115,14 +115,11 @@ export class UptimeCheckServiceClient { // 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 UptimeCheckServiceClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index f3166cdd89e..e4993a965a1 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "f57200d611a52fe1ba4c3646978f3034ee6df412" + "sha": "0e6afe6563bc04ac6ee7cb69efacfe7c371ba013" } }, { From 8b87a682fe5f3b26c6901748c49a110ac7124f7c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 16 Jun 2020 09:29:50 -0700 Subject: [PATCH 307/422] docs: change relative URLs to absolute URLs to fix broken links (#438) --- .../protos/google/monitoring/v3/common.proto | 6 +++++- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index f1b38c2349b..26242225257 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -51,7 +51,11 @@ message TypedValue { } } -// A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time. +// A closed time interval. It extends from the start time to the end time, and +// includes both: `[startTime, endTime]`. Valid time intervals depend on the +// [`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) +// of the metric value. In no case can the end time be earlier than the start +// time. // // * For a `GAUGE` metric, the `startTime` value is technically optional; if // no value is specified, the start time defaults to the value of the diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index e4993a965a1..5c4aee893af 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a3a0bf0f6291d69f2ff3df7fcd63d28ee20ac727", - "internalRef": "310060413" + "sha": "51362f378a286494980ffc9a5199ab6e3cefd6d5", + "internalRef": "314788297" } }, { From 92359857b6225310d63796bc31b40a58f5cf9695 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 11:04:11 -0700 Subject: [PATCH 308/422] fix: update node issue template (#447) 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 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 5c4aee893af..68077d67451 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "0e6afe6563bc04ac6ee7cb69efacfe7c371ba013" + "sha": "4381642fedf3788ffd7bce0a0405bda127df2af0" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From 9dac7a58b06cbe8e46af5639e70cb73d36070c3e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2020 14:17:10 -0700 Subject: [PATCH 309/422] chore: release 2.1.0 (#441) * 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> --- packages/google-cloud-monitoring/CHANGELOG.md | 13 +++++++++++++ packages/google-cloud-monitoring/package.json | 2 +- .../google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 565970c326b..cc7216b539b 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [2.1.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.0.0...v2.1.0) (2020-06-18) + + +### Features + +* move ts target to es2018 from es2016 ([#440](https://www.github.com/googleapis/nodejs-monitoring/issues/440)) ([f57200d](https://www.github.com/googleapis/nodejs-monitoring/commit/f57200d611a52fe1ba4c3646978f3034ee6df412)) + + +### Bug Fixes + +* proper fallback option handling ([81f52b7](https://www.github.com/googleapis/nodejs-monitoring/commit/81f52b7a697ac4f953644a81ad13aaff4b19570f)) +* update node issue template ([#447](https://www.github.com/googleapis/nodejs-monitoring/issues/447)) ([5f08bf8](https://www.github.com/googleapis/nodejs-monitoring/commit/5f08bf88f8caa969800582d6eb408759ba240278)) + ## [2.0.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v1.7.0...v2.0.0) (2020-05-08) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 4ce4c6d1e02..c15a9e5fd55 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.0.0", + "version": "2.1.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 2be9be979ef..f7df5496133 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.0.0", + "@google-cloud/monitoring": "^2.1.0", "yargs": "^15.0.0" }, "devDependencies": { From dfb7244f064f96792e1f406164a2c02fb1e2b324 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Jun 2020 03:05:08 +0200 Subject: [PATCH 310/422] chore(deps): update dependency mocha to v8 (#448) --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c15a9e5fd55..ba17eda6c37 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -56,7 +56,7 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^7.0.1", + "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index f7df5496133..163afc0d847 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "chai": "^4.2.0", - "mocha": "^7.0.0", + "mocha": "^8.0.0", "uuid": "^8.0.0" } } From 508494175e979023bf0115c1b0557ded676e6ea5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jun 2020 17:46:25 -0700 Subject: [PATCH 311/422] build: add config .gitattributes (#449) 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 --- packages/google-cloud-monitoring/.gitattributes | 3 +++ packages/google-cloud-monitoring/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-monitoring/.gitattributes diff --git a/packages/google-cloud-monitoring/.gitattributes b/packages/google-cloud-monitoring/.gitattributes new file mode 100644 index 00000000000..2e63216ae9c --- /dev/null +++ b/packages/google-cloud-monitoring/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 68077d67451..9c98b0d9836 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "4381642fedf3788ffd7bce0a0405bda127df2af0" + "sha": "c3bda103c90d7aa404397a8b3e729f62c8416f57" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From 7d8beca8504dc9e6c55fab34f730275643aa3372 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:18:07 -0700 Subject: [PATCH 312/422] build: use bazel build (#450) --- .../google-cloud-monitoring/synth.metadata | 18 +++++------------- packages/google-cloud-monitoring/synth.py | 14 ++------------ 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 9c98b0d9836..75f3f6c44e8 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "c3bda103c90d7aa404397a8b3e729f62c8416f57" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "51362f378a286494980ffc9a5199ab6e3cefd6d5", - "internalRef": "314788297" + "remote": "git@github.com:googleapis/nodejs-monitoring.git", + "sha": "1e0751185d29f17ea9e8fd6eaf03a40f9a60cf6e" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -29,8 +21,8 @@ "source": "googleapis", "apiName": "monitoring", "apiVersion": "v3", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/synth.py index 43620f53f81..c7d8f298b1e 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/synth.py @@ -23,19 +23,9 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() version = "v3" -library = gapic.typescript_library( - "monitoring", - version, - generator_args={ - "grpc-service-config": f"google/monitoring/{version}/monitoring_grpc_service_config.json", - "package-name": "@google-cloud/monitoring", - "main-service": "monitoring" - }, - proto_path=f'/google/monitoring/{version}', - extra_proto_files=['google/cloud/common_resources.proto'] -) +library = gapic.node_library("monitoring", version, proto_path=f'google/monitoring/{version}') s.copy(library, excludes=["README.md", "package.json"]) From 0693c0bab948bb52c64266c653a48aebe7cd965c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 23:26:23 -0700 Subject: [PATCH 313/422] build: typeo in nodejs .gitattribute (#453) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cc99acfa-05b8-434b-9500-2f6faf2eaa02/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b --- packages/google-cloud-monitoring/.gitattributes | 2 +- packages/google-cloud-monitoring/synth.metadata | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/.gitattributes b/packages/google-cloud-monitoring/.gitattributes index 2e63216ae9c..d4f4169b28b 100644 --- a/packages/google-cloud-monitoring/.gitattributes +++ b/packages/google-cloud-monitoring/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 75f3f6c44e8..59e2a9cc685 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring.git", - "sha": "1e0751185d29f17ea9e8fd6eaf03a40f9a60cf6e" + "remote": "https://github.com/googleapis/nodejs-monitoring.git", + "sha": "cf606befe543e03b686f9920b4d585519c560e6d" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", + "internalRef": "320300472" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From 6991f327e438c4ce34d7f417a2a3a691338be647 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jul 2020 18:51:19 +0200 Subject: [PATCH 314/422] chore(deps): update dependency ts-loader to v8 (#452) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/ts-loader/7.0.5/8.0.0) | --- ### Release Notes
TypeStrong/ts-loader ### [`v8.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v800) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v7.0.5...v8.0.0) - [Support for symlinks in project references](https://togithub.com/TypeStrong/ts-loader/pull/1136) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - `ts-loader` now supports TypeScript 3.6 and greater **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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index ba17eda6c37..e8c27d4e5ee 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -60,7 +60,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "ts-loader": "^7.0.0", + "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.6", "webpack-cli": "^3.3.11" From aef49a035a6418900d442fe60e18ada7908c950d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jul 2020 18:46:32 +0200 Subject: [PATCH 315/422] chore(deps): update dependency @types/mocha to v8 (#454) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/7.0.2/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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e8c27d4e5ee..392fc4f6637 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -46,7 +46,7 @@ "google-gax": "^2.1.0" }, "devDependencies": { - "@types/mocha": "^7.0.0", + "@types/mocha": "^8.0.0", "@types/node": "^12.12.27", "@types/sinon": "^9.0.0", "c8": "^7.1.0", From 01d6b505b0d76f96d4ac806e1931e0b33ca3d54f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 16 Jul 2020 10:27:35 -0700 Subject: [PATCH 316/422] build: missing closing paren in publish script and delete node 8 tests (#459) * 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. * build: missing closing paren in publish script Source-Author: Benjamin E. Coe Source-Date: Mon Jul 13 09:56:30 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: d82deccf657a66e31bd5da9efdb96c6fa322fc7e Source-Link: https://github.com/googleapis/synthtool/commit/d82deccf657a66e31bd5da9efdb96c6fa322fc7e * chore: delete template for Node 8 tests Source-Author: F. Hinkelmann Source-Date: Tue Jul 14 19:56:02 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 388e10f5ae302d3e8de1fac99f3a95d1ab8f824a Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a --- .../google-cloud-monitoring/protos/protos.js | 214 ++++++++++++++---- .../google-cloud-monitoring/synth.metadata | 4 +- 2 files changed, 172 insertions(+), 46 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 2db7d82c7ba..a68d3ea0015 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -261,7 +261,7 @@ AlertPolicy.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -275,12 +275,26 @@ message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.decode(reader, reader.uint32()); break; case 16: - 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; case 12: if (!(message.conditions && message.conditions.length)) @@ -4993,17 +5007,31 @@ DroppedLabels.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DroppedLabels(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.DroppedLabels(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - reader.skip().pos++; if (message.label === $util.emptyObject) message.label = {}; - key = reader.string(); - reader.pos++; - message.label[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.label[key] = value; break; default: reader.skipType(tag & 7); @@ -15196,7 +15224,7 @@ NotificationChannel.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannel(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.NotificationChannel(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -15213,20 +15241,48 @@ message.description = reader.string(); break; case 5: - 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 8: - 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; case 9: message.verificationStatus = reader.int32(); @@ -28003,7 +28059,7 @@ HttpCheck.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -28026,12 +28082,26 @@ message.maskHeaders = reader.bool(); break; case 6: - reader.skip().pos++; if (message.headers === $util.emptyObject) message.headers = {}; - key = reader.string(); - reader.pos++; - message.headers[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.headers[key] = value; break; case 9: message.contentType = reader.int32(); @@ -34978,7 +35048,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) { @@ -34986,12 +35056,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); @@ -35209,7 +35293,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) { @@ -35217,12 +35301,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); @@ -36557,7 +36655,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) { @@ -36565,12 +36663,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); @@ -47853,17 +47965,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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 59e2a9cc685..6ea25e4dc2a 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "cf606befe543e03b686f9920b4d585519c560e6d" + "sha": "b40c5fc3914c8d04592691790aeaa0761c538f74" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "388e10f5ae302d3e8de1fac99f3a95d1ab8f824a" } } ], From 1560bc002110c7f024868d662270e030af7b6ddf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 15:18:46 -0700 Subject: [PATCH 317/422] chore: add config files for cloud-rad for node.js (#460) 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 --- .../api-extractor.json | 369 ++++++++++++++++++ .../google-cloud-monitoring/synth.metadata | 4 +- 2 files changed, 371 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-monitoring/api-extractor.json diff --git a/packages/google-cloud-monitoring/api-extractor.json b/packages/google-cloud-monitoring/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 6ea25e4dc2a..528f96681f6 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "b40c5fc3914c8d04592691790aeaa0761c538f74" + "sha": "1baf0d4c0dd1d26ea8ab690ec7ea0887bb2cd8f6" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "388e10f5ae302d3e8de1fac99f3a95d1ab8f824a" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From 808f166e9eb8df34368fef59cdc2f5921ed39c0a Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:41:31 -0400 Subject: [PATCH 318/422] chore: add dev dependencies for cloud-rad ref docs (#462) --- packages/google-cloud-monitoring/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 392fc4f6637..1dc8ab92938 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,7 +40,9 @@ "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile", - "precompile": "gts clean" + "precompile": "gts clean", + "api-extractor": "api-extractor run --local", + "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { "google-gax": "^2.1.0" @@ -63,6 +65,8 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.6", - "webpack-cli": "^3.3.11" + "webpack-cli": "^3.3.11", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" } } From 15953f906672d233fe87aeec1ff3d810064428a5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Jul 2020 17:48:13 -0700 Subject: [PATCH 319/422] build: rename _toc to toc (#463) Source-Author: F. Hinkelmann Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 528f96681f6..d3ef1fc3a32 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "1baf0d4c0dd1d26ea8ab690ec7ea0887bb2cd8f6" + "sha": "55c19b167dc270ed4c4247fa105b4e1485874dbc" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], From a0cebd22e1ba3c91363e2ed9e0b054c7c6c0bddf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jul 2020 21:15:01 -0700 Subject: [PATCH 320/422] fix: move gitattributes files to node templates (#464) 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 --- packages/google-cloud-monitoring/.gitattributes | 1 + packages/google-cloud-monitoring/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.gitattributes b/packages/google-cloud-monitoring/.gitattributes index d4f4169b28b..33739cb74e4 100644 --- a/packages/google-cloud-monitoring/.gitattributes +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index d3ef1fc3a32..54068041338 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "55c19b167dc270ed4c4247fa105b4e1485874dbc" + "sha": "1c775dd5644fd41cd5ed740771227201e74f99f8" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" } } ], From ab45421bb42c407a3a9396c4f28ba419db6b66d1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 17:02:05 +0000 Subject: [PATCH 321/422] chore: release 2.1.1 (#465) :robot: I have created a release \*beep\* \*boop\* --- ### [2.1.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.0...v2.1.1) (2020-07-24) ### Bug Fixes * move gitattributes files to node templates ([#464](https://www.github.com/googleapis/nodejs-monitoring/issues/464)) ([db2d19d](https://www.github.com/googleapis/nodejs-monitoring/commit/db2d19d9170eb10d8f2c779589e623222991d393)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index cc7216b539b..b6007d673b9 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.1.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.0...v2.1.1) (2020-07-24) + + +### Bug Fixes + +* move gitattributes files to node templates ([#464](https://www.github.com/googleapis/nodejs-monitoring/issues/464)) ([db2d19d](https://www.github.com/googleapis/nodejs-monitoring/commit/db2d19d9170eb10d8f2c779589e623222991d393)) + ## [2.1.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.0.0...v2.1.0) (2020-06-18) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 1dc8ab92938..8ec23f84f8c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.1.0", + "version": "2.1.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 163afc0d847..4727f6ab764 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.1.0", + "@google-cloud/monitoring": "^2.1.1", "yargs": "^15.0.0" }, "devDependencies": { From bf9153db2b54f0271dcf88a3e9570062dc664d3b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 16:36:17 -0700 Subject: [PATCH 322/422] chore(node): fix kokoro build path for cloud-rad (#466) 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 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 54068041338..6ef1ac255b0 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "1c775dd5644fd41cd5ed740771227201e74f99f8" + "sha": "da74320aab084eabf9f2c474b089f52724d88dc4" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From cf0144bef5235e8b1bb595d6d0d12f2cc97d8e9a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:10:04 -0700 Subject: [PATCH 323/422] build: update protos (#467) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b205fd33-200c-4298-88b8-18b0d1c79a3e/targets - [ ] To automatically regenerate this PR, check this box. --- .../protos/protos.d.ts | 10 ++- .../google-cloud-monitoring/protos/protos.js | 87 ++++++++++++++++++- .../protos/protos.json | 7 ++ .../google-cloud-monitoring/synth.metadata | 2 +- 4 files changed, 102 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 8f11bab8f48..9dcf71349be 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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 { @@ -14857,6 +14857,8 @@ export namespace google { /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, EARLY_ACCESS = 1, ALPHA = 2, BETA = 3, @@ -14896,6 +14898,9 @@ export namespace google { /** MetricDescriptor launchStage */ launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); } /** Represents a MetricDescriptor. */ @@ -14937,6 +14942,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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index a68d3ea0015..e3cdbaa7146 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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"; @@ -14904,6 +14904,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -14970,6 +14972,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; @@ -34824,6 +34834,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -34869,6 +34881,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; @@ -35713,6 +35733,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 @@ -35722,6 +35744,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; @@ -35746,6 +35770,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 */ /** @@ -35758,6 +35783,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) @@ -35844,6 +35870,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 @@ -35889,6 +35923,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; }; @@ -35955,6 +35992,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; @@ -36047,6 +36089,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -36054,6 +36098,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; }; @@ -36147,6 +36198,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; @@ -36168,6 +36227,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; }; @@ -36184,8 +36250,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; @@ -36220,6 +36288,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; }; @@ -36397,6 +36470,8 @@ default: return "launchStage: enum value expected"; case 0: + case 6: + case 7: case 1: case 2: case 3: @@ -36434,6 +36509,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/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 9c508bf23e7..d4a31761fd8 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -3284,6 +3284,8 @@ "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, "EARLY_ACCESS": 1, "ALPHA": 2, "BETA": 3, @@ -3333,6 +3335,11 @@ "launchStage": { "type": "LaunchStage", "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 } }, "nested": { diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 6ef1ac255b0..4b66963ea0a 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "da74320aab084eabf9f2c474b089f52724d88dc4" + "sha": "90496ddaa84a2cf9119026d19e47f99f9111b79c" } }, { From b28d4fdf398bb96ea57c0a027a1e44ef67f669b5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 31 Jul 2020 11:16:03 -0700 Subject: [PATCH 324/422] docs: add links to the CHANGELOG from the README.md for Java and Node (#468) 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 --- packages/google-cloud-monitoring/README.md | 3 +++ packages/google-cloud-monitoring/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 0e619daf1c5..e6a31f362d4 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -16,6 +16,9 @@ Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, applicat and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring/blob/master/CHANGELOG.md). + * [Stackdriver Monitoring Node.js Client API Reference][client-docs] * [Stackdriver Monitoring Documentation][product-docs] * [github.com/googleapis/nodejs-monitoring](https://github.com/googleapis/nodejs-monitoring) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 4b66963ea0a..22b216fb1b1 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "90496ddaa84a2cf9119026d19e47f99f9111b79c" + "sha": "4ea27129d999e4c32f16b7ca97d21e2bd0df0b69" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From a04ab9d7cd781d4853accca0cf3a8c3ab312ac98 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 10 Aug 2020 20:28:21 -0700 Subject: [PATCH 325/422] build: --credential-file-override is no longer required (#470) Source-Author: Benjamin E. Coe Source-Date: Fri Aug 7 19:02:09 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 94421c47802f56a44c320257b2b4c190dc7d6b68 Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 22b216fb1b1..d5a16f2fb4c 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "4ea27129d999e4c32f16b7ca97d21e2bd0df0b69" + "sha": "6ffa7123d1f95f5e29cd49e98506e0ef907cb922" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From 9152415ec7d252884f18341604f8f44ce0eda395 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 12:36:09 -0700 Subject: [PATCH 326/422] chore: update cloud rad kokoro build job (#472) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/bd0deaa1113b588d70449535ab9cbf0f2bd0e72f --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index d5a16f2fb4c..1bec209c77d 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "6ffa7123d1f95f5e29cd49e98506e0ef907cb922" + "sha": "776f18d31861fbd15884444a6c906ccdadc7de80" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" } } ], From feae696062cb085914cf989b44d7fa635ddf44c7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 13:00:14 -0700 Subject: [PATCH 327/422] build: use gapic-generator-typescript v1.0.7. (#471) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 325949033 Source-Link: https://github.com/googleapis/googleapis/commit/94006b3cb8d2fb44703cf535da15608eed6bf7db --- .../src/v3/alert_policy_service_client.ts | 5 ++--- .../google-cloud-monitoring/src/v3/group_service_client.ts | 5 ++--- .../google-cloud-monitoring/src/v3/metric_service_client.ts | 5 ++--- .../src/v3/notification_channel_service_client.ts | 5 ++--- .../src/v3/service_monitoring_service_client.ts | 5 ++--- .../src/v3/uptime_check_service_client.ts | 5 ++--- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 7 files changed, 14 insertions(+), 20 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 380cf806ebb..4111238dcde 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -322,12 +322,11 @@ export class AlertPolicyServiceClient { } ); + 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/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index e7631de19ff..ba6068ea86e 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -331,12 +331,11 @@ export class GroupServiceClient { } ); + 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/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 55ce1ae1ae4..91487ca0c3c 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -346,12 +346,11 @@ export class MetricServiceClient { } ); + 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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index a8931cf4e4b..be004146958 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -327,12 +327,11 @@ export class NotificationChannelServiceClient { } ); + 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/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index a7c80ad92e9..9fdaaf48382 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -329,12 +329,11 @@ export class ServiceMonitoringServiceClient { } ); + 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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index 8c4773b9646..7d44e34d266 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -327,12 +327,11 @@ export class UptimeCheckServiceClient { } ); + 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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 1bec209c77d..e3a9748f64c 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", - "internalRef": "320300472" + "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", + "internalRef": "325949033" } }, { From b2cbebc362cecaa181f6729fa41e1ca8732c5855 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Aug 2020 12:40:12 -0700 Subject: [PATCH 328/422] build: perform publish using Node 12 (#473) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/c36c6dbc-ab79-4f17-b70b-523b420b2a70/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5747555f7620113d9a2078a48f4c047a99d31b3e --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index e3a9748f64c..8b2d0549dca 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "776f18d31861fbd15884444a6c906ccdadc7de80" + "sha": "29b7114aa70f34930744c12ff0c37668d2afd882" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], From db131f3bc32d967c360448f62fa6c17ec044aa9b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 Aug 2020 22:08:22 -0700 Subject: [PATCH 329/422] chore: start tracking obsolete files --- .../google-cloud-monitoring/synth.metadata | 115 +++++++++++++++++- 1 file changed, 111 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 8b2d0549dca..054a8dbef84 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "29b7114aa70f34930744c12ff0c37668d2afd882" + "sha": "8552f0845c6bc3cc417140ca9230f0ea2955978b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", - "internalRef": "325949033" + "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", + "internalRef": "327369997" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" + "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" } } ], @@ -33,5 +33,112 @@ "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.1386743570", + "protos/google/monitoring/v3/alert.proto", + "protos/google/monitoring/v3/alert_service.proto", + "protos/google/monitoring/v3/common.proto", + "protos/google/monitoring/v3/dropped_labels.proto", + "protos/google/monitoring/v3/group.proto", + "protos/google/monitoring/v3/group_service.proto", + "protos/google/monitoring/v3/metric.proto", + "protos/google/monitoring/v3/metric_service.proto", + "protos/google/monitoring/v3/mutation_record.proto", + "protos/google/monitoring/v3/notification.proto", + "protos/google/monitoring/v3/notification_service.proto", + "protos/google/monitoring/v3/service.proto", + "protos/google/monitoring/v3/service_service.proto", + "protos/google/monitoring/v3/span_context.proto", + "protos/google/monitoring/v3/uptime.proto", + "protos/google/monitoring/v3/uptime_service.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.231839960", + "src/index.ts", + "src/v3/alert_policy_service_client.ts", + "src/v3/alert_policy_service_client_config.json", + "src/v3/alert_policy_service_proto_list.json", + "src/v3/group_service_client.ts", + "src/v3/group_service_client_config.json", + "src/v3/group_service_proto_list.json", + "src/v3/index.ts", + "src/v3/metric_service_client.ts", + "src/v3/metric_service_client_config.json", + "src/v3/metric_service_proto_list.json", + "src/v3/notification_channel_service_client.ts", + "src/v3/notification_channel_service_client_config.json", + "src/v3/notification_channel_service_proto_list.json", + "src/v3/service_monitoring_service_client.ts", + "src/v3/service_monitoring_service_client_config.json", + "src/v3/service_monitoring_service_proto_list.json", + "src/v3/uptime_check_service_client.ts", + "src/v3/uptime_check_service_client_config.json", + "src/v3/uptime_check_service_proto_list.json", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_alert_policy_service_v3.ts", + "test/gapic_group_service_v3.ts", + "test/gapic_metric_service_v3.ts", + "test/gapic_notification_channel_service_v3.ts", + "test/gapic_service_monitoring_service_v3.ts", + "test/gapic_uptime_check_service_v3.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 3154721e35852bfb1c72103c0a3addd8a3bf95c4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 Aug 2020 11:12:22 -0700 Subject: [PATCH 330/422] build: move system and samples test from Node 10 to Node 12 (#475) 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 --- packages/google-cloud-monitoring/synth.metadata | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 054a8dbef84..98da76d0878 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "8552f0845c6bc3cc417140ca9230f0ea2955978b" + "sha": "9e3703bd3d36e8d1ffa735c7eff973e9e7d7d3bc" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" + "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.1386743570", "protos/google/monitoring/v3/alert.proto", "protos/google/monitoring/v3/alert_service.proto", "protos/google/monitoring/v3/common.proto", @@ -108,7 +107,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.231839960", "src/index.ts", "src/v3/alert_policy_service_client.ts", "src/v3/alert_policy_service_client_config.json", From 197271ab31f995da0d8764613e3961769ceb3b29 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Aug 2020 09:26:20 -0700 Subject: [PATCH 331/422] build: track flaky tests for "nightly", add new secrets for tagging (#476) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a8c1e885-336c-4636-8e00-e4134524f8ee/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- packages/google-cloud-monitoring/synth.metadata | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 98da76d0878..aba7d90012a 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "9e3703bd3d36e8d1ffa735c7eff973e9e7d7d3bc" + "sha": "f0d91a240f06b1a6fd098dd66fe2e5cfe6671a2f" } }, { @@ -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 0c70857c6301f477e0742b6aef467b5213dafa1f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Sep 2020 19:04:17 +0200 Subject: [PATCH 332/422] fix(deps): update dependency yargs to v16 (#480) 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 | |---|---|---|---| | [yargs](https://yargs.js.org/) ([source](https://togithub.com/yargs/yargs)) | dependencies | major | [`^15.0.0` -> `^16.0.0`](https://renovatebot.com/diffs/npm/yargs/15.4.1/16.0.1) | --- ### Release Notes
yargs/yargs ### [`v16.0.1`](https://togithub.com/yargs/yargs/blob/master/CHANGELOG.md#​1601-httpswwwgithubcomyargsyargscomparev1600v1601-2020-09-09) [Compare Source](https://togithub.com/yargs/yargs/compare/v16.0.0...v16.0.1) ### [`v16.0.0`](https://togithub.com/yargs/yargs/blob/master/CHANGELOG.md#​1600-httpswwwgithubcomyargsyargscomparev1542v1600-2020-09-09) [Compare Source](https://togithub.com/yargs/yargs/compare/v15.4.1...v16.0.0) ##### ⚠ BREAKING CHANGES - tweaks to ESM/Deno API surface: now exports yargs function by default; getProcessArgvWithoutBin becomes hideBin; types now exported for Deno. - find-up replaced with escalade; export map added (limits importable files in Node >= 12); yarser-parser@19.x.x (new decamelize/camelcase implementation). - **usage:** single character aliases are now shown first in help output - rebase helper is no longer provided on yargs instance. - drop support for EOL Node 8 ([#​1686](https://togithub.com/yargs/yargs/issues/1686)) ##### Features - adds strictOptions() ([#​1738](https://www.github.com/yargs/yargs/issues/1738)) ([b215fba](https://www.github.com/yargs/yargs/commit/b215fba0ed6e124e5aad6cf22c8d5875661c63a3)) - **helpers:** rebase, Parser, applyExtends now blessed helpers ([#​1733](https://www.github.com/yargs/yargs/issues/1733)) ([c7debe8](https://www.github.com/yargs/yargs/commit/c7debe8eb1e5bc6ea20b5ed68026c56e5ebec9e1)) - adds support for ESM and Deno ([#​1708](https://www.github.com/yargs/yargs/issues/1708)) ([ac6d5d1](https://www.github.com/yargs/yargs/commit/ac6d5d105a75711fe703f6a39dad5181b383d6c6)) - drop support for EOL Node 8 ([#​1686](https://www.github.com/yargs/yargs/issues/1686)) ([863937f](https://www.github.com/yargs/yargs/commit/863937f23c3102f804cdea78ee3097e28c7c289f)) - i18n for ESM and Deno ([#​1735](https://www.github.com/yargs/yargs/issues/1735)) ([c71783a](https://www.github.com/yargs/yargs/commit/c71783a5a898a0c0e92ac501c939a3ec411ac0c1)) - tweaks to API surface based on user feedback ([#​1726](https://www.github.com/yargs/yargs/issues/1726)) ([4151fee](https://www.github.com/yargs/yargs/commit/4151fee4c33a97d26bc40de7e623e5b0eb87e9bb)) - **usage:** single char aliases first in help ([#​1574](https://www.github.com/yargs/yargs/issues/1574)) ([a552990](https://www.github.com/yargs/yargs/commit/a552990c120646c2d85a5c9b628e1ce92a68e797)) ##### Bug Fixes - **yargs:** add missing command(module) signature ([#​1707](https://www.github.com/yargs/yargs/issues/1707)) ([0f81024](https://www.github.com/yargs/yargs/commit/0f810245494ccf13a35b7786d021b30fc95ecad5)), closes [#​1704](https://www.github.com/yargs/yargs/issues/1704)
--- ### 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-monitoring). --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 4727f6ab764..6557c68489b 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@google-cloud/monitoring": "^2.1.1", - "yargs": "^15.0.0" + "yargs": "^16.0.0" }, "devDependencies": { "chai": "^4.2.0", From 85127401061d9b6779a4ff20d258db3356647c7a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 11:22:03 -0700 Subject: [PATCH 333/422] build(test): recursively find test files; fail on unsupported dependency versions (#483) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0832b96d-f20d-428a-9244-9373d24004a9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- packages/google-cloud-monitoring/.mocharc.js | 3 ++- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/.mocharc.js b/packages/google-cloud-monitoring/.mocharc.js index ff7b34fa5d1..0b600509bed 100644 --- a/packages/google-cloud-monitoring/.mocharc.js +++ b/packages/google-cloud-monitoring/.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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index aba7d90012a..f71d0cf7f35 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "f0d91a240f06b1a6fd098dd66fe2e5cfe6671a2f" + "sha": "188c55a4126fbf2180fa116985bf3cbdd3c46ce8" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From 132cb87bdb7e29ba94304c2825c21c66c1fe6446 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 15:15:26 -0700 Subject: [PATCH 334/422] chore: release 2.1.2 (#481) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index b6007d673b9..a332f2c1e3a 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.1.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.1...v2.1.2) (2020-09-12) + + +### Bug Fixes + +* **deps:** update dependency yargs to v16 ([#480](https://www.github.com/googleapis/nodejs-monitoring/issues/480)) ([188c55a](https://www.github.com/googleapis/nodejs-monitoring/commit/188c55a4126fbf2180fa116985bf3cbdd3c46ce8)) + ### [2.1.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.0...v2.1.1) (2020-07-24) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8ec23f84f8c..833f5d2e908 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.1.1", + "version": "2.1.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 6557c68489b..f8ceafee6af 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.1.1", + "@google-cloud/monitoring": "^2.1.2", "yargs": "^16.0.0" }, "devDependencies": { From 4dacf2372b3fdeb42785981a614d25ce3602e3da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Oct 2020 08:10:07 -0700 Subject: [PATCH 335/422] chore: update bucket for cloud-rad (#484) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/abddcc47-cb76-4fc4-b8c1-feafeaf13e14/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index f71d0cf7f35..5d25c023450 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "188c55a4126fbf2180fa116985bf3cbdd3c46ce8" + "sha": "64a5b56dc2749ea28c468685de46c195cf55fbea" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From 30490f7fb4ae9c4e3db63fde9499079b28bda5de Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 5 Oct 2020 10:42:50 -0700 Subject: [PATCH 336/422] build(node_library): migrate to Trampoline V2 (#485) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1e3d0729-fe1f-4f75-babe-29f5584e5b6a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 --- packages/google-cloud-monitoring/synth.metadata | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 5d25c023450..86a67a8fb86 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "64a5b56dc2749ea28c468685de46c195cf55fbea" + "sha": "7857c6c3420dfb0040e2bd43fcb8440c34b0f255" } }, { @@ -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 85996ce631a17dee99a06807402a385bfad6b763 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 21:54:21 +0200 Subject: [PATCH 337/422] chore(deps): update dependency webpack-cli to v4 (#488) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 833f5d2e908..671e6316c22 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -65,7 +65,7 @@ "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^4.41.6", - "webpack-cli": "^3.3.11", + "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" } From 20ad0ac6916e2a458be2ae4740959fab9b3b9cdc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 23:02:21 +0200 Subject: [PATCH 338/422] chore(deps): update dependency webpack to v5 (#487) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack](https://togithub.com/webpack/webpack) | devDependencies | major | [`^4.41.6` -> `^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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 671e6316c22..2e66dd92385 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -64,7 +64,7 @@ "sinon": "^9.0.1", "ts-loader": "^8.0.0", "typescript": "^3.8.3", - "webpack": "^4.41.6", + "webpack": "^5.0.0", "webpack-cli": "^4.0.0", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From b3542ce5b80f14b8f1f8ff9d5ac20907f7e42766 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 10:08:24 -0700 Subject: [PATCH 339/422] build: only check --engine-strict for production deps (#490) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/05b05b53-a254-4e87-acf9-e9bae7f17a4e/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 86a67a8fb86..0a787789bb5 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "7857c6c3420dfb0040e2bd43fcb8440c34b0f255" + "sha": "c9b8be7896efbb5a12cc4d392a4f9fcbb287d7a9" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], From 32b6fdc0d5a40b19e6a47208fa5e37c68ea5a5d4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 16:14:23 -0700 Subject: [PATCH 340/422] chore: clean up Node.js TOC for cloud-rad (#491) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/53e2a61c-af19-4be7-b9af-c352b89a29fb/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 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 0a787789bb5..4ee81f126b7 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "c9b8be7896efbb5a12cc4d392a4f9fcbb287d7a9" + "sha": "645ae7a228418e7390183a4532446a32d6cc1331" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From 082ae49abdcbf0157e7aebc3f9ae69a987972754 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 08:38:21 -0700 Subject: [PATCH 341/422] docs: updated code of conduct (includes update to actions) (#494) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8603a334-7a64-49dc-bf6d-29ff55473bfe/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 --- .../CODE_OF_CONDUCT.md | 123 +++++++++++++----- .../google-cloud-monitoring/synth.metadata | 4 +- 2 files changed, 89 insertions(+), 38 deletions(-) diff --git a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md b/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-cloud-monitoring/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 4ee81f126b7..c7f09f712bf 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "645ae7a228418e7390183a4532446a32d6cc1331" + "sha": "ae747c3b83662c56f35cef9e769c2a93499f0e4d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From 343259f07f85ec8ea967b44966bbd8d756435985 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 15:58:54 -0800 Subject: [PATCH 342/422] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#495) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2b12f6c9-10d8-4a5e-b86e-af5827858559/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index c7f09f712bf..322b0e20cb5 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "ae747c3b83662c56f35cef9e769c2a93499f0e4d" + "sha": "6445e65c0ff84e9cb0dac2c9b7bf172300f4bd2a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From fb0412d360e0c6ac893615c92a9d1fc7f3a0c0e6 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 16:58:37 -0800 Subject: [PATCH 343/422] fix: do not modify options object, use defaultScopes (#497) * fix: do not modify options object, use defaultScopes Regenerated the library using gapic-generator-typescript v1.2.1. * fix(deps): require google-gax ^2.9.2 --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/src/index.ts | 6 + .../src/v3/alert_policy_service_client.ts | 151 +++++----- .../src/v3/group_service_client.ts | 208 ++++++++------ .../src/v3/metric_service_client.ts | 271 ++++++++++-------- .../v3/notification_channel_service_client.ts | 233 ++++++++------- .../v3/service_monitoring_service_client.ts | 233 ++++++++------- .../src/v3/uptime_check_service_client.ts | 208 ++++++++------ .../google-cloud-monitoring/synth.metadata | 16 +- .../system-test/fixtures/sample/src/index.ts | 48 +++- .../system-test/install.ts | 18 +- 11 files changed, 792 insertions(+), 602 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2e66dd92385..1b80a1eaf71 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -45,7 +45,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.1.0" + "google-gax": "^2.9.2" }, "devDependencies": { "@types/mocha": "^8.0.0", diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts index 8ed785d32a8..2b0f78d83ad 100644 --- a/packages/google-cloud-monitoring/src/index.ts +++ b/packages/google-cloud-monitoring/src/index.ts @@ -19,11 +19,17 @@ import * as v3 from './v3'; const AlertPolicyServiceClient = v3.AlertPolicyServiceClient; +type AlertPolicyServiceClient = v3.AlertPolicyServiceClient; const GroupServiceClient = v3.GroupServiceClient; +type GroupServiceClient = v3.GroupServiceClient; const MetricServiceClient = v3.MetricServiceClient; +type MetricServiceClient = v3.MetricServiceClient; const NotificationChannelServiceClient = v3.NotificationChannelServiceClient; +type NotificationChannelServiceClient = v3.NotificationChannelServiceClient; const ServiceMonitoringServiceClient = v3.ServiceMonitoringServiceClient; +type ServiceMonitoringServiceClient = v3.ServiceMonitoringServiceClient; const UptimeCheckServiceClient = v3.UptimeCheckServiceClient; +type UptimeCheckServiceClient = v3.UptimeCheckServiceClient; export { v3, diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 4111238dcde..76394756799 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -68,8 +68,10 @@ export class AlertPolicyServiceClient { /** * Construct an instance of AlertPolicyServiceClient. * - * @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] @@ -89,42 +91,33 @@ export class AlertPolicyServiceClient { * 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 AlertPolicyServiceClient; 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 AlertPolicyServiceClient 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 AlertPolicyServiceClient).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. @@ -133,6 +126,11 @@ export class AlertPolicyServiceClient { // 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) { @@ -337,6 +335,7 @@ export class AlertPolicyServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -345,6 +344,7 @@ export class AlertPolicyServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -352,6 +352,7 @@ export class AlertPolicyServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -360,6 +361,7 @@ export class AlertPolicyServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -373,8 +375,7 @@ export class AlertPolicyServiceClient { 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 @@ -429,7 +430,11 @@ export class AlertPolicyServiceClient { * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * 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.getAlertPolicy(request); */ getAlertPolicy( request: protos.google.monitoring.v3.IGetAlertPolicyRequest, @@ -522,7 +527,11 @@ export class AlertPolicyServiceClient { * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * 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.createAlertPolicy(request); */ createAlertPolicy( request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, @@ -608,7 +617,11 @@ export class AlertPolicyServiceClient { * 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.deleteAlertPolicy(request); */ deleteAlertPolicy( request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, @@ -718,7 +731,11 @@ export class AlertPolicyServiceClient { * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * 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.updateAlertPolicy(request); */ updateAlertPolicy( request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, @@ -828,19 +845,14 @@ export class AlertPolicyServiceClient { * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. - * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} 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 [ListAlertPoliciesRequest]{@link google.monitoring.v3.ListAlertPoliciesRequest} - * 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 - * [ListAlertPoliciesResponse]{@link google.monitoring.v3.ListAlertPoliciesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listAlertPoliciesAsync()` + * 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. */ listAlertPolicies( request: protos.google.monitoring.v3.IListAlertPoliciesRequest, @@ -886,18 +898,7 @@ export class AlertPolicyServiceClient { } /** - * Equivalent to {@link listAlertPolicies}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listAlertPolicies} 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.name @@ -933,6 +934,13 @@ export class AlertPolicyServiceClient { * 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 [AlertPolicy]{@link google.monitoring.v3.AlertPolicy} 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 `listAlertPoliciesAsync()` + * 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. */ listAlertPoliciesStream( request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, @@ -957,10 +965,9 @@ export class AlertPolicyServiceClient { } /** - * Equivalent to {@link listAlertPolicies}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listAlertPolicies`, 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.name @@ -995,7 +1002,18 @@ export class AlertPolicyServiceClient { * @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 + * [AlertPolicy]{@link google.monitoring.v3.AlertPolicy}. 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.listAlertPoliciesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listAlertPoliciesAsync( request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, @@ -2212,9 +2230,10 @@ export class AlertPolicyServiceClient { } /** - * 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/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index ba6068ea86e..60565bac44f 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -71,8 +71,10 @@ export class GroupServiceClient { /** * Construct an instance of GroupServiceClient. * - * @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] @@ -92,42 +94,33 @@ export class GroupServiceClient { * 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 GroupServiceClient; 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 GroupServiceClient 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 GroupServiceClient).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. @@ -136,6 +129,11 @@ export class GroupServiceClient { // 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) { @@ -346,6 +344,7 @@ export class GroupServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -354,6 +353,7 @@ export class GroupServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -361,6 +361,7 @@ export class GroupServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -369,6 +370,7 @@ export class GroupServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -382,8 +384,7 @@ export class GroupServiceClient { 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 @@ -438,7 +439,11 @@ export class GroupServiceClient { * 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 [Group]{@link google.monitoring.v3.Group}. - * 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.getGroup(request); */ getGroup( request: protos.google.monitoring.v3.IGetGroupRequest, @@ -525,7 +530,11 @@ export class GroupServiceClient { * 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 [Group]{@link google.monitoring.v3.Group}. - * 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.createGroup(request); */ createGroup( request: protos.google.monitoring.v3.ICreateGroupRequest, @@ -609,7 +618,11 @@ export class GroupServiceClient { * 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 [Group]{@link google.monitoring.v3.Group}. - * 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.updateGroup(request); */ updateGroup( request: protos.google.monitoring.v3.IUpdateGroupRequest, @@ -695,7 +708,11 @@ export class GroupServiceClient { * 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.deleteGroup(request); */ deleteGroup( request: protos.google.monitoring.v3.IDeleteGroupRequest, @@ -808,19 +825,14 @@ export class GroupServiceClient { * 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 [Group]{@link google.monitoring.v3.Group}. - * 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 [Group]{@link google.monitoring.v3.Group} 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 [ListGroupsRequest]{@link google.monitoring.v3.ListGroupsRequest} - * 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 - * [ListGroupsResponse]{@link google.monitoring.v3.ListGroupsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listGroupsAsync()` + * 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. */ listGroups( request: protos.google.monitoring.v3.IListGroupsRequest, @@ -864,18 +876,7 @@ export class GroupServiceClient { } /** - * Equivalent to {@link listGroups}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listGroups} 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.name @@ -916,6 +917,13 @@ export class GroupServiceClient { * 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 [Group]{@link google.monitoring.v3.Group} 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 `listGroupsAsync()` + * 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. */ listGroupsStream( request?: protos.google.monitoring.v3.IListGroupsRequest, @@ -940,10 +948,9 @@ export class GroupServiceClient { } /** - * Equivalent to {@link listGroups}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listGroups`, 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.name @@ -983,7 +990,18 @@ export class GroupServiceClient { * @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 + * [Group]{@link google.monitoring.v3.Group}. 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.listGroupsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listGroupsAsync( request?: protos.google.monitoring.v3.IListGroupsRequest, @@ -1067,19 +1085,14 @@ export class GroupServiceClient { * 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 [MonitoredResource]{@link google.api.MonitoredResource}. - * 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 [MonitoredResource]{@link google.api.MonitoredResource} 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 [ListGroupMembersRequest]{@link google.monitoring.v3.ListGroupMembersRequest} - * 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 - * [ListGroupMembersResponse]{@link google.monitoring.v3.ListGroupMembersResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listGroupMembersAsync()` + * 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. */ listGroupMembers( request: protos.google.monitoring.v3.IListGroupMembersRequest, @@ -1125,18 +1138,7 @@ export class GroupServiceClient { } /** - * Equivalent to {@link listGroupMembers}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listGroupMembers} 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.name @@ -1167,6 +1169,13 @@ export class GroupServiceClient { * 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 [MonitoredResource]{@link google.api.MonitoredResource} 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 `listGroupMembersAsync()` + * 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. */ listGroupMembersStream( request?: protos.google.monitoring.v3.IListGroupMembersRequest, @@ -1191,10 +1200,9 @@ export class GroupServiceClient { } /** - * Equivalent to {@link listGroupMembers}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listGroupMembers`, 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.name @@ -1224,7 +1232,18 @@ export class GroupServiceClient { * @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 + * [MonitoredResource]{@link google.api.MonitoredResource}. 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.listGroupMembersAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listGroupMembersAsync( request?: protos.google.monitoring.v3.IListGroupMembersRequest, @@ -2441,9 +2460,10 @@ export class GroupServiceClient { } /** - * 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/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 91487ca0c3c..707bcfcb6c0 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -61,8 +61,10 @@ export class MetricServiceClient { /** * Construct an instance of MetricServiceClient. * - * @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] @@ -82,42 +84,33 @@ export class MetricServiceClient { * 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 MetricServiceClient; 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 MetricServiceClient 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 MetricServiceClient).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. @@ -126,6 +119,11 @@ export class MetricServiceClient { // 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) { @@ -361,6 +359,7 @@ export class MetricServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -369,6 +368,7 @@ export class MetricServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -376,6 +376,7 @@ export class MetricServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -384,6 +385,7 @@ export class MetricServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -398,8 +400,7 @@ export class MetricServiceClient { 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 MetricServiceClient { * 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 [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. - * 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.getMonitoredResourceDescriptor(request); */ getMonitoredResourceDescriptor( request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, @@ -564,7 +569,11 @@ export class MetricServiceClient { * 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. - * 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.getMetricDescriptor(request); */ getMetricDescriptor( request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, @@ -659,7 +668,11 @@ export class MetricServiceClient { * 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. - * 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.createMetricDescriptor(request); */ createMetricDescriptor( request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, @@ -758,7 +771,11 @@ export class MetricServiceClient { * 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.deleteMetricDescriptor(request); */ deleteMetricDescriptor( request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, @@ -859,7 +876,11 @@ export class MetricServiceClient { * 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.createTimeSeries(request); */ createTimeSeries( request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, @@ -961,19 +982,14 @@ export class MetricServiceClient { * 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.monitoring.v3.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.monitoring.v3.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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, @@ -1025,18 +1041,7 @@ export class MetricServiceClient { } /** - * 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 {string} request.name @@ -1060,6 +1065,13 @@ export class MetricServiceClient { * 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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, @@ -1084,10 +1096,9 @@ export class MetricServiceClient { } /** - * 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 {string} request.name @@ -1110,7 +1121,18 @@ export class MetricServiceClient { * @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.monitoring.v3.IListMonitoredResourceDescriptorsRequest, @@ -1193,19 +1215,14 @@ export class MetricServiceClient { * 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 [MetricDescriptor]{@link google.api.MetricDescriptor}. - * 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 [MetricDescriptor]{@link google.api.MetricDescriptor} 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 [ListMetricDescriptorsRequest]{@link google.monitoring.v3.ListMetricDescriptorsRequest} - * 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 - * [ListMetricDescriptorsResponse]{@link google.monitoring.v3.ListMetricDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listMetricDescriptorsAsync()` + * 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. */ listMetricDescriptors( request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, @@ -1253,18 +1270,7 @@ export class MetricServiceClient { } /** - * Equivalent to {@link listMetricDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listMetricDescriptors} 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.name @@ -1290,6 +1296,13 @@ export class MetricServiceClient { * 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 [MetricDescriptor]{@link google.api.MetricDescriptor} 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 `listMetricDescriptorsAsync()` + * 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. */ listMetricDescriptorsStream( request?: protos.google.monitoring.v3.IListMetricDescriptorsRequest, @@ -1314,10 +1327,9 @@ export class MetricServiceClient { } /** - * Equivalent to {@link listMetricDescriptors}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listMetricDescriptors`, 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.name @@ -1342,7 +1354,18 @@ export class MetricServiceClient { * @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 + * [MetricDescriptor]{@link google.api.MetricDescriptor}. 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.listMetricDescriptorsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listMetricDescriptorsAsync( request?: protos.google.monitoring.v3.IListMetricDescriptorsRequest, @@ -1439,19 +1462,14 @@ export class MetricServiceClient { * 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries}. - * 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} 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 [ListTimeSeriesRequest]{@link google.monitoring.v3.ListTimeSeriesRequest} - * 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 - * [ListTimeSeriesResponse]{@link google.monitoring.v3.ListTimeSeriesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listTimeSeriesAsync()` + * 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. */ listTimeSeries( request: protos.google.monitoring.v3.IListTimeSeriesRequest, @@ -1497,18 +1515,7 @@ export class MetricServiceClient { } /** - * Equivalent to {@link listTimeSeries}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listTimeSeries} 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.name @@ -1552,6 +1559,13 @@ export class MetricServiceClient { * 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 [TimeSeries]{@link google.monitoring.v3.TimeSeries} 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 `listTimeSeriesAsync()` + * 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. */ listTimeSeriesStream( request?: protos.google.monitoring.v3.IListTimeSeriesRequest, @@ -1576,10 +1590,9 @@ export class MetricServiceClient { } /** - * Equivalent to {@link listTimeSeries}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listTimeSeries`, 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.name @@ -1622,7 +1635,18 @@ export class MetricServiceClient { * @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 + * [TimeSeries]{@link google.monitoring.v3.TimeSeries}. 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.listTimeSeriesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listTimeSeriesAsync( request?: protos.google.monitoring.v3.IListTimeSeriesRequest, @@ -3121,9 +3145,10 @@ export class MetricServiceClient { } /** - * 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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index be004146958..ab75d9e7322 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -61,8 +61,10 @@ export class NotificationChannelServiceClient { /** * Construct an instance of NotificationChannelServiceClient. * - * @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] @@ -82,44 +84,34 @@ export class NotificationChannelServiceClient { * 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 NotificationChannelServiceClient; 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 NotificationChannelServiceClient 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 NotificationChannelServiceClient).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. @@ -128,6 +120,11 @@ export class NotificationChannelServiceClient { // 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) { @@ -342,6 +339,7 @@ export class NotificationChannelServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -350,6 +348,7 @@ export class NotificationChannelServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -357,6 +356,7 @@ export class NotificationChannelServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -365,6 +365,7 @@ export class NotificationChannelServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -378,8 +379,7 @@ export class NotificationChannelServiceClient { 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 +442,11 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. - * 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.getNotificationChannelDescriptor(request); */ getNotificationChannelDescriptor( request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, @@ -543,7 +547,11 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * 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.getNotificationChannel(request); */ getNotificationChannel( request: protos.google.monitoring.v3.IGetNotificationChannelRequest, @@ -645,7 +653,11 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * 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.createNotificationChannel(request); */ createNotificationChannel( request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, @@ -743,7 +755,11 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * 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.updateNotificationChannel(request); */ updateNotificationChannel( request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, @@ -842,7 +858,11 @@ export class NotificationChannelServiceClient { * 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.deleteNotificationChannel(request); */ deleteNotificationChannel( request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, @@ -938,7 +958,11 @@ export class NotificationChannelServiceClient { * 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.sendNotificationChannelVerificationCode(request); */ sendNotificationChannelVerificationCode( request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, @@ -1068,7 +1092,11 @@ export class NotificationChannelServiceClient { * 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 [GetNotificationChannelVerificationCodeResponse]{@link google.monitoring.v3.GetNotificationChannelVerificationCodeResponse}. - * 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.getNotificationChannelVerificationCode(request); */ getNotificationChannelVerificationCode( request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, @@ -1173,7 +1201,11 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * 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.verifyNotificationChannel(request); */ verifyNotificationChannel( request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, @@ -1283,19 +1315,14 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. - * 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} 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 [ListNotificationChannelDescriptorsRequest]{@link google.monitoring.v3.ListNotificationChannelDescriptorsRequest} - * 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 - * [ListNotificationChannelDescriptorsResponse]{@link google.monitoring.v3.ListNotificationChannelDescriptorsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listNotificationChannelDescriptorsAsync()` + * 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. */ listNotificationChannelDescriptors( request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, @@ -1347,18 +1374,7 @@ export class NotificationChannelServiceClient { } /** - * Equivalent to {@link listNotificationChannelDescriptors}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listNotificationChannelDescriptors} 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.name @@ -1383,6 +1399,13 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor} 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 `listNotificationChannelDescriptorsAsync()` + * 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. */ listNotificationChannelDescriptorsStream( request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, @@ -1407,10 +1430,9 @@ export class NotificationChannelServiceClient { } /** - * Equivalent to {@link listNotificationChannelDescriptors}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listNotificationChannelDescriptors`, 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.name @@ -1434,7 +1456,18 @@ export class NotificationChannelServiceClient { * @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 + * [NotificationChannelDescriptor]{@link google.monitoring.v3.NotificationChannelDescriptor}. 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.listNotificationChannelDescriptorsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listNotificationChannelDescriptorsAsync( request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, @@ -1532,19 +1565,14 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. - * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} 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 [ListNotificationChannelsRequest]{@link google.monitoring.v3.ListNotificationChannelsRequest} - * 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 - * [ListNotificationChannelsResponse]{@link google.monitoring.v3.ListNotificationChannelsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listNotificationChannelsAsync()` + * 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. */ listNotificationChannels( request: protos.google.monitoring.v3.IListNotificationChannelsRequest, @@ -1596,18 +1624,7 @@ export class NotificationChannelServiceClient { } /** - * Equivalent to {@link listNotificationChannels}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listNotificationChannels} 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.name @@ -1646,6 +1663,13 @@ export class NotificationChannelServiceClient { * 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 [NotificationChannel]{@link google.monitoring.v3.NotificationChannel} 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 `listNotificationChannelsAsync()` + * 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. */ listNotificationChannelsStream( request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, @@ -1670,10 +1694,9 @@ export class NotificationChannelServiceClient { } /** - * Equivalent to {@link listNotificationChannels}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listNotificationChannels`, 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.name @@ -1711,7 +1734,18 @@ export class NotificationChannelServiceClient { * @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 + * [NotificationChannel]{@link google.monitoring.v3.NotificationChannel}. 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.listNotificationChannelsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listNotificationChannelsAsync( request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, @@ -2928,9 +2962,10 @@ export class NotificationChannelServiceClient { } /** - * 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/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index 9fdaaf48382..5590bd92aeb 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -63,8 +63,10 @@ export class ServiceMonitoringServiceClient { /** * Construct an instance of ServiceMonitoringServiceClient. * - * @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] @@ -84,44 +86,34 @@ export class ServiceMonitoringServiceClient { * 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 ServiceMonitoringServiceClient; 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 ServiceMonitoringServiceClient 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 ServiceMonitoringServiceClient).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. @@ -130,6 +122,11 @@ export class ServiceMonitoringServiceClient { // 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) { @@ -344,6 +341,7 @@ export class ServiceMonitoringServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -352,6 +350,7 @@ export class ServiceMonitoringServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -359,6 +358,7 @@ export class ServiceMonitoringServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -367,6 +367,7 @@ export class ServiceMonitoringServiceClient { /** * 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 +381,7 @@ export class ServiceMonitoringServiceClient { 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 @@ -441,7 +441,11 @@ export class ServiceMonitoringServiceClient { * 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 [Service]{@link google.monitoring.v3.Service}. - * 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.createService(request); */ createService( request: protos.google.monitoring.v3.ICreateServiceRequest, @@ -523,7 +527,11 @@ export class ServiceMonitoringServiceClient { * 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 [Service]{@link google.monitoring.v3.Service}. - * 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.getService(request); */ getService( request: protos.google.monitoring.v3.IGetServiceRequest, @@ -606,7 +614,11 @@ export class ServiceMonitoringServiceClient { * 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 [Service]{@link google.monitoring.v3.Service}. - * 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.updateService(request); */ updateService( request: protos.google.monitoring.v3.IUpdateServiceRequest, @@ -688,7 +700,11 @@ export class ServiceMonitoringServiceClient { * 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.deleteService(request); */ deleteService( request: protos.google.monitoring.v3.IDeleteServiceRequest, @@ -785,7 +801,11 @@ export class ServiceMonitoringServiceClient { * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * 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.createServiceLevelObjective(request); */ createServiceLevelObjective( request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, @@ -887,7 +907,11 @@ export class ServiceMonitoringServiceClient { * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * 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.getServiceLevelObjective(request); */ getServiceLevelObjective( request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, @@ -985,7 +1009,11 @@ export class ServiceMonitoringServiceClient { * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * 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.updateServiceLevelObjective(request); */ updateServiceLevelObjective( request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, @@ -1085,7 +1113,11 @@ export class ServiceMonitoringServiceClient { * 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.deleteServiceLevelObjective(request); */ deleteServiceLevelObjective( request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, @@ -1204,19 +1236,14 @@ export class ServiceMonitoringServiceClient { * 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 [Service]{@link google.monitoring.v3.Service}. - * 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 [Service]{@link google.monitoring.v3.Service} 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 [ListServicesRequest]{@link google.monitoring.v3.ListServicesRequest} - * 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 - * [ListServicesResponse]{@link google.monitoring.v3.ListServicesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listServicesAsync()` + * 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. */ listServices( request: protos.google.monitoring.v3.IListServicesRequest, @@ -1260,18 +1287,7 @@ export class ServiceMonitoringServiceClient { } /** - * Equivalent to {@link listServices}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listServices} 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 @@ -1307,6 +1323,13 @@ export class ServiceMonitoringServiceClient { * 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 [Service]{@link google.monitoring.v3.Service} 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 `listServicesAsync()` + * 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. */ listServicesStream( request?: protos.google.monitoring.v3.IListServicesRequest, @@ -1331,10 +1354,9 @@ export class ServiceMonitoringServiceClient { } /** - * Equivalent to {@link listServices}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listServices`, 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 @@ -1369,7 +1391,18 @@ export class ServiceMonitoringServiceClient { * @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 + * [Service]{@link google.monitoring.v3.Service}. 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.listServicesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listServicesAsync( request?: protos.google.monitoring.v3.IListServicesRequest, @@ -1453,19 +1486,14 @@ export class ServiceMonitoringServiceClient { * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. - * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} 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 [ListServiceLevelObjectivesRequest]{@link google.monitoring.v3.ListServiceLevelObjectivesRequest} - * 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 - * [ListServiceLevelObjectivesResponse]{@link google.monitoring.v3.ListServiceLevelObjectivesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listServiceLevelObjectivesAsync()` + * 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. */ listServiceLevelObjectives( request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, @@ -1517,18 +1545,7 @@ export class ServiceMonitoringServiceClient { } /** - * Equivalent to {@link listServiceLevelObjectives}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listServiceLevelObjectives} 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 @@ -1555,6 +1572,13 @@ export class ServiceMonitoringServiceClient { * 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 [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective} 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 `listServiceLevelObjectivesAsync()` + * 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. */ listServiceLevelObjectivesStream( request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, @@ -1579,10 +1603,9 @@ export class ServiceMonitoringServiceClient { } /** - * Equivalent to {@link listServiceLevelObjectives}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listServiceLevelObjectives`, 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 @@ -1608,7 +1631,18 @@ export class ServiceMonitoringServiceClient { * @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 + * [ServiceLevelObjective]{@link google.monitoring.v3.ServiceLevelObjective}. 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.listServiceLevelObjectivesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listServiceLevelObjectivesAsync( request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, @@ -2825,9 +2859,10 @@ export class ServiceMonitoringServiceClient { } /** - * 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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index 7d44e34d266..a685f94efb3 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -67,8 +67,10 @@ export class UptimeCheckServiceClient { /** * Construct an instance of UptimeCheckServiceClient. * - * @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] @@ -88,42 +90,33 @@ export class UptimeCheckServiceClient { * 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 UptimeCheckServiceClient; 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 UptimeCheckServiceClient 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 UptimeCheckServiceClient).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. @@ -132,6 +125,11 @@ export class UptimeCheckServiceClient { // 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) { @@ -342,6 +340,7 @@ export class UptimeCheckServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'monitoring.googleapis.com'; @@ -350,6 +349,7 @@ export class UptimeCheckServiceClient { /** * 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 'monitoring.googleapis.com'; @@ -357,6 +357,7 @@ export class UptimeCheckServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -365,6 +366,7 @@ export class UptimeCheckServiceClient { /** * The scopes needed to make gRPC calls for every method defined * in this service. + * @returns {string[]} List of default scopes. */ static get scopes() { return [ @@ -378,8 +380,7 @@ export class UptimeCheckServiceClient { 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 @@ -438,7 +439,11 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * 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.getUptimeCheckConfig(request); */ getUptimeCheckConfig( request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, @@ -530,7 +535,11 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * 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.createUptimeCheckConfig(request); */ createUptimeCheckConfig( request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, @@ -640,7 +649,11 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * 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.updateUptimeCheckConfig(request); */ updateUptimeCheckConfig( request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, @@ -736,7 +749,11 @@ export class UptimeCheckServiceClient { * 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.deleteUptimeCheckConfig(request); */ deleteUptimeCheckConfig( request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, @@ -841,19 +858,14 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. - * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} 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 [ListUptimeCheckConfigsRequest]{@link google.monitoring.v3.ListUptimeCheckConfigsRequest} - * 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 - * [ListUptimeCheckConfigsResponse]{@link google.monitoring.v3.ListUptimeCheckConfigsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listUptimeCheckConfigsAsync()` + * 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. */ listUptimeCheckConfigs( request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, @@ -905,18 +917,7 @@ export class UptimeCheckServiceClient { } /** - * Equivalent to {@link listUptimeCheckConfigs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listUptimeCheckConfigs} 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 @@ -936,6 +937,13 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig} 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 `listUptimeCheckConfigsAsync()` + * 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. */ listUptimeCheckConfigsStream( request?: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, @@ -960,10 +968,9 @@ export class UptimeCheckServiceClient { } /** - * Equivalent to {@link listUptimeCheckConfigs}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listUptimeCheckConfigs`, 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 @@ -982,7 +989,18 @@ export class UptimeCheckServiceClient { * @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 + * [UptimeCheckConfig]{@link google.monitoring.v3.UptimeCheckConfig}. 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.listUptimeCheckConfigsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listUptimeCheckConfigsAsync( request?: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, @@ -1057,19 +1075,14 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. - * 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} 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 [ListUptimeCheckIpsRequest]{@link google.monitoring.v3.ListUptimeCheckIpsRequest} - * 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 - * [ListUptimeCheckIpsResponse]{@link google.monitoring.v3.ListUptimeCheckIpsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listUptimeCheckIpsAsync()` + * 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. */ listUptimeCheckIps( request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, @@ -1110,18 +1123,7 @@ export class UptimeCheckServiceClient { } /** - * Equivalent to {@link listUptimeCheckIps}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listUptimeCheckIps} 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 @@ -1139,6 +1141,13 @@ export class UptimeCheckServiceClient { * 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 [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp} 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 `listUptimeCheckIpsAsync()` + * 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. */ listUptimeCheckIpsStream( request?: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, @@ -1156,10 +1165,9 @@ export class UptimeCheckServiceClient { } /** - * Equivalent to {@link listUptimeCheckIps}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listUptimeCheckIps`, 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 @@ -1176,7 +1184,18 @@ export class UptimeCheckServiceClient { * @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 + * [UptimeCheckIp]{@link google.monitoring.v3.UptimeCheckIp}. 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.listUptimeCheckIpsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listUptimeCheckIpsAsync( request?: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, @@ -2386,9 +2405,10 @@ export class UptimeCheckServiceClient { } /** - * 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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 322b0e20cb5..0a499efd392 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "6445e65c0ff84e9cb0dac2c9b7bf172300f4bd2a" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "remote": "git@github.com:googleapis/nodejs-monitoring.git", + "sha": "69f9bcf752172e6a5a793d0150176d6f9c6658b2" } }, { "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.592367270", "protos/google/monitoring/v3/alert.proto", "protos/google/monitoring/v3/alert_service.proto", "protos/google/monitoring/v3/common.proto", @@ -108,6 +101,7 @@ "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.4124165143", "src/index.ts", "src/v3/alert_policy_service_client.ts", "src/v3/alert_policy_service_client_config.json", diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts index 70b78043268..c456bb14d99 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts @@ -25,13 +25,49 @@ import { UptimeCheckServiceClient, } from '@google-cloud/monitoring'; +// check that the client class type name can be used +function doStuffWithAlertPolicyServiceClient(client: AlertPolicyServiceClient) { + client.close(); +} +function doStuffWithGroupServiceClient(client: GroupServiceClient) { + client.close(); +} +function doStuffWithMetricServiceClient(client: MetricServiceClient) { + client.close(); +} +function doStuffWithNotificationChannelServiceClient( + client: NotificationChannelServiceClient +) { + client.close(); +} +function doStuffWithServiceMonitoringServiceClient( + client: ServiceMonitoringServiceClient +) { + client.close(); +} +function doStuffWithUptimeCheckServiceClient(client: UptimeCheckServiceClient) { + client.close(); +} + function main() { - new AlertPolicyServiceClient(); - new GroupServiceClient(); - new MetricServiceClient(); - new NotificationChannelServiceClient(); - new ServiceMonitoringServiceClient(); - new UptimeCheckServiceClient(); + // check that the client instance can be created + const alertPolicyServiceClient = new AlertPolicyServiceClient(); + doStuffWithAlertPolicyServiceClient(alertPolicyServiceClient); + // check that the client instance can be created + const groupServiceClient = new GroupServiceClient(); + doStuffWithGroupServiceClient(groupServiceClient); + // check that the client instance can be created + const metricServiceClient = new MetricServiceClient(); + doStuffWithMetricServiceClient(metricServiceClient); + // check that the client instance can be created + const notificationChannelServiceClient = new NotificationChannelServiceClient(); + doStuffWithNotificationChannelServiceClient(notificationChannelServiceClient); + // check that the client instance can be created + const serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + doStuffWithServiceMonitoringServiceClient(serviceMonitoringServiceClient); + // check that the client instance can be created + const uptimeCheckServiceClient = new UptimeCheckServiceClient(); + doStuffWithUptimeCheckServiceClient(uptimeCheckServiceClient); } main(); diff --git a/packages/google-cloud-monitoring/system-test/install.ts b/packages/google-cloud-monitoring/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-cloud-monitoring/system-test/install.ts +++ b/packages/google-cloud-monitoring/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 79e5127bffe5835a3d292ebb170bc3b09ded7cfc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2020 12:45:09 -0800 Subject: [PATCH 344/422] chore: release 2.1.3 (#498) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index a332f2c1e3a..35c8807e0d7 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.1.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.2...v2.1.3) (2020-11-07) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#497](https://www.github.com/googleapis/nodejs-monitoring/issues/497)) ([447cfce](https://www.github.com/googleapis/nodejs-monitoring/commit/447cfce75ed11d66e254d72d105252e8b0ed0a3c)) + ### [2.1.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.1...v2.1.2) (2020-09-12) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 1b80a1eaf71..8f985f5122a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.1.2", + "version": "2.1.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index f8ceafee6af..ed971009df3 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.1.2", + "@google-cloud/monitoring": "^2.1.3", "yargs": "^16.0.0" }, "devDependencies": { From 3b0b935b4bfa9eb4bc8904dbaeb7ba02a886fd19 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 11 Nov 2020 13:04:12 -0800 Subject: [PATCH 345/422] build: add version clients (#496) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/057c08c0-647a-4c05-9b44-46e745121a61/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-monitoring/synth.metadata | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 0a499efd392..898b09d2801 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -3,10 +3,18 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-monitoring.git", + "remote": "https://github.com/googleapis/nodejs-monitoring.git", "sha": "69f9bcf752172e6a5a793d0150176d6f9c6658b2" } }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", + "internalRef": "327369997" + } + }, { "git": { "name": "synthtool", From f0ee9e17d069a2adf6df249ec1f81147813e7dc6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 12:27:46 -0800 Subject: [PATCH 346/422] fix(browser): check for fetch on window (#501) --- .../protos/protos.json | 554 ++++++++++++++++-- .../src/v3/alert_policy_service_client.ts | 70 ++- .../src/v3/group_service_client.ts | 84 +-- .../src/v3/metric_service_client.ts | 108 ++-- .../v3/notification_channel_service_client.ts | 124 ++-- .../v3/service_monitoring_service_client.ts | 124 ++-- .../src/v3/uptime_check_service_client.ts | 84 +-- .../google-cloud-monitoring/synth.metadata | 8 +- 8 files changed, 833 insertions(+), 323 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index d4a31761fd8..56162dc2efa 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -364,7 +364,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/alertPolicies", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/alertPolicies" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetAlertPolicy": { "requestType": "GetAlertPolicyRequest", @@ -372,7 +382,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/alertPolicies/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/alertPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateAlertPolicy": { "requestType": "CreateAlertPolicyRequest", @@ -381,7 +401,18 @@ "(google.api.http).post": "/v3/{name=projects/*}/alertPolicies", "(google.api.http).body": "alert_policy", "(google.api.method_signature)": "name,alert_policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*}/alertPolicies", + "body": "alert_policy" + } + }, + { + "(google.api.method_signature)": "name,alert_policy" + } + ] }, "DeleteAlertPolicy": { "requestType": "DeleteAlertPolicyRequest", @@ -389,7 +420,17 @@ "options": { "(google.api.http).delete": "/v3/{name=projects/*/alertPolicies/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/alertPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateAlertPolicy": { "requestType": "UpdateAlertPolicyRequest", @@ -398,7 +439,18 @@ "(google.api.http).patch": "/v3/{alert_policy.name=projects/*/alertPolicies/*}", "(google.api.http).body": "alert_policy", "(google.api.method_signature)": "update_mask,alert_policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{alert_policy.name=projects/*/alertPolicies/*}", + "body": "alert_policy" + } + }, + { + "(google.api.method_signature)": "update_mask,alert_policy" + } + ] } } }, @@ -550,7 +602,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/groups", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/groups" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetGroup": { "requestType": "GetGroupRequest", @@ -558,7 +620,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/groups/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/groups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGroup": { "requestType": "CreateGroupRequest", @@ -567,7 +639,18 @@ "(google.api.http).post": "/v3/{name=projects/*}/groups", "(google.api.http).body": "group", "(google.api.method_signature)": "name,group" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*}/groups", + "body": "group" + } + }, + { + "(google.api.method_signature)": "name,group" + } + ] }, "UpdateGroup": { "requestType": "UpdateGroupRequest", @@ -576,7 +659,18 @@ "(google.api.http).put": "/v3/{group.name=projects/*/groups/*}", "(google.api.http).body": "group", "(google.api.method_signature)": "group" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v3/{group.name=projects/*/groups/*}", + "body": "group" + } + }, + { + "(google.api.method_signature)": "group" + } + ] }, "DeleteGroup": { "requestType": "DeleteGroupRequest", @@ -584,7 +678,17 @@ "options": { "(google.api.http).delete": "/v3/{name=projects/*/groups/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/groups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListGroupMembers": { "requestType": "ListGroupMembersRequest", @@ -592,7 +696,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/groups/*}/members", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/groups/*}/members" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -959,7 +1073,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/monitoredResourceDescriptors", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/monitoredResourceDescriptors" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetMonitoredResourceDescriptor": { "requestType": "GetMonitoredResourceDescriptorRequest", @@ -967,7 +1091,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/monitoredResourceDescriptors/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/monitoredResourceDescriptors/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListMetricDescriptors": { "requestType": "ListMetricDescriptorsRequest", @@ -975,7 +1109,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/metricDescriptors", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/metricDescriptors" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetMetricDescriptor": { "requestType": "GetMetricDescriptorRequest", @@ -983,7 +1127,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/metricDescriptors/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/metricDescriptors/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateMetricDescriptor": { "requestType": "CreateMetricDescriptorRequest", @@ -992,7 +1146,18 @@ "(google.api.http).post": "/v3/{name=projects/*}/metricDescriptors", "(google.api.http).body": "metric_descriptor", "(google.api.method_signature)": "name,metric_descriptor" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*}/metricDescriptors", + "body": "metric_descriptor" + } + }, + { + "(google.api.method_signature)": "name,metric_descriptor" + } + ] }, "DeleteMetricDescriptor": { "requestType": "DeleteMetricDescriptorRequest", @@ -1000,7 +1165,17 @@ "options": { "(google.api.http).delete": "/v3/{name=projects/*/metricDescriptors/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/metricDescriptors/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListTimeSeries": { "requestType": "ListTimeSeriesRequest", @@ -1008,7 +1183,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/timeSeries", "(google.api.method_signature)": "name,filter,interval,view" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/timeSeries" + } + }, + { + "(google.api.method_signature)": "name,filter,interval,view" + } + ] }, "CreateTimeSeries": { "requestType": "CreateTimeSeriesRequest", @@ -1017,7 +1202,18 @@ "(google.api.http).post": "/v3/{name=projects/*}/timeSeries", "(google.api.http).body": "*", "(google.api.method_signature)": "name,time_series" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*}/timeSeries", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,time_series" + } + ] } } }, @@ -1453,7 +1649,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/notificationChannelDescriptors", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/notificationChannelDescriptors" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetNotificationChannelDescriptor": { "requestType": "GetNotificationChannelDescriptorRequest", @@ -1461,7 +1667,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/notificationChannelDescriptors/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/notificationChannelDescriptors/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListNotificationChannels": { "requestType": "ListNotificationChannelsRequest", @@ -1469,7 +1685,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*}/notificationChannels", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*}/notificationChannels" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetNotificationChannel": { "requestType": "GetNotificationChannelRequest", @@ -1477,7 +1703,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/notificationChannels/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/notificationChannels/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateNotificationChannel": { "requestType": "CreateNotificationChannelRequest", @@ -1486,7 +1722,18 @@ "(google.api.http).post": "/v3/{name=projects/*}/notificationChannels", "(google.api.http).body": "notification_channel", "(google.api.method_signature)": "name,notification_channel" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*}/notificationChannels", + "body": "notification_channel" + } + }, + { + "(google.api.method_signature)": "name,notification_channel" + } + ] }, "UpdateNotificationChannel": { "requestType": "UpdateNotificationChannelRequest", @@ -1495,7 +1742,18 @@ "(google.api.http).patch": "/v3/{notification_channel.name=projects/*/notificationChannels/*}", "(google.api.http).body": "notification_channel", "(google.api.method_signature)": "update_mask,notification_channel" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{notification_channel.name=projects/*/notificationChannels/*}", + "body": "notification_channel" + } + }, + { + "(google.api.method_signature)": "update_mask,notification_channel" + } + ] }, "DeleteNotificationChannel": { "requestType": "DeleteNotificationChannelRequest", @@ -1503,7 +1761,17 @@ "options": { "(google.api.http).delete": "/v3/{name=projects/*/notificationChannels/*}", "(google.api.method_signature)": "name,force" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/notificationChannels/*}" + } + }, + { + "(google.api.method_signature)": "name,force" + } + ] }, "SendNotificationChannelVerificationCode": { "requestType": "SendNotificationChannelVerificationCodeRequest", @@ -1512,7 +1780,18 @@ "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetNotificationChannelVerificationCode": { "requestType": "GetNotificationChannelVerificationCodeRequest", @@ -1521,7 +1800,18 @@ "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/notificationChannels/*}:getVerificationCode", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "VerifyNotificationChannel": { "requestType": "VerifyNotificationChannelRequest", @@ -1530,7 +1820,18 @@ "(google.api.http).post": "/v3/{name=projects/*/notificationChannels/*}:verify", "(google.api.http).body": "*", "(google.api.method_signature)": "name,code" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*/notificationChannels/*}:verify", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,code" + } + ] } } }, @@ -2131,7 +2432,18 @@ "(google.api.http).post": "/v3/{parent=*/*}/services", "(google.api.http).body": "service", "(google.api.method_signature)": "parent,service" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=*/*}/services", + "body": "service" + } + }, + { + "(google.api.method_signature)": "parent,service" + } + ] }, "GetService": { "requestType": "GetServiceRequest", @@ -2139,7 +2451,17 @@ "options": { "(google.api.http).get": "/v3/{name=*/*/services/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=*/*/services/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListServices": { "requestType": "ListServicesRequest", @@ -2147,7 +2469,17 @@ "options": { "(google.api.http).get": "/v3/{parent=*/*}/services", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=*/*}/services" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "UpdateService": { "requestType": "UpdateServiceRequest", @@ -2156,7 +2488,18 @@ "(google.api.http).patch": "/v3/{service.name=*/*/services/*}", "(google.api.http).body": "service", "(google.api.method_signature)": "service" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{service.name=*/*/services/*}", + "body": "service" + } + }, + { + "(google.api.method_signature)": "service" + } + ] }, "DeleteService": { "requestType": "DeleteServiceRequest", @@ -2164,7 +2507,17 @@ "options": { "(google.api.http).delete": "/v3/{name=*/*/services/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=*/*/services/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateServiceLevelObjective": { "requestType": "CreateServiceLevelObjectiveRequest", @@ -2173,7 +2526,18 @@ "(google.api.http).post": "/v3/{parent=*/*/services/*}/serviceLevelObjectives", "(google.api.http).body": "service_level_objective", "(google.api.method_signature)": "parent,service_level_objective" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=*/*/services/*}/serviceLevelObjectives", + "body": "service_level_objective" + } + }, + { + "(google.api.method_signature)": "parent,service_level_objective" + } + ] }, "GetServiceLevelObjective": { "requestType": "GetServiceLevelObjectiveRequest", @@ -2181,7 +2545,17 @@ "options": { "(google.api.http).get": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListServiceLevelObjectives": { "requestType": "ListServiceLevelObjectivesRequest", @@ -2189,7 +2563,17 @@ "options": { "(google.api.http).get": "/v3/{parent=*/*/services/*}/serviceLevelObjectives", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=*/*/services/*}/serviceLevelObjectives" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "UpdateServiceLevelObjective": { "requestType": "UpdateServiceLevelObjectiveRequest", @@ -2198,7 +2582,18 @@ "(google.api.http).patch": "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}", "(google.api.http).body": "service_level_objective", "(google.api.method_signature)": "service_level_objective" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}", + "body": "service_level_objective" + } + }, + { + "(google.api.method_signature)": "service_level_objective" + } + ] }, "DeleteServiceLevelObjective": { "requestType": "DeleteServiceLevelObjectiveRequest", @@ -2206,7 +2601,17 @@ "options": { "(google.api.http).delete": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=*/*/services/*/serviceLevelObjectives/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -2704,7 +3109,17 @@ "options": { "(google.api.http).get": "/v3/{parent=projects/*}/uptimeCheckConfigs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=projects/*}/uptimeCheckConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetUptimeCheckConfig": { "requestType": "GetUptimeCheckConfigRequest", @@ -2712,7 +3127,17 @@ "options": { "(google.api.http).get": "/v3/{name=projects/*/uptimeCheckConfigs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{name=projects/*/uptimeCheckConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateUptimeCheckConfig": { "requestType": "CreateUptimeCheckConfigRequest", @@ -2721,7 +3146,18 @@ "(google.api.http).post": "/v3/{parent=projects/*}/uptimeCheckConfigs", "(google.api.http).body": "uptime_check_config", "(google.api.method_signature)": "parent,uptime_check_config" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=projects/*}/uptimeCheckConfigs", + "body": "uptime_check_config" + } + }, + { + "(google.api.method_signature)": "parent,uptime_check_config" + } + ] }, "UpdateUptimeCheckConfig": { "requestType": "UpdateUptimeCheckConfigRequest", @@ -2730,7 +3166,18 @@ "(google.api.http).patch": "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}", "(google.api.http).body": "uptime_check_config", "(google.api.method_signature)": "uptime_check_config" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}", + "body": "uptime_check_config" + } + }, + { + "(google.api.method_signature)": "uptime_check_config" + } + ] }, "DeleteUptimeCheckConfig": { "requestType": "DeleteUptimeCheckConfigRequest", @@ -2738,14 +3185,31 @@ "options": { "(google.api.http).delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=projects/*/uptimeCheckConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListUptimeCheckIps": { "requestType": "ListUptimeCheckIpsRequest", "responseType": "ListUptimeCheckIpsResponse", "options": { "(google.api.http).get": "/v3/uptimeCheckIps" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/uptimeCheckIps" + } + } + ] } } }, diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 76394756799..0b81a3b1c0a 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_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/v3/alert_policy_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './alert_policy_service_client_config.json'; const version = require('../../../package.json').version; @@ -91,9 +97,9 @@ export class AlertPolicyServiceClient { * 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` @@ -106,7 +112,9 @@ export class AlertPolicyServiceClient { 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. @@ -392,7 +400,7 @@ export class AlertPolicyServiceClient { // ------------------- getAlertPolicy( request: protos.google.monitoring.v3.IGetAlertPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IAlertPolicy, @@ -402,7 +410,7 @@ export class AlertPolicyServiceClient { >; getAlertPolicy( request: protos.google.monitoring.v3.IGetAlertPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, @@ -439,7 +447,7 @@ export class AlertPolicyServiceClient { getAlertPolicy( request: protos.google.monitoring.v3.IGetAlertPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IGetAlertPolicyRequest | null | undefined, @@ -458,12 +466,12 @@ export class AlertPolicyServiceClient { ] > | 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 || {}; @@ -478,7 +486,7 @@ export class AlertPolicyServiceClient { } createAlertPolicy( request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IAlertPolicy, @@ -488,7 +496,7 @@ export class AlertPolicyServiceClient { >; createAlertPolicy( request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.ICreateAlertPolicyRequest | null | undefined, @@ -536,7 +544,7 @@ export class AlertPolicyServiceClient { createAlertPolicy( request: protos.google.monitoring.v3.ICreateAlertPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IAlertPolicy, | protos.google.monitoring.v3.ICreateAlertPolicyRequest @@ -557,12 +565,12 @@ export class AlertPolicyServiceClient { ] > | 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 || {}; @@ -577,7 +585,7 @@ export class AlertPolicyServiceClient { } deleteAlertPolicy( request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -587,7 +595,7 @@ export class AlertPolicyServiceClient { >; deleteAlertPolicy( request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteAlertPolicyRequest | null | undefined, @@ -626,7 +634,7 @@ export class AlertPolicyServiceClient { deleteAlertPolicy( request: protos.google.monitoring.v3.IDeleteAlertPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteAlertPolicyRequest @@ -647,12 +655,12 @@ export class AlertPolicyServiceClient { ] > | 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 || {}; @@ -667,7 +675,7 @@ export class AlertPolicyServiceClient { } updateAlertPolicy( request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IAlertPolicy, @@ -677,7 +685,7 @@ export class AlertPolicyServiceClient { >; updateAlertPolicy( request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IAlertPolicy, protos.google.monitoring.v3.IUpdateAlertPolicyRequest | null | undefined, @@ -740,7 +748,7 @@ export class AlertPolicyServiceClient { updateAlertPolicy( request: protos.google.monitoring.v3.IUpdateAlertPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IAlertPolicy, | protos.google.monitoring.v3.IUpdateAlertPolicyRequest @@ -761,12 +769,12 @@ export class AlertPolicyServiceClient { ] > | 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 || {}; @@ -782,7 +790,7 @@ export class AlertPolicyServiceClient { listAlertPolicies( request: protos.google.monitoring.v3.IListAlertPoliciesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IAlertPolicy[], @@ -792,7 +800,7 @@ export class AlertPolicyServiceClient { >; listAlertPolicies( request: protos.google.monitoring.v3.IListAlertPoliciesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListAlertPoliciesRequest, protos.google.monitoring.v3.IListAlertPoliciesResponse | null | undefined, @@ -857,7 +865,7 @@ export class AlertPolicyServiceClient { listAlertPolicies( request: protos.google.monitoring.v3.IListAlertPoliciesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListAlertPoliciesRequest, | protos.google.monitoring.v3.IListAlertPoliciesResponse @@ -878,12 +886,12 @@ export class AlertPolicyServiceClient { ] > | 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 || {}; @@ -944,7 +952,7 @@ export class AlertPolicyServiceClient { */ listAlertPoliciesStream( request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1017,7 +1025,7 @@ export class AlertPolicyServiceClient { */ listAlertPoliciesAsync( request?: protos.google.monitoring.v3.IListAlertPoliciesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index 60565bac44f..24463822985 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_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/v3/group_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './group_service_client_config.json'; const version = require('../../../package.json').version; @@ -94,9 +100,9 @@ export class GroupServiceClient { * 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` @@ -109,7 +115,9 @@ export class GroupServiceClient { 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. @@ -401,7 +409,7 @@ export class GroupServiceClient { // ------------------- getGroup( request: protos.google.monitoring.v3.IGetGroupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IGroup, @@ -411,7 +419,7 @@ export class GroupServiceClient { >; getGroup( request: protos.google.monitoring.v3.IGetGroupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IGroup, protos.google.monitoring.v3.IGetGroupRequest | null | undefined, @@ -448,7 +456,7 @@ export class GroupServiceClient { getGroup( request: protos.google.monitoring.v3.IGetGroupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IGroup, protos.google.monitoring.v3.IGetGroupRequest | null | undefined, @@ -467,12 +475,12 @@ export class GroupServiceClient { ] > | 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 || {}; @@ -487,7 +495,7 @@ export class GroupServiceClient { } createGroup( request: protos.google.monitoring.v3.ICreateGroupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IGroup, @@ -497,7 +505,7 @@ export class GroupServiceClient { >; createGroup( request: protos.google.monitoring.v3.ICreateGroupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IGroup, protos.google.monitoring.v3.ICreateGroupRequest | null | undefined, @@ -539,7 +547,7 @@ export class GroupServiceClient { createGroup( request: protos.google.monitoring.v3.ICreateGroupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IGroup, protos.google.monitoring.v3.ICreateGroupRequest | null | undefined, @@ -558,12 +566,12 @@ export class GroupServiceClient { ] > | 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 || {}; @@ -578,7 +586,7 @@ export class GroupServiceClient { } updateGroup( request: protos.google.monitoring.v3.IUpdateGroupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IGroup, @@ -588,7 +596,7 @@ export class GroupServiceClient { >; updateGroup( request: protos.google.monitoring.v3.IUpdateGroupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IGroup, protos.google.monitoring.v3.IUpdateGroupRequest | null | undefined, @@ -627,7 +635,7 @@ export class GroupServiceClient { updateGroup( request: protos.google.monitoring.v3.IUpdateGroupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IGroup, protos.google.monitoring.v3.IUpdateGroupRequest | null | undefined, @@ -646,12 +654,12 @@ export class GroupServiceClient { ] > | 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 || {}; @@ -666,7 +674,7 @@ export class GroupServiceClient { } deleteGroup( request: protos.google.monitoring.v3.IDeleteGroupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -676,7 +684,7 @@ export class GroupServiceClient { >; deleteGroup( request: protos.google.monitoring.v3.IDeleteGroupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteGroupRequest | null | undefined, @@ -717,7 +725,7 @@ export class GroupServiceClient { deleteGroup( request: protos.google.monitoring.v3.IDeleteGroupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteGroupRequest | null | undefined, @@ -736,12 +744,12 @@ export class GroupServiceClient { ] > | 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 || {}; @@ -757,7 +765,7 @@ export class GroupServiceClient { listGroups( request: protos.google.monitoring.v3.IListGroupsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IGroup[], @@ -767,7 +775,7 @@ export class GroupServiceClient { >; listGroups( request: protos.google.monitoring.v3.IListGroupsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListGroupsRequest, protos.google.monitoring.v3.IListGroupsResponse | null | undefined, @@ -837,7 +845,7 @@ export class GroupServiceClient { listGroups( request: protos.google.monitoring.v3.IListGroupsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListGroupsRequest, protos.google.monitoring.v3.IListGroupsResponse | null | undefined, @@ -856,12 +864,12 @@ export class GroupServiceClient { ] > | 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 || {}; @@ -927,7 +935,7 @@ export class GroupServiceClient { */ listGroupsStream( request?: protos.google.monitoring.v3.IListGroupsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1005,7 +1013,7 @@ export class GroupServiceClient { */ listGroupsAsync( request?: protos.google.monitoring.v3.IListGroupsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1027,7 +1035,7 @@ export class GroupServiceClient { } listGroupMembers( request: protos.google.monitoring.v3.IListGroupMembersRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMonitoredResource[], @@ -1037,7 +1045,7 @@ export class GroupServiceClient { >; listGroupMembers( request: protos.google.monitoring.v3.IListGroupMembersRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListGroupMembersRequest, protos.google.monitoring.v3.IListGroupMembersResponse | null | undefined, @@ -1097,7 +1105,7 @@ export class GroupServiceClient { listGroupMembers( request: protos.google.monitoring.v3.IListGroupMembersRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListGroupMembersRequest, | protos.google.monitoring.v3.IListGroupMembersResponse @@ -1118,12 +1126,12 @@ export class GroupServiceClient { ] > | 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 || {}; @@ -1179,7 +1187,7 @@ export class GroupServiceClient { */ listGroupMembersStream( request?: protos.google.monitoring.v3.IListGroupMembersRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1247,7 +1255,7 @@ export class GroupServiceClient { */ listGroupMembersAsync( request?: protos.google.monitoring.v3.IListGroupMembersRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 707bcfcb6c0..84a3d72cea2 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_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/v3/metric_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './metric_service_client_config.json'; const version = require('../../../package.json').version; @@ -84,9 +90,9 @@ export class MetricServiceClient { * 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` @@ -99,7 +105,9 @@ export class MetricServiceClient { 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. @@ -417,7 +425,7 @@ export class MetricServiceClient { // ------------------- getMonitoredResourceDescriptor( request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMonitoredResourceDescriptor, @@ -430,7 +438,7 @@ export class MetricServiceClient { >; getMonitoredResourceDescriptor( request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.api.IMonitoredResourceDescriptor, | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest @@ -474,7 +482,7 @@ export class MetricServiceClient { getMonitoredResourceDescriptor( request: protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.api.IMonitoredResourceDescriptor, | protos.google.monitoring.v3.IGetMonitoredResourceDescriptorRequest @@ -500,12 +508,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -524,7 +532,7 @@ export class MetricServiceClient { } getMetricDescriptor( request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMetricDescriptor, @@ -534,7 +542,7 @@ export class MetricServiceClient { >; getMetricDescriptor( request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.api.IMetricDescriptor, | protos.google.monitoring.v3.IGetMetricDescriptorRequest @@ -578,7 +586,7 @@ export class MetricServiceClient { getMetricDescriptor( request: protos.google.monitoring.v3.IGetMetricDescriptorRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.api.IMetricDescriptor, | protos.google.monitoring.v3.IGetMetricDescriptorRequest @@ -601,12 +609,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -621,7 +629,7 @@ export class MetricServiceClient { } createMetricDescriptor( request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMetricDescriptor, @@ -631,7 +639,7 @@ export class MetricServiceClient { >; createMetricDescriptor( request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.api.IMetricDescriptor, | protos.google.monitoring.v3.ICreateMetricDescriptorRequest @@ -677,7 +685,7 @@ export class MetricServiceClient { createMetricDescriptor( request: protos.google.monitoring.v3.ICreateMetricDescriptorRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.api.IMetricDescriptor, | protos.google.monitoring.v3.ICreateMetricDescriptorRequest @@ -700,12 +708,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -724,7 +732,7 @@ export class MetricServiceClient { } deleteMetricDescriptor( request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -734,7 +742,7 @@ export class MetricServiceClient { >; deleteMetricDescriptor( request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteMetricDescriptorRequest @@ -780,7 +788,7 @@ export class MetricServiceClient { deleteMetricDescriptor( request: protos.google.monitoring.v3.IDeleteMetricDescriptorRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteMetricDescriptorRequest @@ -803,12 +811,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -827,7 +835,7 @@ export class MetricServiceClient { } createTimeSeries( request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -837,7 +845,7 @@ export class MetricServiceClient { >; createTimeSeries( request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.monitoring.v3.ICreateTimeSeriesRequest | null | undefined, @@ -885,7 +893,7 @@ export class MetricServiceClient { createTimeSeries( request: protos.google.monitoring.v3.ICreateTimeSeriesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.ICreateTimeSeriesRequest @@ -906,12 +914,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -927,7 +935,7 @@ export class MetricServiceClient { listMonitoredResourceDescriptors( request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMonitoredResourceDescriptor[], @@ -937,7 +945,7 @@ export class MetricServiceClient { >; listMonitoredResourceDescriptors( request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, | protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse @@ -994,7 +1002,7 @@ export class MetricServiceClient { listMonitoredResourceDescriptors( request: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, | protos.google.monitoring.v3.IListMonitoredResourceDescriptorsResponse @@ -1017,12 +1025,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -1075,7 +1083,7 @@ export class MetricServiceClient { */ listMonitoredResourceDescriptorsStream( request?: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1136,7 +1144,7 @@ export class MetricServiceClient { */ listMonitoredResourceDescriptorsAsync( request?: protos.google.monitoring.v3.IListMonitoredResourceDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1158,7 +1166,7 @@ export class MetricServiceClient { } listMetricDescriptors( request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.api.IMetricDescriptor[], @@ -1168,7 +1176,7 @@ export class MetricServiceClient { >; listMetricDescriptors( request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListMetricDescriptorsRequest, | protos.google.monitoring.v3.IListMetricDescriptorsResponse @@ -1227,7 +1235,7 @@ export class MetricServiceClient { listMetricDescriptors( request: protos.google.monitoring.v3.IListMetricDescriptorsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListMetricDescriptorsRequest, | protos.google.monitoring.v3.IListMetricDescriptorsResponse @@ -1250,12 +1258,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -1306,7 +1314,7 @@ export class MetricServiceClient { */ listMetricDescriptorsStream( request?: protos.google.monitoring.v3.IListMetricDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1369,7 +1377,7 @@ export class MetricServiceClient { */ listMetricDescriptorsAsync( request?: protos.google.monitoring.v3.IListMetricDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1391,7 +1399,7 @@ export class MetricServiceClient { } listTimeSeries( request: protos.google.monitoring.v3.IListTimeSeriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.ITimeSeries[], @@ -1401,7 +1409,7 @@ export class MetricServiceClient { >; listTimeSeries( request: protos.google.monitoring.v3.IListTimeSeriesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListTimeSeriesRequest, protos.google.monitoring.v3.IListTimeSeriesResponse | null | undefined, @@ -1474,7 +1482,7 @@ export class MetricServiceClient { listTimeSeries( request: protos.google.monitoring.v3.IListTimeSeriesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListTimeSeriesRequest, | protos.google.monitoring.v3.IListTimeSeriesResponse @@ -1495,12 +1503,12 @@ export class MetricServiceClient { ] > | 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 || {}; @@ -1569,7 +1577,7 @@ export class MetricServiceClient { */ listTimeSeriesStream( request?: protos.google.monitoring.v3.IListTimeSeriesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1650,7 +1658,7 @@ export class MetricServiceClient { */ listTimeSeriesAsync( request?: protos.google.monitoring.v3.IListTimeSeriesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index ab75d9e7322..0aa571da6aa 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_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/v3/notification_channel_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './notification_channel_service_client_config.json'; const version = require('../../../package.json').version; @@ -84,9 +90,9 @@ export class NotificationChannelServiceClient { * 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` @@ -100,7 +106,9 @@ export class NotificationChannelServiceClient { 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. @@ -396,7 +404,7 @@ export class NotificationChannelServiceClient { // ------------------- getNotificationChannelDescriptor( request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannelDescriptor, @@ -409,7 +417,7 @@ export class NotificationChannelServiceClient { >; getNotificationChannelDescriptor( request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.INotificationChannelDescriptor, | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest @@ -451,7 +459,7 @@ export class NotificationChannelServiceClient { getNotificationChannelDescriptor( request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.INotificationChannelDescriptor, | protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest @@ -477,12 +485,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -501,7 +509,7 @@ export class NotificationChannelServiceClient { } getNotificationChannel( request: protos.google.monitoring.v3.IGetNotificationChannelRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannel, @@ -511,7 +519,7 @@ export class NotificationChannelServiceClient { >; getNotificationChannel( request: protos.google.monitoring.v3.IGetNotificationChannelRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.IGetNotificationChannelRequest @@ -556,7 +564,7 @@ export class NotificationChannelServiceClient { getNotificationChannel( request: protos.google.monitoring.v3.IGetNotificationChannelRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.IGetNotificationChannelRequest @@ -579,12 +587,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -603,7 +611,7 @@ export class NotificationChannelServiceClient { } createNotificationChannel( request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannel, @@ -613,7 +621,7 @@ export class NotificationChannelServiceClient { >; createNotificationChannel( request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.ICreateNotificationChannelRequest @@ -662,7 +670,7 @@ export class NotificationChannelServiceClient { createNotificationChannel( request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.ICreateNotificationChannelRequest @@ -685,12 +693,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -709,7 +717,7 @@ export class NotificationChannelServiceClient { } updateNotificationChannel( request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannel, @@ -719,7 +727,7 @@ export class NotificationChannelServiceClient { >; updateNotificationChannel( request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.IUpdateNotificationChannelRequest @@ -764,7 +772,7 @@ export class NotificationChannelServiceClient { updateNotificationChannel( request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.IUpdateNotificationChannelRequest @@ -787,12 +795,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -811,7 +819,7 @@ export class NotificationChannelServiceClient { } deleteNotificationChannel( request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -821,7 +829,7 @@ export class NotificationChannelServiceClient { >; deleteNotificationChannel( request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteNotificationChannelRequest @@ -867,7 +875,7 @@ export class NotificationChannelServiceClient { deleteNotificationChannel( request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteNotificationChannelRequest @@ -890,12 +898,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -914,7 +922,7 @@ export class NotificationChannelServiceClient { } sendNotificationChannelVerificationCode( request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -927,7 +935,7 @@ export class NotificationChannelServiceClient { >; sendNotificationChannelVerificationCode( request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest @@ -967,7 +975,7 @@ export class NotificationChannelServiceClient { sendNotificationChannelVerificationCode( request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest @@ -993,12 +1001,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -1017,7 +1025,7 @@ export class NotificationChannelServiceClient { } getNotificationChannelVerificationCode( request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, @@ -1030,7 +1038,7 @@ export class NotificationChannelServiceClient { >; getNotificationChannelVerificationCode( request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest @@ -1101,7 +1109,7 @@ export class NotificationChannelServiceClient { getNotificationChannelVerificationCode( request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, | protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest @@ -1127,12 +1135,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -1151,7 +1159,7 @@ export class NotificationChannelServiceClient { } verifyNotificationChannel( request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannel, @@ -1161,7 +1169,7 @@ export class NotificationChannelServiceClient { >; verifyNotificationChannel( request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.IVerifyNotificationChannelRequest @@ -1210,7 +1218,7 @@ export class NotificationChannelServiceClient { verifyNotificationChannel( request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.INotificationChannel, | protos.google.monitoring.v3.IVerifyNotificationChannelRequest @@ -1233,12 +1241,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -1258,7 +1266,7 @@ export class NotificationChannelServiceClient { listNotificationChannelDescriptors( request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannelDescriptor[], @@ -1268,7 +1276,7 @@ export class NotificationChannelServiceClient { >; listNotificationChannelDescriptors( request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, | protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse @@ -1327,7 +1335,7 @@ export class NotificationChannelServiceClient { listNotificationChannelDescriptors( request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, | protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse @@ -1350,12 +1358,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -1409,7 +1417,7 @@ export class NotificationChannelServiceClient { */ listNotificationChannelDescriptorsStream( request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1471,7 +1479,7 @@ export class NotificationChannelServiceClient { */ listNotificationChannelDescriptorsAsync( request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1495,7 +1503,7 @@ export class NotificationChannelServiceClient { } listNotificationChannels( request: protos.google.monitoring.v3.IListNotificationChannelsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.INotificationChannel[], @@ -1505,7 +1513,7 @@ export class NotificationChannelServiceClient { >; listNotificationChannels( request: protos.google.monitoring.v3.IListNotificationChannelsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListNotificationChannelsRequest, | protos.google.monitoring.v3.IListNotificationChannelsResponse @@ -1577,7 +1585,7 @@ export class NotificationChannelServiceClient { listNotificationChannels( request: protos.google.monitoring.v3.IListNotificationChannelsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListNotificationChannelsRequest, | protos.google.monitoring.v3.IListNotificationChannelsResponse @@ -1600,12 +1608,12 @@ export class NotificationChannelServiceClient { ] > | 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 || {}; @@ -1673,7 +1681,7 @@ export class NotificationChannelServiceClient { */ listNotificationChannelsStream( request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1749,7 +1757,7 @@ export class NotificationChannelServiceClient { */ listNotificationChannelsAsync( request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index 5590bd92aeb..e4dad71a50b 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_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/v3/service_monitoring_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './service_monitoring_service_client_config.json'; const version = require('../../../package.json').version; @@ -86,9 +92,9 @@ export class ServiceMonitoringServiceClient { * 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` @@ -102,7 +108,9 @@ export class ServiceMonitoringServiceClient { 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. @@ -398,7 +406,7 @@ export class ServiceMonitoringServiceClient { // ------------------- createService( request: protos.google.monitoring.v3.ICreateServiceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IService, @@ -408,7 +416,7 @@ export class ServiceMonitoringServiceClient { >; createService( request: protos.google.monitoring.v3.ICreateServiceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IService, protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, @@ -450,7 +458,7 @@ export class ServiceMonitoringServiceClient { createService( request: protos.google.monitoring.v3.ICreateServiceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IService, protos.google.monitoring.v3.ICreateServiceRequest | null | undefined, @@ -469,12 +477,12 @@ export class ServiceMonitoringServiceClient { ] > | 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,7 +497,7 @@ export class ServiceMonitoringServiceClient { } getService( request: protos.google.monitoring.v3.IGetServiceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IService, @@ -499,7 +507,7 @@ export class ServiceMonitoringServiceClient { >; getService( request: protos.google.monitoring.v3.IGetServiceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IGetServiceRequest | null | undefined, @@ -536,7 +544,7 @@ export class ServiceMonitoringServiceClient { getService( request: protos.google.monitoring.v3.IGetServiceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IGetServiceRequest | null | undefined, @@ -555,12 +563,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -575,7 +583,7 @@ export class ServiceMonitoringServiceClient { } updateService( request: protos.google.monitoring.v3.IUpdateServiceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IService, @@ -585,7 +593,7 @@ export class ServiceMonitoringServiceClient { >; updateService( request: protos.google.monitoring.v3.IUpdateServiceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, @@ -623,7 +631,7 @@ export class ServiceMonitoringServiceClient { updateService( request: protos.google.monitoring.v3.IUpdateServiceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IService, protos.google.monitoring.v3.IUpdateServiceRequest | null | undefined, @@ -642,12 +650,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -662,7 +670,7 @@ export class ServiceMonitoringServiceClient { } deleteService( request: protos.google.monitoring.v3.IDeleteServiceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -672,7 +680,7 @@ export class ServiceMonitoringServiceClient { >; deleteService( request: protos.google.monitoring.v3.IDeleteServiceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, @@ -709,7 +717,7 @@ export class ServiceMonitoringServiceClient { deleteService( request: protos.google.monitoring.v3.IDeleteServiceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteServiceRequest | null | undefined, @@ -728,12 +736,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -748,7 +756,7 @@ export class ServiceMonitoringServiceClient { } createServiceLevelObjective( request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IServiceLevelObjective, @@ -761,7 +769,7 @@ export class ServiceMonitoringServiceClient { >; createServiceLevelObjective( request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IServiceLevelObjective, | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest @@ -810,7 +818,7 @@ export class ServiceMonitoringServiceClient { createServiceLevelObjective( request: protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IServiceLevelObjective, | protos.google.monitoring.v3.ICreateServiceLevelObjectiveRequest @@ -836,12 +844,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -860,7 +868,7 @@ export class ServiceMonitoringServiceClient { } getServiceLevelObjective( request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IServiceLevelObjective, @@ -870,7 +878,7 @@ export class ServiceMonitoringServiceClient { >; getServiceLevelObjective( request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IServiceLevelObjective, | protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest @@ -916,7 +924,7 @@ export class ServiceMonitoringServiceClient { getServiceLevelObjective( request: protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IServiceLevelObjective, | protos.google.monitoring.v3.IGetServiceLevelObjectiveRequest @@ -939,12 +947,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -963,7 +971,7 @@ export class ServiceMonitoringServiceClient { } updateServiceLevelObjective( request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IServiceLevelObjective, @@ -976,7 +984,7 @@ export class ServiceMonitoringServiceClient { >; updateServiceLevelObjective( request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IServiceLevelObjective, | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest @@ -1018,7 +1026,7 @@ export class ServiceMonitoringServiceClient { updateServiceLevelObjective( request: protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IServiceLevelObjective, | protos.google.monitoring.v3.IUpdateServiceLevelObjectiveRequest @@ -1044,12 +1052,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -1068,7 +1076,7 @@ export class ServiceMonitoringServiceClient { } deleteServiceLevelObjective( request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -1081,7 +1089,7 @@ export class ServiceMonitoringServiceClient { >; deleteServiceLevelObjective( request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest @@ -1122,7 +1130,7 @@ export class ServiceMonitoringServiceClient { deleteServiceLevelObjective( request: protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteServiceLevelObjectiveRequest @@ -1148,12 +1156,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -1173,7 +1181,7 @@ export class ServiceMonitoringServiceClient { listServices( request: protos.google.monitoring.v3.IListServicesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IService[], @@ -1183,7 +1191,7 @@ export class ServiceMonitoringServiceClient { >; listServices( request: protos.google.monitoring.v3.IListServicesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListServicesRequest, protos.google.monitoring.v3.IListServicesResponse | null | undefined, @@ -1248,7 +1256,7 @@ export class ServiceMonitoringServiceClient { listServices( request: protos.google.monitoring.v3.IListServicesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListServicesRequest, protos.google.monitoring.v3.IListServicesResponse | null | undefined, @@ -1267,12 +1275,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -1333,7 +1341,7 @@ export class ServiceMonitoringServiceClient { */ listServicesStream( request?: protos.google.monitoring.v3.IListServicesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1406,7 +1414,7 @@ export class ServiceMonitoringServiceClient { */ listServicesAsync( request?: protos.google.monitoring.v3.IListServicesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1428,7 +1436,7 @@ export class ServiceMonitoringServiceClient { } listServiceLevelObjectives( request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IServiceLevelObjective[], @@ -1438,7 +1446,7 @@ export class ServiceMonitoringServiceClient { >; listServiceLevelObjectives( request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, | protos.google.monitoring.v3.IListServiceLevelObjectivesResponse @@ -1498,7 +1506,7 @@ export class ServiceMonitoringServiceClient { listServiceLevelObjectives( request: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, | protos.google.monitoring.v3.IListServiceLevelObjectivesResponse @@ -1521,12 +1529,12 @@ export class ServiceMonitoringServiceClient { ] > | 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 || {}; @@ -1582,7 +1590,7 @@ export class ServiceMonitoringServiceClient { */ listServiceLevelObjectivesStream( request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1646,7 +1654,7 @@ export class ServiceMonitoringServiceClient { */ listServiceLevelObjectivesAsync( request?: protos.google.monitoring.v3.IListServiceLevelObjectivesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index a685f94efb3..12854f6a7b1 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_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/v3/uptime_check_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './uptime_check_service_client_config.json'; const version = require('../../../package.json').version; @@ -90,9 +96,9 @@ export class UptimeCheckServiceClient { * 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` @@ -105,7 +111,9 @@ export class UptimeCheckServiceClient { 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. @@ -397,7 +405,7 @@ export class UptimeCheckServiceClient { // ------------------- getUptimeCheckConfig( request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IUptimeCheckConfig, @@ -407,7 +415,7 @@ export class UptimeCheckServiceClient { >; getUptimeCheckConfig( request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IUptimeCheckConfig, | protos.google.monitoring.v3.IGetUptimeCheckConfigRequest @@ -448,7 +456,7 @@ export class UptimeCheckServiceClient { getUptimeCheckConfig( request: protos.google.monitoring.v3.IGetUptimeCheckConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IUptimeCheckConfig, | protos.google.monitoring.v3.IGetUptimeCheckConfigRequest @@ -471,12 +479,12 @@ export class UptimeCheckServiceClient { ] > | 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 || {}; @@ -491,7 +499,7 @@ export class UptimeCheckServiceClient { } createUptimeCheckConfig( request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IUptimeCheckConfig, @@ -501,7 +509,7 @@ export class UptimeCheckServiceClient { >; createUptimeCheckConfig( request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IUptimeCheckConfig, | protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest @@ -544,7 +552,7 @@ export class UptimeCheckServiceClient { createUptimeCheckConfig( request: protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IUptimeCheckConfig, | protos.google.monitoring.v3.ICreateUptimeCheckConfigRequest @@ -567,12 +575,12 @@ export class UptimeCheckServiceClient { ] > | 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 || {}; @@ -591,7 +599,7 @@ export class UptimeCheckServiceClient { } updateUptimeCheckConfig( request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IUptimeCheckConfig, @@ -601,7 +609,7 @@ export class UptimeCheckServiceClient { >; updateUptimeCheckConfig( request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.monitoring.v3.IUptimeCheckConfig, | protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest @@ -658,7 +666,7 @@ export class UptimeCheckServiceClient { updateUptimeCheckConfig( request: protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.monitoring.v3.IUptimeCheckConfig, | protos.google.monitoring.v3.IUpdateUptimeCheckConfigRequest @@ -681,12 +689,12 @@ export class UptimeCheckServiceClient { ] > | 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 || {}; @@ -705,7 +713,7 @@ export class UptimeCheckServiceClient { } deleteUptimeCheckConfig( request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -715,7 +723,7 @@ export class UptimeCheckServiceClient { >; deleteUptimeCheckConfig( request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest @@ -758,7 +766,7 @@ export class UptimeCheckServiceClient { deleteUptimeCheckConfig( request: protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.monitoring.v3.IDeleteUptimeCheckConfigRequest @@ -781,12 +789,12 @@ export class UptimeCheckServiceClient { ] > | 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 +814,7 @@ export class UptimeCheckServiceClient { listUptimeCheckConfigs( request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IUptimeCheckConfig[], @@ -816,7 +824,7 @@ export class UptimeCheckServiceClient { >; listUptimeCheckConfigs( request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, | protos.google.monitoring.v3.IListUptimeCheckConfigsResponse @@ -870,7 +878,7 @@ export class UptimeCheckServiceClient { listUptimeCheckConfigs( request: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, | protos.google.monitoring.v3.IListUptimeCheckConfigsResponse @@ -893,12 +901,12 @@ export class UptimeCheckServiceClient { ] > | 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 || {}; @@ -947,7 +955,7 @@ export class UptimeCheckServiceClient { */ listUptimeCheckConfigsStream( request?: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1004,7 +1012,7 @@ export class UptimeCheckServiceClient { */ listUptimeCheckConfigsAsync( request?: protos.google.monitoring.v3.IListUptimeCheckConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1026,7 +1034,7 @@ export class UptimeCheckServiceClient { } listUptimeCheckIps( request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.monitoring.v3.IUptimeCheckIp[], @@ -1036,7 +1044,7 @@ export class UptimeCheckServiceClient { >; listUptimeCheckIps( request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.monitoring.v3.IListUptimeCheckIpsRequest, | protos.google.monitoring.v3.IListUptimeCheckIpsResponse @@ -1087,7 +1095,7 @@ export class UptimeCheckServiceClient { listUptimeCheckIps( request: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.monitoring.v3.IListUptimeCheckIpsRequest, | protos.google.monitoring.v3.IListUptimeCheckIpsResponse @@ -1110,12 +1118,12 @@ export class UptimeCheckServiceClient { ] > | 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(); @@ -1151,7 +1159,7 @@ export class UptimeCheckServiceClient { */ listUptimeCheckIpsStream( request?: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1199,7 +1207,7 @@ export class UptimeCheckServiceClient { */ listUptimeCheckIpsAsync( request?: protos.google.monitoring.v3.IListUptimeCheckIpsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 898b09d2801..7dc3967e56c 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "69f9bcf752172e6a5a793d0150176d6f9c6658b2" + "sha": "465f8982c765bb86dffe41a206da032edb973ba5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { @@ -87,7 +87,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.592367270", "protos/google/monitoring/v3/alert.proto", "protos/google/monitoring/v3/alert_service.proto", "protos/google/monitoring/v3/common.proto", @@ -109,7 +108,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.4124165143", "src/index.ts", "src/v3/alert_policy_service_client.ts", "src/v3/alert_policy_service_client_config.json", From b2d85ddae0d3c71dd2ddf79c2e2520a75032c1fc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 24 Nov 2020 07:03:15 -0800 Subject: [PATCH 347/422] build: stop tracking generated files --- .../v3/notification_channel_service_client.ts | 4 +- .../google-cloud-monitoring/synth.metadata | 108 +----------------- 2 files changed, 2 insertions(+), 110 deletions(-) diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index 0aa571da6aa..ea0e5e65019 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -1497,9 +1497,7 @@ export class NotificationChannelServiceClient { this.innerApiCalls['listNotificationChannelDescriptors'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.monitoring.v3.INotificationChannelDescriptor - >; + ) as AsyncIterable; } listNotificationChannels( request: protos.google.monitoring.v3.IListNotificationChannelsRequest, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7dc3967e56c..15ea5bd237b 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "465f8982c765bb86dffe41a206da032edb973ba5" + "sha": "a9236060fdd4516e5f3fa31a5bf76895ad8bf6c1" } }, { @@ -33,111 +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/monitoring/v3/alert.proto", - "protos/google/monitoring/v3/alert_service.proto", - "protos/google/monitoring/v3/common.proto", - "protos/google/monitoring/v3/dropped_labels.proto", - "protos/google/monitoring/v3/group.proto", - "protos/google/monitoring/v3/group_service.proto", - "protos/google/monitoring/v3/metric.proto", - "protos/google/monitoring/v3/metric_service.proto", - "protos/google/monitoring/v3/mutation_record.proto", - "protos/google/monitoring/v3/notification.proto", - "protos/google/monitoring/v3/notification_service.proto", - "protos/google/monitoring/v3/service.proto", - "protos/google/monitoring/v3/service_service.proto", - "protos/google/monitoring/v3/span_context.proto", - "protos/google/monitoring/v3/uptime.proto", - "protos/google/monitoring/v3/uptime_service.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v3/alert_policy_service_client.ts", - "src/v3/alert_policy_service_client_config.json", - "src/v3/alert_policy_service_proto_list.json", - "src/v3/group_service_client.ts", - "src/v3/group_service_client_config.json", - "src/v3/group_service_proto_list.json", - "src/v3/index.ts", - "src/v3/metric_service_client.ts", - "src/v3/metric_service_client_config.json", - "src/v3/metric_service_proto_list.json", - "src/v3/notification_channel_service_client.ts", - "src/v3/notification_channel_service_client_config.json", - "src/v3/notification_channel_service_proto_list.json", - "src/v3/service_monitoring_service_client.ts", - "src/v3/service_monitoring_service_client_config.json", - "src/v3/service_monitoring_service_proto_list.json", - "src/v3/uptime_check_service_client.ts", - "src/v3/uptime_check_service_client_config.json", - "src/v3/uptime_check_service_proto_list.json", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_alert_policy_service_v3.ts", - "test/gapic_group_service_v3.ts", - "test/gapic_metric_service_v3.ts", - "test/gapic_notification_channel_service_v3.ts", - "test/gapic_service_monitoring_service_v3.ts", - "test/gapic_uptime_check_service_v3.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From 9ac07a3a2766a04d382ef44fa0fd070335e359a9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:34:27 -0800 Subject: [PATCH 348/422] docs: spelling correction for "targetting" (#505) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0d9476f5-156e-4a9b-9f97-94473eb544b9/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- packages/google-cloud-monitoring/README.md | 2 +- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index e6a31f362d4..7799b67a807 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -138,7 +138,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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 15ea5bd237b..7b629c2d7f7 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "a9236060fdd4516e5f3fa31a5bf76895ad8bf6c1" + "sha": "a2bcf315ebde4f1a7a0d2679eebfe859b1118546" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], From 8ef567a8615b5487db1ba7603f2554b0f079d49e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:40:13 +0000 Subject: [PATCH 349/422] chore: release 2.1.4 (#502) :robot: I have created a release \*beep\* \*boop\* --- ### [2.1.4](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.3...v2.1.4) (2020-11-25) ### Bug Fixes * **browser:** check for fetch on window ([#501](https://www.github.com/googleapis/nodejs-monitoring/issues/501)) ([a923606](https://www.github.com/googleapis/nodejs-monitoring/commit/a9236060fdd4516e5f3fa31a5bf76895ad8bf6c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 35c8807e0d7..d44b3cb224b 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.1.4](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.3...v2.1.4) (2020-11-25) + + +### Bug Fixes + +* **browser:** check for fetch on window ([#501](https://www.github.com/googleapis/nodejs-monitoring/issues/501)) ([a923606](https://www.github.com/googleapis/nodejs-monitoring/commit/a9236060fdd4516e5f3fa31a5bf76895ad8bf6c1)) + ### [2.1.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.2...v2.1.3) (2020-11-07) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8f985f5122a..032ac6d16b3 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.1.3", + "version": "2.1.4", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index ed971009df3..14b60108c70 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.1.3", + "@google-cloud/monitoring": "^2.1.4", "yargs": "^16.0.0" }, "devDependencies": { From f4c4bdc8c0c5068a3be6d58f3eea4d4c1a707db3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:56:17 -0800 Subject: [PATCH 350/422] chore: generate GAPIC metadata JSON file (#508) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/86075bca-3db9-4047-98b6-39dbe4174275/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../src/v3/gapic_metadata.json | 591 ++++++++++++++++++ .../google-cloud-monitoring/synth.metadata | 6 +- 2 files changed, 594 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-monitoring/src/v3/gapic_metadata.json diff --git a/packages/google-cloud-monitoring/src/v3/gapic_metadata.json b/packages/google-cloud-monitoring/src/v3/gapic_metadata.json new file mode 100644 index 00000000000..bfecaffa535 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/gapic_metadata.json @@ -0,0 +1,591 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.monitoring.v3", + "libraryPackage": "@google-cloud/monitoring", + "services": { + "AlertPolicyService": { + "clients": { + "grpc": { + "libraryClient": "AlertPolicyServiceClient", + "rpcs": { + "GetAlertPolicy": { + "methods": [ + "getAlertPolicy" + ] + }, + "CreateAlertPolicy": { + "methods": [ + "createAlertPolicy" + ] + }, + "DeleteAlertPolicy": { + "methods": [ + "deleteAlertPolicy" + ] + }, + "UpdateAlertPolicy": { + "methods": [ + "updateAlertPolicy" + ] + }, + "ListAlertPolicies": { + "methods": [ + "listAlertPolicies", + "listAlertPoliciesStream", + "listAlertPoliciesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AlertPolicyServiceClient", + "rpcs": { + "GetAlertPolicy": { + "methods": [ + "getAlertPolicy" + ] + }, + "CreateAlertPolicy": { + "methods": [ + "createAlertPolicy" + ] + }, + "DeleteAlertPolicy": { + "methods": [ + "deleteAlertPolicy" + ] + }, + "UpdateAlertPolicy": { + "methods": [ + "updateAlertPolicy" + ] + }, + "ListAlertPolicies": { + "methods": [ + "listAlertPolicies", + "listAlertPoliciesStream", + "listAlertPoliciesAsync" + ] + } + } + } + } + }, + "GroupService": { + "clients": { + "grpc": { + "libraryClient": "GroupServiceClient", + "rpcs": { + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "CreateGroup": { + "methods": [ + "createGroup" + ] + }, + "UpdateGroup": { + "methods": [ + "updateGroup" + ] + }, + "DeleteGroup": { + "methods": [ + "deleteGroup" + ] + }, + "ListGroups": { + "methods": [ + "listGroups", + "listGroupsStream", + "listGroupsAsync" + ] + }, + "ListGroupMembers": { + "methods": [ + "listGroupMembers", + "listGroupMembersStream", + "listGroupMembersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "GroupServiceClient", + "rpcs": { + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "CreateGroup": { + "methods": [ + "createGroup" + ] + }, + "UpdateGroup": { + "methods": [ + "updateGroup" + ] + }, + "DeleteGroup": { + "methods": [ + "deleteGroup" + ] + }, + "ListGroups": { + "methods": [ + "listGroups", + "listGroupsStream", + "listGroupsAsync" + ] + }, + "ListGroupMembers": { + "methods": [ + "listGroupMembers", + "listGroupMembersStream", + "listGroupMembersAsync" + ] + } + } + } + } + }, + "MetricService": { + "clients": { + "grpc": { + "libraryClient": "MetricServiceClient", + "rpcs": { + "GetMonitoredResourceDescriptor": { + "methods": [ + "getMonitoredResourceDescriptor" + ] + }, + "GetMetricDescriptor": { + "methods": [ + "getMetricDescriptor" + ] + }, + "CreateMetricDescriptor": { + "methods": [ + "createMetricDescriptor" + ] + }, + "DeleteMetricDescriptor": { + "methods": [ + "deleteMetricDescriptor" + ] + }, + "CreateTimeSeries": { + "methods": [ + "createTimeSeries" + ] + }, + "ListMonitoredResourceDescriptors": { + "methods": [ + "listMonitoredResourceDescriptors", + "listMonitoredResourceDescriptorsStream", + "listMonitoredResourceDescriptorsAsync" + ] + }, + "ListMetricDescriptors": { + "methods": [ + "listMetricDescriptors", + "listMetricDescriptorsStream", + "listMetricDescriptorsAsync" + ] + }, + "ListTimeSeries": { + "methods": [ + "listTimeSeries", + "listTimeSeriesStream", + "listTimeSeriesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MetricServiceClient", + "rpcs": { + "GetMonitoredResourceDescriptor": { + "methods": [ + "getMonitoredResourceDescriptor" + ] + }, + "GetMetricDescriptor": { + "methods": [ + "getMetricDescriptor" + ] + }, + "CreateMetricDescriptor": { + "methods": [ + "createMetricDescriptor" + ] + }, + "DeleteMetricDescriptor": { + "methods": [ + "deleteMetricDescriptor" + ] + }, + "CreateTimeSeries": { + "methods": [ + "createTimeSeries" + ] + }, + "ListMonitoredResourceDescriptors": { + "methods": [ + "listMonitoredResourceDescriptors", + "listMonitoredResourceDescriptorsStream", + "listMonitoredResourceDescriptorsAsync" + ] + }, + "ListMetricDescriptors": { + "methods": [ + "listMetricDescriptors", + "listMetricDescriptorsStream", + "listMetricDescriptorsAsync" + ] + }, + "ListTimeSeries": { + "methods": [ + "listTimeSeries", + "listTimeSeriesStream", + "listTimeSeriesAsync" + ] + } + } + } + } + }, + "NotificationChannelService": { + "clients": { + "grpc": { + "libraryClient": "NotificationChannelServiceClient", + "rpcs": { + "GetNotificationChannelDescriptor": { + "methods": [ + "getNotificationChannelDescriptor" + ] + }, + "GetNotificationChannel": { + "methods": [ + "getNotificationChannel" + ] + }, + "CreateNotificationChannel": { + "methods": [ + "createNotificationChannel" + ] + }, + "UpdateNotificationChannel": { + "methods": [ + "updateNotificationChannel" + ] + }, + "DeleteNotificationChannel": { + "methods": [ + "deleteNotificationChannel" + ] + }, + "SendNotificationChannelVerificationCode": { + "methods": [ + "sendNotificationChannelVerificationCode" + ] + }, + "GetNotificationChannelVerificationCode": { + "methods": [ + "getNotificationChannelVerificationCode" + ] + }, + "VerifyNotificationChannel": { + "methods": [ + "verifyNotificationChannel" + ] + }, + "ListNotificationChannelDescriptors": { + "methods": [ + "listNotificationChannelDescriptors", + "listNotificationChannelDescriptorsStream", + "listNotificationChannelDescriptorsAsync" + ] + }, + "ListNotificationChannels": { + "methods": [ + "listNotificationChannels", + "listNotificationChannelsStream", + "listNotificationChannelsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "NotificationChannelServiceClient", + "rpcs": { + "GetNotificationChannelDescriptor": { + "methods": [ + "getNotificationChannelDescriptor" + ] + }, + "GetNotificationChannel": { + "methods": [ + "getNotificationChannel" + ] + }, + "CreateNotificationChannel": { + "methods": [ + "createNotificationChannel" + ] + }, + "UpdateNotificationChannel": { + "methods": [ + "updateNotificationChannel" + ] + }, + "DeleteNotificationChannel": { + "methods": [ + "deleteNotificationChannel" + ] + }, + "SendNotificationChannelVerificationCode": { + "methods": [ + "sendNotificationChannelVerificationCode" + ] + }, + "GetNotificationChannelVerificationCode": { + "methods": [ + "getNotificationChannelVerificationCode" + ] + }, + "VerifyNotificationChannel": { + "methods": [ + "verifyNotificationChannel" + ] + }, + "ListNotificationChannelDescriptors": { + "methods": [ + "listNotificationChannelDescriptors", + "listNotificationChannelDescriptorsStream", + "listNotificationChannelDescriptorsAsync" + ] + }, + "ListNotificationChannels": { + "methods": [ + "listNotificationChannels", + "listNotificationChannelsStream", + "listNotificationChannelsAsync" + ] + } + } + } + } + }, + "ServiceMonitoringService": { + "clients": { + "grpc": { + "libraryClient": "ServiceMonitoringServiceClient", + "rpcs": { + "CreateService": { + "methods": [ + "createService" + ] + }, + "GetService": { + "methods": [ + "getService" + ] + }, + "UpdateService": { + "methods": [ + "updateService" + ] + }, + "DeleteService": { + "methods": [ + "deleteService" + ] + }, + "CreateServiceLevelObjective": { + "methods": [ + "createServiceLevelObjective" + ] + }, + "GetServiceLevelObjective": { + "methods": [ + "getServiceLevelObjective" + ] + }, + "UpdateServiceLevelObjective": { + "methods": [ + "updateServiceLevelObjective" + ] + }, + "DeleteServiceLevelObjective": { + "methods": [ + "deleteServiceLevelObjective" + ] + }, + "ListServices": { + "methods": [ + "listServices", + "listServicesStream", + "listServicesAsync" + ] + }, + "ListServiceLevelObjectives": { + "methods": [ + "listServiceLevelObjectives", + "listServiceLevelObjectivesStream", + "listServiceLevelObjectivesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ServiceMonitoringServiceClient", + "rpcs": { + "CreateService": { + "methods": [ + "createService" + ] + }, + "GetService": { + "methods": [ + "getService" + ] + }, + "UpdateService": { + "methods": [ + "updateService" + ] + }, + "DeleteService": { + "methods": [ + "deleteService" + ] + }, + "CreateServiceLevelObjective": { + "methods": [ + "createServiceLevelObjective" + ] + }, + "GetServiceLevelObjective": { + "methods": [ + "getServiceLevelObjective" + ] + }, + "UpdateServiceLevelObjective": { + "methods": [ + "updateServiceLevelObjective" + ] + }, + "DeleteServiceLevelObjective": { + "methods": [ + "deleteServiceLevelObjective" + ] + }, + "ListServices": { + "methods": [ + "listServices", + "listServicesStream", + "listServicesAsync" + ] + }, + "ListServiceLevelObjectives": { + "methods": [ + "listServiceLevelObjectives", + "listServiceLevelObjectivesStream", + "listServiceLevelObjectivesAsync" + ] + } + } + } + } + }, + "UptimeCheckService": { + "clients": { + "grpc": { + "libraryClient": "UptimeCheckServiceClient", + "rpcs": { + "GetUptimeCheckConfig": { + "methods": [ + "getUptimeCheckConfig" + ] + }, + "CreateUptimeCheckConfig": { + "methods": [ + "createUptimeCheckConfig" + ] + }, + "UpdateUptimeCheckConfig": { + "methods": [ + "updateUptimeCheckConfig" + ] + }, + "DeleteUptimeCheckConfig": { + "methods": [ + "deleteUptimeCheckConfig" + ] + }, + "ListUptimeCheckConfigs": { + "methods": [ + "listUptimeCheckConfigs", + "listUptimeCheckConfigsStream", + "listUptimeCheckConfigsAsync" + ] + }, + "ListUptimeCheckIps": { + "methods": [ + "listUptimeCheckIps", + "listUptimeCheckIpsStream", + "listUptimeCheckIpsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "UptimeCheckServiceClient", + "rpcs": { + "GetUptimeCheckConfig": { + "methods": [ + "getUptimeCheckConfig" + ] + }, + "CreateUptimeCheckConfig": { + "methods": [ + "createUptimeCheckConfig" + ] + }, + "UpdateUptimeCheckConfig": { + "methods": [ + "updateUptimeCheckConfig" + ] + }, + "DeleteUptimeCheckConfig": { + "methods": [ + "deleteUptimeCheckConfig" + ] + }, + "ListUptimeCheckConfigs": { + "methods": [ + "listUptimeCheckConfigs", + "listUptimeCheckConfigsStream", + "listUptimeCheckConfigsAsync" + ] + }, + "ListUptimeCheckIps": { + "methods": [ + "listUptimeCheckIps", + "listUptimeCheckIpsStream", + "listUptimeCheckIpsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7b629c2d7f7..7cc955a4132 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "a2bcf315ebde4f1a7a0d2679eebfe859b1118546" + "sha": "b2c77f547db06755afdbdeb4749df581b791b912" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", - "internalRef": "343187793" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From 8fcd083da2e03e7cec8fd322835ff3e49df1eaee Mon Sep 17 00:00:00 2001 From: Syed Ashrafulla Date: Mon, 21 Dec 2020 19:21:33 -0500 Subject: [PATCH 351/422] fix: update alert policies one at a time because (concurrent updates are not supported) (#507) --- packages/google-cloud-monitoring/samples/quickstart.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index 1be7d2e1822..b7194768692 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -20,7 +20,10 @@ const monitoring = require('@google-cloud/monitoring'); async function quickstart() { // Your Google Cloud Platform project ID - const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID'; + const projectId = + process.env.GCLOUD_PROJECT || + process.env.GOOGLE_CLOUD_PROJECT || + 'YOUR_PROJECT_ID'; // Creates a client const client = new monitoring.MetricServiceClient(); From 29070fb8e23aba784ddcbd5c47a8a2fb9a0668ae Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 14:43:00 -0800 Subject: [PATCH 352/422] docs: add instructions for authenticating for system tests (#511) * docs: add instructions for authenticating for system tests * docs: add instructions for authenticating for system tests * docs: add phrasing change to README Source-Author: sofisl <55454395+sofisl@users.noreply.github.com> Source-Date: Mon Dec 21 13:21:29 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 363fe305e9ce34a6cd53951c6ee5f997094b54ee Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- packages/google-cloud-monitoring/CONTRIBUTING.md | 15 +++++++++++++-- packages/google-cloud-monitoring/README.md | 8 +++++--- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/CONTRIBUTING.md b/packages/google-cloud-monitoring/CONTRIBUTING.md index f6c4cf010e3..34e9b55ae8c 100644 --- a/packages/google-cloud-monitoring/CONTRIBUTING.md +++ b/packages/google-cloud-monitoring/CONTRIBUTING.md @@ -37,6 +37,15 @@ 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 billing for your project][billing]. +1. [Enable the Stackdriver Monitoring 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 +60,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 +70,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=monitoring.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 7799b67a807..54b3546be6a 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -65,7 +65,10 @@ const monitoring = require('@google-cloud/monitoring'); async function quickstart() { // Your Google Cloud Platform project ID - const projectId = process.env.GCLOUD_PROJECT || 'YOUR_PROJECT_ID'; + const projectId = + process.env.GCLOUD_PROJECT || + process.env.GOOGLE_CLOUD_PROJECT || + 'YOUR_PROJECT_ID'; // Creates a client const client = new monitoring.MetricServiceClient(); @@ -117,8 +120,7 @@ async function quickstart() { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 7cc955a4132..959e6b79f94 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "b2c77f547db06755afdbdeb4749df581b791b912" + "sha": "2bf75a2294f82d3b75e0ee3d44c91b0b8e5ec358" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From fc936d05db80673d2f72f6a7541e5636aba33ed7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Jan 2021 11:42:16 -0800 Subject: [PATCH 353/422] docs: update dates (#512) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d365a9d3-f86e-4598-8272-bbf6b821e385/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-monitoring/.jsdoc.js | 4 ++-- packages/google-cloud-monitoring/protos/protos.d.ts | 2 +- packages/google-cloud-monitoring/protos/protos.js | 2 +- .../src/v3/alert_policy_service_client.ts | 2 +- .../google-cloud-monitoring/src/v3/group_service_client.ts | 2 +- packages/google-cloud-monitoring/src/v3/index.ts | 2 +- .../google-cloud-monitoring/src/v3/metric_service_client.ts | 2 +- .../src/v3/notification_channel_service_client.ts | 2 +- .../src/v3/service_monitoring_service_client.ts | 2 +- .../src/v3/uptime_check_service_client.ts | 2 +- packages/google-cloud-monitoring/synth.metadata | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- packages/google-cloud-monitoring/system-test/install.ts | 2 +- .../test/gapic_alert_policy_service_v3.ts | 2 +- .../google-cloud-monitoring/test/gapic_group_service_v3.ts | 2 +- .../google-cloud-monitoring/test/gapic_metric_service_v3.ts | 2 +- .../test/gapic_notification_channel_service_v3.ts | 2 +- .../test/gapic_service_monitoring_service_v3.ts | 2 +- .../test/gapic_uptime_check_service_v3.ts | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/google-cloud-monitoring/.jsdoc.js b/packages/google-cloud-monitoring/.jsdoc.js index 25faf92bd80..4c8fbdf61b0 100644 --- a/packages/google-cloud-monitoring/.jsdoc.js +++ b/packages/google-cloud-monitoring/.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/monitoring', diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 9dcf71349be..7edeefeb36c 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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. diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index e3cdbaa7146..1492201a8b2 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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. diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 0b81a3b1c0a..80783bccd22 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_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/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index 24463822985..bd90184be4f 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_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/packages/google-cloud-monitoring/src/v3/index.ts b/packages/google-cloud-monitoring/src/v3/index.ts index fe58a3d3a4a..1708ac2f377 100644 --- a/packages/google-cloud-monitoring/src/v3/index.ts +++ b/packages/google-cloud-monitoring/src/v3/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/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index 84a3d72cea2..fb99031938c 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_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/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index ea0e5e65019..e2be5884b29 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_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/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index e4dad71a50b..21d78e207e6 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_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/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index 12854f6a7b1..418c51f80ba 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 959e6b79f94..4898ce06bfa 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "2bf75a2294f82d3b75e0ee3d44c91b0b8e5ec358" + "sha": "5ec129cd9a249597ccbc4887b8070f7eb8e97fe4" } }, { diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js index 1a73cd85938..9b1325f9a4c 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.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. diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts index c456bb14d99..7cdc39cfc6e 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/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/packages/google-cloud-monitoring/system-test/install.ts b/packages/google-cloud-monitoring/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-monitoring/system-test/install.ts +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts index 4d82ca932e4..4a47b723950 100644 --- a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.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/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts index b96b4217407..5a984f6c0a8 100644 --- a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_group_service_v3.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/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts index 3a95c9ae2b1..54530f78e42 100644 --- a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.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/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts index 5caefabc0f7..d839aa0044c 100644 --- a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.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/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts index 431c0d00138..9e4c30e609a 100644 --- a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.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/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts index a50fd767fd6..a21314d22e9 100644 --- a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.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 5af95b135696e3c605071d882d65ccb503bfedfb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Jan 2021 19:56:05 +0000 Subject: [PATCH 354/422] chore: release 2.1.5 (#509) :robot: I have created a release \*beep\* \*boop\* --- ### [2.1.5](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.4...v2.1.5) (2021-01-07) ### Bug Fixes * update alert policies one at a time because (concurrent updates are not supported) ([#507](https://www.github.com/googleapis/nodejs-monitoring/issues/507)) ([2bf75a2](https://www.github.com/googleapis/nodejs-monitoring/commit/2bf75a2294f82d3b75e0ee3d44c91b0b8e5ec358)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index d44b3cb224b..8c4c8ed0755 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.1.5](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.4...v2.1.5) (2021-01-07) + + +### Bug Fixes + +* update alert policies one at a time because (concurrent updates are not supported) ([#507](https://www.github.com/googleapis/nodejs-monitoring/issues/507)) ([2bf75a2](https://www.github.com/googleapis/nodejs-monitoring/commit/2bf75a2294f82d3b75e0ee3d44c91b0b8e5ec358)) + ### [2.1.4](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.3...v2.1.4) (2020-11-25) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 032ac6d16b3..4664c2e9496 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.1.4", + "version": "2.1.5", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 14b60108c70..db93ef78ab2 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.1.4", + "@google-cloud/monitoring": "^2.1.5", "yargs": "^16.0.0" }, "devDependencies": { From f490ad661af5808c116bbbb6dc7d46f63be4ffd7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:40:22 -0800 Subject: [PATCH 355/422] feat: adds style enumeration (#513) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8b7e3986-c966-4325-9ced-bdd850176095/targets - [ ] To automatically regenerate this PR, check this box. --- .../protos/protos.d.ts | 12 +++ .../google-cloud-monitoring/protos/protos.js | 78 ++++++++++++++++++- .../protos/protos.json | 13 +++- .../google-cloud-monitoring/synth.metadata | 2 +- 4 files changed, 102 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 7edeefeb36c..22029e1a980 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -13146,6 +13146,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -13175,6 +13178,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 @@ -13254,6 +13260,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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 1492201a8b2..78c580dd8f7 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -31307,6 +31307,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 */ /** @@ -31319,6 +31320,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) @@ -31373,6 +31375,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 @@ -31410,6 +31420,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; }; @@ -31464,6 +31480,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; @@ -31527,6 +31553,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; }; @@ -31571,6 +31609,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; }; @@ -31587,8 +31642,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 = ""; @@ -31611,6 +31668,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; }; @@ -31641,6 +31703,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/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 56162dc2efa..35520345ec6 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -3389,6 +3389,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -3398,6 +3403,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -3864,7 +3875,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/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 4898ce06bfa..3044f61a68d 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "5ec129cd9a249597ccbc4887b8070f7eb8e97fe4" + "sha": "53318d5ef46a40a275e1ef81bcd6226da0196ff4" } }, { From da106afd85a70cba2e26a323a920b6e1a198973f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:36:48 +0000 Subject: [PATCH 356/422] chore: release 2.2.0 (#514) :robot: I have created a release \*beep\* \*boop\* --- ## [2.2.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.5...v2.2.0) (2021-01-09) ### Features * adds style enumeration ([#513](https://www.github.com/googleapis/nodejs-monitoring/issues/513)) ([2ca2169](https://www.github.com/googleapis/nodejs-monitoring/commit/2ca2169553c90a588cc8c7374d4790da3bf122f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 8c4c8ed0755..9420410b4bf 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [2.2.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.5...v2.2.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#513](https://www.github.com/googleapis/nodejs-monitoring/issues/513)) ([2ca2169](https://www.github.com/googleapis/nodejs-monitoring/commit/2ca2169553c90a588cc8c7374d4790da3bf122f2)) + ### [2.1.5](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.4...v2.1.5) (2021-01-07) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 4664c2e9496..30dbfdcca47 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.1.5", + "version": "2.2.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index db93ef78ab2..9d70c3977ba 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.1.5", + "@google-cloud/monitoring": "^2.2.0", "yargs": "^16.0.0" }, "devDependencies": { From 0d96bf72fe17e5faff65c612efb59fbfd5b52de4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:42:31 -0800 Subject: [PATCH 357/422] refactor(nodejs): move build cop to flakybot (#516) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/79ba0372-ded2-4df4-829f-0c53e04a7c6d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 3044f61a68d..5fdac2980e5 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "53318d5ef46a40a275e1ef81bcd6226da0196ff4" + "sha": "4e0eb8108ab124f2d17d2728c45513b8474697bd" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From 771cbb2dd29446cfd79369106bb5a58fa6bed148 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 17:56:19 -0800 Subject: [PATCH 358/422] build: adds UNORDERED_LIST enum (#518) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/f20ba027-76a5-44ba-baa4-962e18a97819/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-monitoring/protos/protos.d.ts | 3 ++- packages/google-cloud-monitoring/protos/protos.js | 7 +++++++ packages/google-cloud-monitoring/protos/protos.json | 3 ++- packages/google-cloud-monitoring/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 22029e1a980..c3bb5938bc8 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -14439,7 +14439,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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 78c580dd8f7..a0ddb3c120f 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -34668,6 +34668,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); @@ -34677,6 +34678,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; })(); @@ -42492,6 +42494,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -42592,6 +42595,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } return message; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 35520345ec6..20149924ec9 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -3673,7 +3673,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "MonitoredResourceDescriptor": { diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 5fdac2980e5..4053afcb104 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "4e0eb8108ab124f2d17d2728c45513b8474697bd" + "sha": "8a7ef74faeb51639e66bcda82d6b25298bc544c0" } }, { From 78c3d81692e0a05cf5998a38d34b064422023c29 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:15 -0800 Subject: [PATCH 359/422] build: update gapic-generator-typescript to v1.2.10. (#519) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a27e585a-8362-450e-a458-6225be320237/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-monitoring/synth.metadata | 6 +++--- packages/google-cloud-monitoring/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 4053afcb104..362953e23b4 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "8a7ef74faeb51639e66bcda82d6b25298bc544c0" + "sha": "467f0c2e77b2877bb554ed99e22efd10caf4587a" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-monitoring/webpack.config.js b/packages/google-cloud-monitoring/webpack.config.js index 39aa3c704a3..e6c0bc651fe 100644 --- a/packages/google-cloud-monitoring/webpack.config.js +++ b/packages/google-cloud-monitoring/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 0b65e6e58d41b7c3bc7a9ad03d5470e6d1199cc7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 12 Mar 2021 09:55:47 -0800 Subject: [PATCH 360/422] build: updates to generated protos --- .../protos/protos.d.ts | 348 ++--- .../google-cloud-monitoring/protos/protos.js | 1186 ++++++++--------- .../protos/protos.json | 26 +- .../google-cloud-monitoring/synth.metadata | 2 +- 4 files changed, 781 insertions(+), 781 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index c3bb5938bc8..ca6279b6e7a 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -19477,6 +19477,180 @@ export namespace google { 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 Struct. */ interface IStruct { @@ -19784,180 +19958,6 @@ export namespace google { */ 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 rpc. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index a0ddb3c120f..dad5127df3a 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -48039,25 +48039,23 @@ return BytesValue; })(); - protobuf.Struct = (function() { + protobuf.Empty = (function() { /** - * Properties of a Struct. + * Properties of an Empty. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IEmpty */ /** - * Constructs a new Struct. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48065,98 +48063,63 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Struct.create = function create(properties) { - return new Struct(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IStruct} message Struct 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 */ - Struct.encode = function encode(message, writer) { + Empty.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; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.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.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IStruct} message Struct 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 */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @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.Struct} Struct + * @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 */ - Struct.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.Struct(), key, value; + 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.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; @@ -48166,131 +48129,95 @@ }; /** - * Decodes a Struct 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.Struct + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @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 */ - Struct.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 Struct message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.Struct + * @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 */ - Struct.verify = function verify(message) { + Empty.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. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Empty} Empty */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) 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; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a Struct 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.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.Empty} message Empty * @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; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this Struct to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return Empty; })(); - protobuf.Value = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a Value. + * Properties of a FieldMask. * @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 IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Value. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Value(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) @@ -48298,154 +48225,78 @@ } /** - * 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 + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Value.prototype.numberValue = 0; + FieldMask.prototype.paths = $util.emptyArray; /** - * Value stringValue. - * @member {string} stringValue - * @memberof google.protobuf.Value - * @instance + * 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 */ - Value.prototype.stringValue = ""; + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; /** - * Value boolValue. - * @member {boolean} boolValue - * @memberof google.protobuf.Value - * @instance + * 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 */ - Value.prototype.boolValue = false; + 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; + }; /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance + * 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 */ - Value.prototype.structValue = null; + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * 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 && 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 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. + * 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); @@ -48456,214 +48307,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 {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; + return FieldMask; })(); - protobuf.ListValue = (function() { + protobuf.Struct = (function() { /** - * Properties of a ListValue. + * Properties of a Struct. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new ListValue. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48671,78 +48428,97 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - ListValue.prototype.values = $util.emptyArray; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new ListValue instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IListValue} message ListValue 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 */ - ListValue.encode = function encode(message, writer) { + Struct.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.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; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.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.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IListValue} message ListValue 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 */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @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.ListValue} ListValue + * @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 */ - ListValue.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.ListValue(); + 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.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + 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); @@ -48753,123 +48529,131 @@ }; /** - * Decodes a ListValue 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.ListValue + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @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 */ - ListValue.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 ListValue message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.ListValue + * @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 */ - ListValue.verify = function verify(message) { + Struct.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 (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 "values." + error; + return "fields." + error; } } return null; }; /** - * Creates a ListValue 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.ListValue + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Struct} Struct */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) 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.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 ListValue 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.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + Struct.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.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 ListValue to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + 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) @@ -48877,63 +48661,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 && 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 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; @@ -48943,95 +48819,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 {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; + })(); + + 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) @@ -49039,78 +49034,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); @@ -49121,99 +49116,104 @@ }; /** - * 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; })(); return protobuf; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 20149924ec9..52e205d8601 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -9,7 +9,7 @@ "csharp_namespace": "Google.Cloud.Monitoring.V3", "go_package": "google.golang.org/genproto/googleapis/monitoring/v3;monitoring", "java_multiple_files": true, - "java_outer_classname": "UptimeProto", + "java_outer_classname": "UptimeServiceProto", "java_package": "com.google.monitoring.v3", "php_namespace": "Google\\Cloud\\Monitoring\\V3", "ruby_package": "Google::Cloud::Monitoring::V3", @@ -4877,6 +4877,18 @@ } } }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, "Struct": { "fields": { "fields": { @@ -4939,18 +4951,6 @@ "id": 1 } } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } } } }, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 362953e23b4..9c8eba8df3b 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "467f0c2e77b2877bb554ed99e22efd10caf4587a" + "sha": "db892b2908ff02201cace7c9a3a6b904ba0a08c2" } }, { From 7a47040f689220937894c00ba42d8b1bdeca854d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 17:48:24 +0100 Subject: [PATCH 361/422] chore(deps): update dependency sinon to v10 (#522) [![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
--- ### 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 30dbfdcca47..290f4e52251 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -61,7 +61,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^9.0.1", + "sinon": "^10.0.0", "ts-loader": "^8.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From d0bdd02a1bf61ba078c67e97709a3056a1665333 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 24 Mar 2021 09:50:58 -0700 Subject: [PATCH 362/422] feat: Added support for Monitoring Query Language: https://cloud.google.com/monitoring/mql feat: Added support for units in the MetricService feat: Added total_size to the response of ListAlertPolicies. fix: Un-deprecated cluster_istio for service monitoring. feat: Added IstioCanonicalService for service monitoring. feat: Added creation and mutation records to notification channels. feat: Added support for querying metrics for folders and organizations. fix: Extended the default deadline for UpdateGroup to 180s. feat: Added support for secondary aggregation when querying metrics. (#523) PiperOrigin-RevId: 364422694 Source-Author: Google APIs Source-Date: Mon Mar 22 15:30:13 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 2124b6251e56e2ec8dd5c47e7d3815d7d5841880 Source-Link: https://github.com/googleapis/googleapis/commit/2124b6251e56e2ec8dd5c47e7d3815d7d5841880 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../protos/google/monitoring/v3/alert.proto | 62 +- .../google/monitoring/v3/alert_service.proto | 17 +- .../protos/google/monitoring/v3/common.proto | 49 +- .../google/monitoring/v3/dropped_labels.proto | 21 +- .../protos/google/monitoring/v3/group.proto | 2 +- .../google/monitoring/v3/group_service.proto | 2 +- .../protos/google/monitoring/v3/metric.proto | 19 +- .../google/monitoring/v3/metric_service.proto | 43 +- .../monitoring/v3/mutation_record.proto | 2 +- .../google/monitoring/v3/notification.proto | 14 +- .../monitoring/v3/notification_service.proto | 6 +- .../google/monitoring/v3/query_service.proto | 50 + .../protos/google/monitoring/v3/service.proto | 39 +- .../monitoring/v3/service_service.proto | 18 +- .../google/monitoring/v3/span_context.proto | 2 +- .../protos/google/monitoring/v3/uptime.proto | 81 +- .../google/monitoring/v3/uptime_service.proto | 2 +- .../protos/protos.d.ts | 359 ++- .../google-cloud-monitoring/protos/protos.js | 963 +++++++- .../protos/protos.json | 194 +- packages/google-cloud-monitoring/src/index.ts | 4 + .../src/v3/alert_policy_service_client.ts | 11 +- .../v3/alert_policy_service_proto_list.json | 1 + .../src/v3/gapic_metadata.json | 28 + .../src/v3/group_service_proto_list.json | 1 + .../google-cloud-monitoring/src/v3/index.ts | 1 + .../src/v3/metric_service_client.ts | 67 +- .../src/v3/metric_service_proto_list.json | 1 + ...tification_channel_service_proto_list.json | 1 + .../src/v3/query_service_client.ts | 1784 +++++++++++++++ .../src/v3/query_service_client_config.json | 30 + .../src/v3/query_service_proto_list.json | 19 + .../v3/service_monitoring_service_client.ts | 48 +- ...service_monitoring_service_proto_list.json | 1 + .../v3/uptime_check_service_proto_list.json | 1 + .../google-cloud-monitoring/synth.metadata | 6 +- .../system-test/fixtures/sample/src/index.js | 1 + .../system-test/fixtures/sample/src/index.ts | 7 + .../test/gapic_metric_service_v3.ts | 57 + .../test/gapic_query_service_v3.ts | 1954 +++++++++++++++++ 40 files changed, 5684 insertions(+), 284 deletions(-) create mode 100644 packages/google-cloud-monitoring/protos/google/monitoring/v3/query_service.proto create mode 100644 packages/google-cloud-monitoring/src/v3/query_service_client.ts create mode 100644 packages/google-cloud-monitoring/src/v3/query_service_client_config.json create mode 100644 packages/google-cloud-monitoring/src/v3/query_service_proto_list.json create mode 100644 packages/google-cloud-monitoring/test/gapic_query_service_v3.ts diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto index 6662304d706..8d1cbf2edce 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert.proto @@ -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. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.monitoring.v3; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; import "google/monitoring/v3/mutation_record.proto"; @@ -89,17 +90,17 @@ message AlertPolicy { // A condition type that compares a collection of time series // against a threshold. message MetricThreshold { - // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + // Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the // [`ListTimeSeries` // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) // (that call is useful to verify the time series that will be retrieved / - // processed) and must specify the metric type and optionally may contain - // restrictions on resource type, resource labels, and metric labels. - // This field may not exceed 2048 Unicode characters in length. - string filter = 2; + // processed). The filter must specify the metric type and the resource + // type. Optionally, it can specify resource labels and metric labels. + // This field must not exceed 2048 Unicode characters in length. + string filter = 2 [(google.api.field_behavior) = REQUIRED]; // Specifies the alignment of data points in individual time series as // well as how to combine the retrieved time series together (such as @@ -175,17 +176,17 @@ message AlertPolicy { // when a time series for the specified metric of a monitored // resource does not include any data in the specified `duration`. message MetricAbsence { - // A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + // Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that // identifies which time series should be compared with the threshold. // // The filter is similar to the one that is specified in the // [`ListTimeSeries` // request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) // (that call is useful to verify the time series that will be retrieved / - // processed) and must specify the metric type and optionally may contain - // restrictions on resource type, resource labels, and metric labels. - // This field may not exceed 2048 Unicode characters in length. - string filter = 1; + // processed). The filter must specify the metric type and the resource + // type. Optionally, it can specify resource labels and metric labels. + // This field must not exceed 2048 Unicode characters in length. + string filter = 1 [(google.api.field_behavior) = REQUIRED]; // Specifies the alignment of data points in individual time series as // well as how to combine the retrieved time series together (such as @@ -201,9 +202,10 @@ message AlertPolicy { repeated Aggregation aggregations = 5; // The amount of time that a time series must fail to report new - // data to be considered failing. Currently, only values that - // are a multiple of a minute--e.g. 60, 120, or 300 - // seconds--are supported. If an invalid value is given, an + // data to be considered failing. The minimum value of this field + // is 120 seconds. Larger values that are a multiple of a + // minute--for example, 240 or 300 seconds--are supported. + // If an invalid value is given, an // error will be returned. The `Duration.nanos` field is // ignored. google.protobuf.Duration duration = 2; @@ -215,6 +217,34 @@ message AlertPolicy { Trigger trigger = 3; } + // A condition type that allows alert policies to be defined using + // [Monitoring Query Language](https://cloud.google.com/monitoring/mql). + message MonitoringQueryLanguageCondition { + // [Monitoring Query Language](https://cloud.google.com/monitoring/mql) + // query that outputs a boolean stream. + string query = 1; + + // The amount of time that a time series must violate the + // threshold to be considered failing. Currently, only values + // that are a multiple of a minute--e.g., 0, 60, 120, or 300 + // seconds--are supported. If an invalid value is given, an + // error will be returned. When choosing a duration, it is useful to + // keep in mind the frequency of the underlying time series data + // (which may also be affected by any alignments specified in the + // `aggregations` field); a good duration is long enough so that a single + // outlier does not generate spurious alerts, but short enough that + // unhealthy states are detected and alerted on quickly. + google.protobuf.Duration duration = 2; + + // The number/percent of time series for which the comparison must hold + // in order for the condition to trigger. If unspecified, then the + // condition will trigger if the comparison is true for any of the + // time series that have been identified by `filter` and `aggregations`, + // or by the ratio, if `denominator_filter` and `denominator_aggregations` + // are specified. + Trigger trigger = 3; + } + // Required if the condition exists. The unique resource name for this // condition. Its format is: // @@ -255,6 +285,10 @@ message AlertPolicy { // A condition that checks that a time series continues to // receive new data points. MetricAbsence condition_absent = 2; + + // A condition that uses the Monitoring Query Language to define + // alerts. + MonitoringQueryLanguageCondition condition_monitoring_query_language = 19; } } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto index ea0c5ada302..4017b16e070 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/alert_service.proto @@ -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. @@ -48,7 +48,7 @@ service AlertPolicyService { "https://www.googleapis.com/auth/monitoring," "https://www.googleapis.com/auth/monitoring.read"; - // Lists the existing alerting policies for the project. + // Lists the existing alerting policies for the workspace. rpc ListAlertPolicies(ListAlertPoliciesRequest) returns (ListAlertPoliciesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/alertPolicies" @@ -101,10 +101,11 @@ message CreateAlertPolicyRequest { // projects/[PROJECT_ID_OR_NUMBER] // // Note that this field names the parent container in which the alerting - // policy will be written, not the name of the created policy. The alerting - // policy that is returned will have a name that contains a normalized - // representation of this name as a prefix but adds a suffix of the form - // `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + // policy will be written, not the name of the created policy. |name| must be + // a host project of a workspace, otherwise INVALID_ARGUMENT error will + // return. The alerting policy that is returned will have a name that contains + // a normalized representation of this name as a prefix but adds a suffix of + // the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the // container. string name = 3 [ (google.api.field_behavior) = REQUIRED, @@ -183,6 +184,10 @@ message ListAlertPoliciesResponse { // to a non-empty value. To see the additional results, // use that value as `page_token` in the next call to this method. string next_page_token = 2; + + // The total number of alert policies in all pages. This number is only an + // estimate, and may change in subsequent pages. https://aip.dev/158 + int32 total_size = 4; } // The protocol for the `UpdateAlertPolicy` request. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto index 26242225257..77a28ea3af4 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/common.proto @@ -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. @@ -51,28 +51,34 @@ message TypedValue { } } -// A closed time interval. It extends from the start time to the end time, and -// includes both: `[startTime, endTime]`. Valid time intervals depend on the -// [`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) -// of the metric value. In no case can the end time be earlier than the start -// time. +// A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. The end time must not be earlier than the start time. When writing data points, the start time must not be more than 25 hours in the past and the end time must not be more than five minutes in the future. // -// * For a `GAUGE` metric, the `startTime` value is technically optional; if +// * For `GAUGE` metrics, the `startTime` value is technically optional; if // no value is specified, the start time defaults to the value of the // end time, and the interval represents a single point in time. If both // start and end times are specified, they must be identical. Such an // interval is valid only for `GAUGE` metrics, which are point-in-time -// measurements. +// measurements. The end time of a new interval must be at least a +// millisecond after the end time of the previous interval. // -// * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier -// than the end time. +// * For `DELTA` metrics, the start time and end time must specify a +// non-zero interval, with subsequent points specifying contiguous and +// non-overlapping intervals. For `DELTA` metrics, the start time of +// the next interval must be at least a millisecond after the end time +// of the previous interval. // -// * In all cases, the start time of the next interval must be -// at least a millisecond after the end time of the previous interval. -// Because the interval is closed, if the start time of a new interval -// is the same as the end time of the previous interval, data written -// at the new start time could overwrite data written at the previous -// end time. +// * For `CUMULATIVE` metrics, the start time and end time must specify a +// a non-zero interval, with subsequent points specifying 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. The new start time must be at least a millisecond after the +// end time of the previous interval. +// +// * The start time of a new interval must be at least a millisecond after the +// end time of the previous interval because intervals are closed. If the +// start time of a new interval is the same as the end time of the previous +// interval, then data written at the new start time could overwrite data +// written at the previous end time. message TimeInterval { // Required. The end of the time interval. google.protobuf.Timestamp end_time = 2; @@ -370,10 +376,13 @@ message Aggregation { // time. This will be done before the per-series aligner can be applied to // the data. // - // The value must be at least 60 seconds. If a per-series aligner other than - // `ALIGN_NONE` is specified, this field is required or an error is returned. - // If no per-series aligner is specified, or the aligner `ALIGN_NONE` is - // specified, then this field is ignored. + // The value must be at least 60 seconds. If a per-series + // aligner other than `ALIGN_NONE` is specified, this field is required or an + // error is returned. If no per-series aligner is specified, or the aligner + // `ALIGN_NONE` is specified, then this field is ignored. + // + // The maximum value of the `alignment_period` is 104 weeks (2 years) for + // charts, and 90,000 seconds (25 hours) for alerting policies. google.protobuf.Duration alignment_period = 1; // An `Aligner` describes how to bring the data points in a single diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto index ce6e46e1f09..16e213c4abf 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/dropped_labels.proto @@ -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. @@ -24,16 +24,17 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; option ruby_package = "Google::Cloud::Monitoring::V3"; -// A set of (label, value) pairs which were dropped during aggregation, attached -// to google.api.Distribution.Exemplars in google.api.Distribution values during -// aggregation. +// A set of (label, value) pairs that were removed from a Distribution +// time series during aggregation and then added as an attachment to a +// Distribution.Exemplar. // -// These values are used in combination with the label values that remain on the -// aggregated Distribution timeseries to construct the full label set for the -// exemplar values. The resulting full label set may be used to identify the -// specific task/job/instance (for example) which may be contributing to a -// long-tail, while allowing the storage savings of only storing aggregated -// distribution values for a large group. +// The full label set for the exemplars is constructed by using the dropped +// pairs in combination with the label values that remain on the aggregated +// Distribution time series. The constructed full label set can be used to +// identify the specific entity, such as the instance or job, which might be +// contributing to a long-tail. However, with dropped labels, the storage +// requirements are reduced because only the aggregated distribution values for +// a large group of time series are stored. // // Note that there are no guarantees on ordering of the labels from // exemplar-to-exemplar and from distribution-to-distribution in the same diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto index 2d1ffbb61f9..a414cc8520b 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group.proto @@ -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/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto index 0163ab36efd..6385c8bbf80 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/group_service.proto @@ -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/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto index 5a4833b19b5..c0c23a39bba 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric.proto @@ -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. @@ -62,8 +62,8 @@ message TimeSeries { google.api.MonitoredResource resource = 2; // Output only. The associated monitored resource metadata. When reading a - // a timeseries, this field will include metadata labels that are explicitly - // named in the reduction. When creating a timeseries, this field is ignored. + // time series, this field will include metadata labels that are explicitly + // named in the reduction. When creating a time series, this field is ignored. google.api.MonitoredResourceMetadata metadata = 7; // The metric kind of the time series. When listing time series, this metric @@ -94,9 +94,14 @@ message TimeSeries { // the value type of the descriptor is determined by the point's type, which // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. repeated Point points = 5; + + // 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. + string unit = 8; } -// A descriptor for the labels and points in a timeseries. +// A descriptor for the labels and points in a time series. message TimeSeriesDescriptor { // A descriptor for the value columns in a data point. message ValueDescriptor { @@ -108,6 +113,12 @@ message TimeSeriesDescriptor { // The value stream kind. google.api.MetricDescriptor.MetricKind metric_kind = 3; + + // The unit in which `time_series` point values are reported. `unit` + // follows the UCUM format for units as seen in + // https://unitsofmeasure.org/ucum.html. + // `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. + string unit = 4; } // Descriptors for the labels. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto index 119990358a7..ab30e285166 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/metric_service.proto @@ -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. @@ -52,6 +52,17 @@ option (google.api.resource_definition) = { pattern: "*" history: ORIGINALLY_SINGLE_PATTERN }; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/Workspace" + pattern: "projects/{project}" + pattern: "workspaces/{workspace}" +}; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/TimeSeries" + pattern: "projects/{project}/timeSeries/{time_series}" + pattern: "organizations/{organization}/timeSeries/{time_series}" + pattern: "folders/{folder}/timeSeries/{time_series}" +}; // Manages metric descriptors, monitored resource descriptors, and // time series data. @@ -120,6 +131,12 @@ service MetricService { rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) { option (google.api.http) = { get: "/v3/{name=projects/*}/timeSeries" + additional_bindings { + get: "/v3/{name=organizations/*}/timeSeries" + } + additional_bindings { + get: "/v3/{name=folders/*}/timeSeries" + } }; option (google.api.method_signature) = "name,filter,interval,view"; } @@ -299,13 +316,16 @@ message ListTimeSeriesRequest { HEADERS = 1; } - // Required. The project on which to execute the request. The format is: + // Required. The project, organization or folder on which to execute the request. The + // format is: // // projects/[PROJECT_ID_OR_NUMBER] + // organizations/[ORGANIZATION_ID] + // folders/[FOLDER_ID] string name = 10 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" + child_type: "monitoring.googleapis.com/TimeSeries" } ]; @@ -330,6 +350,10 @@ message ListTimeSeriesRequest { // series data is returned. Aggregation aggregation = 5; + // Apply a second aggregation after `aggregation` is applied. May only be + // specified if `aggregation` is specified. + Aggregation secondary_aggregation = 11; + // Unsupported: must be left blank. The points in each time series are // currently returned in reverse time order (most recent to oldest). string order_by = 6; @@ -363,6 +387,14 @@ message ListTimeSeriesResponse { // Query execution errors that may have caused the time series data returned // to be incomplete. repeated google.rpc.Status execution_errors = 3; + + // The unit in which all `time_series` point values are reported. `unit` + // follows the UCUM format for units as seen in + // https://unitsofmeasure.org/ucum.html. + // If different `time_series` have different units (for example, because they + // come from different metric types, or a unit is absent), then `unit` will be + // "{not_a_unit}". + string unit = 5; } // The `CreateTimeSeries` request. @@ -424,8 +456,9 @@ message QueryTimeSeriesRequest { // projects/[PROJECT_ID_OR_NUMBER] string name = 1; - // Required. The query in the monitoring query language format. The default - // time zone is in UTC. + // Required. The query in the [Monitoring Query + // Language](https://cloud.google.com/monitoring/mql/reference) format. + // The default time zone is in UTC. string query = 7; // A positive number that is the maximum number of time_series_data to return. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto index b830eb626f0..77c2d5c2b75 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/mutation_record.proto @@ -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/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto index 897a14c046e..74ea3a15f4f 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification.proto @@ -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. @@ -20,6 +20,7 @@ import "google/api/label.proto"; import "google/api/launch_stage.proto"; import "google/api/resource.proto"; import "google/monitoring/v3/common.proto"; +import "google/monitoring/v3/mutation_record.proto"; import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.Monitoring.V3"; @@ -49,7 +50,10 @@ message NotificationChannelDescriptor { // In the above, `[TYPE]` is the value of the `type` field. string name = 6; - // The type of notification channel, such as "email", "sms", etc. + // The type of notification channel, such as "email" and "sms". To view the + // full list of channels, see + // [Channel + // descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). // Notification channel types are globally unique. string type = 1; @@ -180,4 +184,10 @@ message NotificationChannel { // temporary and you want to receive notifications from the same set // of alerting policies on the channel at some point in the future. google.protobuf.BoolValue enabled = 11; + + // Record of the creation of this channel. + MutationRecord creation_record = 12; + + // Records of the modification of this channel. + repeated MutationRecord mutation_records = 13; } diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto index 20c9a8e9ba5..0039ce15ebc 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/notification_service.proto @@ -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. @@ -291,6 +291,10 @@ message ListNotificationChannelsResponse { // subsequent request to fetch the next set of results. If empty, // all results have been returned. string next_page_token = 2; + + // The total number of notification channels in all pages. This number is only + // an estimate, and may change in subsequent pages. https://aip.dev/158 + int32 total_size = 4; } // The `GetNotificationChannel` request. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/query_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/query_service.proto new file mode 100644 index 00000000000..80bb4126336 --- /dev/null +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/query_service.proto @@ -0,0 +1,50 @@ +// 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. + +syntax = "proto3"; + +package google.monitoring.v3; + +import "google/api/annotations.proto"; +import "google/api/label.proto"; +import "google/monitoring/v3/metric.proto"; +import "google/monitoring/v3/metric_service.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.Monitoring.V3"; +option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring"; +option java_multiple_files = true; +option java_outer_classname = "QueryServiceProto"; +option java_package = "com.google.monitoring.v3"; +option php_namespace = "Google\\Cloud\\Monitoring\\V3"; +option ruby_package = "Google::Cloud::Monitoring::V3"; + +// The QueryService API is used to manage time series data in Stackdriver +// Monitoring. Time series data is a collection of data points that describes +// the time-varying values of a metric. +service QueryService { + option (google.api.default_host) = "monitoring.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/monitoring," + "https://www.googleapis.com/auth/monitoring.read"; + + // Queries time series using Monitoring Query Language. This method does not require a Workspace. + rpc QueryTimeSeries(QueryTimeSeriesRequest) returns (QueryTimeSeriesResponse) { + option (google.api.http) = { + post: "/v3/{name=projects/*}/timeSeries:query" + body: "*" + }; + } +} diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto index a89c007c95f..a0156e9e8dc 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service.proto @@ -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. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.monitoring.v3; -import "google/api/monitored_resource.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -67,10 +66,9 @@ message Service { } // Istio service scoped to a single Kubernetes cluster. Learn more at - // http://istio.io. + // https://istio.io. Clusters running OSS Istio will have their services + // ingested as this type. message ClusterIstio { - option deprecated = true; - // The location of the Kubernetes cluster in which this Istio service is // defined. Corresponds to the `location` resource label in `k8s_cluster` // resources. @@ -90,7 +88,8 @@ message Service { string service_name = 4; } - // Istio service scoped to an Istio mesh + // Istio service scoped to an Istio mesh. Anthos clusters running ASM < 1.6.8 + // will have their services ingested as this type. message MeshIstio { // Identifier for the mesh in which this Istio service is defined. // Corresponds to the `mesh_uid` metric label in Istio metrics. @@ -105,6 +104,27 @@ message Service { string service_name = 4; } + // Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= + // 1.6.8 will have their services ingested as this type. + message IstioCanonicalService { + // Identifier for the Istio mesh in which this canonical service is defined. + // Corresponds to the `mesh_uid` metric label in + // [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). + string mesh_uid = 1; + + // The namespace of the canonical service underlying this service. + // Corresponds to the `destination_canonical_service_namespace` metric + // label in [Istio + // metrics](https://cloud.google.com/monitoring/api/metrics_istio). + string canonical_service_namespace = 3; + + // The name of the canonical service underlying this service. + // Corresponds to the `destination_canonical_service_name` metric label in + // label in [Istio + // metrics](https://cloud.google.com/monitoring/api/metrics_istio). + string canonical_service = 4; + } + // Configuration for how to query telemetry on a Service. message Telemetry { // The full name of the resource that defines this service. Formatted as @@ -132,10 +152,15 @@ message Service { CloudEndpoints cloud_endpoints = 8; // Type used for Istio services that live in a Kubernetes cluster. - ClusterIstio cluster_istio = 9 [deprecated = true]; + ClusterIstio cluster_istio = 9; // Type used for Istio services scoped to an Istio mesh. MeshIstio mesh_istio = 10; + + // Type used for canonical services scoped to an Istio mesh. + // Metrics for Istio are + // [documented here](https://istio.io/latest/docs/reference/config/metrics/) + IstioCanonicalService istio_canonical_service = 11; } // Configuration for how to query telemetry on a Service. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto index cd5f7db6750..07916e62418 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/service_service.proto @@ -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. @@ -180,16 +180,20 @@ message ListServicesRequest { // // - `identifier_case` // - `app_engine.module_id` - // - `cloud_endpoints.service` - // - `cluster_istio.location` - // - `cluster_istio.cluster_name` - // - `cluster_istio.service_namespace` - // - `cluster_istio.service_name` + // - `cloud_endpoints.service` (reserved for future use) + // - `mesh_istio.mesh_uid` + // - `mesh_istio.service_namespace` + // - `mesh_istio.service_name` + // - `cluster_istio.location` (deprecated) + // - `cluster_istio.cluster_name` (deprecated) + // - `cluster_istio.service_namespace` (deprecated) + // - `cluster_istio.service_name` (deprecated) // // `identifier_case` refers to which option in the identifier oneof is // populated. For example, the filter `identifier_case = "CUSTOM"` would match // all services with a value for the `custom` field. Valid options are - // "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + // "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) + // and "CLOUD_ENDPOINTS" (reserved for future use). string filter = 2; // A non-negative number that is the maximum number of results to return. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto index 72cce35f12f..cfb8f267fc8 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/span_context.proto @@ -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/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto index 54a9b11e119..1f66ffcc57e 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime.proto @@ -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. @@ -28,6 +28,27 @@ option java_package = "com.google.monitoring.v3"; option php_namespace = "Google\\Cloud\\Monitoring\\V3"; option ruby_package = "Google::Cloud::Monitoring::V3"; +// The regions from which an Uptime check can be run. +enum UptimeCheckRegion { + // Default value if no region is specified. Will result in Uptime checks + // running from all regions. + REGION_UNSPECIFIED = 0; + + // Allows checks to run from locations within the United States of America. + USA = 1; + + // Allows checks to run from locations within the continent of Europe. + EUROPE = 2; + + // Allows checks to run from locations within the continent of South + // America. + SOUTH_AMERICA = 3; + + // Allows checks to run from locations within the Asia Pacific area (ex: + // Singapore). + ASIA_PACIFIC = 4; +} + // An internal checker allows Uptime checks to run on private/internal GCP // resources. message InternalChecker { @@ -84,27 +105,6 @@ message InternalChecker { State state = 7; } -// The regions from which an Uptime check can be run. -enum UptimeCheckRegion { - // Default value if no region is specified. Will result in Uptime checks - // running from all regions. - REGION_UNSPECIFIED = 0; - - // Allows checks to run from locations within the United States of America. - USA = 1; - - // Allows checks to run from locations within the continent of Europe. - EUROPE = 2; - - // Allows checks to run from locations within the continent of South - // America. - SOUTH_AMERICA = 3; - - // Allows checks to run from locations within the Asia Pacific area (ex: - // Singapore). - ASIA_PACIFIC = 4; -} - // This message configures which resources and services to monitor for // availability. message UptimeCheckConfig { @@ -154,12 +154,9 @@ message UptimeCheckConfig { POST = 2; } - // Header options corresponding to the Content-Type of the body in HTTP - // requests. Note that a `Content-Type` header cannot be present in the - // `headers` field if this field is specified. + // Header options corresponding to the content type of a HTTP request body. enum ContentType { - // No content type specified. If the request method is POST, an - // unspecified content type results in a check creation rejection. + // No content type specified. TYPE_UNSPECIFIED = 0; // `body` is in URL-encoded form. Equivalent to setting the `Content-Type` @@ -167,7 +164,8 @@ message UptimeCheckConfig { URL_ENCODED = 1; } - // The HTTP request method to use for the check. + // The HTTP request method to use for the check. If set to + // `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. RequestMethod request_method = 8; // If `true`, use HTTPS instead of HTTP to run the check. @@ -190,7 +188,7 @@ message UptimeCheckConfig { // defaults to empty. BasicAuthentication auth_info = 4; - // Boolean specifiying whether to encrypt the header information. + // Boolean specifying whether to encrypt the header information. // Encryption should be specified for any headers related to authentication // that you do not wish to be seen when retrieving the configuration. The // server will be responsible for encrypting the headers. @@ -208,7 +206,14 @@ message UptimeCheckConfig { // The maximum number of headers allowed is 100. map headers = 6; - // The content type to use for the check. + // The content type header to use for the check. The following + // configurations result in errors: + // 1. Content type is specified in both the `headers` field and the + // `content_type` field. + // 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` + // 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. + // 4. Request method is `POST` and a "Content-Type" header is provided via + // `headers` field. The `content_type` field should be used instead. ContentType content_type = 9; // Boolean specifying whether to include SSL certificate validation as a @@ -217,11 +222,14 @@ message UptimeCheckConfig { // setting `validate_ssl` to `true` has no effect. bool validate_ssl = 7; - // The request body associated with the HTTP request. If `content_type` is - // `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide - // a `Content-Length` header via the `headers` field or the API will do - // so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields - // JSON representations are base64 encoded. + // The request body associated with the HTTP POST request. If `content_type` + // is `URL_ENCODED`, the body passed in must be URL-encoded. Users can + // provide a `Content-Length` header via the `headers` field or the API will + // do so. If the `request_method` is `GET` and `body` is not empty, the API + // will return an error. The maximum byte size is 1 megabyte. Note: As with + // all `bytes` fields, JSON representations are base64 encoded. e.g.: + // "foo=bar" in URL-encoded form is "foo%3Dbar" and in base64 encoding is + // "Zm9vJTI1M0RiYXI=". bytes body = 10; } @@ -279,6 +287,9 @@ message UptimeCheckConfig { // // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] // + // `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the + // Uptime check. + // // This field should be omitted when creating the Uptime check configuration; // on create, the resource name is assigned by the server and included in the // response. diff --git a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto index 5e53934edce..78ad6697c1a 100644 --- a/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto +++ b/packages/google-cloud-monitoring/protos/google/monitoring/v3/uptime_service.proto @@ -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/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index ca6279b6e7a..aef3e04d293 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -285,6 +285,9 @@ export namespace google { /** Condition conditionAbsent */ conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + + /** Condition conditionMonitoringQueryLanguage */ + conditionMonitoringQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition|null); } /** Represents a Condition. */ @@ -308,8 +311,11 @@ export namespace google { /** Condition conditionAbsent. */ public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null); + /** Condition conditionMonitoringQueryLanguage. */ + public conditionMonitoringQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition|null); + /** Condition condition. */ - public condition?: ("conditionThreshold"|"conditionAbsent"); + public condition?: ("conditionThreshold"|"conditionAbsent"|"conditionMonitoringQueryLanguage"); /** * Creates a new Condition instance using the specified properties. @@ -722,6 +728,108 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a MonitoringQueryLanguageCondition. */ + interface IMonitoringQueryLanguageCondition { + + /** MonitoringQueryLanguageCondition query */ + query?: (string|null); + + /** MonitoringQueryLanguageCondition duration */ + duration?: (google.protobuf.IDuration|null); + + /** MonitoringQueryLanguageCondition trigger */ + trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + } + + /** Represents a MonitoringQueryLanguageCondition. */ + class MonitoringQueryLanguageCondition implements IMonitoringQueryLanguageCondition { + + /** + * Constructs a new MonitoringQueryLanguageCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition); + + /** MonitoringQueryLanguageCondition query. */ + public query: string; + + /** MonitoringQueryLanguageCondition duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** MonitoringQueryLanguageCondition trigger. */ + public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null); + + /** + * Creates a new MonitoringQueryLanguageCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringQueryLanguageCondition instance + */ + public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition): google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition; + + /** + * Encodes the specified MonitoringQueryLanguageCondition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.verify|verify} messages. + * @param message MonitoringQueryLanguageCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringQueryLanguageCondition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.verify|verify} messages. + * @param message MonitoringQueryLanguageCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringQueryLanguageCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition; + + /** + * Decodes a MonitoringQueryLanguageCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition; + + /** + * Verifies a MonitoringQueryLanguageCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringQueryLanguageCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringQueryLanguageCondition + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition; + + /** + * Creates a plain object from a MonitoringQueryLanguageCondition message. Also converts values to other types if specified. + * @param message MonitoringQueryLanguageCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringQueryLanguageCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** ConditionCombinerType enum. */ @@ -1649,6 +1757,9 @@ export namespace google { /** ListAlertPoliciesResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListAlertPoliciesResponse totalSize */ + totalSize?: (number|null); } /** Represents a ListAlertPoliciesResponse. */ @@ -1666,6 +1777,9 @@ export namespace google { /** ListAlertPoliciesResponse nextPageToken. */ public nextPageToken: string; + /** ListAlertPoliciesResponse totalSize. */ + public totalSize: number; + /** * Creates a new ListAlertPoliciesResponse instance using the specified properties. * @param [properties] Properties to set @@ -3212,6 +3326,9 @@ export namespace google { /** TimeSeries points */ points?: (google.monitoring.v3.IPoint[]|null); + + /** TimeSeries unit */ + unit?: (string|null); } /** Represents a TimeSeries. */ @@ -3241,6 +3358,9 @@ export namespace google { /** TimeSeries points. */ public points: google.monitoring.v3.IPoint[]; + /** TimeSeries unit. */ + public unit: string; + /** * Creates a new TimeSeries instance using the specified properties. * @param [properties] Properties to set @@ -3421,6 +3541,9 @@ export namespace google { /** ValueDescriptor metricKind */ metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** ValueDescriptor unit */ + unit?: (string|null); } /** Represents a ValueDescriptor. */ @@ -3441,6 +3564,9 @@ export namespace google { /** ValueDescriptor metricKind. */ public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + /** ValueDescriptor unit. */ + public unit: string; + /** * Creates a new ValueDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -5103,6 +5229,9 @@ export namespace google { /** ListTimeSeriesRequest aggregation */ aggregation?: (google.monitoring.v3.IAggregation|null); + /** ListTimeSeriesRequest secondaryAggregation */ + secondaryAggregation?: (google.monitoring.v3.IAggregation|null); + /** ListTimeSeriesRequest orderBy */ orderBy?: (string|null); @@ -5137,6 +5266,9 @@ export namespace google { /** ListTimeSeriesRequest aggregation. */ public aggregation?: (google.monitoring.v3.IAggregation|null); + /** ListTimeSeriesRequest secondaryAggregation. */ + public secondaryAggregation?: (google.monitoring.v3.IAggregation|null); + /** ListTimeSeriesRequest orderBy. */ public orderBy: string; @@ -5240,6 +5372,9 @@ export namespace google { /** ListTimeSeriesResponse executionErrors */ executionErrors?: (google.rpc.IStatus[]|null); + + /** ListTimeSeriesResponse unit */ + unit?: (string|null); } /** Represents a ListTimeSeriesResponse. */ @@ -5260,6 +5395,9 @@ export namespace google { /** ListTimeSeriesResponse executionErrors. */ public executionErrors: google.rpc.IStatus[]; + /** ListTimeSeriesResponse unit. */ + public unit: string; + /** * Creates a new ListTimeSeriesResponse instance using the specified properties. * @param [properties] Properties to set @@ -6188,6 +6326,12 @@ export namespace google { /** NotificationChannel enabled */ enabled?: (google.protobuf.IBoolValue|null); + + /** NotificationChannel creationRecord */ + creationRecord?: (google.monitoring.v3.IMutationRecord|null); + + /** NotificationChannel mutationRecords */ + mutationRecords?: (google.monitoring.v3.IMutationRecord[]|null); } /** Represents a NotificationChannel. */ @@ -6223,6 +6367,12 @@ export namespace google { /** NotificationChannel enabled. */ public enabled?: (google.protobuf.IBoolValue|null); + /** NotificationChannel creationRecord. */ + public creationRecord?: (google.monitoring.v3.IMutationRecord|null); + + /** NotificationChannel mutationRecords. */ + public mutationRecords: google.monitoring.v3.IMutationRecord[]; + /** * Creates a new NotificationChannel instance using the specified properties. * @param [properties] Properties to set @@ -7044,6 +7194,9 @@ export namespace google { /** ListNotificationChannelsResponse nextPageToken */ nextPageToken?: (string|null); + + /** ListNotificationChannelsResponse totalSize */ + totalSize?: (number|null); } /** Represents a ListNotificationChannelsResponse. */ @@ -7061,6 +7214,9 @@ export namespace google { /** ListNotificationChannelsResponse nextPageToken. */ public nextPageToken: string; + /** ListNotificationChannelsResponse totalSize. */ + public totalSize: number; + /** * Creates a new ListNotificationChannelsResponse instance using the specified properties. * @param [properties] Properties to set @@ -7792,6 +7948,51 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Represents a QueryService */ + class QueryService extends $protobuf.rpc.Service { + + /** + * Constructs a new QueryService 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 QueryService 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): QueryService; + + /** + * Calls QueryTimeSeries. + * @param request QueryTimeSeriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryTimeSeriesResponse + */ + public queryTimeSeries(request: google.monitoring.v3.IQueryTimeSeriesRequest, callback: google.monitoring.v3.QueryService.QueryTimeSeriesCallback): void; + + /** + * Calls QueryTimeSeries. + * @param request QueryTimeSeriesRequest message or plain object + * @returns Promise + */ + public queryTimeSeries(request: google.monitoring.v3.IQueryTimeSeriesRequest): Promise; + } + + namespace QueryService { + + /** + * Callback as used by {@link google.monitoring.v3.QueryService#queryTimeSeries}. + * @param error Error, if any + * @param [response] QueryTimeSeriesResponse + */ + type QueryTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.QueryTimeSeriesResponse) => void; + } + /** Properties of a Service. */ interface IService { @@ -7816,6 +8017,9 @@ export namespace google { /** Service meshIstio */ meshIstio?: (google.monitoring.v3.Service.IMeshIstio|null); + /** Service istioCanonicalService */ + istioCanonicalService?: (google.monitoring.v3.Service.IIstioCanonicalService|null); + /** Service telemetry */ telemetry?: (google.monitoring.v3.Service.ITelemetry|null); } @@ -7850,11 +8054,14 @@ export namespace google { /** Service meshIstio. */ public meshIstio?: (google.monitoring.v3.Service.IMeshIstio|null); + /** Service istioCanonicalService. */ + public istioCanonicalService?: (google.monitoring.v3.Service.IIstioCanonicalService|null); + /** Service telemetry. */ public telemetry?: (google.monitoring.v3.Service.ITelemetry|null); /** Service identifier. */ - public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|"meshIstio"); + public identifier?: ("custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|"meshIstio"|"istioCanonicalService"); /** * Creates a new Service instance using the specified properties. @@ -8403,6 +8610,108 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of an IstioCanonicalService. */ + interface IIstioCanonicalService { + + /** IstioCanonicalService meshUid */ + meshUid?: (string|null); + + /** IstioCanonicalService canonicalServiceNamespace */ + canonicalServiceNamespace?: (string|null); + + /** IstioCanonicalService canonicalService */ + canonicalService?: (string|null); + } + + /** Represents an IstioCanonicalService. */ + class IstioCanonicalService implements IIstioCanonicalService { + + /** + * Constructs a new IstioCanonicalService. + * @param [properties] Properties to set + */ + constructor(properties?: google.monitoring.v3.Service.IIstioCanonicalService); + + /** IstioCanonicalService meshUid. */ + public meshUid: string; + + /** IstioCanonicalService canonicalServiceNamespace. */ + public canonicalServiceNamespace: string; + + /** IstioCanonicalService canonicalService. */ + public canonicalService: string; + + /** + * Creates a new IstioCanonicalService instance using the specified properties. + * @param [properties] Properties to set + * @returns IstioCanonicalService instance + */ + public static create(properties?: google.monitoring.v3.Service.IIstioCanonicalService): google.monitoring.v3.Service.IstioCanonicalService; + + /** + * Encodes the specified IstioCanonicalService message. Does not implicitly {@link google.monitoring.v3.Service.IstioCanonicalService.verify|verify} messages. + * @param message IstioCanonicalService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.monitoring.v3.Service.IIstioCanonicalService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IstioCanonicalService message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.IstioCanonicalService.verify|verify} messages. + * @param message IstioCanonicalService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.monitoring.v3.Service.IIstioCanonicalService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IstioCanonicalService message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IstioCanonicalService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.Service.IstioCanonicalService; + + /** + * Decodes an IstioCanonicalService message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IstioCanonicalService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.Service.IstioCanonicalService; + + /** + * Verifies an IstioCanonicalService message. + * @param message Plain 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 IstioCanonicalService message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IstioCanonicalService + */ + public static fromObject(object: { [k: string]: any }): google.monitoring.v3.Service.IstioCanonicalService; + + /** + * Creates a plain object from an IstioCanonicalService message. Also converts values to other types if specified. + * @param message IstioCanonicalService + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.monitoring.v3.Service.IstioCanonicalService, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IstioCanonicalService to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Telemetry. */ interface ITelemetry { @@ -11240,6 +11549,15 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** UptimeCheckRegion enum. */ + enum UptimeCheckRegion { + REGION_UNSPECIFIED = 0, + USA = 1, + EUROPE = 2, + SOUTH_AMERICA = 3, + ASIA_PACIFIC = 4 + } + /** Properties of an InternalChecker. */ interface IInternalChecker { @@ -11370,15 +11688,6 @@ export namespace google { } } - /** UptimeCheckRegion enum. */ - enum UptimeCheckRegion { - REGION_UNSPECIFIED = 0, - USA = 1, - EUROPE = 2, - SOUTH_AMERICA = 3, - ASIA_PACIFIC = 4 - } - /** Properties of an UptimeCheckConfig. */ interface IUptimeCheckConfig { @@ -13126,6 +13435,17 @@ export namespace google { /** 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 ResourceDescriptor. */ interface IResourceDescriptor { @@ -14432,17 +14752,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** 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 { @@ -17113,11 +17422,11 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - /** FieldOptions .google.api.fieldBehavior */ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } /** Represents a FieldOptions. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index dad5127df3a..629d9499093 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -805,6 +805,7 @@ * @property {string|null} [displayName] Condition displayName * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null} [conditionThreshold] Condition conditionThreshold * @property {google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null} [conditionAbsent] Condition conditionAbsent + * @property {google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition|null} [conditionMonitoringQueryLanguage] Condition conditionMonitoringQueryLanguage */ /** @@ -854,17 +855,25 @@ */ Condition.prototype.conditionAbsent = null; + /** + * Condition conditionMonitoringQueryLanguage. + * @member {google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition|null|undefined} conditionMonitoringQueryLanguage + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @instance + */ + Condition.prototype.conditionMonitoringQueryLanguage = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Condition condition. - * @member {"conditionThreshold"|"conditionAbsent"|undefined} condition + * @member {"conditionThreshold"|"conditionAbsent"|"conditionMonitoringQueryLanguage"|undefined} condition * @memberof google.monitoring.v3.AlertPolicy.Condition * @instance */ Object.defineProperty(Condition.prototype, "condition", { - get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent"]), + get: $util.oneOfGetter($oneOfFields = ["conditionThreshold", "conditionAbsent", "conditionMonitoringQueryLanguage"]), set: $util.oneOfSetter($oneOfFields) }); @@ -900,6 +909,8 @@ writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.name); + if (message.conditionMonitoringQueryLanguage != null && Object.hasOwnProperty.call(message, "conditionMonitoringQueryLanguage")) + $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.encode(message.conditionMonitoringQueryLanguage, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -946,6 +957,9 @@ case 2: message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); break; + case 19: + message.conditionMonitoringQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -1006,6 +1020,16 @@ return "conditionAbsent." + error; } } + if (message.conditionMonitoringQueryLanguage != null && message.hasOwnProperty("conditionMonitoringQueryLanguage")) { + if (properties.condition === 1) + return "condition: multiple values"; + properties.condition = 1; + { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.verify(message.conditionMonitoringQueryLanguage); + if (error) + return "conditionMonitoringQueryLanguage." + error; + } + } return null; }; @@ -1035,6 +1059,11 @@ throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionAbsent: object expected"); message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.fromObject(object.conditionAbsent); } + if (object.conditionMonitoringQueryLanguage != null) { + if (typeof object.conditionMonitoringQueryLanguage !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.conditionMonitoringQueryLanguage: object expected"); + message.conditionMonitoringQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.fromObject(object.conditionMonitoringQueryLanguage); + } return message; }; @@ -1069,6 +1098,11 @@ object.displayName = message.displayName; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.conditionMonitoringQueryLanguage != null && message.hasOwnProperty("conditionMonitoringQueryLanguage")) { + object.conditionMonitoringQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.toObject(message.conditionMonitoringQueryLanguage, options); + if (options.oneofs) + object.condition = "conditionMonitoringQueryLanguage"; + } return object; }; @@ -2036,6 +2070,248 @@ return MetricAbsence; })(); + Condition.MonitoringQueryLanguageCondition = (function() { + + /** + * Properties of a MonitoringQueryLanguageCondition. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @interface IMonitoringQueryLanguageCondition + * @property {string|null} [query] MonitoringQueryLanguageCondition query + * @property {google.protobuf.IDuration|null} [duration] MonitoringQueryLanguageCondition duration + * @property {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null} [trigger] MonitoringQueryLanguageCondition trigger + */ + + /** + * Constructs a new MonitoringQueryLanguageCondition. + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @classdesc Represents a MonitoringQueryLanguageCondition. + * @implements IMonitoringQueryLanguageCondition + * @constructor + * @param {google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition=} [properties] Properties to set + */ + function MonitoringQueryLanguageCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonitoringQueryLanguageCondition query. + * @member {string} query + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @instance + */ + MonitoringQueryLanguageCondition.prototype.query = ""; + + /** + * MonitoringQueryLanguageCondition duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @instance + */ + MonitoringQueryLanguageCondition.prototype.duration = null; + + /** + * MonitoringQueryLanguageCondition trigger. + * @member {google.monitoring.v3.AlertPolicy.Condition.ITrigger|null|undefined} trigger + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @instance + */ + MonitoringQueryLanguageCondition.prototype.trigger = null; + + /** + * Creates a new MonitoringQueryLanguageCondition instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition=} [properties] Properties to set + * @returns {google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition} MonitoringQueryLanguageCondition instance + */ + MonitoringQueryLanguageCondition.create = function create(properties) { + return new MonitoringQueryLanguageCondition(properties); + }; + + /** + * Encodes the specified MonitoringQueryLanguageCondition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition} message MonitoringQueryLanguageCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringQueryLanguageCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MonitoringQueryLanguageCondition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition} message MonitoringQueryLanguageCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringQueryLanguageCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringQueryLanguageCondition message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition} MonitoringQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringQueryLanguageCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.query = reader.string(); + break; + case 2: + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringQueryLanguageCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition} MonitoringQueryLanguageCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringQueryLanguageCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringQueryLanguageCondition message. + * @function verify + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringQueryLanguageCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; + + /** + * Creates a MonitoringQueryLanguageCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition} MonitoringQueryLanguageCondition + */ + MonitoringQueryLanguageCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition) + return object; + var message = new $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition(); + if (object.query != null) + message.query = String(object.query); + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.trigger: object expected"); + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from a MonitoringQueryLanguageCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition} message MonitoringQueryLanguageCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringQueryLanguageCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.query = ""; + object.duration = null; + object.trigger = null; + } + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.toObject(message.trigger, options); + return object; + }; + + /** + * Converts this MonitoringQueryLanguageCondition to JSON. + * @function toJSON + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @instance + * @returns {Object.} JSON object + */ + MonitoringQueryLanguageCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MonitoringQueryLanguageCondition; + })(); + return Condition; })(); @@ -4287,6 +4563,7 @@ * @interface IListAlertPoliciesResponse * @property {Array.|null} [alertPolicies] ListAlertPoliciesResponse alertPolicies * @property {string|null} [nextPageToken] ListAlertPoliciesResponse nextPageToken + * @property {number|null} [totalSize] ListAlertPoliciesResponse totalSize */ /** @@ -4321,6 +4598,14 @@ */ ListAlertPoliciesResponse.prototype.nextPageToken = ""; + /** + * ListAlertPoliciesResponse totalSize. + * @member {number} totalSize + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @instance + */ + ListAlertPoliciesResponse.prototype.totalSize = 0; + /** * Creates a new ListAlertPoliciesResponse instance using the specified properties. * @function create @@ -4350,6 +4635,8 @@ if (message.alertPolicies != null && message.alertPolicies.length) for (var i = 0; i < message.alertPolicies.length; ++i) $root.google.monitoring.v3.AlertPolicy.encode(message.alertPolicies[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; @@ -4392,6 +4679,9 @@ case 2: message.nextPageToken = reader.string(); break; + case 4: + message.totalSize = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -4439,6 +4729,9 @@ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; @@ -4466,6 +4759,8 @@ } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; @@ -4484,8 +4779,10 @@ var object = {}; if (options.arrays || options.defaults) object.alertPolicies = []; - if (options.defaults) + if (options.defaults) { object.nextPageToken = ""; + object.totalSize = 0; + } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; if (message.alertPolicies && message.alertPolicies.length) { @@ -4493,6 +4790,8 @@ for (var j = 0; j < message.alertPolicies.length; ++j) object.alertPolicies[j] = $root.google.monitoring.v3.AlertPolicy.toObject(message.alertPolicies[j], options); } + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; @@ -7824,6 +8123,7 @@ * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] TimeSeries metricKind * @property {google.api.MetricDescriptor.ValueType|null} [valueType] TimeSeries valueType * @property {Array.|null} [points] TimeSeries points + * @property {string|null} [unit] TimeSeries unit */ /** @@ -7890,6 +8190,14 @@ */ TimeSeries.prototype.points = $util.emptyArray; + /** + * TimeSeries unit. + * @member {string} unit + * @memberof google.monitoring.v3.TimeSeries + * @instance + */ + TimeSeries.prototype.unit = ""; + /** * Creates a new TimeSeries instance using the specified properties. * @function create @@ -7927,6 +8235,8 @@ $root.google.monitoring.v3.Point.encode(message.points[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.google.api.MonitoredResourceMetadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.unit); return writer; }; @@ -7981,6 +8291,9 @@ message.points = []; message.points.push($root.google.monitoring.v3.Point.decode(reader, reader.uint32())); break; + case 8: + message.unit = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -8063,6 +8376,9 @@ return "points." + error; } } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; return null; }; @@ -8151,6 +8467,8 @@ message.points[i] = $root.google.monitoring.v3.Point.fromObject(object.points[i]); } } + if (object.unit != null) + message.unit = String(object.unit); return message; }; @@ -8175,6 +8493,7 @@ object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; object.metadata = null; + object.unit = ""; } if (message.metric != null && message.hasOwnProperty("metric")) object.metric = $root.google.api.Metric.toObject(message.metric, options); @@ -8191,6 +8510,8 @@ } if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = $root.google.api.MonitoredResourceMetadata.toObject(message.metadata, options); + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; return object; }; @@ -8466,6 +8787,7 @@ * @property {string|null} [key] ValueDescriptor key * @property {google.api.MetricDescriptor.ValueType|null} [valueType] ValueDescriptor valueType * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] ValueDescriptor metricKind + * @property {string|null} [unit] ValueDescriptor unit */ /** @@ -8507,6 +8829,14 @@ */ ValueDescriptor.prototype.metricKind = 0; + /** + * ValueDescriptor unit. + * @member {string} unit + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @instance + */ + ValueDescriptor.prototype.unit = ""; + /** * Creates a new ValueDescriptor instance using the specified properties. * @function create @@ -8537,6 +8867,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.unit); return writer; }; @@ -8580,6 +8912,9 @@ case 3: message.metricKind = reader.int32(); break; + case 4: + message.unit = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -8641,6 +8976,9 @@ case 3: break; } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; return null; }; @@ -8706,6 +9044,8 @@ message.metricKind = 3; break; } + if (object.unit != null) + message.unit = String(object.unit); return message; }; @@ -8726,6 +9066,7 @@ object.key = ""; object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.unit = ""; } if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; @@ -8733,6 +9074,8 @@ object.valueType = options.enums === String ? $root.google.api.MetricDescriptor.ValueType[message.valueType] : message.valueType; if (message.metricKind != null && message.hasOwnProperty("metricKind")) object.metricKind = options.enums === String ? $root.google.api.MetricDescriptor.MetricKind[message.metricKind] : message.metricKind; + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; return object; }; @@ -12283,6 +12626,7 @@ * @property {string|null} [filter] ListTimeSeriesRequest filter * @property {google.monitoring.v3.ITimeInterval|null} [interval] ListTimeSeriesRequest interval * @property {google.monitoring.v3.IAggregation|null} [aggregation] ListTimeSeriesRequest aggregation + * @property {google.monitoring.v3.IAggregation|null} [secondaryAggregation] ListTimeSeriesRequest secondaryAggregation * @property {string|null} [orderBy] ListTimeSeriesRequest orderBy * @property {google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView|null} [view] ListTimeSeriesRequest view * @property {number|null} [pageSize] ListTimeSeriesRequest pageSize @@ -12336,6 +12680,14 @@ */ ListTimeSeriesRequest.prototype.aggregation = null; + /** + * ListTimeSeriesRequest secondaryAggregation. + * @member {google.monitoring.v3.IAggregation|null|undefined} secondaryAggregation + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @instance + */ + ListTimeSeriesRequest.prototype.secondaryAggregation = null; + /** * ListTimeSeriesRequest orderBy. * @member {string} orderBy @@ -12408,6 +12760,8 @@ writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.name); + if (message.secondaryAggregation != null && Object.hasOwnProperty.call(message, "secondaryAggregation")) + $root.google.monitoring.v3.Aggregation.encode(message.secondaryAggregation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -12454,6 +12808,9 @@ case 5: message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); break; + case 11: + message.secondaryAggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); + break; case 6: message.orderBy = reader.string(); break; @@ -12517,6 +12874,11 @@ if (error) return "aggregation." + error; } + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) { + var error = $root.google.monitoring.v3.Aggregation.verify(message.secondaryAggregation); + if (error) + return "secondaryAggregation." + error; + } if (message.orderBy != null && message.hasOwnProperty("orderBy")) if (!$util.isString(message.orderBy)) return "orderBy: string expected"; @@ -12563,6 +12925,11 @@ throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.aggregation: object expected"); message.aggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.aggregation); } + if (object.secondaryAggregation != null) { + if (typeof object.secondaryAggregation !== "object") + throw TypeError(".google.monitoring.v3.ListTimeSeriesRequest.secondaryAggregation: object expected"); + message.secondaryAggregation = $root.google.monitoring.v3.Aggregation.fromObject(object.secondaryAggregation); + } if (object.orderBy != null) message.orderBy = String(object.orderBy); switch (object.view) { @@ -12604,6 +12971,7 @@ object.pageSize = 0; object.pageToken = ""; object.name = ""; + object.secondaryAggregation = null; } if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; @@ -12621,6 +12989,8 @@ object.pageToken = message.pageToken; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.secondaryAggregation != null && message.hasOwnProperty("secondaryAggregation")) + object.secondaryAggregation = $root.google.monitoring.v3.Aggregation.toObject(message.secondaryAggregation, options); return object; }; @@ -12661,6 +13031,7 @@ * @property {Array.|null} [timeSeries] ListTimeSeriesResponse timeSeries * @property {string|null} [nextPageToken] ListTimeSeriesResponse nextPageToken * @property {Array.|null} [executionErrors] ListTimeSeriesResponse executionErrors + * @property {string|null} [unit] ListTimeSeriesResponse unit */ /** @@ -12704,6 +13075,14 @@ */ ListTimeSeriesResponse.prototype.executionErrors = $util.emptyArray; + /** + * ListTimeSeriesResponse unit. + * @member {string} unit + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @instance + */ + ListTimeSeriesResponse.prototype.unit = ""; + /** * Creates a new ListTimeSeriesResponse instance using the specified properties. * @function create @@ -12736,6 +13115,8 @@ if (message.executionErrors != null && message.executionErrors.length) for (var i = 0; i < message.executionErrors.length; ++i) $root.google.rpc.Status.encode(message.executionErrors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); return writer; }; @@ -12783,6 +13164,9 @@ message.executionErrors = []; message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; + case 5: + message.unit = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -12839,6 +13223,9 @@ return "executionErrors." + error; } } + if (message.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; return null; }; @@ -12876,6 +13263,8 @@ message.executionErrors[i] = $root.google.rpc.Status.fromObject(object.executionErrors[i]); } } + if (object.unit != null) + message.unit = String(object.unit); return message; }; @@ -12896,8 +13285,10 @@ object.timeSeries = []; object.executionErrors = []; } - if (options.defaults) + if (options.defaults) { object.nextPageToken = ""; + object.unit = ""; + } if (message.timeSeries && message.timeSeries.length) { object.timeSeries = []; for (var j = 0; j < message.timeSeries.length; ++j) @@ -12910,6 +13301,8 @@ for (var j = 0; j < message.executionErrors.length; ++j) object.executionErrors[j] = $root.google.rpc.Status.toObject(message.executionErrors[j], options); } + if (message.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; return object; }; @@ -15079,6 +15472,8 @@ * @property {Object.|null} [userLabels] NotificationChannel userLabels * @property {google.monitoring.v3.NotificationChannel.VerificationStatus|null} [verificationStatus] NotificationChannel verificationStatus * @property {google.protobuf.IBoolValue|null} [enabled] NotificationChannel enabled + * @property {google.monitoring.v3.IMutationRecord|null} [creationRecord] NotificationChannel creationRecord + * @property {Array.|null} [mutationRecords] NotificationChannel mutationRecords */ /** @@ -15092,6 +15487,7 @@ function NotificationChannel(properties) { this.labels = {}; this.userLabels = {}; + this.mutationRecords = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15162,6 +15558,22 @@ */ NotificationChannel.prototype.enabled = null; + /** + * NotificationChannel creationRecord. + * @member {google.monitoring.v3.IMutationRecord|null|undefined} creationRecord + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.creationRecord = null; + + /** + * NotificationChannel mutationRecords. + * @member {Array.} mutationRecords + * @memberof google.monitoring.v3.NotificationChannel + * @instance + */ + NotificationChannel.prototype.mutationRecords = $util.emptyArray; + /** * Creates a new NotificationChannel instance using the specified properties. * @function create @@ -15204,6 +15616,11 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.verificationStatus); if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) $root.google.protobuf.BoolValue.encode(message.enabled, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.creationRecord != null && Object.hasOwnProperty.call(message, "creationRecord")) + $root.google.monitoring.v3.MutationRecord.encode(message.creationRecord, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.mutationRecords != null && message.mutationRecords.length) + for (var i = 0; i < message.mutationRecords.length; ++i) + $root.google.monitoring.v3.MutationRecord.encode(message.mutationRecords[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -15300,6 +15717,14 @@ case 11: message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); break; + case 12: + message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; + case 13: + if (!(message.mutationRecords && message.mutationRecords.length)) + message.mutationRecords = []; + message.mutationRecords.push($root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -15377,6 +15802,20 @@ if (error) return "enabled." + error; } + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) { + var error = $root.google.monitoring.v3.MutationRecord.verify(message.creationRecord); + if (error) + return "creationRecord." + error; + } + if (message.mutationRecords != null && message.hasOwnProperty("mutationRecords")) { + if (!Array.isArray(message.mutationRecords)) + return "mutationRecords: array expected"; + for (var i = 0; i < message.mutationRecords.length; ++i) { + var error = $root.google.monitoring.v3.MutationRecord.verify(message.mutationRecords[i]); + if (error) + return "mutationRecords." + error; + } + } return null; }; @@ -15433,6 +15872,21 @@ throw TypeError(".google.monitoring.v3.NotificationChannel.enabled: object expected"); message.enabled = $root.google.protobuf.BoolValue.fromObject(object.enabled); } + if (object.creationRecord != null) { + if (typeof object.creationRecord !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.creationRecord: object expected"); + message.creationRecord = $root.google.monitoring.v3.MutationRecord.fromObject(object.creationRecord); + } + if (object.mutationRecords) { + if (!Array.isArray(object.mutationRecords)) + throw TypeError(".google.monitoring.v3.NotificationChannel.mutationRecords: array expected"); + message.mutationRecords = []; + for (var i = 0; i < object.mutationRecords.length; ++i) { + if (typeof object.mutationRecords[i] !== "object") + throw TypeError(".google.monitoring.v3.NotificationChannel.mutationRecords: object expected"); + message.mutationRecords[i] = $root.google.monitoring.v3.MutationRecord.fromObject(object.mutationRecords[i]); + } + } return message; }; @@ -15449,6 +15903,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.mutationRecords = []; if (options.objects || options.defaults) { object.labels = {}; object.userLabels = {}; @@ -15460,6 +15916,7 @@ object.name = ""; object.verificationStatus = options.enums === String ? "VERIFICATION_STATUS_UNSPECIFIED" : 0; object.enabled = null; + object.creationRecord = null; } if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; @@ -15484,6 +15941,13 @@ object.verificationStatus = options.enums === String ? $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] : message.verificationStatus; if (message.enabled != null && message.hasOwnProperty("enabled")) object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); + if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) + object.creationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.creationRecord, options); + if (message.mutationRecords && message.mutationRecords.length) { + object.mutationRecords = []; + for (var j = 0; j < message.mutationRecords.length; ++j) + object.mutationRecords[j] = $root.google.monitoring.v3.MutationRecord.toObject(message.mutationRecords[j], options); + } return object; }; @@ -17031,6 +17495,7 @@ * @interface IListNotificationChannelsResponse * @property {Array.|null} [notificationChannels] ListNotificationChannelsResponse notificationChannels * @property {string|null} [nextPageToken] ListNotificationChannelsResponse nextPageToken + * @property {number|null} [totalSize] ListNotificationChannelsResponse totalSize */ /** @@ -17065,6 +17530,14 @@ */ ListNotificationChannelsResponse.prototype.nextPageToken = ""; + /** + * ListNotificationChannelsResponse totalSize. + * @member {number} totalSize + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @instance + */ + ListNotificationChannelsResponse.prototype.totalSize = 0; + /** * Creates a new ListNotificationChannelsResponse instance using the specified properties. * @function create @@ -17094,6 +17567,8 @@ if (message.notificationChannels != null && message.notificationChannels.length) for (var i = 0; i < message.notificationChannels.length; ++i) $root.google.monitoring.v3.NotificationChannel.encode(message.notificationChannels[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalSize); return writer; }; @@ -17136,6 +17611,9 @@ case 2: message.nextPageToken = reader.string(); break; + case 4: + message.totalSize = reader.int32(); + break; default: reader.skipType(tag & 7); break; @@ -17183,6 +17661,9 @@ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; return null; }; @@ -17210,6 +17691,8 @@ } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; return message; }; @@ -17228,8 +17711,10 @@ var object = {}; if (options.arrays || options.defaults) object.notificationChannels = []; - if (options.defaults) + if (options.defaults) { object.nextPageToken = ""; + object.totalSize = 0; + } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; if (message.notificationChannels && message.notificationChannels.length) { @@ -17237,6 +17722,8 @@ for (var j = 0; j < message.notificationChannels.length; ++j) object.notificationChannels[j] = $root.google.monitoring.v3.NotificationChannel.toObject(message.notificationChannels[j], options); } + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; return object; }; @@ -18698,6 +19185,74 @@ return VerifyNotificationChannelRequest; })(); + v3.QueryService = (function() { + + /** + * Constructs a new QueryService service. + * @memberof google.monitoring.v3 + * @classdesc Represents a QueryService + * @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 QueryService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (QueryService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = QueryService; + + /** + * Creates new QueryService service using the specified rpc implementation. + * @function create + * @memberof google.monitoring.v3.QueryService + * @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 {QueryService} RPC service. Useful where requests and/or responses are streamed. + */ + QueryService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.monitoring.v3.QueryService#queryTimeSeries}. + * @memberof google.monitoring.v3.QueryService + * @typedef QueryTimeSeriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.monitoring.v3.QueryTimeSeriesResponse} [response] QueryTimeSeriesResponse + */ + + /** + * Calls QueryTimeSeries. + * @function queryTimeSeries + * @memberof google.monitoring.v3.QueryService + * @instance + * @param {google.monitoring.v3.IQueryTimeSeriesRequest} request QueryTimeSeriesRequest message or plain object + * @param {google.monitoring.v3.QueryService.QueryTimeSeriesCallback} callback Node-style callback called with the error, if any, and QueryTimeSeriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(QueryService.prototype.queryTimeSeries = function queryTimeSeries(request, callback) { + return this.rpcCall(queryTimeSeries, $root.google.monitoring.v3.QueryTimeSeriesRequest, $root.google.monitoring.v3.QueryTimeSeriesResponse, request, callback); + }, "name", { value: "QueryTimeSeries" }); + + /** + * Calls QueryTimeSeries. + * @function queryTimeSeries + * @memberof google.monitoring.v3.QueryService + * @instance + * @param {google.monitoring.v3.IQueryTimeSeriesRequest} request QueryTimeSeriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return QueryService; + })(); + v3.Service = (function() { /** @@ -18711,6 +19266,7 @@ * @property {google.monitoring.v3.Service.ICloudEndpoints|null} [cloudEndpoints] Service cloudEndpoints * @property {google.monitoring.v3.Service.IClusterIstio|null} [clusterIstio] Service clusterIstio * @property {google.monitoring.v3.Service.IMeshIstio|null} [meshIstio] Service meshIstio + * @property {google.monitoring.v3.Service.IIstioCanonicalService|null} [istioCanonicalService] Service istioCanonicalService * @property {google.monitoring.v3.Service.ITelemetry|null} [telemetry] Service telemetry */ @@ -18785,6 +19341,14 @@ */ Service.prototype.meshIstio = null; + /** + * Service istioCanonicalService. + * @member {google.monitoring.v3.Service.IIstioCanonicalService|null|undefined} istioCanonicalService + * @memberof google.monitoring.v3.Service + * @instance + */ + Service.prototype.istioCanonicalService = null; + /** * Service telemetry. * @member {google.monitoring.v3.Service.ITelemetry|null|undefined} telemetry @@ -18798,12 +19362,12 @@ /** * Service identifier. - * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|"meshIstio"|undefined} identifier + * @member {"custom"|"appEngine"|"cloudEndpoints"|"clusterIstio"|"meshIstio"|"istioCanonicalService"|undefined} identifier * @memberof google.monitoring.v3.Service * @instance */ Object.defineProperty(Service.prototype, "identifier", { - get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio", "meshIstio"]), + get: $util.oneOfGetter($oneOfFields = ["custom", "appEngine", "cloudEndpoints", "clusterIstio", "meshIstio", "istioCanonicalService"]), set: $util.oneOfSetter($oneOfFields) }); @@ -18845,6 +19409,8 @@ $root.google.monitoring.v3.Service.ClusterIstio.encode(message.clusterIstio, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.meshIstio != null && Object.hasOwnProperty.call(message, "meshIstio")) $root.google.monitoring.v3.Service.MeshIstio.encode(message.meshIstio, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.istioCanonicalService != null && Object.hasOwnProperty.call(message, "istioCanonicalService")) + $root.google.monitoring.v3.Service.IstioCanonicalService.encode(message.istioCanonicalService, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.telemetry != null && Object.hasOwnProperty.call(message, "telemetry")) $root.google.monitoring.v3.Service.Telemetry.encode(message.telemetry, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; @@ -18902,6 +19468,9 @@ case 10: message.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.decode(reader, reader.uint32()); break; + case 11: + message.istioCanonicalService = $root.google.monitoring.v3.Service.IstioCanonicalService.decode(reader, reader.uint32()); + break; case 13: message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); break; @@ -18995,6 +19564,16 @@ return "meshIstio." + error; } } + if (message.istioCanonicalService != null && message.hasOwnProperty("istioCanonicalService")) { + if (properties.identifier === 1) + return "identifier: multiple values"; + properties.identifier = 1; + { + var error = $root.google.monitoring.v3.Service.IstioCanonicalService.verify(message.istioCanonicalService); + if (error) + return "istioCanonicalService." + error; + } + } if (message.telemetry != null && message.hasOwnProperty("telemetry")) { var error = $root.google.monitoring.v3.Service.Telemetry.verify(message.telemetry); if (error) @@ -19044,6 +19623,11 @@ throw TypeError(".google.monitoring.v3.Service.meshIstio: object expected"); message.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.fromObject(object.meshIstio); } + if (object.istioCanonicalService != null) { + if (typeof object.istioCanonicalService !== "object") + throw TypeError(".google.monitoring.v3.Service.istioCanonicalService: object expected"); + message.istioCanonicalService = $root.google.monitoring.v3.Service.IstioCanonicalService.fromObject(object.istioCanonicalService); + } if (object.telemetry != null) { if (typeof object.telemetry !== "object") throw TypeError(".google.monitoring.v3.Service.telemetry: object expected"); @@ -19099,6 +19683,11 @@ if (options.oneofs) object.identifier = "meshIstio"; } + if (message.istioCanonicalService != null && message.hasOwnProperty("istioCanonicalService")) { + object.istioCanonicalService = $root.google.monitoring.v3.Service.IstioCanonicalService.toObject(message.istioCanonicalService, options); + if (options.oneofs) + object.identifier = "istioCanonicalService"; + } if (message.telemetry != null && message.hasOwnProperty("telemetry")) object.telemetry = $root.google.monitoring.v3.Service.Telemetry.toObject(message.telemetry, options); return object; @@ -20135,6 +20724,238 @@ return MeshIstio; })(); + Service.IstioCanonicalService = (function() { + + /** + * Properties of an IstioCanonicalService. + * @memberof google.monitoring.v3.Service + * @interface IIstioCanonicalService + * @property {string|null} [meshUid] IstioCanonicalService meshUid + * @property {string|null} [canonicalServiceNamespace] IstioCanonicalService canonicalServiceNamespace + * @property {string|null} [canonicalService] IstioCanonicalService canonicalService + */ + + /** + * Constructs a new IstioCanonicalService. + * @memberof google.monitoring.v3.Service + * @classdesc Represents an IstioCanonicalService. + * @implements IIstioCanonicalService + * @constructor + * @param {google.monitoring.v3.Service.IIstioCanonicalService=} [properties] Properties to set + */ + function IstioCanonicalService(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IstioCanonicalService meshUid. + * @member {string} meshUid + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @instance + */ + IstioCanonicalService.prototype.meshUid = ""; + + /** + * IstioCanonicalService canonicalServiceNamespace. + * @member {string} canonicalServiceNamespace + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @instance + */ + IstioCanonicalService.prototype.canonicalServiceNamespace = ""; + + /** + * IstioCanonicalService canonicalService. + * @member {string} canonicalService + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @instance + */ + IstioCanonicalService.prototype.canonicalService = ""; + + /** + * Creates a new IstioCanonicalService instance using the specified properties. + * @function create + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {google.monitoring.v3.Service.IIstioCanonicalService=} [properties] Properties to set + * @returns {google.monitoring.v3.Service.IstioCanonicalService} IstioCanonicalService instance + */ + IstioCanonicalService.create = function create(properties) { + return new IstioCanonicalService(properties); + }; + + /** + * Encodes the specified IstioCanonicalService message. Does not implicitly {@link google.monitoring.v3.Service.IstioCanonicalService.verify|verify} messages. + * @function encode + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {google.monitoring.v3.Service.IIstioCanonicalService} message IstioCanonicalService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IstioCanonicalService.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.meshUid != null && Object.hasOwnProperty.call(message, "meshUid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.meshUid); + if (message.canonicalServiceNamespace != null && Object.hasOwnProperty.call(message, "canonicalServiceNamespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.canonicalServiceNamespace); + if (message.canonicalService != null && Object.hasOwnProperty.call(message, "canonicalService")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.canonicalService); + return writer; + }; + + /** + * Encodes the specified IstioCanonicalService message, length delimited. Does not implicitly {@link google.monitoring.v3.Service.IstioCanonicalService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {google.monitoring.v3.Service.IIstioCanonicalService} message IstioCanonicalService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IstioCanonicalService.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IstioCanonicalService message from the specified reader or buffer. + * @function decode + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.monitoring.v3.Service.IstioCanonicalService} IstioCanonicalService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IstioCanonicalService.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.monitoring.v3.Service.IstioCanonicalService(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.meshUid = reader.string(); + break; + case 3: + message.canonicalServiceNamespace = reader.string(); + break; + case 4: + message.canonicalService = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IstioCanonicalService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.monitoring.v3.Service.IstioCanonicalService} IstioCanonicalService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IstioCanonicalService.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IstioCanonicalService message. + * @function verify + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IstioCanonicalService.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.meshUid != null && message.hasOwnProperty("meshUid")) + if (!$util.isString(message.meshUid)) + return "meshUid: string expected"; + if (message.canonicalServiceNamespace != null && message.hasOwnProperty("canonicalServiceNamespace")) + if (!$util.isString(message.canonicalServiceNamespace)) + return "canonicalServiceNamespace: string expected"; + if (message.canonicalService != null && message.hasOwnProperty("canonicalService")) + if (!$util.isString(message.canonicalService)) + return "canonicalService: string expected"; + return null; + }; + + /** + * Creates an IstioCanonicalService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {Object.} object Plain object + * @returns {google.monitoring.v3.Service.IstioCanonicalService} IstioCanonicalService + */ + IstioCanonicalService.fromObject = function fromObject(object) { + if (object instanceof $root.google.monitoring.v3.Service.IstioCanonicalService) + return object; + var message = new $root.google.monitoring.v3.Service.IstioCanonicalService(); + if (object.meshUid != null) + message.meshUid = String(object.meshUid); + if (object.canonicalServiceNamespace != null) + message.canonicalServiceNamespace = String(object.canonicalServiceNamespace); + if (object.canonicalService != null) + message.canonicalService = String(object.canonicalService); + return message; + }; + + /** + * Creates a plain object from an IstioCanonicalService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {google.monitoring.v3.Service.IstioCanonicalService} message IstioCanonicalService + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IstioCanonicalService.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.meshUid = ""; + object.canonicalServiceNamespace = ""; + object.canonicalService = ""; + } + if (message.meshUid != null && message.hasOwnProperty("meshUid")) + object.meshUid = message.meshUid; + if (message.canonicalServiceNamespace != null && message.hasOwnProperty("canonicalServiceNamespace")) + object.canonicalServiceNamespace = message.canonicalServiceNamespace; + if (message.canonicalService != null && message.hasOwnProperty("canonicalService")) + object.canonicalService = message.canonicalService; + return object; + }; + + /** + * Converts this IstioCanonicalService to JSON. + * @function toJSON + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @instance + * @returns {Object.} JSON object + */ + IstioCanonicalService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IstioCanonicalService; + })(); + Service.Telemetry = (function() { /** @@ -26695,6 +27516,26 @@ return SpanContext; })(); + /** + * UptimeCheckRegion enum. + * @name google.monitoring.v3.UptimeCheckRegion + * @enum {number} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} USA=1 USA value + * @property {number} EUROPE=2 EUROPE value + * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value + * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value + */ + v3.UptimeCheckRegion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "USA"] = 1; + values[valuesById[2] = "EUROPE"] = 2; + values[valuesById[3] = "SOUTH_AMERICA"] = 3; + values[valuesById[4] = "ASIA_PACIFIC"] = 4; + return values; + })(); + v3.InternalChecker = (function() { /** @@ -27027,26 +27868,6 @@ return InternalChecker; })(); - /** - * UptimeCheckRegion enum. - * @name google.monitoring.v3.UptimeCheckRegion - * @enum {number} - * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value - * @property {number} USA=1 USA value - * @property {number} EUROPE=2 EUROPE value - * @property {number} SOUTH_AMERICA=3 SOUTH_AMERICA value - * @property {number} ASIA_PACIFIC=4 ASIA_PACIFIC value - */ - v3.UptimeCheckRegion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; - values[valuesById[1] = "USA"] = 1; - values[valuesById[2] = "EUROPE"] = 2; - values[valuesById[3] = "SOUTH_AMERICA"] = 3; - values[valuesById[4] = "ASIA_PACIFIC"] = 4; - return values; - })(); - v3.UptimeCheckConfig = (function() { /** @@ -31295,6 +32116,30 @@ */ var api = {}; + /** + * 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.ResourceDescriptor = (function() { /** @@ -34658,30 +35503,6 @@ 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 - */ - 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() { /** @@ -42192,8 +43013,8 @@ * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** @@ -42270,20 +43091,20 @@ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference * @memberof google.protobuf.FieldOptions * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** * Creates a new FieldOptions instance using the specified properties. @@ -42389,9 +43210,6 @@ message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; case 1052: if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) message[".google.api.fieldBehavior"] = []; @@ -42402,6 +43220,9 @@ } 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; @@ -42476,11 +43297,6 @@ return "uninterpretedOption." + error; } } - 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; - } if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; @@ -42498,6 +43314,11 @@ 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; }; @@ -42559,11 +43380,6 @@ message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - 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"]); - } if (object[".google.api.fieldBehavior"]) { if (!Array.isArray(object[".google.api.fieldBehavior"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); @@ -42601,6 +43417,11 @@ 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; }; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 52e205d8601..8f463cbb593 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -13,8 +13,8 @@ "java_package": "com.google.monitoring.v3", "php_namespace": "Google\\Cloud\\Monitoring\\V3", "ruby_package": "Google::Cloud::Monitoring::V3", - "(google.api.resource_definition).type": "monitoring.googleapis.com/MonitoredResourceDescriptor", - "(google.api.resource_definition).pattern": "*", + "(google.api.resource_definition).type": "monitoring.googleapis.com/TimeSeries", + "(google.api.resource_definition).pattern": "folders/{folder}/timeSeries/{time_series}", "(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN" }, "nested": { @@ -94,7 +94,8 @@ "condition": { "oneof": [ "conditionThreshold", - "conditionAbsent" + "conditionAbsent", + "conditionMonitoringQueryLanguage" ] } }, @@ -114,6 +115,10 @@ "conditionAbsent": { "type": "MetricAbsence", "id": 2 + }, + "conditionMonitoringQueryLanguage": { + "type": "MonitoringQueryLanguageCondition", + "id": 19 } }, "nested": { @@ -141,7 +146,10 @@ "fields": { "filter": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "aggregations": { "rule": "repeated", @@ -179,7 +187,10 @@ "fields": { "filter": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "aggregations": { "rule": "repeated", @@ -195,6 +206,22 @@ "id": 3 } } + }, + "MonitoringQueryLanguageCondition": { + "fields": { + "query": { + "type": "string", + "id": 1 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "trigger": { + "type": "Trigger", + "id": 3 + } + } } } }, @@ -523,6 +550,10 @@ "nextPageToken": { "type": "string", "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 4 } } }, @@ -922,6 +953,10 @@ "rule": "repeated", "type": "Point", "id": 5 + }, + "unit": { + "type": "string", + "id": 8 } } }, @@ -952,6 +987,10 @@ "metricKind": { "type": "google.api.MetricDescriptor.MetricKind", "id": 3 + }, + "unit": { + "type": "string", + "id": 4 } } } @@ -1182,12 +1221,21 @@ "responseType": "ListTimeSeriesResponse", "options": { "(google.api.http).get": "/v3/{name=projects/*}/timeSeries", + "(google.api.http).additional_bindings.get": "/v3/{name=folders/*}/timeSeries", "(google.api.method_signature)": "name,filter,interval,view" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v3/{name=projects/*}/timeSeries" + "get": "/v3/{name=projects/*}/timeSeries", + "additional_bindings": [ + { + "get": "/v3/{name=organizations/*}/timeSeries" + }, + { + "get": "/v3/{name=folders/*}/timeSeries" + } + ] } }, { @@ -1353,7 +1401,7 @@ "id": 10, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + "(google.api.resource_reference).child_type": "monitoring.googleapis.com/TimeSeries" } }, "filter": { @@ -1374,6 +1422,10 @@ "type": "Aggregation", "id": 5 }, + "secondaryAggregation": { + "type": "Aggregation", + "id": 11 + }, "orderBy": { "type": "string", "id": 6 @@ -1418,6 +1470,10 @@ "rule": "repeated", "type": "google.rpc.Status", "id": 3 + }, + "unit": { + "type": "string", + "id": 5 } } }, @@ -1625,6 +1681,15 @@ "enabled": { "type": "google.protobuf.BoolValue", "id": 11 + }, + "creationRecord": { + "type": "MutationRecord", + "id": 12 + }, + "mutationRecords": { + "rule": "repeated", + "type": "MutationRecord", + "id": 13 } }, "nested": { @@ -1937,6 +2002,10 @@ "nextPageToken": { "type": "string", "id": 2 + }, + "totalSize": { + "type": "int32", + "id": 4 } } }, @@ -2042,6 +2111,30 @@ } } }, + "QueryService": { + "options": { + "(google.api.default_host)": "monitoring.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.read" + }, + "methods": { + "QueryTimeSeries": { + "requestType": "QueryTimeSeriesRequest", + "responseType": "QueryTimeSeriesResponse", + "options": { + "(google.api.http).post": "/v3/{name=projects/*}/timeSeries:query", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{name=projects/*}/timeSeries:query", + "body": "*" + } + } + ] + } + } + }, "Service": { "options": { "(google.api.resource).type": "monitoring.googleapis.com/Service", @@ -2054,7 +2147,8 @@ "appEngine", "cloudEndpoints", "clusterIstio", - "meshIstio" + "meshIstio", + "istioCanonicalService" ] } }, @@ -2081,15 +2175,16 @@ }, "clusterIstio": { "type": "ClusterIstio", - "id": 9, - "options": { - "deprecated": true - } + "id": 9 }, "meshIstio": { "type": "MeshIstio", "id": 10 }, + "istioCanonicalService": { + "type": "IstioCanonicalService", + "id": 11 + }, "telemetry": { "type": "Telemetry", "id": 13 @@ -2116,9 +2211,6 @@ } }, "ClusterIstio": { - "options": { - "deprecated": true - }, "fields": { "location": { "type": "string", @@ -2154,6 +2246,22 @@ } } }, + "IstioCanonicalService": { + "fields": { + "meshUid": { + "type": "string", + "id": 1 + }, + "canonicalServiceNamespace": { + "type": "string", + "id": 3 + }, + "canonicalService": { + "type": "string", + "id": 4 + } + } + }, "Telemetry": { "fields": { "resourceName": { @@ -2829,6 +2937,15 @@ } } }, + "UptimeCheckRegion": { + "values": { + "REGION_UNSPECIFIED": 0, + "USA": 1, + "EUROPE": 2, + "SOUTH_AMERICA": 3, + "ASIA_PACIFIC": 4 + } + }, "InternalChecker": { "options": { "deprecated": true @@ -2869,15 +2986,6 @@ } } }, - "UptimeCheckRegion": { - "values": { - "REGION_UNSPECIFIED": 0, - "USA": 1, - "EUROPE": 2, - "SOUTH_AMERICA": 3, - "ASIA_PACIFIC": 4 - } - }, "UptimeCheckConfig": { "options": { "(google.api.resource).type": "monitoring.googleapis.com/UptimeCheckConfig", @@ -3339,14 +3447,31 @@ }, "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": { + "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 + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -3660,23 +3785,6 @@ "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, - "UNORDERED_LIST": 6 - } - }, "MonitoredResourceDescriptor": { "fields": { "name": { diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts index 2b0f78d83ad..385e844deef 100644 --- a/packages/google-cloud-monitoring/src/index.ts +++ b/packages/google-cloud-monitoring/src/index.ts @@ -26,6 +26,8 @@ const MetricServiceClient = v3.MetricServiceClient; type MetricServiceClient = v3.MetricServiceClient; const NotificationChannelServiceClient = v3.NotificationChannelServiceClient; type NotificationChannelServiceClient = v3.NotificationChannelServiceClient; +const QueryServiceClient = v3.QueryServiceClient; +type QueryServiceClient = v3.QueryServiceClient; const ServiceMonitoringServiceClient = v3.ServiceMonitoringServiceClient; type ServiceMonitoringServiceClient = v3.ServiceMonitoringServiceClient; const UptimeCheckServiceClient = v3.UptimeCheckServiceClient; @@ -37,6 +39,7 @@ export { GroupServiceClient, MetricServiceClient, NotificationChannelServiceClient, + QueryServiceClient, ServiceMonitoringServiceClient, UptimeCheckServiceClient, }; @@ -46,6 +49,7 @@ export default { GroupServiceClient, MetricServiceClient, NotificationChannelServiceClient, + QueryServiceClient, ServiceMonitoringServiceClient, UptimeCheckServiceClient, }; diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 80783bccd22..44ac998c46f 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -522,10 +522,11 @@ export class AlertPolicyServiceClient { * projects/[PROJECT_ID_OR_NUMBER] * * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. The alerting - * policy that is returned will have a name that contains a normalized - * representation of this name as a prefix but adds a suffix of the form - * `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * policy will be written, not the name of the created policy. |name| must be + * a host project of a workspace, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the * container. * @param {google.monitoring.v3.AlertPolicy} request.alertPolicy * Required. The requested alerting policy. You should omit the `name` field in this @@ -816,7 +817,7 @@ export class AlertPolicyServiceClient { > ): void; /** - * Lists the existing alerting policies for the project. + * Lists the existing alerting policies for the workspace. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json index 0534dc6a035..e55f61d422f 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_proto_list.json @@ -10,6 +10,7 @@ "../../protos/google/monitoring/v3/mutation_record.proto", "../../protos/google/monitoring/v3/notification.proto", "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", "../../protos/google/monitoring/v3/service.proto", "../../protos/google/monitoring/v3/service_service.proto", "../../protos/google/monitoring/v3/span_context.proto", diff --git a/packages/google-cloud-monitoring/src/v3/gapic_metadata.json b/packages/google-cloud-monitoring/src/v3/gapic_metadata.json index bfecaffa535..6312a12ae34 100644 --- a/packages/google-cloud-monitoring/src/v3/gapic_metadata.json +++ b/packages/google-cloud-monitoring/src/v3/gapic_metadata.json @@ -383,6 +383,34 @@ } } }, + "QueryService": { + "clients": { + "grpc": { + "libraryClient": "QueryServiceClient", + "rpcs": { + "QueryTimeSeries": { + "methods": [ + "queryTimeSeries", + "queryTimeSeriesStream", + "queryTimeSeriesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "QueryServiceClient", + "rpcs": { + "QueryTimeSeries": { + "methods": [ + "queryTimeSeries", + "queryTimeSeriesStream", + "queryTimeSeriesAsync" + ] + } + } + } + } + }, "ServiceMonitoringService": { "clients": { "grpc": { diff --git a/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json index 0534dc6a035..e55f61d422f 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/group_service_proto_list.json @@ -10,6 +10,7 @@ "../../protos/google/monitoring/v3/mutation_record.proto", "../../protos/google/monitoring/v3/notification.proto", "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", "../../protos/google/monitoring/v3/service.proto", "../../protos/google/monitoring/v3/service_service.proto", "../../protos/google/monitoring/v3/span_context.proto", diff --git a/packages/google-cloud-monitoring/src/v3/index.ts b/packages/google-cloud-monitoring/src/v3/index.ts index 1708ac2f377..d3bade93ec7 100644 --- a/packages/google-cloud-monitoring/src/v3/index.ts +++ b/packages/google-cloud-monitoring/src/v3/index.ts @@ -20,5 +20,6 @@ export {AlertPolicyServiceClient} from './alert_policy_service_client'; export {GroupServiceClient} from './group_service_client'; export {MetricServiceClient} from './metric_service_client'; export {NotificationChannelServiceClient} from './notification_channel_service_client'; +export {QueryServiceClient} from './query_service_client'; export {ServiceMonitoringServiceClient} from './service_monitoring_service_client'; export {UptimeCheckServiceClient} from './uptime_check_service_client'; diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index fb99031938c..a33afcb2c4d 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -257,6 +257,9 @@ export class MetricServiceClient { projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' ), + projectTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/timeSeries/{time_series}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -1430,9 +1433,12 @@ export class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The project on which to execute the request. The format is: + * Required. The project, organization or folder on which to execute the request. The + * format is: * * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] * @param {string} request.filter * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) * that specifies which time series should be returned. The filter must @@ -1451,6 +1457,9 @@ export class MetricServiceClient { * * By default (if no `aggregation` is explicitly specified), the raw time * series data is returned. + * @param {google.monitoring.v3.Aggregation} request.secondaryAggregation + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. * @param {string} request.orderBy * Unsupported: must be left blank. The points in each time series are * currently returned in reverse time order (most recent to oldest). @@ -1527,9 +1536,12 @@ export class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The project on which to execute the request. The format is: + * Required. The project, organization or folder on which to execute the request. The + * format is: * * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] * @param {string} request.filter * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) * that specifies which time series should be returned. The filter must @@ -1548,6 +1560,9 @@ export class MetricServiceClient { * * By default (if no `aggregation` is explicitly specified), the raw time * series data is returned. + * @param {google.monitoring.v3.Aggregation} request.secondaryAggregation + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. * @param {string} request.orderBy * Unsupported: must be left blank. The points in each time series are * currently returned in reverse time order (most recent to oldest). @@ -1604,9 +1619,12 @@ export class MetricServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The project on which to execute the request. The format is: + * Required. The project, organization or folder on which to execute the request. The + * format is: * * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] * @param {string} request.filter * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) * that specifies which time series should be returned. The filter must @@ -1625,6 +1643,9 @@ export class MetricServiceClient { * * By default (if no `aggregation` is explicitly specified), the raw time * series data is returned. + * @param {google.monitoring.v3.Aggregation} request.secondaryAggregation + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. * @param {string} request.orderBy * Unsupported: must be left blank. The points in each time series are * currently returned in reverse time order (most recent to oldest). @@ -3108,6 +3129,46 @@ export class MetricServiceClient { ).service_level_objective; } + /** + * Return a fully-qualified projectTimeSeries resource name string. + * + * @param {string} project + * @param {string} time_series + * @returns {string} Resource name string. + */ + projectTimeSeriesPath(project: string, timeSeries: string) { + return this.pathTemplates.projectTimeSeriesPathTemplate.render({ + project: project, + time_series: timeSeries, + }); + } + + /** + * Parse the project from ProjectTimeSeries resource. + * + * @param {string} projectTimeSeriesName + * A fully-qualified path representing project_time_series resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectTimeSeriesName(projectTimeSeriesName: string) { + return this.pathTemplates.projectTimeSeriesPathTemplate.match( + projectTimeSeriesName + ).project; + } + + /** + * Parse the time_series from ProjectTimeSeries resource. + * + * @param {string} projectTimeSeriesName + * A fully-qualified path representing project_time_series resource. + * @returns {string} A string representing the time_series. + */ + matchTimeSeriesFromProjectTimeSeriesName(projectTimeSeriesName: string) { + return this.pathTemplates.projectTimeSeriesPathTemplate.match( + projectTimeSeriesName + ).time_series; + } + /** * Return a fully-qualified projectUptimeCheckConfig resource name string. * diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json index 0534dc6a035..e55f61d422f 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/metric_service_proto_list.json @@ -10,6 +10,7 @@ "../../protos/google/monitoring/v3/mutation_record.proto", "../../protos/google/monitoring/v3/notification.proto", "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", "../../protos/google/monitoring/v3/service.proto", "../../protos/google/monitoring/v3/service_service.proto", "../../protos/google/monitoring/v3/span_context.proto", diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json index 0534dc6a035..e55f61d422f 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_proto_list.json @@ -10,6 +10,7 @@ "../../protos/google/monitoring/v3/mutation_record.proto", "../../protos/google/monitoring/v3/notification.proto", "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", "../../protos/google/monitoring/v3/service.proto", "../../protos/google/monitoring/v3/service_service.proto", "../../protos/google/monitoring/v3/span_context.proto", diff --git a/packages/google-cloud-monitoring/src/v3/query_service_client.ts b/packages/google-cloud-monitoring/src/v3/query_service_client.ts new file mode 100644 index 00000000000..8260474a0ec --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/query_service_client.ts @@ -0,0 +1,1784 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** 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, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +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/v3/query_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './query_service_client_config.json'; + +const version = require('../../../package.json').version; + +/** + * The QueryService API is used to manage time series data in Stackdriver + * Monitoring. Time series data is a collection of data points that describes + * the time-varying values of a metric. + * @class + * @memberof v3 + */ +export class QueryServiceClient { + 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; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + queryServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of QueryServiceClient. + * + * @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] + * @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. + * @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. + */ + constructor(opts?: ClientOptions) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof QueryServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + 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. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // 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. + 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; + + // 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) { + 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 + ? // 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 = { + folderAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}' + ), + folderAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + folderChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}' + ), + folderGroupPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/groups/{group}' + ), + folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/notificationChannels/{notification_channel}' + ), + folderServicePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}' + ), + folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' + ), + organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}' + ), + organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), + organizationGroupPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/groups/{group}' + ), + organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), + organizationServicePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}' + ), + organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), + projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}' + ), + projectAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + projectChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}' + ), + projectGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/groups/{group}' + ), + projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/notificationChannels/{notification_channel}' + ), + projectServicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}' + ), + projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' + ), + }; + + // 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 = { + queryTimeSeries: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'timeSeriesData' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.monitoring.v3.QueryService', + 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.queryServiceStub) { + return this.queryServiceStub; + } + + // Put together the "service stub" for + // google.monitoring.v3.QueryService. + this.queryServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.monitoring.v3.QueryService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.monitoring.v3.QueryService, + 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 queryServiceStubMethods = ['queryTimeSeries']; + for (const methodName of queryServiceStubMethods) { + const callPromise = this.queryServiceStub.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 descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.queryServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'monitoring.googleapis.com'; + } + + /** + * 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 'monitoring.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + + queryTimeSeries( + request: protos.google.monitoring.v3.IQueryTimeSeriesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.monitoring.v3.ITimeSeriesData[], + protos.google.monitoring.v3.IQueryTimeSeriesRequest | null, + protos.google.monitoring.v3.IQueryTimeSeriesResponse + ] + >; + queryTimeSeries( + request: protos.google.monitoring.v3.IQueryTimeSeriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.monitoring.v3.IQueryTimeSeriesRequest, + protos.google.monitoring.v3.IQueryTimeSeriesResponse | null | undefined, + protos.google.monitoring.v3.ITimeSeriesData + > + ): void; + queryTimeSeries( + request: protos.google.monitoring.v3.IQueryTimeSeriesRequest, + callback: PaginationCallback< + protos.google.monitoring.v3.IQueryTimeSeriesRequest, + protos.google.monitoring.v3.IQueryTimeSeriesResponse | null | undefined, + protos.google.monitoring.v3.ITimeSeriesData + > + ): void; + /** + * Queries time series using Monitoring Query Language. This method does not require a Workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.query + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * @param {number} request.pageSize + * A positive number that is the maximum number of time_series_data to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [TimeSeriesData]{@link google.monitoring.v3.TimeSeriesData}. + * 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 `queryTimeSeriesAsync()` + * 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. + */ + queryTimeSeries( + request: protos.google.monitoring.v3.IQueryTimeSeriesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.monitoring.v3.IQueryTimeSeriesRequest, + | protos.google.monitoring.v3.IQueryTimeSeriesResponse + | null + | undefined, + protos.google.monitoring.v3.ITimeSeriesData + >, + callback?: PaginationCallback< + protos.google.monitoring.v3.IQueryTimeSeriesRequest, + protos.google.monitoring.v3.IQueryTimeSeriesResponse | null | undefined, + protos.google.monitoring.v3.ITimeSeriesData + > + ): Promise< + [ + protos.google.monitoring.v3.ITimeSeriesData[], + protos.google.monitoring.v3.IQueryTimeSeriesRequest | null, + protos.google.monitoring.v3.IQueryTimeSeriesResponse + ] + > | 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.queryTimeSeries(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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.query + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * @param {number} request.pageSize + * A positive number that is the maximum number of time_series_data to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 [TimeSeriesData]{@link google.monitoring.v3.TimeSeriesData} 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 `queryTimeSeriesAsync()` + * 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. + */ + queryTimeSeriesStream( + request?: protos.google.monitoring.v3.IQueryTimeSeriesRequest, + 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({ + name: request.name || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.queryTimeSeries.createStream( + this.innerApiCalls.queryTimeSeries as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `queryTimeSeries`, 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.name + * Required. The project on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param {string} request.query + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * @param {number} request.pageSize + * A positive number that is the maximum number of time_series_data to return. + * @param {string} request.pageToken + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method 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 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 + * [TimeSeriesData]{@link google.monitoring.v3.TimeSeriesData}. 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.queryTimeSeriesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + queryTimeSeriesAsync( + request?: protos.google.monitoring.v3.IQueryTimeSeriesRequest, + 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({ + name: request.name || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.queryTimeSeries.asyncIterate( + this.innerApiCalls['queryTimeSeries'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderAlertPolicy resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + folderAlertPolicyPath(folder: string, alertPolicy: string) { + return this.pathTemplates.folderAlertPolicyPathTemplate.render({ + folder: folder, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the folder from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this.pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicy resource. + * + * @param {string} folderAlertPolicyName + * A fully-qualified path representing folder_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string) { + return this.pathTemplates.folderAlertPolicyPathTemplate.match( + folderAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified folderAlertPolicyCondition resource name string. + * + * @param {string} folder + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + folderAlertPolicyConditionPath( + folder: string, + alertPolicy: string, + condition: string + ) { + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.render({ + folder: folder, + alert_policy: alertPolicy, + condition: condition, + }); + } + + /** + * Parse the folder from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).folder; + } + + /** + * Parse the alert_policy from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from FolderAlertPolicyCondition resource. + * + * @param {string} folderAlertPolicyConditionName + * A fully-qualified path representing folder_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromFolderAlertPolicyConditionName( + folderAlertPolicyConditionName: string + ) { + return this.pathTemplates.folderAlertPolicyConditionPathTemplate.match( + folderAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified folderChannelDescriptor resource name string. + * + * @param {string} folder + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + folderChannelDescriptorPath(folder: string, channelDescriptor: string) { + return this.pathTemplates.folderChannelDescriptorPathTemplate.render({ + folder: folder, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the folder from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).folder; + } + + /** + * Parse the channel_descriptor from FolderChannelDescriptor resource. + * + * @param {string} folderChannelDescriptorName + * A fully-qualified path representing folder_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromFolderChannelDescriptorName( + folderChannelDescriptorName: string + ) { + return this.pathTemplates.folderChannelDescriptorPathTemplate.match( + folderChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified folderGroup resource name string. + * + * @param {string} folder + * @param {string} group + * @returns {string} Resource name string. + */ + folderGroupPath(folder: string, group: string) { + return this.pathTemplates.folderGroupPathTemplate.render({ + folder: folder, + group: group, + }); + } + + /** + * Parse the folder from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderGroupName(folderGroupName: string) { + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .folder; + } + + /** + * Parse the group from FolderGroup resource. + * + * @param {string} folderGroupName + * A fully-qualified path representing folder_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromFolderGroupName(folderGroupName: string) { + return this.pathTemplates.folderGroupPathTemplate.match(folderGroupName) + .group; + } + + /** + * Return a fully-qualified folderNotificationChannel resource name string. + * + * @param {string} folder + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + folderNotificationChannelPath(folder: string, notificationChannel: string) { + return this.pathTemplates.folderNotificationChannelPathTemplate.render({ + folder: folder, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the folder from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this.pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).folder; + } + + /** + * Parse the notification_channel from FolderNotificationChannel resource. + * + * @param {string} folderNotificationChannelName + * A fully-qualified path representing folder_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromFolderNotificationChannelName( + folderNotificationChannelName: string + ) { + return this.pathTemplates.folderNotificationChannelPathTemplate.match( + folderNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified folderService resource name string. + * + * @param {string} folder + * @param {string} service + * @returns {string} Resource name string. + */ + folderServicePath(folder: string, service: string) { + return this.pathTemplates.folderServicePathTemplate.render({ + folder: folder, + service: service, + }); + } + + /** + * Parse the folder from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceName(folderServiceName: string) { + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .folder; + } + + /** + * Parse the service from FolderService resource. + * + * @param {string} folderServiceName + * A fully-qualified path representing folder_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceName(folderServiceName: string) { + return this.pathTemplates.folderServicePathTemplate.match(folderServiceName) + .service; + } + + /** + * Return a fully-qualified folderServiceServiceLevelObjective resource name string. + * + * @param {string} folder + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + folderServiceServiceLevelObjectivePath( + folder: string, + service: string, + serviceLevelObjective: string + ) { + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render( + { + folder: folder, + service: service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the folder from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).folder; + } + + /** + * Parse the service from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from FolderServiceServiceLevelObjective resource. + * + * @param {string} folderServiceServiceLevelObjectiveName + * A fully-qualified path representing folder_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + folderServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match( + folderServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified folderUptimeCheckConfig resource name string. + * + * @param {string} folder + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + folderUptimeCheckConfigPath(folder: string, uptimeCheckConfig: string) { + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.render({ + folder: folder, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the folder from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).folder; + } + + /** + * Parse the uptime_check_config from FolderUptimeCheckConfig resource. + * + * @param {string} folderUptimeCheckConfigName + * A fully-qualified path representing folder_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + folderUptimeCheckConfigName: string + ) { + return this.pathTemplates.folderUptimeCheckConfigPathTemplate.match( + folderUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified organizationAlertPolicy resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + organizationAlertPolicyPath(organization: string, alertPolicy: string) { + return this.pathTemplates.organizationAlertPolicyPathTemplate.render({ + organization: organization, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the organization from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicy resource. + * + * @param {string} organizationAlertPolicyName + * A fully-qualified path representing organization_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyName( + organizationAlertPolicyName: string + ) { + return this.pathTemplates.organizationAlertPolicyPathTemplate.match( + organizationAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified organizationAlertPolicyCondition resource name string. + * + * @param {string} organization + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + organizationAlertPolicyConditionPath( + organization: string, + alertPolicy: string, + condition: string + ) { + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.render( + { + organization: organization, + alert_policy: alertPolicy, + condition: condition, + } + ); + } + + /** + * Parse the organization from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).organization; + } + + /** + * Parse the alert_policy from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from OrganizationAlertPolicyCondition resource. + * + * @param {string} organizationAlertPolicyConditionName + * A fully-qualified path representing organization_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromOrganizationAlertPolicyConditionName( + organizationAlertPolicyConditionName: string + ) { + return this.pathTemplates.organizationAlertPolicyConditionPathTemplate.match( + organizationAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified organizationChannelDescriptor resource name string. + * + * @param {string} organization + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + organizationChannelDescriptorPath( + organization: string, + channelDescriptor: string + ) { + return this.pathTemplates.organizationChannelDescriptorPathTemplate.render({ + organization: organization, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the organization from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).organization; + } + + /** + * Parse the channel_descriptor from OrganizationChannelDescriptor resource. + * + * @param {string} organizationChannelDescriptorName + * A fully-qualified path representing organization_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromOrganizationChannelDescriptorName( + organizationChannelDescriptorName: string + ) { + return this.pathTemplates.organizationChannelDescriptorPathTemplate.match( + organizationChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified organizationGroup resource name string. + * + * @param {string} organization + * @param {string} group + * @returns {string} Resource name string. + */ + organizationGroupPath(organization: string, group: string) { + return this.pathTemplates.organizationGroupPathTemplate.render({ + organization: organization, + group: group, + }); + } + + /** + * Parse the organization from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationGroupName(organizationGroupName: string) { + return this.pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).organization; + } + + /** + * Parse the group from OrganizationGroup resource. + * + * @param {string} organizationGroupName + * A fully-qualified path representing organization_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromOrganizationGroupName(organizationGroupName: string) { + return this.pathTemplates.organizationGroupPathTemplate.match( + organizationGroupName + ).group; + } + + /** + * Return a fully-qualified organizationNotificationChannel resource name string. + * + * @param {string} organization + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + organizationNotificationChannelPath( + organization: string, + notificationChannel: string + ) { + return this.pathTemplates.organizationNotificationChannelPathTemplate.render( + { + organization: organization, + notification_channel: notificationChannel, + } + ); + } + + /** + * Parse the organization from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).organization; + } + + /** + * Parse the notification_channel from OrganizationNotificationChannel resource. + * + * @param {string} organizationNotificationChannelName + * A fully-qualified path representing organization_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromOrganizationNotificationChannelName( + organizationNotificationChannelName: string + ) { + return this.pathTemplates.organizationNotificationChannelPathTemplate.match( + organizationNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified organizationService resource name string. + * + * @param {string} organization + * @param {string} service + * @returns {string} Resource name string. + */ + organizationServicePath(organization: string, service: string) { + return this.pathTemplates.organizationServicePathTemplate.render({ + organization: organization, + service: service, + }); + } + + /** + * Parse the organization from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceName( + organizationServiceName: string + ) { + return this.pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).organization; + } + + /** + * Parse the service from OrganizationService resource. + * + * @param {string} organizationServiceName + * A fully-qualified path representing organization_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceName(organizationServiceName: string) { + return this.pathTemplates.organizationServicePathTemplate.match( + organizationServiceName + ).service; + } + + /** + * Return a fully-qualified organizationServiceServiceLevelObjective resource name string. + * + * @param {string} organization + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + organizationServiceServiceLevelObjectivePath( + organization: string, + service: string, + serviceLevelObjective: string + ) { + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render( + { + organization: organization, + service: service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the organization from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).organization; + } + + /** + * Parse the service from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from OrganizationServiceServiceLevelObjective resource. + * + * @param {string} organizationServiceServiceLevelObjectiveName + * A fully-qualified path representing organization_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + organizationServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match( + organizationServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified organizationUptimeCheckConfig resource name string. + * + * @param {string} organization + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + organizationUptimeCheckConfigPath( + organization: string, + uptimeCheckConfig: string + ) { + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.render({ + organization: organization, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the organization from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).organization; + } + + /** + * Parse the uptime_check_config from OrganizationUptimeCheckConfig resource. + * + * @param {string} organizationUptimeCheckConfigName + * A fully-qualified path representing organization_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + organizationUptimeCheckConfigName: string + ) { + return this.pathTemplates.organizationUptimeCheckConfigPathTemplate.match( + organizationUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * Return a fully-qualified projectAlertPolicy resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @returns {string} Resource name string. + */ + projectAlertPolicyPath(project: string, alertPolicy: string) { + return this.pathTemplates.projectAlertPolicyPathTemplate.render({ + project: project, + alert_policy: alertPolicy, + }); + } + + /** + * Parse the project from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this.pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicy resource. + * + * @param {string} projectAlertPolicyName + * A fully-qualified path representing project_alert_policy resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyName(projectAlertPolicyName: string) { + return this.pathTemplates.projectAlertPolicyPathTemplate.match( + projectAlertPolicyName + ).alert_policy; + } + + /** + * Return a fully-qualified projectAlertPolicyCondition resource name string. + * + * @param {string} project + * @param {string} alert_policy + * @param {string} condition + * @returns {string} Resource name string. + */ + projectAlertPolicyConditionPath( + project: string, + alertPolicy: string, + condition: string + ) { + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.render({ + project: project, + alert_policy: alertPolicy, + condition: condition, + }); + } + + /** + * Parse the project from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).project; + } + + /** + * Parse the alert_policy from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the alert_policy. + */ + matchAlertPolicyFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).alert_policy; + } + + /** + * Parse the condition from ProjectAlertPolicyCondition resource. + * + * @param {string} projectAlertPolicyConditionName + * A fully-qualified path representing project_alert_policy_condition resource. + * @returns {string} A string representing the condition. + */ + matchConditionFromProjectAlertPolicyConditionName( + projectAlertPolicyConditionName: string + ) { + return this.pathTemplates.projectAlertPolicyConditionPathTemplate.match( + projectAlertPolicyConditionName + ).condition; + } + + /** + * Return a fully-qualified projectChannelDescriptor resource name string. + * + * @param {string} project + * @param {string} channel_descriptor + * @returns {string} Resource name string. + */ + projectChannelDescriptorPath(project: string, channelDescriptor: string) { + return this.pathTemplates.projectChannelDescriptorPathTemplate.render({ + project: project, + channel_descriptor: channelDescriptor, + }); + } + + /** + * Parse the project from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).project; + } + + /** + * Parse the channel_descriptor from ProjectChannelDescriptor resource. + * + * @param {string} projectChannelDescriptorName + * A fully-qualified path representing project_channel_descriptor resource. + * @returns {string} A string representing the channel_descriptor. + */ + matchChannelDescriptorFromProjectChannelDescriptorName( + projectChannelDescriptorName: string + ) { + return this.pathTemplates.projectChannelDescriptorPathTemplate.match( + projectChannelDescriptorName + ).channel_descriptor; + } + + /** + * Return a fully-qualified projectGroup resource name string. + * + * @param {string} project + * @param {string} group + * @returns {string} Resource name string. + */ + projectGroupPath(project: string, group: string) { + return this.pathTemplates.projectGroupPathTemplate.render({ + project: project, + group: group, + }); + } + + /** + * Parse the project from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectGroupName(projectGroupName: string) { + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .project; + } + + /** + * Parse the group from ProjectGroup resource. + * + * @param {string} projectGroupName + * A fully-qualified path representing project_group resource. + * @returns {string} A string representing the group. + */ + matchGroupFromProjectGroupName(projectGroupName: string) { + return this.pathTemplates.projectGroupPathTemplate.match(projectGroupName) + .group; + } + + /** + * Return a fully-qualified projectNotificationChannel resource name string. + * + * @param {string} project + * @param {string} notification_channel + * @returns {string} Resource name string. + */ + projectNotificationChannelPath(project: string, notificationChannel: string) { + return this.pathTemplates.projectNotificationChannelPathTemplate.render({ + project: project, + notification_channel: notificationChannel, + }); + } + + /** + * Parse the project from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this.pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).project; + } + + /** + * Parse the notification_channel from ProjectNotificationChannel resource. + * + * @param {string} projectNotificationChannelName + * A fully-qualified path representing project_notification_channel resource. + * @returns {string} A string representing the notification_channel. + */ + matchNotificationChannelFromProjectNotificationChannelName( + projectNotificationChannelName: string + ) { + return this.pathTemplates.projectNotificationChannelPathTemplate.match( + projectNotificationChannelName + ).notification_channel; + } + + /** + * Return a fully-qualified projectService resource name string. + * + * @param {string} project + * @param {string} service + * @returns {string} Resource name string. + */ + projectServicePath(project: string, service: string) { + return this.pathTemplates.projectServicePathTemplate.render({ + project: project, + service: service, + }); + } + + /** + * Parse the project from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceName(projectServiceName: string) { + return this.pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).project; + } + + /** + * Parse the service from ProjectService resource. + * + * @param {string} projectServiceName + * A fully-qualified path representing project_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceName(projectServiceName: string) { + return this.pathTemplates.projectServicePathTemplate.match( + projectServiceName + ).service; + } + + /** + * Return a fully-qualified projectServiceServiceLevelObjective resource name string. + * + * @param {string} project + * @param {string} service + * @param {string} service_level_objective + * @returns {string} Resource name string. + */ + projectServiceServiceLevelObjectivePath( + project: string, + service: string, + serviceLevelObjective: string + ) { + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render( + { + project: project, + service: service, + service_level_objective: serviceLevelObjective, + } + ); + } + + /** + * Parse the project from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).project; + } + + /** + * Parse the service from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service; + } + + /** + * Parse the service_level_objective from ProjectServiceServiceLevelObjective resource. + * + * @param {string} projectServiceServiceLevelObjectiveName + * A fully-qualified path representing project_service_service_level_objective resource. + * @returns {string} A string representing the service_level_objective. + */ + matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + projectServiceServiceLevelObjectiveName: string + ) { + return this.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match( + projectServiceServiceLevelObjectiveName + ).service_level_objective; + } + + /** + * Return a fully-qualified projectUptimeCheckConfig resource name string. + * + * @param {string} project + * @param {string} uptime_check_config + * @returns {string} Resource name string. + */ + projectUptimeCheckConfigPath(project: string, uptimeCheckConfig: string) { + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.render({ + project: project, + uptime_check_config: uptimeCheckConfig, + }); + } + + /** + * Parse the project from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).project; + } + + /** + * Parse the uptime_check_config from ProjectUptimeCheckConfig resource. + * + * @param {string} projectUptimeCheckConfigName + * A fully-qualified path representing project_uptime_check_config resource. + * @returns {string} A string representing the uptime_check_config. + */ + matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + projectUptimeCheckConfigName: string + ) { + return this.pathTemplates.projectUptimeCheckConfigPathTemplate.match( + projectUptimeCheckConfigName + ).uptime_check_config; + } + + /** + * 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(); + if (!this._terminated) { + return this.queryServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-monitoring/src/v3/query_service_client_config.json b/packages/google-cloud-monitoring/src/v3/query_service_client_config.json new file mode 100644 index 00000000000..dadb5411b85 --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/query_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.monitoring.v3.QueryService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "QueryTimeSeries": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-monitoring/src/v3/query_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/query_service_proto_list.json new file mode 100644 index 00000000000..e55f61d422f --- /dev/null +++ b/packages/google-cloud-monitoring/src/v3/query_service_proto_list.json @@ -0,0 +1,19 @@ +[ + "../../protos/google/monitoring/v3/alert.proto", + "../../protos/google/monitoring/v3/alert_service.proto", + "../../protos/google/monitoring/v3/common.proto", + "../../protos/google/monitoring/v3/dropped_labels.proto", + "../../protos/google/monitoring/v3/group.proto", + "../../protos/google/monitoring/v3/group_service.proto", + "../../protos/google/monitoring/v3/metric.proto", + "../../protos/google/monitoring/v3/metric_service.proto", + "../../protos/google/monitoring/v3/mutation_record.proto", + "../../protos/google/monitoring/v3/notification.proto", + "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", + "../../protos/google/monitoring/v3/service.proto", + "../../protos/google/monitoring/v3/service_service.proto", + "../../protos/google/monitoring/v3/span_context.proto", + "../../protos/google/monitoring/v3/uptime.proto", + "../../protos/google/monitoring/v3/uptime_service.proto" +] diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index 21d78e207e6..d7a4f852245 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -1223,16 +1223,20 @@ export class ServiceMonitoringServiceClient { * * - `identifier_case` * - `app_engine.module_id` - * - `cloud_endpoints.service` - * - `cluster_istio.location` - * - `cluster_istio.cluster_name` - * - `cluster_istio.service_namespace` - * - `cluster_istio.service_name` + * - `cloud_endpoints.service` (reserved for future use) + * - `mesh_istio.mesh_uid` + * - `mesh_istio.service_namespace` + * - `mesh_istio.service_name` + * - `cluster_istio.location` (deprecated) + * - `cluster_istio.cluster_name` (deprecated) + * - `cluster_istio.service_namespace` (deprecated) + * - `cluster_istio.service_name` (deprecated) * * `identifier_case` refers to which option in the identifier oneof is * populated. For example, the filter `identifier_case = "CUSTOM"` would match * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) + * and "CLOUD_ENDPOINTS" (reserved for future use). * @param {number} request.pageSize * A non-negative number that is the maximum number of results to return. * When 0, use default page size. @@ -1310,16 +1314,20 @@ export class ServiceMonitoringServiceClient { * * - `identifier_case` * - `app_engine.module_id` - * - `cloud_endpoints.service` - * - `cluster_istio.location` - * - `cluster_istio.cluster_name` - * - `cluster_istio.service_namespace` - * - `cluster_istio.service_name` + * - `cloud_endpoints.service` (reserved for future use) + * - `mesh_istio.mesh_uid` + * - `mesh_istio.service_namespace` + * - `mesh_istio.service_name` + * - `cluster_istio.location` (deprecated) + * - `cluster_istio.cluster_name` (deprecated) + * - `cluster_istio.service_namespace` (deprecated) + * - `cluster_istio.service_name` (deprecated) * * `identifier_case` refers to which option in the identifier oneof is * populated. For example, the filter `identifier_case = "CUSTOM"` would match * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) + * and "CLOUD_ENDPOINTS" (reserved for future use). * @param {number} request.pageSize * A non-negative number that is the maximum number of results to return. * When 0, use default page size. @@ -1379,16 +1387,20 @@ export class ServiceMonitoringServiceClient { * * - `identifier_case` * - `app_engine.module_id` - * - `cloud_endpoints.service` - * - `cluster_istio.location` - * - `cluster_istio.cluster_name` - * - `cluster_istio.service_namespace` - * - `cluster_istio.service_name` + * - `cloud_endpoints.service` (reserved for future use) + * - `mesh_istio.mesh_uid` + * - `mesh_istio.service_namespace` + * - `mesh_istio.service_name` + * - `cluster_istio.location` (deprecated) + * - `cluster_istio.cluster_name` (deprecated) + * - `cluster_istio.service_namespace` (deprecated) + * - `cluster_istio.service_name` (deprecated) * * `identifier_case` refers to which option in the identifier oneof is * populated. For example, the filter `identifier_case = "CUSTOM"` would match * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO". + * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) + * and "CLOUD_ENDPOINTS" (reserved for future use). * @param {number} request.pageSize * A non-negative number that is the maximum number of results to return. * When 0, use default page size. diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json index 0534dc6a035..e55f61d422f 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_proto_list.json @@ -10,6 +10,7 @@ "../../protos/google/monitoring/v3/mutation_record.proto", "../../protos/google/monitoring/v3/notification.proto", "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", "../../protos/google/monitoring/v3/service.proto", "../../protos/google/monitoring/v3/service_service.proto", "../../protos/google/monitoring/v3/span_context.proto", diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json b/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json index 0534dc6a035..e55f61d422f 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_proto_list.json @@ -10,6 +10,7 @@ "../../protos/google/monitoring/v3/mutation_record.proto", "../../protos/google/monitoring/v3/notification.proto", "../../protos/google/monitoring/v3/notification_service.proto", + "../../protos/google/monitoring/v3/query_service.proto", "../../protos/google/monitoring/v3/service.proto", "../../protos/google/monitoring/v3/service_service.proto", "../../protos/google/monitoring/v3/span_context.proto", diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 9c8eba8df3b..551fd577987 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "db892b2908ff02201cace7c9a3a6b904ba0a08c2" + "sha": "11f9995c5def81a0a2e0598ddf026446d117b39d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" + "sha": "2124b6251e56e2ec8dd5c47e7d3815d7d5841880", + "internalRef": "364422694" } }, { diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js index 9b1325f9a4c..989fd17d844 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js @@ -24,6 +24,7 @@ function main() { const groupServiceClient = new monitoring.GroupServiceClient(); const metricServiceClient = new monitoring.MetricServiceClient(); const notificationChannelServiceClient = new monitoring.NotificationChannelServiceClient(); + const queryServiceClient = new monitoring.QueryServiceClient(); const serviceMonitoringServiceClient = new monitoring.ServiceMonitoringServiceClient(); const uptimeCheckServiceClient = new monitoring.UptimeCheckServiceClient(); } diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts index 7cdc39cfc6e..c4ee0535da7 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts @@ -21,6 +21,7 @@ import { GroupServiceClient, MetricServiceClient, NotificationChannelServiceClient, + QueryServiceClient, ServiceMonitoringServiceClient, UptimeCheckServiceClient, } from '@google-cloud/monitoring'; @@ -40,6 +41,9 @@ function doStuffWithNotificationChannelServiceClient( ) { client.close(); } +function doStuffWithQueryServiceClient(client: QueryServiceClient) { + client.close(); +} function doStuffWithServiceMonitoringServiceClient( client: ServiceMonitoringServiceClient ) { @@ -63,6 +67,9 @@ function main() { const notificationChannelServiceClient = new NotificationChannelServiceClient(); doStuffWithNotificationChannelServiceClient(notificationChannelServiceClient); // check that the client instance can be created + const queryServiceClient = new QueryServiceClient(); + doStuffWithQueryServiceClient(queryServiceClient); + // check that the client instance can be created const serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); doStuffWithServiceMonitoringServiceClient(serviceMonitoringServiceClient); // check that the client instance can be created diff --git a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts index 54530f78e42..f4c7a852563 100644 --- a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts @@ -3482,6 +3482,63 @@ describe('v3.MetricServiceClient', () => { }); }); + describe('projectTimeSeries', () => { + const fakePath = '/rendered/path/projectTimeSeries'; + const expectedParameters = { + project: 'projectValue', + time_series: 'timeSeriesValue', + }; + const client = new metricserviceModule.v3.MetricServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectTimeSeriesPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectTimeSeriesPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectTimeSeriesPath', () => { + const result = client.projectTimeSeriesPath( + 'projectValue', + 'timeSeriesValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectTimeSeriesPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectTimeSeriesName', () => { + const result = client.matchProjectFromProjectTimeSeriesName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectTimeSeriesPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTimeSeriesFromProjectTimeSeriesName', () => { + const result = client.matchTimeSeriesFromProjectTimeSeriesName( + fakePath + ); + assert.strictEqual(result, 'timeSeriesValue'); + assert( + (client.pathTemplates.projectTimeSeriesPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectUptimeCheckConfig', () => { const fakePath = '/rendered/path/projectUptimeCheckConfig'; const expectedParameters = { diff --git a/packages/google-cloud-monitoring/test/gapic_query_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_query_service_v3.ts new file mode 100644 index 00000000000..311fbeb53d6 --- /dev/null +++ b/packages/google-cloud-monitoring/test/gapic_query_service_v3.ts @@ -0,0 +1,1954 @@ +// 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. +// +// ** 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 queryserviceModule 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('v3.QueryServiceClient', () => { + it('has servicePath', () => { + const servicePath = queryserviceModule.v3.QueryServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = queryserviceModule.v3.QueryServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = queryserviceModule.v3.QueryServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new queryserviceModule.v3.QueryServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.queryServiceStub, undefined); + await client.initialize(); + assert(client.queryServiceStub); + }); + + it('has close method', () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new queryserviceModule.v3.QueryServiceClient({ + 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 queryserviceModule.v3.QueryServiceClient({ + 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('queryTimeSeries', () => { + it('invokes queryTimeSeries without error', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + ]; + client.innerApiCalls.queryTimeSeries = stubSimpleCall(expectedResponse); + const [response] = await client.queryTimeSeries(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryTimeSeries without error using callback', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + ]; + client.innerApiCalls.queryTimeSeries = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.queryTimeSeries( + request, + ( + err?: Error | null, + result?: protos.google.monitoring.v3.ITimeSeriesData[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.queryTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes queryTimeSeries with error', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.queryTimeSeries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.queryTimeSeries(request), expectedError); + assert( + (client.innerApiCalls.queryTimeSeries as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes queryTimeSeriesStream without error', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + ]; + client.descriptors.page.queryTimeSeries.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.queryTimeSeriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.TimeSeriesData[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.TimeSeriesData) => { + 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.queryTimeSeries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.queryTimeSeries, request) + ); + assert.strictEqual( + (client.descriptors.page.queryTimeSeries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes queryTimeSeriesStream with error', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryTimeSeries.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.queryTimeSeriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.monitoring.v3.TimeSeriesData[] = []; + stream.on( + 'data', + (response: protos.google.monitoring.v3.TimeSeriesData) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.queryTimeSeries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.queryTimeSeries, request) + ); + assert.strictEqual( + (client.descriptors.page.queryTimeSeries + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryTimeSeries without error', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), + ]; + client.descriptors.page.queryTimeSeries.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.monitoring.v3.ITimeSeriesData[] = []; + const iterable = client.queryTimeSeriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.queryTimeSeries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.queryTimeSeries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with queryTimeSeries with error', async () => { + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.monitoring.v3.QueryTimeSeriesRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.descriptors.page.queryTimeSeries.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.queryTimeSeriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.monitoring.v3.ITimeSeriesData[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.queryTimeSeries + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.queryTimeSeries + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('folderAlertPolicy', () => { + const fakePath = '/rendered/path/folderAlertPolicy'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyPath', () => { + const result = client.folderAlertPolicyPath( + 'folderValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyName', () => { + const result = client.matchFolderFromFolderAlertPolicyName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderAlertPolicyCondition', () => { + const fakePath = '/rendered/path/folderAlertPolicyCondition'; + const expectedParameters = { + folder: 'folderValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderAlertPolicyConditionPath', () => { + const result = client.folderAlertPolicyConditionPath( + 'folderValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderAlertPolicyConditionName', () => { + const result = client.matchFolderFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromFolderAlertPolicyConditionName', () => { + const result = client.matchConditionFromFolderAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderChannelDescriptor', () => { + const fakePath = '/rendered/path/folderChannelDescriptor'; + const expectedParameters = { + folder: 'folderValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderChannelDescriptorPath', () => { + const result = client.folderChannelDescriptorPath( + 'folderValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderChannelDescriptorName', () => { + const result = client.matchFolderFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderGroup', () => { + const fakePath = '/rendered/path/folderGroup'; + const expectedParameters = { + folder: 'folderValue', + group: 'groupValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderGroupPath', () => { + const result = client.folderGroupPath('folderValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderGroupName', () => { + const result = client.matchFolderFromFolderGroupName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromFolderGroupName', () => { + const result = client.matchGroupFromFolderGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.folderGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderNotificationChannel', () => { + const fakePath = '/rendered/path/folderNotificationChannel'; + const expectedParameters = { + folder: 'folderValue', + notification_channel: 'notificationChannelValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderNotificationChannelPath', () => { + const result = client.folderNotificationChannelPath( + 'folderValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderNotificationChannelName', () => { + const result = client.matchFolderFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromFolderNotificationChannelName', () => { + const result = client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderService', () => { + const fakePath = '/rendered/path/folderService'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServicePath', () => { + const result = client.folderServicePath('folderValue', 'serviceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceName', () => { + const result = client.matchFolderFromFolderServiceName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceName', () => { + const result = client.matchServiceFromFolderServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/folderServiceServiceLevelObjective'; + const expectedParameters = { + folder: 'folderValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderServiceServiceLevelObjectivePath', () => { + const result = client.folderServiceServiceLevelObjectivePath( + 'folderValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('folderUptimeCheckConfig', () => { + const fakePath = '/rendered/path/folderUptimeCheckConfig'; + const expectedParameters = { + folder: 'folderValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderUptimeCheckConfigPath', () => { + const result = client.folderUptimeCheckConfigPath( + 'folderValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderUptimeCheckConfigName', () => { + const result = client.matchFolderFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicy', () => { + const fakePath = '/rendered/path/organizationAlertPolicy'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyPath', () => { + const result = client.organizationAlertPolicyPath( + 'organizationValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationAlertPolicyCondition', () => { + const fakePath = '/rendered/path/organizationAlertPolicyCondition'; + const expectedParameters = { + organization: 'organizationValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationAlertPolicyConditionPath', () => { + const result = client.organizationAlertPolicyConditionPath( + 'organizationValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromOrganizationAlertPolicyConditionName', () => { + const result = client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationChannelDescriptor', () => { + const fakePath = '/rendered/path/organizationChannelDescriptor'; + const expectedParameters = { + organization: 'organizationValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationChannelDescriptorPath', () => { + const result = client.organizationChannelDescriptorPath( + 'organizationValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationChannelDescriptorName', () => { + const result = client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationGroup', () => { + const fakePath = '/rendered/path/organizationGroup'; + const expectedParameters = { + organization: 'organizationValue', + group: 'groupValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationGroupPath', () => { + const result = client.organizationGroupPath( + 'organizationValue', + 'groupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationGroupName', () => { + const result = client.matchOrganizationFromOrganizationGroupName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromOrganizationGroupName', () => { + const result = client.matchGroupFromOrganizationGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationNotificationChannel', () => { + const fakePath = '/rendered/path/organizationNotificationChannel'; + const expectedParameters = { + organization: 'organizationValue', + notification_channel: 'notificationChannelValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationNotificationChannelPath', () => { + const result = client.organizationNotificationChannelPath( + 'organizationValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationNotificationChannelName', () => { + const result = client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { + const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationService', () => { + const fakePath = '/rendered/path/organizationService'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServicePath', () => { + const result = client.organizationServicePath( + 'organizationValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationServicePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceName', () => { + const result = client.matchOrganizationFromOrganizationServiceName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceName', () => { + const result = client.matchServiceFromOrganizationServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.organizationServicePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationServiceServiceLevelObjective', () => { + const fakePath = + '/rendered/path/organizationServiceServiceLevelObjective'; + const expectedParameters = { + organization: 'organizationValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationServiceServiceLevelObjectivePath', () => { + const result = client.organizationServiceServiceLevelObjectivePath( + 'organizationValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organizationUptimeCheckConfig', () => { + const fakePath = '/rendered/path/organizationUptimeCheckConfig'; + const expectedParameters = { + organization: 'organizationValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationUptimeCheckConfigPath', () => { + const result = client.organizationUptimeCheckConfigPath( + 'organizationValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicy', () => { + const fakePath = '/rendered/path/projectAlertPolicy'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyPath', () => { + const result = client.projectAlertPolicyPath( + 'projectValue', + 'alertPolicyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyName', () => { + const result = client.matchProjectFromProjectAlertPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectAlertPolicyCondition', () => { + const fakePath = '/rendered/path/projectAlertPolicyCondition'; + const expectedParameters = { + project: 'projectValue', + alert_policy: 'alertPolicyValue', + condition: 'conditionValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectAlertPolicyConditionPath', () => { + const result = client.projectAlertPolicyConditionPath( + 'projectValue', + 'alertPolicyValue', + 'conditionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectAlertPolicyConditionName', () => { + const result = client.matchProjectFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { + const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'alertPolicyValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConditionFromProjectAlertPolicyConditionName', () => { + const result = client.matchConditionFromProjectAlertPolicyConditionName( + fakePath + ); + assert.strictEqual(result, 'conditionValue'); + assert( + (client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectChannelDescriptor', () => { + const fakePath = '/rendered/path/projectChannelDescriptor'; + const expectedParameters = { + project: 'projectValue', + channel_descriptor: 'channelDescriptorValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectChannelDescriptorPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectChannelDescriptorPath', () => { + const result = client.projectChannelDescriptorPath( + 'projectValue', + 'channelDescriptorValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectChannelDescriptorName', () => { + const result = client.matchProjectFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { + const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); + assert.strictEqual(result, 'channelDescriptorValue'); + assert( + (client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectGroup', () => { + const fakePath = '/rendered/path/projectGroup'; + const expectedParameters = { + project: 'projectValue', + group: 'groupValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectGroupPath', () => { + const result = client.projectGroupPath('projectValue', 'groupValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectGroupName', () => { + const result = client.matchProjectFromProjectGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGroupFromProjectGroupName', () => { + const result = client.matchGroupFromProjectGroupName(fakePath); + assert.strictEqual(result, 'groupValue'); + assert( + (client.pathTemplates.projectGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectNotificationChannel', () => { + const fakePath = '/rendered/path/projectNotificationChannel'; + const expectedParameters = { + project: 'projectValue', + notification_channel: 'notificationChannelValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectNotificationChannelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectNotificationChannelPath', () => { + const result = client.projectNotificationChannelPath( + 'projectValue', + 'notificationChannelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectNotificationChannelName', () => { + const result = client.matchProjectFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNotificationChannelFromProjectNotificationChannelName', () => { + const result = client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); + assert.strictEqual(result, 'notificationChannelValue'); + assert( + (client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectService', () => { + const fakePath = '/rendered/path/projectService'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServicePath', () => { + const result = client.projectServicePath( + 'projectValue', + 'serviceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServicePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceName', () => { + const result = client.matchProjectFromProjectServiceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceName', () => { + const result = client.matchServiceFromProjectServiceName(fakePath); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServicePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectServiceServiceLevelObjective', () => { + const fakePath = '/rendered/path/projectServiceServiceLevelObjective'; + const expectedParameters = { + project: 'projectValue', + service: 'serviceValue', + service_level_objective: 'serviceLevelObjectiveValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectServiceServiceLevelObjectivePath', () => { + const result = client.projectServiceServiceLevelObjectivePath( + 'projectValue', + 'serviceValue', + 'serviceLevelObjectiveValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { + const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); + assert.strictEqual(result, 'serviceLevelObjectiveValue'); + assert( + (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectUptimeCheckConfig', () => { + const fakePath = '/rendered/path/projectUptimeCheckConfig'; + const expectedParameters = { + project: 'projectValue', + uptime_check_config: 'uptimeCheckConfigValue', + }; + const client = new queryserviceModule.v3.QueryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectUptimeCheckConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectUptimeCheckConfigPath', () => { + const result = client.projectUptimeCheckConfigPath( + 'projectValue', + 'uptimeCheckConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectUptimeCheckConfigName', () => { + const result = client.matchProjectFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { + const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); + assert.strictEqual(result, 'uptimeCheckConfigValue'); + assert( + (client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From 89861dc6a2431954c4d2b093f9dc7238cb7bbc85 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 29 Mar 2021 12:10:51 -0700 Subject: [PATCH 363/422] chore: release 2.3.0 (#524) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 9420410b4bf..05dff8b88fd 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [2.3.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.2.0...v2.3.0) (2021-03-24) + + +### Features + +* Added support for Monitoring Query Language: https://cloud.google.com/monitoring/mql feat: Added support for units in the MetricService feat: Added total_size to the response of ListAlertPolicies. fix: Un-deprecated cluster_istio for service monitoring. feat: Added IstioCanonicalService for service monitoring. feat: Added creation and mutation records to notification channels. feat: Added support for querying metrics for folders and organizations. fix: Extended the default deadline for UpdateGroup to 180s. feat: Added support for secondary aggregation when querying metrics. ([#523](https://www.github.com/googleapis/nodejs-monitoring/issues/523)) ([cab3fdb](https://www.github.com/googleapis/nodejs-monitoring/commit/cab3fdb02c41149ae40e3a28987bb7ffeed050ac)) + ## [2.2.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.1.5...v2.2.0) (2021-01-09) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 290f4e52251..35d47ea138c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.2.0", + "version": "2.3.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 9d70c3977ba..4a3df411477 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.2.0", + "@google-cloud/monitoring": "^2.3.0", "yargs": "^16.0.0" }, "devDependencies": { From 42ba382c933ada9facf061e91db09a9ffd537f88 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:08:11 +0200 Subject: [PATCH 364/422] chore(deps): update dependency @types/sinon to v10 (#527) [![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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 35d47ea138c..f0204d0920d 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@types/mocha": "^8.0.0", "@types/node": "^12.12.27", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", "gts": "^2.0.0", From 76299a956ad269f630f799ba4d3dd11b640932cc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 19 Apr 2021 13:14:56 -0700 Subject: [PATCH 365/422] chore: template changes (#529) * feat: fetch for default branch Source-Author: Billy Jacobson Source-Date: Thu Apr 15 20:13:42 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 898b38a6f4fab89a76dfb152480bb034a781331b Source-Link: https://github.com/googleapis/synthtool/commit/898b38a6f4fab89a76dfb152480bb034a781331b * build(node): remove unused tokens Source-Author: Benjamin E. Coe Source-Date: Fri Apr 16 10:12:05 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: b33b0e2056a85fc2264b294f2cf47dcd45e95186 Source-Link: https://github.com/googleapis/synthtool/commit/b33b0e2056a85fc2264b294f2cf47dcd45e95186 * fix(node): default-branch should use $default_branch Source-Author: Benjamin E. Coe Source-Date: Fri Apr 16 10:25:52 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: c6706ee5d693e9ae5967614170732646590d8374 Source-Link: https://github.com/googleapis/synthtool/commit/c6706ee5d693e9ae5967614170732646590d8374 --- packages/google-cloud-monitoring/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata index 551fd577987..25e72647820 100644 --- a/packages/google-cloud-monitoring/synth.metadata +++ b/packages/google-cloud-monitoring/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "11f9995c5def81a0a2e0598ddf026446d117b39d" + "sha": "62d2c5ebc91677198b22b3deb291b90d0b1aac3c" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "c6706ee5d693e9ae5967614170732646590d8374" } } ], From 9a56fd26ae49699bdeb5c959b59b5bec41fa3cd0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:15 +0200 Subject: [PATCH 366/422] chore(deps): update dependency ts-loader to v9 (#530) [![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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f0204d0920d..a4afa718911 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -62,7 +62,7 @@ "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^10.0.0", - "ts-loader": "^8.0.0", + "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", "webpack-cli": "^4.0.0", From 75160b0fd9a7927683edcd50bf534582ba7d7437 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Wed, 28 Apr 2021 16:15:36 -0700 Subject: [PATCH 367/422] chore: migrate to owl bot (#526) --- .../.github/.OwlBot.yaml | 26 + .../.repo-metadata.json | 15 +- .../{synth.py => owlbot.py} | 20 +- .../protos/protos.d.ts | 348 ++--- .../google-cloud-monitoring/protos/protos.js | 1196 ++++++++--------- .../protos/protos.json | 30 +- .../google-cloud-monitoring/synth.metadata | 37 - 7 files changed, 822 insertions(+), 850 deletions(-) create mode 100644 packages/google-cloud-monitoring/.github/.OwlBot.yaml rename packages/google-cloud-monitoring/{synth.py => owlbot.py} (56%) delete mode 100644 packages/google-cloud-monitoring/synth.metadata diff --git a/packages/google-cloud-monitoring/.github/.OwlBot.yaml b/packages/google-cloud-monitoring/.github/.OwlBot.yaml new file mode 100644 index 00000000000..f27b2b4e4f4 --- /dev/null +++ b/packages/google-cloud-monitoring/.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/cloud/monitoring/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: ed3195d0a29ae8c2608dc5a2aa2590554a3f9d14 + diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json index 7ebf2d742c3..0e49853fedb 100644 --- a/packages/google-cloud-monitoring/.repo-metadata.json +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "monitoring", - "name_pretty": "Stackdriver Monitoring", - "product_documentation": "https://cloud.google.com/monitoring/docs", "client_documentation": "https://googleapis.dev/nodejs/monitoring/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", + "product_documentation": "https://cloud.google.com/monitoring/docs", + "name": "monitoring", + "requires_billing": true, "release_level": "ga", "language": "nodejs", - "repo": "googleapis/nodejs-monitoring", - "distribution_name": "@google-cloud/monitoring", "api_id": "monitoring.googleapis.com", - "requires_billing": true + "distribution_name": "@google-cloud/monitoring", + "repo": "googleapis/nodejs-monitoring", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", + "name_pretty": "Stackdriver Monitoring", + "default_version": "v3" } diff --git a/packages/google-cloud-monitoring/synth.py b/packages/google-cloud-monitoring/owlbot.py similarity index 56% rename from packages/google-cloud-monitoring/synth.py rename to packages/google-cloud-monitoring/owlbot.py index c7d8f298b1e..57f66fb1889 100644 --- a/packages/google-cloud-monitoring/synth.py +++ b/packages/google-cloud-monitoring/owlbot.py @@ -14,24 +14,6 @@ """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 -logging.basicConfig(level=logging.DEBUG) -AUTOSYNTH_MULTIPLE_COMMITS = True - - -gapic = gcp.GAPICBazel() -version = "v3" -library = gapic.node_library("monitoring", version, proto_path=f'google/monitoring/{version}') - -s.copy(library, excludes=["README.md", "package.json"]) - -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location="build/src", versions=["v3"], default_version="v3") -s.copy(templates) - -node.postprocess_gapic_library() +node.owlbot_main(staging_excludes=["README.md", "package.json"]) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index aef3e04d293..bd2143c7282 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -19786,180 +19786,6 @@ export namespace google { 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 Struct. */ interface IStruct { @@ -20267,6 +20093,180 @@ export namespace google { */ 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 rpc. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 629d9499093..b07f1bd2592 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -48860,23 +48860,25 @@ return BytesValue; })(); - protobuf.Empty = (function() { + protobuf.Struct = (function() { /** - * Properties of an Empty. + * Properties of a Struct. * @memberof google.protobuf - * @interface IEmpty + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new Empty. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function Empty(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) @@ -48884,63 +48886,98 @@ } /** - * Creates a new Empty instance using the specified properties. + * 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.Empty + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - Empty.create = function create(properties) { - return new Empty(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IEmpty} message Empty 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 */ - Empty.encode = function encode(message, 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; }; /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.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.Empty + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IEmpty} message Empty 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 */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @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.Empty} Empty + * @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 */ - Empty.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.Empty(); + 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; @@ -48950,95 +48987,131 @@ }; /** - * Decodes an Empty 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.Empty + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @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 */ - Empty.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.Empty + * @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 */ - Empty.verify = function verify(message) { + 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 an Empty 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.Empty + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.Struct} Struct */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - return new $root.google.protobuf.Empty(); + 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 an Empty 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.Empty + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + 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 Empty to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + return Struct; })(); - protobuf.FieldMask = (function() { + protobuf.Value = (function() { /** - * Properties of a FieldMask. + * Properties of a Value. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @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 FieldMask. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49046,78 +49119,154 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * Value nullValue. + * @member {google.protobuf.NullValue} nullValue + * @memberof google.protobuf.Value * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + Value.prototype.nullValue = 0; /** - * 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 + * Value numberValue. + * @member {number} numberValue + * @memberof google.protobuf.Value + * @instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; + Value.prototype.numberValue = 0; /** - * 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 + * Value stringValue. + * @member {string} stringValue + * @memberof google.protobuf.Value + * @instance */ - 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; - }; + Value.prototype.stringValue = ""; /** - * 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 + * Value boolValue. + * @member {boolean} boolValue + * @memberof google.protobuf.Value + * @instance */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Value.prototype.boolValue = false; /** - * 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 + * 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 && 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 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 */ - 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); @@ -49128,120 +49277,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; + } + } + 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 FieldMask 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.FieldMask + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Value} Value */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + 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.Struct = (function() { + /** + * 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; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a Struct. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new Struct. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49249,97 +49492,78 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - Struct.prototype.fields = $util.emptyObject; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new Struct instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - Struct.create = function create(properties) { - return new Struct(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IStruct} message Struct 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 */ - Struct.encode = function encode(message, writer) { + ListValue.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(); - } + 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 Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.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.Struct + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IStruct} message Struct 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 */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @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.Struct} Struct + * @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 */ - Struct.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.Struct(), key, value; + 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.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; + 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); @@ -49350,131 +49574,123 @@ }; /** - * Decodes a Struct 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.Struct + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @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 */ - Struct.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 Struct message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.Struct + * @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 */ - Struct.verify = function verify(message) { + ListValue.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 (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 "fields." + error; + return "values." + error; } } return null; }; /** - * Creates a Struct 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.Struct + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.ListValue} ListValue */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) 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.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 Struct 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.Struct + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + ListValue.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.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 Struct to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return ListValue; })(); - 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) @@ -49482,155 +49698,63 @@ } /** - * 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. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Value.create = function create(properties) { - return new Value(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IValue} message Value 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 */ - Value.encode = function encode(message, writer) { + Empty.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 Value message, length delimited. Does not implicitly {@link google.protobuf.Value.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.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IValue} message Value 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 */ - Value.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Value message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Value + * @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.Value} Value + * @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.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.Value(); + 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.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; @@ -49640,214 +49764,95 @@ }; /** - * Decodes a Value 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.Value + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value + * @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.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 Value message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.Value + * @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 */ - Value.verify = function verify(message) { + Empty.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. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.Empty} Empty */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) 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; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a Value 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.Value + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.Value} message Value + * @param {google.protobuf.Empty} message Empty * @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; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this Value to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; - })(); - - /** - * 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; + return Empty; })(); - protobuf.ListValue = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a ListValue. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new ListValue. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49855,78 +49860,78 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - ListValue.prototype.values = $util.emptyArray; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new ListValue instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IListValue} message ListValue 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 */ - ListValue.encode = function encode(message, writer) { + FieldMask.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.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 ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.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.ListValue + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IListValue} message ListValue 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 */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @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.ListValue} ListValue + * @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 */ - ListValue.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.ListValue(); + 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.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -49937,104 +49942,99 @@ }; /** - * Decodes a ListValue 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.ListValue + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @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 */ - ListValue.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 ListValue message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.ListValue + * @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 */ - ListValue.verify = function verify(message) { + FieldMask.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.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 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. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.FieldMask} FieldMask */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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.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 ListValue 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.ListValue + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + FieldMask.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); + 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 ListValue to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + return FieldMask; })(); return protobuf; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 8f463cbb593..e426e8819a3 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -9,12 +9,12 @@ "csharp_namespace": "Google.Cloud.Monitoring.V3", "go_package": "google.golang.org/genproto/googleapis/monitoring/v3;monitoring", "java_multiple_files": true, - "java_outer_classname": "UptimeServiceProto", + "java_outer_classname": "UptimeProto", "java_package": "com.google.monitoring.v3", "php_namespace": "Google\\Cloud\\Monitoring\\V3", "ruby_package": "Google::Cloud::Monitoring::V3", - "(google.api.resource_definition).type": "monitoring.googleapis.com/TimeSeries", - "(google.api.resource_definition).pattern": "folders/{folder}/timeSeries/{time_series}", + "(google.api.resource_definition).type": "monitoring.googleapis.com/MonitoredResourceDescriptor", + "(google.api.resource_definition).pattern": "*", "(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN" }, "nested": { @@ -4985,18 +4985,6 @@ } } }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, "Struct": { "fields": { "fields": { @@ -5059,6 +5047,18 @@ "id": 1 } } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } } } }, diff --git a/packages/google-cloud-monitoring/synth.metadata b/packages/google-cloud-monitoring/synth.metadata deleted file mode 100644 index 25e72647820..00000000000 --- a/packages/google-cloud-monitoring/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-monitoring.git", - "sha": "62d2c5ebc91677198b22b3deb291b90d0b1aac3c" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2124b6251e56e2ec8dd5c47e7d3815d7d5841880", - "internalRef": "364422694" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c6706ee5d693e9ae5967614170732646590d8374" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "monitoring", - "apiVersion": "v3", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file From 7e5bc12621d25542cca1b2326724ffd8a9626f60 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:52:18 -0700 Subject: [PATCH 368/422] fix(deps): require google-gax v2.12.0 (#534) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a4afa718911..342a98fae3c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -45,7 +45,7 @@ "api-documenter": "api-documenter yaml --input-folder=temp" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From 5431bf07d8435a2afd9bbf07cae0b5654482a78f 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 17:00:38 +0000 Subject: [PATCH 369/422] chore: new owl bot post processor docker image (#536) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../protos/protos.d.ts | 46 +- .../google-cloud-monitoring/protos/protos.js | 92 +- .../src/v3/alert_policy_service_client.ts | 129 +- .../src/v3/group_service_client.ts | 158 +- .../src/v3/metric_service_client.ts | 224 +- .../v3/notification_channel_service_client.ts | 194 +- .../src/v3/query_service_client.ts | 93 +- .../v3/service_monitoring_service_client.ts | 195 +- .../src/v3/uptime_check_service_client.ts | 131 +- .../system-test/fixtures/sample/src/index.js | 6 +- .../system-test/fixtures/sample/src/index.ts | 3 +- .../test/gapic_alert_policy_service_v3.ts | 829 +++---- .../test/gapic_group_service_v3.ts | 844 ++++---- .../test/gapic_metric_service_v3.ts | 1281 ++++++----- .../gapic_notification_channel_service_v3.ts | 1920 +++++++++-------- .../test/gapic_query_service_v3.ts | 809 ++++--- .../gapic_service_monitoring_service_v3.ts | 1442 +++++++------ .../test/gapic_uptime_check_service_v3.ts | 914 ++++---- 18 files changed, 5049 insertions(+), 4261 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index bd2143c7282..8dd3d65095b 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -410,10 +410,10 @@ export namespace google { constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger); /** Trigger count. */ - public count: number; + public count?: (number|null); /** Trigger percent. */ - public percent: number; + public percent?: (number|null); /** Trigger type. */ public type?: ("count"|"percent"); @@ -870,16 +870,16 @@ export namespace google { constructor(properties?: google.monitoring.v3.ITypedValue); /** TypedValue boolValue. */ - public boolValue: boolean; + public boolValue?: (boolean|null); /** TypedValue int64Value. */ - public int64Value: (number|Long|string); + public int64Value?: (number|Long|string|null); /** TypedValue doubleValue. */ - public doubleValue: number; + public doubleValue?: (number|null); /** TypedValue stringValue. */ - public stringValue: string; + public stringValue?: (string|null); /** TypedValue distributionValue. */ public distributionValue?: (google.api.IDistribution|null); @@ -2426,13 +2426,13 @@ export namespace google { public name: string; /** ListGroupsRequest childrenOfGroup. */ - public childrenOfGroup: string; + public childrenOfGroup?: (string|null); /** ListGroupsRequest ancestorsOfGroup. */ - public ancestorsOfGroup: string; + public ancestorsOfGroup?: (string|null); /** ListGroupsRequest descendantsOfGroup. */ - public descendantsOfGroup: string; + public descendantsOfGroup?: (string|null); /** ListGroupsRequest pageSize. */ public pageSize: number; @@ -3857,13 +3857,13 @@ export namespace google { constructor(properties?: google.monitoring.v3.ILabelValue); /** LabelValue boolValue. */ - public boolValue: boolean; + public boolValue?: (boolean|null); /** LabelValue int64Value. */ - public int64Value: (number|Long|string); + public int64Value?: (number|Long|string|null); /** LabelValue stringValue. */ - public stringValue: string; + public stringValue?: (string|null); /** LabelValue value. */ public value?: ("boolValue"|"int64Value"|"stringValue"); @@ -8850,7 +8850,7 @@ export namespace google { public rollingPeriod?: (google.protobuf.IDuration|null); /** ServiceLevelObjective calendarPeriod. */ - public calendarPeriod: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod); + public calendarPeriod?: (google.type.CalendarPeriod|keyof typeof google.type.CalendarPeriod|null); /** ServiceLevelObjective period. */ public period?: ("rollingPeriod"|"calendarPeriod"); @@ -9757,7 +9757,7 @@ export namespace google { constructor(properties?: google.monitoring.v3.IWindowsBasedSli); /** WindowsBasedSli goodBadMetricFilter. */ - public goodBadMetricFilter: string; + public goodBadMetricFilter?: (string|null); /** WindowsBasedSli goodTotalRatioThreshold. */ public goodTotalRatioThreshold?: (google.monitoring.v3.WindowsBasedSli.IPerformanceThreshold|null); @@ -14556,19 +14556,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); @@ -19908,16 +19908,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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index b07f1bd2592..6cf36a8c6e5 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -1144,19 +1144,19 @@ /** * Trigger count. - * @member {number} count + * @member {number|null|undefined} count * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger * @instance */ - Trigger.prototype.count = 0; + Trigger.prototype.count = null; /** * Trigger percent. - * @member {number} percent + * @member {number|null|undefined} percent * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger * @instance */ - Trigger.prototype.percent = 0; + Trigger.prototype.percent = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2366,35 +2366,35 @@ /** * TypedValue boolValue. - * @member {boolean} boolValue + * @member {boolean|null|undefined} boolValue * @memberof google.monitoring.v3.TypedValue * @instance */ - TypedValue.prototype.boolValue = false; + TypedValue.prototype.boolValue = null; /** * TypedValue int64Value. - * @member {number|Long} int64Value + * @member {number|Long|null|undefined} int64Value * @memberof google.monitoring.v3.TypedValue * @instance */ - TypedValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TypedValue.prototype.int64Value = null; /** * TypedValue doubleValue. - * @member {number} doubleValue + * @member {number|null|undefined} doubleValue * @memberof google.monitoring.v3.TypedValue * @instance */ - TypedValue.prototype.doubleValue = 0; + TypedValue.prototype.doubleValue = null; /** * TypedValue stringValue. - * @member {string} stringValue + * @member {string|null|undefined} stringValue * @memberof google.monitoring.v3.TypedValue * @instance */ - TypedValue.prototype.stringValue = ""; + TypedValue.prototype.stringValue = null; /** * TypedValue distributionValue. @@ -5986,27 +5986,27 @@ /** * ListGroupsRequest childrenOfGroup. - * @member {string} childrenOfGroup + * @member {string|null|undefined} childrenOfGroup * @memberof google.monitoring.v3.ListGroupsRequest * @instance */ - ListGroupsRequest.prototype.childrenOfGroup = ""; + ListGroupsRequest.prototype.childrenOfGroup = null; /** * ListGroupsRequest ancestorsOfGroup. - * @member {string} ancestorsOfGroup + * @member {string|null|undefined} ancestorsOfGroup * @memberof google.monitoring.v3.ListGroupsRequest * @instance */ - ListGroupsRequest.prototype.ancestorsOfGroup = ""; + ListGroupsRequest.prototype.ancestorsOfGroup = null; /** * ListGroupsRequest descendantsOfGroup. - * @member {string} descendantsOfGroup + * @member {string|null|undefined} descendantsOfGroup * @memberof google.monitoring.v3.ListGroupsRequest * @instance */ - ListGroupsRequest.prototype.descendantsOfGroup = ""; + ListGroupsRequest.prototype.descendantsOfGroup = null; /** * ListGroupsRequest pageSize. @@ -9612,27 +9612,27 @@ /** * LabelValue boolValue. - * @member {boolean} boolValue + * @member {boolean|null|undefined} boolValue * @memberof google.monitoring.v3.LabelValue * @instance */ - LabelValue.prototype.boolValue = false; + LabelValue.prototype.boolValue = null; /** * LabelValue int64Value. - * @member {number|Long} int64Value + * @member {number|Long|null|undefined} int64Value * @memberof google.monitoring.v3.LabelValue * @instance */ - LabelValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LabelValue.prototype.int64Value = null; /** * LabelValue stringValue. - * @member {string} stringValue + * @member {string|null|undefined} stringValue * @memberof google.monitoring.v3.LabelValue * @instance */ - LabelValue.prototype.stringValue = ""; + LabelValue.prototype.stringValue = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -21217,11 +21217,11 @@ /** * ServiceLevelObjective calendarPeriod. - * @member {google.type.CalendarPeriod} calendarPeriod + * @member {google.type.CalendarPeriod|null|undefined} calendarPeriod * @memberof google.monitoring.v3.ServiceLevelObjective * @instance */ - ServiceLevelObjective.prototype.calendarPeriod = 0; + ServiceLevelObjective.prototype.calendarPeriod = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -23463,11 +23463,11 @@ /** * WindowsBasedSli goodBadMetricFilter. - * @member {string} goodBadMetricFilter + * @member {string|null|undefined} goodBadMetricFilter * @memberof google.monitoring.v3.WindowsBasedSli * @instance */ - WindowsBasedSli.prototype.goodBadMetricFilter = ""; + WindowsBasedSli.prototype.goodBadMetricFilter = null; /** * WindowsBasedSli goodTotalRatioThreshold. @@ -34874,43 +34874,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. @@ -49120,35 +49120,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/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts index 44ac998c46f..defdfa341e0 100644 --- a/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/alert_policy_service_client.ts @@ -192,36 +192,42 @@ export class AlertPolicyServiceClient { folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -243,9 +249,10 @@ export class AlertPolicyServiceClient { projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -316,13 +323,14 @@ export class AlertPolicyServiceClient { ]; for (const methodName of alertPolicyServiceStubMethods) { const callPromise = this.alertPolicyServiceStub.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; } @@ -476,11 +484,10 @@ export class AlertPolicyServiceClient { 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.getAlertPolicy(request, options, callback); } @@ -576,11 +583,10 @@ export class AlertPolicyServiceClient { 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.createAlertPolicy(request, options, callback); } @@ -666,11 +672,10 @@ export class AlertPolicyServiceClient { 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.deleteAlertPolicy(request, options, callback); } @@ -780,11 +785,10 @@ export class AlertPolicyServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'alert_policy.name': request.alertPolicy!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'alert_policy.name': request.alertPolicy!.name || '', + }); this.initialize(); return this.innerApiCalls.updateAlertPolicy(request, options, callback); } @@ -897,11 +901,10 @@ export class AlertPolicyServiceClient { 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.listAlertPolicies(request, options, callback); } @@ -959,11 +962,10 @@ export class AlertPolicyServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listAlertPolicies.createStream( @@ -1032,17 +1034,16 @@ export class AlertPolicyServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listAlertPolicies.asyncIterate( this.innerApiCalls['listAlertPolicies'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/src/v3/group_service_client.ts b/packages/google-cloud-monitoring/src/v3/group_service_client.ts index bd90184be4f..f38d2ac4a31 100644 --- a/packages/google-cloud-monitoring/src/v3/group_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/group_service_client.ts @@ -195,36 +195,42 @@ export class GroupServiceClient { folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -246,9 +252,10 @@ export class GroupServiceClient { projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -325,13 +332,14 @@ export class GroupServiceClient { ]; for (const methodName of groupServiceStubMethods) { const callPromise = this.groupServiceStub.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; } @@ -485,11 +493,10 @@ export class GroupServiceClient { 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.getGroup(request, options, callback); } @@ -576,11 +583,10 @@ export class GroupServiceClient { 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.createGroup(request, options, callback); } @@ -664,11 +670,10 @@ export class GroupServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'group.name': request.group!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'group.name': request.group!.name || '', + }); this.initialize(); return this.innerApiCalls.updateGroup(request, options, callback); } @@ -754,11 +759,10 @@ export class GroupServiceClient { 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.deleteGroup(request, options, callback); } @@ -874,11 +878,10 @@ export class GroupServiceClient { 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.listGroups(request, options, callback); } @@ -941,11 +944,10 @@ export class GroupServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listGroups.createStream( @@ -1019,17 +1021,16 @@ export class GroupServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listGroups.asyncIterate( this.innerApiCalls['listGroups'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1136,11 +1137,10 @@ export class GroupServiceClient { 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.listGroupMembers(request, options, callback); } @@ -1193,11 +1193,10 @@ export class GroupServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listGroupMembers.createStream( @@ -1261,17 +1260,16 @@ export class GroupServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listGroupMembers.asyncIterate( this.innerApiCalls['listGroupMembers'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts index a33afcb2c4d..db18a051203 100644 --- a/packages/google-cloud-monitoring/src/v3/metric_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/metric_service_client.ts @@ -182,51 +182,60 @@ export class MetricServiceClient { folderMetricDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/metricDescriptors/{metric_descriptor=**}' ), - folderMonitoredResourceDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}' - ), + folderMonitoredResourceDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), folderNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/notificationChannels/{notification_channel}' ), folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationMetricDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/metricDescriptors/{metric_descriptor=**}' - ), - organizationMonitoredResourceDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}' - ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationMetricDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/metricDescriptors/{metric_descriptor=**}' + ), + organizationMonitoredResourceDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -245,18 +254,20 @@ export class MetricServiceClient { projectMetricDescriptorPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/metricDescriptors/{metric_descriptor=**}' ), - projectMonitoredResourceDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' - ), + projectMonitoredResourceDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}' + ), projectNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/notificationChannels/{notification_channel}' ), projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/timeSeries/{time_series}' ), @@ -343,13 +354,14 @@ export class MetricServiceClient { ]; for (const methodName of metricServiceStubMethods) { const callPromise = this.metricServiceStub.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; } @@ -521,11 +533,10 @@ export class MetricServiceClient { 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.getMonitoredResourceDescriptor( request, @@ -622,11 +633,10 @@ export class MetricServiceClient { 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.getMetricDescriptor(request, options, callback); } @@ -721,11 +731,10 @@ export class MetricServiceClient { 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.createMetricDescriptor( request, @@ -824,11 +833,10 @@ export class MetricServiceClient { 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.deleteMetricDescriptor( request, @@ -927,11 +935,10 @@ export class MetricServiceClient { 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.createTimeSeries(request, options, callback); } @@ -1038,11 +1045,10 @@ export class MetricServiceClient { 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.listMonitoredResourceDescriptors( request, @@ -1092,11 +1098,10 @@ export class MetricServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listMonitoredResourceDescriptors.createStream( @@ -1153,17 +1158,16 @@ export class MetricServiceClient { 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 || '', + }); 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, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1271,11 +1275,10 @@ export class MetricServiceClient { 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.listMetricDescriptors(request, options, callback); } @@ -1323,11 +1326,10 @@ export class MetricServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listMetricDescriptors.createStream( @@ -1386,17 +1388,16 @@ export class MetricServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listMetricDescriptors.asyncIterate( this.innerApiCalls['listMetricDescriptors'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1522,11 +1523,10 @@ export class MetricServiceClient { 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.listTimeSeries(request, options, callback); } @@ -1598,11 +1598,10 @@ export class MetricServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listTimeSeries.createStream( @@ -1685,17 +1684,16 @@ export class MetricServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listTimeSeries.asyncIterate( this.innerApiCalls['listTimeSeries'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts index e2be5884b29..123f549e0cb 100644 --- a/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/notification_channel_service_client.ts @@ -186,36 +186,42 @@ export class NotificationChannelServiceClient { folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -237,9 +243,10 @@ export class NotificationChannelServiceClient { projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -320,13 +327,14 @@ export class NotificationChannelServiceClient { ]; for (const methodName of notificationChannelServiceStubMethods) { const callPromise = this.notificationChannelServiceStub.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; } @@ -495,11 +503,10 @@ export class NotificationChannelServiceClient { 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.getNotificationChannelDescriptor( request, @@ -597,11 +604,10 @@ export class NotificationChannelServiceClient { 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.getNotificationChannel( request, @@ -703,11 +709,10 @@ export class NotificationChannelServiceClient { 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.createNotificationChannel( request, @@ -805,11 +810,10 @@ export class NotificationChannelServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'notification_channel.name': request.notificationChannel!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'notification_channel.name': request.notificationChannel!.name || '', + }); this.initialize(); return this.innerApiCalls.updateNotificationChannel( request, @@ -908,11 +912,10 @@ export class NotificationChannelServiceClient { 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.deleteNotificationChannel( request, @@ -1011,11 +1014,10 @@ export class NotificationChannelServiceClient { 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.sendNotificationChannelVerificationCode( request, @@ -1145,11 +1147,10 @@ export class NotificationChannelServiceClient { 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.getNotificationChannelVerificationCode( request, @@ -1251,11 +1252,10 @@ export class NotificationChannelServiceClient { 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.verifyNotificationChannel( request, @@ -1368,11 +1368,10 @@ export class NotificationChannelServiceClient { 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.listNotificationChannelDescriptors( request, @@ -1423,11 +1422,10 @@ export class NotificationChannelServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listNotificationChannelDescriptors.createStream( @@ -1485,17 +1483,16 @@ export class NotificationChannelServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listNotificationChannelDescriptors.asyncIterate( this.innerApiCalls['listNotificationChannelDescriptors'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1616,11 +1613,10 @@ export class NotificationChannelServiceClient { 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.listNotificationChannels( request, @@ -1685,11 +1681,10 @@ export class NotificationChannelServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listNotificationChannels.createStream( @@ -1761,17 +1756,16 @@ export class NotificationChannelServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listNotificationChannels.asyncIterate( this.innerApiCalls['listNotificationChannels'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/src/v3/query_service_client.ts b/packages/google-cloud-monitoring/src/v3/query_service_client.ts index 8260474a0ec..38492e3d2bf 100644 --- a/packages/google-cloud-monitoring/src/v3/query_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/query_service_client.ts @@ -186,36 +186,42 @@ export class QueryServiceClient { folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/alertPolicies/{alert_policy}' ), @@ -234,9 +240,10 @@ export class QueryServiceClient { projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -301,13 +308,14 @@ export class QueryServiceClient { const queryServiceStubMethods = ['queryTimeSeries']; for (const methodName of queryServiceStubMethods) { const callPromise = this.queryServiceStub.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; } @@ -477,11 +485,10 @@ export class QueryServiceClient { 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.queryTimeSeries(request, options, callback); } @@ -524,11 +531,10 @@ export class QueryServiceClient { 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 || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.queryTimeSeries.createStream( @@ -582,17 +588,16 @@ export class QueryServiceClient { 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 || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.queryTimeSeries.asyncIterate( this.innerApiCalls['queryTimeSeries'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts index d7a4f852245..b6157a78676 100644 --- a/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/service_monitoring_service_client.ts @@ -188,36 +188,42 @@ export class ServiceMonitoringServiceClient { folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -239,9 +245,10 @@ export class ServiceMonitoringServiceClient { projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -322,13 +329,14 @@ export class ServiceMonitoringServiceClient { ]; for (const methodName of serviceMonitoringServiceStubMethods) { const callPromise = this.serviceMonitoringServiceStub.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; } @@ -487,11 +495,10 @@ export class ServiceMonitoringServiceClient { 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.createService(request, options, callback); } @@ -573,11 +580,10 @@ export class ServiceMonitoringServiceClient { 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.getService(request, options, callback); } @@ -660,11 +666,10 @@ export class ServiceMonitoringServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'service.name': request.service!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'service.name': request.service!.name || '', + }); this.initialize(); return this.innerApiCalls.updateService(request, options, callback); } @@ -746,11 +751,10 @@ export class ServiceMonitoringServiceClient { 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.deleteService(request, options, callback); } @@ -854,11 +858,10 @@ export class ServiceMonitoringServiceClient { 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.createServiceLevelObjective( request, @@ -957,11 +960,10 @@ export class ServiceMonitoringServiceClient { 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.getServiceLevelObjective( request, @@ -1062,11 +1064,11 @@ export class ServiceMonitoringServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'service_level_objective.name': request.serviceLevelObjective!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'service_level_objective.name': + request.serviceLevelObjective!.name || '', + }); this.initialize(); return this.innerApiCalls.updateServiceLevelObjective( request, @@ -1166,11 +1168,10 @@ export class ServiceMonitoringServiceClient { 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.deleteServiceLevelObjective( request, @@ -1289,11 +1290,10 @@ export class ServiceMonitoringServiceClient { 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.listServices(request, options, callback); } @@ -1355,11 +1355,10 @@ export class ServiceMonitoringServiceClient { 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.listServices.createStream( @@ -1432,17 +1431,16 @@ export class ServiceMonitoringServiceClient { 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.listServices.asyncIterate( this.innerApiCalls['listServices'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1551,11 +1549,10 @@ export class ServiceMonitoringServiceClient { 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.listServiceLevelObjectives( request, @@ -1608,11 +1605,10 @@ export class ServiceMonitoringServiceClient { 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.listServiceLevelObjectives.createStream( @@ -1672,17 +1668,16 @@ export class ServiceMonitoringServiceClient { 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.listServiceLevelObjectives.asyncIterate( this.innerApiCalls['listServiceLevelObjectives'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts index 418c51f80ba..7a5d6ce8318 100644 --- a/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts +++ b/packages/google-cloud-monitoring/src/v3/uptime_check_service_client.ts @@ -191,36 +191,42 @@ export class UptimeCheckServiceClient { folderServicePathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/services/{service}' ), - folderServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + folderServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), folderUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}' ), organizationAlertPolicyPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/alertPolicies/{alert_policy}' ), - organizationAlertPolicyConditionPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' - ), - organizationChannelDescriptorPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' - ), + organizationAlertPolicyConditionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}' + ), + organizationChannelDescriptorPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}' + ), organizationGroupPathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/groups/{group}' ), - organizationNotificationChannelPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/notificationChannels/{notification_channel}' - ), + organizationNotificationChannelPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/notificationChannels/{notification_channel}' + ), organizationServicePathTemplate: new this._gaxModule.PathTemplate( 'organizations/{organization}/services/{service}' ), - organizationServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), - organizationUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' - ), + organizationServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), + organizationUptimeCheckConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -242,9 +248,10 @@ export class UptimeCheckServiceClient { projectServicePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/services/{service}' ), - projectServiceServiceLevelObjectivePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' - ), + projectServiceServiceLevelObjectivePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}' + ), projectUptimeCheckConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}' ), @@ -321,13 +328,14 @@ export class UptimeCheckServiceClient { ]; for (const methodName of uptimeCheckServiceStubMethods) { const callPromise = this.uptimeCheckServiceStub.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; } @@ -489,11 +497,10 @@ export class UptimeCheckServiceClient { 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.getUptimeCheckConfig(request, options, callback); } @@ -585,11 +592,10 @@ export class UptimeCheckServiceClient { 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.createUptimeCheckConfig( request, @@ -699,11 +705,10 @@ export class UptimeCheckServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'uptime_check_config.name': request.uptimeCheckConfig!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'uptime_check_config.name': request.uptimeCheckConfig!.name || '', + }); this.initialize(); return this.innerApiCalls.updateUptimeCheckConfig( request, @@ -799,11 +804,10 @@ export class UptimeCheckServiceClient { 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.deleteUptimeCheckConfig( request, @@ -911,11 +915,10 @@ export class UptimeCheckServiceClient { 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.listUptimeCheckConfigs( request, @@ -961,11 +964,10 @@ export class UptimeCheckServiceClient { 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.listUptimeCheckConfigs.createStream( @@ -1018,17 +1020,16 @@ export class UptimeCheckServiceClient { 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.listUptimeCheckConfigs.asyncIterate( this.innerApiCalls['listUptimeCheckConfigs'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -1216,7 +1217,7 @@ export class UptimeCheckServiceClient { this.initialize(); return this.descriptors.page.listUptimeCheckIps.asyncIterate( this.innerApiCalls['listUptimeCheckIps'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js index 989fd17d844..49be45ef93a 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.js @@ -23,9 +23,11 @@ function main() { const alertPolicyServiceClient = new monitoring.AlertPolicyServiceClient(); const groupServiceClient = new monitoring.GroupServiceClient(); const metricServiceClient = new monitoring.MetricServiceClient(); - const notificationChannelServiceClient = new monitoring.NotificationChannelServiceClient(); + const notificationChannelServiceClient = + new monitoring.NotificationChannelServiceClient(); const queryServiceClient = new monitoring.QueryServiceClient(); - const serviceMonitoringServiceClient = new monitoring.ServiceMonitoringServiceClient(); + const serviceMonitoringServiceClient = + new monitoring.ServiceMonitoringServiceClient(); const uptimeCheckServiceClient = new monitoring.UptimeCheckServiceClient(); } diff --git a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts index c4ee0535da7..3c852d99a4a 100644 --- a/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-monitoring/system-test/fixtures/sample/src/index.ts @@ -64,7 +64,8 @@ function main() { const metricServiceClient = new MetricServiceClient(); doStuffWithMetricServiceClient(metricServiceClient); // check that the client instance can be created - const notificationChannelServiceClient = new NotificationChannelServiceClient(); + const notificationChannelServiceClient = + new NotificationChannelServiceClient(); doStuffWithNotificationChannelServiceClient(notificationChannelServiceClient); // check that the client instance can be created const queryServiceClient = new QueryServiceClient(); diff --git a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts index 4a47b723950..8002a011759 100644 --- a/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_alert_policy_service_v3.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('v3.AlertPolicyServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.AlertPolicy() ); - client.innerApiCalls.getAlertPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getAlertPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getAlertPolicy( request, @@ -361,9 +359,8 @@ describe('v3.AlertPolicyServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.AlertPolicy() ); - client.innerApiCalls.createAlertPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createAlertPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createAlertPolicy( request, @@ -473,9 +470,8 @@ describe('v3.AlertPolicyServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteAlertPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteAlertPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteAlertPolicy( request, @@ -587,9 +583,8 @@ describe('v3.AlertPolicyServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.AlertPolicy() ); - client.innerApiCalls.updateAlertPolicy = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateAlertPolicy = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateAlertPolicy( request, @@ -704,9 +699,8 @@ describe('v3.AlertPolicyServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), ]; - client.innerApiCalls.listAlertPolicies = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listAlertPolicies = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listAlertPolicies( request, @@ -778,9 +772,8 @@ describe('v3.AlertPolicyServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), ]; - client.descriptors.page.listAlertPolicies.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listAlertPolicies.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listAlertPoliciesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.AlertPolicy[] = []; @@ -805,10 +798,9 @@ describe('v3.AlertPolicyServiceClient', () => { .calledWith(client.innerApiCalls.listAlertPolicies, request) ); assert.strictEqual( - (client.descriptors.page.listAlertPolicies - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listAlertPolicies.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -825,10 +817,8 @@ describe('v3.AlertPolicyServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listAlertPolicies.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listAlertPolicies.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listAlertPoliciesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.AlertPolicy[] = []; @@ -852,10 +842,9 @@ describe('v3.AlertPolicyServiceClient', () => { .calledWith(client.innerApiCalls.listAlertPolicies, request) ); assert.strictEqual( - (client.descriptors.page.listAlertPolicies - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listAlertPolicies.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -876,9 +865,8 @@ describe('v3.AlertPolicyServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), generateSampleMessage(new protos.google.monitoring.v3.AlertPolicy()), ]; - client.descriptors.page.listAlertPolicies.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listAlertPolicies.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.IAlertPolicy[] = []; const iterable = client.listAlertPoliciesAsync(request); for await (const resource of iterable) { @@ -886,15 +874,15 @@ describe('v3.AlertPolicyServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listAlertPolicies - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listAlertPolicies.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listAlertPolicies - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listAlertPolicies.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -911,10 +899,8 @@ describe('v3.AlertPolicyServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listAlertPolicies.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listAlertPolicies.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listAlertPoliciesAsync(request); await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IAlertPolicy[] = []; @@ -923,15 +909,15 @@ describe('v3.AlertPolicyServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listAlertPolicies - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listAlertPolicies.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listAlertPolicies - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listAlertPolicies.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -963,8 +949,10 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -974,21 +962,24 @@ describe('v3.AlertPolicyServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1022,47 +1013,52 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1094,34 +1090,40 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1202,34 +1204,40 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1297,12 +1305,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -1312,47 +1318,58 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1384,34 +1401,40 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1443,34 +1466,38 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1489,12 +1516,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -1504,47 +1529,58 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1562,12 +1598,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -1576,34 +1610,42 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1635,21 +1677,24 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1659,8 +1704,10 @@ describe('v3.AlertPolicyServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1678,12 +1725,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -1692,34 +1737,42 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1751,21 +1804,24 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1775,8 +1831,10 @@ describe('v3.AlertPolicyServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1796,12 +1854,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -1811,51 +1867,62 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1873,12 +1940,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -1887,34 +1952,42 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1984,8 +2057,10 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1995,21 +2070,24 @@ describe('v3.AlertPolicyServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2028,9 +2106,8 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -2043,47 +2120,52 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2115,34 +2197,40 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2223,34 +2311,40 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2321,12 +2415,10 @@ describe('v3.AlertPolicyServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -2336,47 +2428,58 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2408,34 +2511,40 @@ describe('v3.AlertPolicyServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts index 5a984f6c0a8..6ca1907f044 100644 --- a/packages/google-cloud-monitoring/test/gapic_group_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_group_service_v3.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; @@ -247,9 +246,8 @@ describe('v3.GroupServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.Group() ); - client.innerApiCalls.getGroup = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getGroup = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getGroup( request, @@ -356,9 +354,8 @@ describe('v3.GroupServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.Group() ); - client.innerApiCalls.createGroup = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createGroup = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createGroup( request, @@ -470,9 +467,8 @@ describe('v3.GroupServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.Group() ); - client.innerApiCalls.updateGroup = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateGroup = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateGroup( request, @@ -583,9 +579,8 @@ describe('v3.GroupServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteGroup = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteGroup = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteGroup( request, @@ -699,9 +694,8 @@ describe('v3.GroupServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.Group()), generateSampleMessage(new protos.google.monitoring.v3.Group()), ]; - client.innerApiCalls.listGroups = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listGroups = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listGroups( request, @@ -773,9 +767,8 @@ describe('v3.GroupServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.Group()), generateSampleMessage(new protos.google.monitoring.v3.Group()), ]; - client.descriptors.page.listGroups.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listGroups.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listGroupsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.Group[] = []; @@ -863,9 +856,8 @@ describe('v3.GroupServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.Group()), generateSampleMessage(new protos.google.monitoring.v3.Group()), ]; - client.descriptors.page.listGroups.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listGroups.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.IGroup[] = []; const iterable = client.listGroupsAsync(request); for await (const resource of iterable) { @@ -981,9 +973,8 @@ describe('v3.GroupServiceClient', () => { generateSampleMessage(new protos.google.api.MonitoredResource()), generateSampleMessage(new protos.google.api.MonitoredResource()), ]; - client.innerApiCalls.listGroupMembers = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listGroupMembers = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listGroupMembers( request, @@ -1055,9 +1046,8 @@ describe('v3.GroupServiceClient', () => { generateSampleMessage(new protos.google.api.MonitoredResource()), generateSampleMessage(new protos.google.api.MonitoredResource()), ]; - client.descriptors.page.listGroupMembers.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listGroupMembers.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listGroupMembersStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.MonitoredResource[] = []; @@ -1079,10 +1069,9 @@ describe('v3.GroupServiceClient', () => { .calledWith(client.innerApiCalls.listGroupMembers, request) ); assert.strictEqual( - (client.descriptors.page.listGroupMembers - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listGroupMembers.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1099,10 +1088,8 @@ describe('v3.GroupServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listGroupMembers.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listGroupMembers.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listGroupMembersStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.MonitoredResource[] = []; @@ -1123,10 +1110,9 @@ describe('v3.GroupServiceClient', () => { .calledWith(client.innerApiCalls.listGroupMembers, request) ); assert.strictEqual( - (client.descriptors.page.listGroupMembers - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listGroupMembers.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1147,9 +1133,8 @@ describe('v3.GroupServiceClient', () => { generateSampleMessage(new protos.google.api.MonitoredResource()), generateSampleMessage(new protos.google.api.MonitoredResource()), ]; - client.descriptors.page.listGroupMembers.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listGroupMembers.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.api.IMonitoredResource[] = []; const iterable = client.listGroupMembersAsync(request); for await (const resource of iterable) { @@ -1157,15 +1142,15 @@ describe('v3.GroupServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listGroupMembers - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listGroupMembers.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listGroupMembers - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listGroupMembers.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1182,10 +1167,8 @@ describe('v3.GroupServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listGroupMembers.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listGroupMembers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listGroupMembersAsync(request); await assert.rejects(async () => { const responses: protos.google.api.IMonitoredResource[] = []; @@ -1194,15 +1177,15 @@ describe('v3.GroupServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listGroupMembers - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listGroupMembers.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listGroupMembers - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listGroupMembers.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1234,8 +1217,10 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1245,21 +1230,24 @@ describe('v3.GroupServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1293,47 +1281,52 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1365,34 +1358,40 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1473,34 +1472,40 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1568,12 +1573,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -1583,47 +1586,58 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1655,34 +1669,40 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1714,34 +1734,38 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1760,12 +1784,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -1775,47 +1797,58 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1833,12 +1866,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -1847,34 +1878,42 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1906,21 +1945,24 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1930,8 +1972,10 @@ describe('v3.GroupServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1949,12 +1993,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -1963,34 +2005,42 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2022,21 +2072,24 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2046,8 +2099,10 @@ describe('v3.GroupServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2067,12 +2122,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -2082,51 +2135,62 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2144,12 +2208,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -2158,34 +2220,42 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2255,8 +2325,10 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2266,21 +2338,24 @@ describe('v3.GroupServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2299,9 +2374,8 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -2314,47 +2388,52 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2386,34 +2465,40 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2494,34 +2579,40 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2592,12 +2683,10 @@ describe('v3.GroupServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -2607,47 +2696,58 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2679,34 +2779,40 @@ describe('v3.GroupServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts index f4c7a852563..8b4684de354 100644 --- a/packages/google-cloud-monitoring/test/gapic_metric_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_metric_service_v3.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; @@ -216,9 +215,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.MonitoredResourceDescriptor() ); - client.innerApiCalls.getMonitoredResourceDescriptor = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getMonitoredResourceDescriptor = + stubSimpleCall(expectedResponse); const [response] = await client.getMonitoredResourceDescriptor(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -249,9 +247,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.MonitoredResourceDescriptor() ); - client.innerApiCalls.getMonitoredResourceDescriptor = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getMonitoredResourceDescriptor = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getMonitoredResourceDescriptor( request, @@ -333,9 +330,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.MetricDescriptor() ); - client.innerApiCalls.getMetricDescriptor = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getMetricDescriptor = + stubSimpleCall(expectedResponse); const [response] = await client.getMetricDescriptor(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -366,9 +362,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.MetricDescriptor() ); - client.innerApiCalls.getMetricDescriptor = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getMetricDescriptor = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getMetricDescriptor( request, @@ -447,9 +442,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.MetricDescriptor() ); - client.innerApiCalls.createMetricDescriptor = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createMetricDescriptor = + stubSimpleCall(expectedResponse); const [response] = await client.createMetricDescriptor(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -480,9 +474,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.api.MetricDescriptor() ); - client.innerApiCalls.createMetricDescriptor = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createMetricDescriptor = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createMetricDescriptor( request, @@ -564,9 +557,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteMetricDescriptor = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deleteMetricDescriptor = + stubSimpleCall(expectedResponse); const [response] = await client.deleteMetricDescriptor(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -597,9 +589,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteMetricDescriptor = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteMetricDescriptor = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteMetricDescriptor( request, @@ -712,9 +703,8 @@ describe('v3.MetricServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.createTimeSeries = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createTimeSeries = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createTimeSeries( request, @@ -801,9 +791,8 @@ describe('v3.MetricServiceClient', () => { 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( @@ -842,9 +831,8 @@ describe('v3.MetricServiceClient', () => { new protos.google.api.MonitoredResourceDescriptor() ), ]; - client.innerApiCalls.listMonitoredResourceDescriptors = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listMonitoredResourceDescriptors = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listMonitoredResourceDescriptors( request, @@ -925,9 +913,8 @@ describe('v3.MetricServiceClient', () => { 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[] = []; @@ -947,8 +934,10 @@ describe('v3.MetricServiceClient', () => { 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, @@ -956,10 +945,10 @@ describe('v3.MetricServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listMonitoredResourceDescriptors - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -976,10 +965,8 @@ describe('v3.MetricServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; 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[] = []; @@ -998,8 +985,10 @@ describe('v3.MetricServiceClient', () => { }); 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, @@ -1007,10 +996,10 @@ describe('v3.MetricServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listMonitoredResourceDescriptors - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMonitoredResourceDescriptors + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1037,9 +1026,8 @@ describe('v3.MetricServiceClient', () => { 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) { @@ -1047,15 +1035,17 @@ describe('v3.MetricServiceClient', () => { } 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 ); assert.strictEqual( - (client.descriptors.page.listMonitoredResourceDescriptors - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1072,10 +1062,8 @@ describe('v3.MetricServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; 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[] = []; @@ -1084,15 +1072,17 @@ describe('v3.MetricServiceClient', () => { } }); 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 ); assert.strictEqual( - (client.descriptors.page.listMonitoredResourceDescriptors - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMonitoredResourceDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1122,9 +1112,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.api.MetricDescriptor()), generateSampleMessage(new protos.google.api.MetricDescriptor()), ]; - client.innerApiCalls.listMetricDescriptors = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listMetricDescriptors = + stubSimpleCall(expectedResponse); const [response] = await client.listMetricDescriptors(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1157,9 +1146,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.api.MetricDescriptor()), generateSampleMessage(new protos.google.api.MetricDescriptor()), ]; - client.innerApiCalls.listMetricDescriptors = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listMetricDescriptors = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listMetricDescriptors( request, @@ -1234,9 +1222,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.api.MetricDescriptor()), generateSampleMessage(new protos.google.api.MetricDescriptor()), ]; - client.descriptors.page.listMetricDescriptors.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listMetricDescriptors.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listMetricDescriptorsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.MetricDescriptor[] = []; @@ -1253,16 +1240,18 @@ describe('v3.MetricServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listMetricDescriptors - .createStream as SinonStub) + ( + client.descriptors.page.listMetricDescriptors + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listMetricDescriptors, request) ); assert.strictEqual( - (client.descriptors.page.listMetricDescriptors - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMetricDescriptors + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1279,10 +1268,8 @@ describe('v3.MetricServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listMetricDescriptors.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listMetricDescriptors.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listMetricDescriptorsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.api.MetricDescriptor[] = []; @@ -1298,16 +1285,18 @@ describe('v3.MetricServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listMetricDescriptors - .createStream as SinonStub) + ( + client.descriptors.page.listMetricDescriptors + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listMetricDescriptors, request) ); assert.strictEqual( - (client.descriptors.page.listMetricDescriptors - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMetricDescriptors + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1328,9 +1317,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.api.MetricDescriptor()), generateSampleMessage(new protos.google.api.MetricDescriptor()), ]; - client.descriptors.page.listMetricDescriptors.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listMetricDescriptors.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.api.IMetricDescriptor[] = []; const iterable = client.listMetricDescriptorsAsync(request); for await (const resource of iterable) { @@ -1338,15 +1326,17 @@ describe('v3.MetricServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listMetricDescriptors - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listMetricDescriptors - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1363,10 +1353,8 @@ describe('v3.MetricServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listMetricDescriptors.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listMetricDescriptors.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listMetricDescriptorsAsync(request); await assert.rejects(async () => { const responses: protos.google.api.IMetricDescriptor[] = []; @@ -1375,15 +1363,17 @@ describe('v3.MetricServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listMetricDescriptors - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listMetricDescriptors - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listMetricDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1446,9 +1436,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), ]; - client.innerApiCalls.listTimeSeries = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listTimeSeries = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listTimeSeries( request, @@ -1520,9 +1509,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), ]; - client.descriptors.page.listTimeSeries.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listTimeSeries.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listTimeSeriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.TimeSeries[] = []; @@ -1547,10 +1535,9 @@ describe('v3.MetricServiceClient', () => { .calledWith(client.innerApiCalls.listTimeSeries, request) ); assert.strictEqual( - (client.descriptors.page.listTimeSeries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listTimeSeries.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1567,10 +1554,8 @@ describe('v3.MetricServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listTimeSeries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listTimeSeries.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listTimeSeriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.TimeSeries[] = []; @@ -1594,10 +1579,9 @@ describe('v3.MetricServiceClient', () => { .calledWith(client.innerApiCalls.listTimeSeries, request) ); assert.strictEqual( - (client.descriptors.page.listTimeSeries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listTimeSeries.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1618,9 +1602,8 @@ describe('v3.MetricServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), generateSampleMessage(new protos.google.monitoring.v3.TimeSeries()), ]; - client.descriptors.page.listTimeSeries.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listTimeSeries.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.ITimeSeries[] = []; const iterable = client.listTimeSeriesAsync(request); for await (const resource of iterable) { @@ -1628,15 +1611,15 @@ describe('v3.MetricServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listTimeSeries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listTimeSeries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1653,10 +1636,8 @@ describe('v3.MetricServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listTimeSeries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listTimeSeries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listTimeSeriesAsync(request); await assert.rejects(async () => { const responses: protos.google.monitoring.v3.ITimeSeries[] = []; @@ -1665,15 +1646,15 @@ describe('v3.MetricServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listTimeSeries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listTimeSeries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1705,8 +1686,10 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1716,21 +1699,24 @@ describe('v3.MetricServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1764,47 +1750,52 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1836,34 +1827,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1944,34 +1941,38 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderMetricDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderMetricDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderMetricDescriptorName', () => { - const result = client.matchFolderFromFolderMetricDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderMetricDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderMetricDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderMetricDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchMetricDescriptorFromFolderMetricDescriptorName', () => { - const result = client.matchMetricDescriptorFromFolderMetricDescriptorName( - fakePath - ); + const result = + client.matchMetricDescriptorFromFolderMetricDescriptorName(fakePath); assert.strictEqual(result, 'metricDescriptorValue'); assert( - (client.pathTemplates.folderMetricDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderMetricDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1989,12 +1990,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderMonitoredResourceDescriptorPath', () => { const result = client.folderMonitoredResourceDescriptorPath( @@ -2003,34 +2002,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderMonitoredResourceDescriptorName', () => { - const result = client.matchFolderFromFolderMonitoredResourceDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderMonitoredResourceDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName', () => { - const result = client.matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName( - fakePath - ); + const result = + client.matchMonitoredResourceDescriptorFromFolderMonitoredResourceDescriptorName( + fakePath + ); assert.strictEqual(result, 'monitoredResourceDescriptorValue'); assert( - (client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderMonitoredResourceDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2062,34 +2067,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2157,12 +2168,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -2172,47 +2181,58 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2244,34 +2264,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2303,34 +2329,38 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2349,12 +2379,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -2364,47 +2392,58 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2422,12 +2461,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -2436,34 +2473,42 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2495,21 +2540,24 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2519,8 +2567,10 @@ describe('v3.MetricServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2538,12 +2588,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationMetricDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationMetricDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationMetricDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationMetricDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationMetricDescriptorPath', () => { const result = client.organizationMetricDescriptorPath( @@ -2552,34 +2600,42 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationMetricDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationMetricDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationMetricDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationMetricDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationMetricDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationMetricDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationMetricDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchMetricDescriptorFromOrganizationMetricDescriptorName', () => { - const result = client.matchMetricDescriptorFromOrganizationMetricDescriptorName( - fakePath - ); + const result = + client.matchMetricDescriptorFromOrganizationMetricDescriptorName( + fakePath + ); assert.strictEqual(result, 'metricDescriptorValue'); assert( - (client.pathTemplates.organizationMetricDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationMetricDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2597,12 +2653,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationMonitoredResourceDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationMonitoredResourceDescriptorPath', () => { const result = client.organizationMonitoredResourceDescriptorPath( @@ -2611,37 +2665,45 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationMonitoredResourceDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationMonitoredResourceDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationMonitoredResourceDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationMonitoredResourceDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationMonitoredResourceDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationMonitoredResourceDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationMonitoredResourceDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName', () => { - const result = client.matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName( - fakePath - ); + const result = + client.matchMonitoredResourceDescriptorFromOrganizationMonitoredResourceDescriptorName( + fakePath + ); assert.strictEqual(result, 'monitoredResourceDescriptorValue'); assert( - (client.pathTemplates - .organizationMonitoredResourceDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationMonitoredResourceDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2659,12 +2721,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -2673,34 +2733,42 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2732,21 +2800,24 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2756,8 +2827,10 @@ describe('v3.MetricServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2777,12 +2850,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -2792,51 +2863,62 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2854,12 +2936,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -2868,34 +2948,42 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2965,8 +3053,10 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2976,21 +3066,24 @@ describe('v3.MetricServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3009,9 +3102,8 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -3024,47 +3116,52 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3096,34 +3193,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3204,34 +3307,38 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectMetricDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectMetricDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectMetricDescriptorName', () => { - const result = client.matchProjectFromProjectMetricDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectMetricDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectMetricDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectMetricDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchMetricDescriptorFromProjectMetricDescriptorName', () => { - const result = client.matchMetricDescriptorFromProjectMetricDescriptorName( - fakePath - ); + const result = + client.matchMetricDescriptorFromProjectMetricDescriptorName(fakePath); assert.strictEqual(result, 'metricDescriptorValue'); assert( - (client.pathTemplates.projectMetricDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectMetricDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3249,12 +3356,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectMonitoredResourceDescriptorPath', () => { const result = client.projectMonitoredResourceDescriptorPath( @@ -3263,34 +3368,42 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectMonitoredResourceDescriptorName', () => { - const result = client.matchProjectFromProjectMonitoredResourceDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectMonitoredResourceDescriptorName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName', () => { - const result = client.matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName( - fakePath - ); + const result = + client.matchMonitoredResourceDescriptorFromProjectMonitoredResourceDescriptorName( + fakePath + ); assert.strictEqual(result, 'monitoredResourceDescriptorValue'); assert( - (client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectMonitoredResourceDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3322,34 +3435,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3420,12 +3539,10 @@ describe('v3.MetricServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -3435,47 +3552,58 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3507,8 +3635,10 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectTimeSeriesPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectTimeSeriesPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -3518,21 +3648,24 @@ describe('v3.MetricServiceClient', () => { const result = client.matchProjectFromProjectTimeSeriesName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectTimeSeriesPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectTimeSeriesPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchTimeSeriesFromProjectTimeSeriesName', () => { - const result = client.matchTimeSeriesFromProjectTimeSeriesName( - fakePath - ); + const result = + client.matchTimeSeriesFromProjectTimeSeriesName(fakePath); assert.strictEqual(result, 'timeSeriesValue'); assert( - (client.pathTemplates.projectTimeSeriesPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectTimeSeriesPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3564,34 +3697,40 @@ describe('v3.MetricServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts index d839aa0044c..6a8e7f73d41 100644 --- a/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_notification_channel_service_v3.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; @@ -136,49 +135,46 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('should create a client with no option', () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient(); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient({ fallback: true, - } - ); + }); assert(client); }); it('has initialize method and supports deferred initialization', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); assert.strictEqual(client.notificationChannelServiceStub, undefined); await client.initialize(); assert(client.notificationChannelServiceStub); }); it('has close method', () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.close(); }); it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient({ 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); @@ -187,12 +183,11 @@ describe('v3.NotificationChannelServiceClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.auth.getProjectId = sinon .stub() .callsArgWith(0, null, fakeProjectId); @@ -211,12 +206,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('getNotificationChannelDescriptor', () => { it('invokes getNotificationChannelDescriptor without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelDescriptorRequest() @@ -233,9 +229,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannelDescriptor() ); - client.innerApiCalls.getNotificationChannelDescriptor = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getNotificationChannelDescriptor = + stubSimpleCall(expectedResponse); const [response] = await client.getNotificationChannelDescriptor(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -246,12 +241,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannelDescriptor without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelDescriptorRequest() @@ -268,9 +264,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannelDescriptor() ); - client.innerApiCalls.getNotificationChannelDescriptor = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getNotificationChannelDescriptor = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getNotificationChannelDescriptor( request, @@ -296,12 +291,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannelDescriptor with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelDescriptorRequest() @@ -334,12 +330,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('getNotificationChannel', () => { it('invokes getNotificationChannel without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelRequest() @@ -356,9 +353,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.getNotificationChannel = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getNotificationChannel = + stubSimpleCall(expectedResponse); const [response] = await client.getNotificationChannel(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -369,12 +365,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannel without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelRequest() @@ -391,9 +388,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.getNotificationChannel = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getNotificationChannel = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getNotificationChannel( request, @@ -419,12 +415,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes getNotificationChannel with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelRequest() @@ -457,12 +454,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('createNotificationChannel', () => { it('invokes createNotificationChannel without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateNotificationChannelRequest() @@ -479,9 +477,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.createNotificationChannel = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createNotificationChannel = + stubSimpleCall(expectedResponse); const [response] = await client.createNotificationChannel(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -492,12 +489,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes createNotificationChannel without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateNotificationChannelRequest() @@ -514,9 +512,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.createNotificationChannel = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createNotificationChannel = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createNotificationChannel( request, @@ -542,12 +539,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes createNotificationChannel with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateNotificationChannelRequest() @@ -580,12 +578,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('updateNotificationChannel', () => { it('invokes updateNotificationChannel without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateNotificationChannelRequest() @@ -603,9 +602,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.updateNotificationChannel = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.updateNotificationChannel = + stubSimpleCall(expectedResponse); const [response] = await client.updateNotificationChannel(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -616,12 +614,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes updateNotificationChannel without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateNotificationChannelRequest() @@ -639,9 +638,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.updateNotificationChannel = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateNotificationChannel = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateNotificationChannel( request, @@ -667,12 +665,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes updateNotificationChannel with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateNotificationChannelRequest() @@ -706,12 +705,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('deleteNotificationChannel', () => { it('invokes deleteNotificationChannel without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteNotificationChannelRequest() @@ -728,9 +728,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteNotificationChannel = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deleteNotificationChannel = + stubSimpleCall(expectedResponse); const [response] = await client.deleteNotificationChannel(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -741,12 +740,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes deleteNotificationChannel without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteNotificationChannelRequest() @@ -763,9 +763,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteNotificationChannel = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteNotificationChannel = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteNotificationChannel( request, @@ -791,12 +790,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes deleteNotificationChannel with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteNotificationChannelRequest() @@ -829,12 +829,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('sendNotificationChannelVerificationCode', () => { it('invokes sendNotificationChannelVerificationCode without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest() @@ -851,28 +852,30 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.sendNotificationChannelVerificationCode = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.sendNotificationChannelVerificationCode = + stubSimpleCall(expectedResponse); const [response] = await client.sendNotificationChannelVerificationCode( request ); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls - .sendNotificationChannelVerificationCode as SinonStub) + ( + client.innerApiCalls + .sendNotificationChannelVerificationCode as SinonStub + ) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); it('invokes sendNotificationChannelVerificationCode without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest() @@ -889,9 +892,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.sendNotificationChannelVerificationCode = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.sendNotificationChannelVerificationCode = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.sendNotificationChannelVerificationCode( request, @@ -910,20 +912,23 @@ describe('v3.NotificationChannelServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls - .sendNotificationChannelVerificationCode as SinonStub) + ( + client.innerApiCalls + .sendNotificationChannelVerificationCode as SinonStub + ) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); it('invokes sendNotificationChannelVerificationCode with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest() @@ -938,17 +943,17 @@ describe('v3.NotificationChannelServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.sendNotificationChannelVerificationCode = stubSimpleCall( - undefined, - expectedError - ); + client.innerApiCalls.sendNotificationChannelVerificationCode = + stubSimpleCall(undefined, expectedError); await assert.rejects( client.sendNotificationChannelVerificationCode(request), expectedError ); assert( - (client.innerApiCalls - .sendNotificationChannelVerificationCode as SinonStub) + ( + client.innerApiCalls + .sendNotificationChannelVerificationCode as SinonStub + ) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -957,12 +962,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('getNotificationChannelVerificationCode', () => { it('invokes getNotificationChannelVerificationCode without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest() @@ -979,28 +985,30 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse() ); - client.innerApiCalls.getNotificationChannelVerificationCode = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getNotificationChannelVerificationCode = + stubSimpleCall(expectedResponse); const [response] = await client.getNotificationChannelVerificationCode( request ); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls - .getNotificationChannelVerificationCode as SinonStub) + ( + client.innerApiCalls + .getNotificationChannelVerificationCode as SinonStub + ) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); it('invokes getNotificationChannelVerificationCode without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest() @@ -1017,9 +1025,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse() ); - client.innerApiCalls.getNotificationChannelVerificationCode = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getNotificationChannelVerificationCode = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getNotificationChannelVerificationCode( request, @@ -1038,20 +1045,23 @@ describe('v3.NotificationChannelServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls - .getNotificationChannelVerificationCode as SinonStub) + ( + client.innerApiCalls + .getNotificationChannelVerificationCode as SinonStub + ) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); it('invokes getNotificationChannelVerificationCode with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetNotificationChannelVerificationCodeRequest() @@ -1066,17 +1076,17 @@ describe('v3.NotificationChannelServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.getNotificationChannelVerificationCode = stubSimpleCall( - undefined, - expectedError - ); + client.innerApiCalls.getNotificationChannelVerificationCode = + stubSimpleCall(undefined, expectedError); await assert.rejects( client.getNotificationChannelVerificationCode(request), expectedError ); assert( - (client.innerApiCalls - .getNotificationChannelVerificationCode as SinonStub) + ( + client.innerApiCalls + .getNotificationChannelVerificationCode as SinonStub + ) .getCall(0) .calledWith(request, expectedOptions, undefined) ); @@ -1085,12 +1095,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('verifyNotificationChannel', () => { it('invokes verifyNotificationChannel without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.VerifyNotificationChannelRequest() @@ -1107,9 +1118,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.verifyNotificationChannel = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.verifyNotificationChannel = + stubSimpleCall(expectedResponse); const [response] = await client.verifyNotificationChannel(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1120,12 +1130,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes verifyNotificationChannel without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.VerifyNotificationChannelRequest() @@ -1142,9 +1153,8 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.NotificationChannel() ); - client.innerApiCalls.verifyNotificationChannel = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.verifyNotificationChannel = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.verifyNotificationChannel( request, @@ -1170,12 +1180,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes verifyNotificationChannel with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.VerifyNotificationChannelRequest() @@ -1208,12 +1219,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('listNotificationChannelDescriptors', () => { it('invokes listNotificationChannelDescriptors without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1238,9 +1250,8 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannelDescriptor() ), ]; - client.innerApiCalls.listNotificationChannelDescriptors = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listNotificationChannelDescriptors = + stubSimpleCall(expectedResponse); const [response] = await client.listNotificationChannelDescriptors( request ); @@ -1253,12 +1264,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannelDescriptors without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1283,9 +1295,8 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannelDescriptor() ), ]; - client.innerApiCalls.listNotificationChannelDescriptors = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listNotificationChannelDescriptors = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listNotificationChannelDescriptors( request, @@ -1313,12 +1324,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannelDescriptors with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1349,12 +1361,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannelDescriptorsStream without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1372,12 +1385,12 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannelDescriptor() ), ]; - client.descriptors.page.listNotificationChannelDescriptors.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listNotificationChannelDescriptors.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listNotificationChannelDescriptorsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.monitoring.v3.NotificationChannelDescriptor[] = []; + const responses: protos.google.monitoring.v3.NotificationChannelDescriptor[] = + []; stream.on( 'data', ( @@ -1396,8 +1409,10 @@ describe('v3.NotificationChannelServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listNotificationChannelDescriptors - .createStream as SinonStub) + ( + client.descriptors.page.listNotificationChannelDescriptors + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listNotificationChannelDescriptors, @@ -1405,21 +1420,22 @@ describe('v3.NotificationChannelServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listNotificationChannelDescriptors - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannelDescriptors + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listNotificationChannelDescriptorsStream with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1427,13 +1443,12 @@ describe('v3.NotificationChannelServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listNotificationChannelDescriptors.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listNotificationChannelDescriptors.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listNotificationChannelDescriptorsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.monitoring.v3.NotificationChannelDescriptor[] = []; + const responses: protos.google.monitoring.v3.NotificationChannelDescriptor[] = + []; stream.on( 'data', ( @@ -1451,8 +1466,10 @@ describe('v3.NotificationChannelServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listNotificationChannelDescriptors - .createStream as SinonStub) + ( + client.descriptors.page.listNotificationChannelDescriptors + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listNotificationChannelDescriptors, @@ -1460,21 +1477,22 @@ describe('v3.NotificationChannelServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listNotificationChannelDescriptors - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannelDescriptors + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listNotificationChannelDescriptors without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1492,36 +1510,39 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannelDescriptor() ), ]; - client.descriptors.page.listNotificationChannelDescriptors.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = []; + client.descriptors.page.listNotificationChannelDescriptors.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = + []; const iterable = client.listNotificationChannelDescriptorsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listNotificationChannelDescriptors - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listNotificationChannelDescriptors - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listNotificationChannelDescriptors with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelDescriptorsRequest() @@ -1529,27 +1550,28 @@ describe('v3.NotificationChannelServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listNotificationChannelDescriptors.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listNotificationChannelDescriptors.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listNotificationChannelDescriptorsAsync(request); await assert.rejects(async () => { - const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = []; + const responses: protos.google.monitoring.v3.INotificationChannelDescriptor[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listNotificationChannelDescriptors - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listNotificationChannelDescriptors - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannelDescriptors + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1557,12 +1579,13 @@ describe('v3.NotificationChannelServiceClient', () => { describe('listNotificationChannels', () => { it('invokes listNotificationChannels without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1587,9 +1610,8 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannel() ), ]; - client.innerApiCalls.listNotificationChannels = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listNotificationChannels = + stubSimpleCall(expectedResponse); const [response] = await client.listNotificationChannels(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1600,12 +1622,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannels without error using callback', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1630,9 +1653,8 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannel() ), ]; - client.innerApiCalls.listNotificationChannels = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listNotificationChannels = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listNotificationChannels( request, @@ -1658,12 +1680,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannels with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1694,12 +1717,13 @@ describe('v3.NotificationChannelServiceClient', () => { }); it('invokes listNotificationChannelsStream without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1717,9 +1741,8 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannel() ), ]; - client.descriptors.page.listNotificationChannels.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listNotificationChannels.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listNotificationChannelsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.NotificationChannel[] = []; @@ -1739,27 +1762,30 @@ describe('v3.NotificationChannelServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listNotificationChannels - .createStream as SinonStub) + ( + client.descriptors.page.listNotificationChannels + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listNotificationChannels, request) ); assert.strictEqual( - (client.descriptors.page.listNotificationChannels - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannels + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listNotificationChannelsStream with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1767,10 +1793,8 @@ describe('v3.NotificationChannelServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listNotificationChannels.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listNotificationChannels.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listNotificationChannelsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.NotificationChannel[] = []; @@ -1789,27 +1813,30 @@ describe('v3.NotificationChannelServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listNotificationChannels - .createStream as SinonStub) + ( + client.descriptors.page.listNotificationChannels + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listNotificationChannels, request) ); assert.strictEqual( - (client.descriptors.page.listNotificationChannels - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannels + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listNotificationChannels without error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1827,9 +1854,8 @@ describe('v3.NotificationChannelServiceClient', () => { new protos.google.monitoring.v3.NotificationChannel() ), ]; - client.descriptors.page.listNotificationChannels.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listNotificationChannels.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.INotificationChannel[] = []; const iterable = client.listNotificationChannelsAsync(request); for await (const resource of iterable) { @@ -1837,26 +1863,29 @@ describe('v3.NotificationChannelServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listNotificationChannels - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listNotificationChannels - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listNotificationChannels with error', async () => { - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListNotificationChannelsRequest() @@ -1864,27 +1893,28 @@ describe('v3.NotificationChannelServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listNotificationChannels.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listNotificationChannels.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listNotificationChannelsAsync(request); await assert.rejects(async () => { - const responses: protos.google.monitoring.v3.INotificationChannel[] = []; + const responses: protos.google.monitoring.v3.INotificationChannel[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listNotificationChannels - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listNotificationChannels - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listNotificationChannels + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1897,12 +1927,13 @@ describe('v3.NotificationChannelServiceClient', () => { folder: 'folderValue', alert_policy: 'alertPolicyValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon .stub() @@ -1918,8 +1949,10 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1929,21 +1962,24 @@ describe('v3.NotificationChannelServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1957,12 +1993,13 @@ describe('v3.NotificationChannelServiceClient', () => { alert_policy: 'alertPolicyValue', condition: 'conditionValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon .stub() @@ -1979,47 +2016,52 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2032,12 +2074,13 @@ describe('v3.NotificationChannelServiceClient', () => { folder: 'folderValue', channel_descriptor: 'channelDescriptorValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon .stub() @@ -2053,34 +2096,40 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2093,12 +2142,13 @@ describe('v3.NotificationChannelServiceClient', () => { folder: 'folderValue', group: 'groupValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderGroupPathTemplate.render = sinon .stub() @@ -2144,12 +2194,13 @@ describe('v3.NotificationChannelServiceClient', () => { folder: 'folderValue', notification_channel: 'notificationChannelValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon .stub() @@ -2165,34 +2216,40 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2205,12 +2262,13 @@ describe('v3.NotificationChannelServiceClient', () => { folder: 'folderValue', service: 'serviceValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderServicePathTemplate.render = sinon .stub() @@ -2257,19 +2315,18 @@ describe('v3.NotificationChannelServiceClient', () => { service: 'serviceValue', service_level_objective: 'serviceLevelObjectiveValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -2279,47 +2336,58 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2332,12 +2400,13 @@ describe('v3.NotificationChannelServiceClient', () => { folder: 'folderValue', uptime_check_config: 'uptimeCheckConfigValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon .stub() @@ -2353,34 +2422,40 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2393,12 +2468,13 @@ describe('v3.NotificationChannelServiceClient', () => { organization: 'organizationValue', alert_policy: 'alertPolicyValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon .stub() @@ -2414,34 +2490,38 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2455,19 +2535,18 @@ describe('v3.NotificationChannelServiceClient', () => { alert_policy: 'alertPolicyValue', condition: 'conditionValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -2477,47 +2556,58 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2530,19 +2620,18 @@ describe('v3.NotificationChannelServiceClient', () => { organization: 'organizationValue', channel_descriptor: 'channelDescriptorValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -2551,34 +2640,42 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2591,12 +2688,13 @@ describe('v3.NotificationChannelServiceClient', () => { organization: 'organizationValue', group: 'groupValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.organizationGroupPathTemplate.render = sinon .stub() @@ -2612,21 +2710,24 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2636,8 +2737,10 @@ describe('v3.NotificationChannelServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2650,19 +2753,18 @@ describe('v3.NotificationChannelServiceClient', () => { organization: 'organizationValue', notification_channel: 'notificationChannelValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -2671,34 +2773,42 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2711,12 +2821,13 @@ describe('v3.NotificationChannelServiceClient', () => { organization: 'organizationValue', service: 'serviceValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.organizationServicePathTemplate.render = sinon .stub() @@ -2732,21 +2843,24 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2756,8 +2870,10 @@ describe('v3.NotificationChannelServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2772,19 +2888,18 @@ describe('v3.NotificationChannelServiceClient', () => { service: 'serviceValue', service_level_objective: 'serviceLevelObjectiveValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -2794,51 +2909,62 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2851,19 +2977,18 @@ describe('v3.NotificationChannelServiceClient', () => { organization: 'organizationValue', uptime_check_config: 'uptimeCheckConfigValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -2872,34 +2997,42 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2911,12 +3044,13 @@ describe('v3.NotificationChannelServiceClient', () => { const expectedParameters = { project: 'projectValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() @@ -2952,12 +3086,13 @@ describe('v3.NotificationChannelServiceClient', () => { project: 'projectValue', alert_policy: 'alertPolicyValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon .stub() @@ -2973,8 +3108,10 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2984,21 +3121,24 @@ describe('v3.NotificationChannelServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3012,16 +3152,16 @@ describe('v3.NotificationChannelServiceClient', () => { alert_policy: 'alertPolicyValue', condition: 'conditionValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -3034,47 +3174,52 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3087,12 +3232,13 @@ describe('v3.NotificationChannelServiceClient', () => { project: 'projectValue', channel_descriptor: 'channelDescriptorValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon .stub() @@ -3108,34 +3254,40 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3148,12 +3300,13 @@ describe('v3.NotificationChannelServiceClient', () => { project: 'projectValue', group: 'groupValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectGroupPathTemplate.render = sinon .stub() @@ -3199,12 +3352,13 @@ describe('v3.NotificationChannelServiceClient', () => { project: 'projectValue', notification_channel: 'notificationChannelValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon .stub() @@ -3220,34 +3374,40 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3260,12 +3420,13 @@ describe('v3.NotificationChannelServiceClient', () => { project: 'projectValue', service: 'serviceValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectServicePathTemplate.render = sinon .stub() @@ -3315,19 +3476,18 @@ describe('v3.NotificationChannelServiceClient', () => { service: 'serviceValue', service_level_objective: 'serviceLevelObjectiveValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -3337,47 +3497,58 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3390,12 +3561,13 @@ describe('v3.NotificationChannelServiceClient', () => { project: 'projectValue', uptime_check_config: 'uptimeCheckConfigValue', }; - const client = new notificationchannelserviceModule.v3.NotificationChannelServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new notificationchannelserviceModule.v3.NotificationChannelServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon .stub() @@ -3411,34 +3583,40 @@ describe('v3.NotificationChannelServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/packages/google-cloud-monitoring/test/gapic_query_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_query_service_v3.ts index 311fbeb53d6..93db4341d2d 100644 --- a/packages/google-cloud-monitoring/test/gapic_query_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_query_service_v3.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; @@ -251,9 +250,8 @@ describe('v3.QueryServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), ]; - client.innerApiCalls.queryTimeSeries = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.queryTimeSeries = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.queryTimeSeries( request, @@ -325,9 +323,8 @@ describe('v3.QueryServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), ]; - client.descriptors.page.queryTimeSeries.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.queryTimeSeries.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.queryTimeSeriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.TimeSeriesData[] = []; @@ -352,10 +349,9 @@ describe('v3.QueryServiceClient', () => { .calledWith(client.innerApiCalls.queryTimeSeries, request) ); assert.strictEqual( - (client.descriptors.page.queryTimeSeries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.queryTimeSeries.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -372,10 +368,8 @@ describe('v3.QueryServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.queryTimeSeries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.queryTimeSeries.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.queryTimeSeriesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.TimeSeriesData[] = []; @@ -399,10 +393,9 @@ describe('v3.QueryServiceClient', () => { .calledWith(client.innerApiCalls.queryTimeSeries, request) ); assert.strictEqual( - (client.descriptors.page.queryTimeSeries - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.queryTimeSeries.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -423,9 +416,8 @@ describe('v3.QueryServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), generateSampleMessage(new protos.google.monitoring.v3.TimeSeriesData()), ]; - client.descriptors.page.queryTimeSeries.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.queryTimeSeries.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.ITimeSeriesData[] = []; const iterable = client.queryTimeSeriesAsync(request); for await (const resource of iterable) { @@ -433,15 +425,15 @@ describe('v3.QueryServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.queryTimeSeries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.queryTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.queryTimeSeries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.queryTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -458,10 +450,8 @@ describe('v3.QueryServiceClient', () => { request.name = ''; const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.queryTimeSeries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.queryTimeSeries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.queryTimeSeriesAsync(request); await assert.rejects(async () => { const responses: protos.google.monitoring.v3.ITimeSeriesData[] = []; @@ -470,15 +460,15 @@ describe('v3.QueryServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.queryTimeSeries - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.queryTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.queryTimeSeries - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.queryTimeSeries.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -510,8 +500,10 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -521,21 +513,24 @@ describe('v3.QueryServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -569,47 +564,52 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -641,34 +641,40 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -749,34 +755,40 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -844,12 +856,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -859,47 +869,58 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -931,34 +952,40 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -990,34 +1017,38 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1036,12 +1067,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -1051,47 +1080,58 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1109,12 +1149,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -1123,34 +1161,42 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1182,21 +1228,24 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1206,8 +1255,10 @@ describe('v3.QueryServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1225,12 +1276,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -1239,34 +1288,42 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1298,21 +1355,24 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1322,8 +1382,10 @@ describe('v3.QueryServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1343,12 +1405,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -1358,51 +1418,62 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1420,12 +1491,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -1434,34 +1503,42 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1493,8 +1570,10 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1504,21 +1583,24 @@ describe('v3.QueryServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1537,9 +1619,8 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -1552,47 +1633,52 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1624,34 +1710,40 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1732,34 +1824,40 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1830,12 +1928,10 @@ describe('v3.QueryServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -1845,47 +1941,58 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1917,34 +2024,40 @@ describe('v3.QueryServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts index 9e4c30e609a..7d99c191a16 100644 --- a/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_service_monitoring_service_v3.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; @@ -136,49 +135,46 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('should create a client with no option', () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient(); + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ fallback: true, - } - ); + }); assert(client); }); it('has initialize method and supports deferred initialization', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); assert.strictEqual(client.serviceMonitoringServiceStub, undefined); await client.initialize(); assert(client.serviceMonitoringServiceStub); }); it('has close method', () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.close(); }); it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ 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); @@ -187,12 +183,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.auth.getProjectId = sinon .stub() .callsArgWith(0, null, fakeProjectId); @@ -211,12 +206,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('createService', () => { it('invokes createService without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateServiceRequest() @@ -244,12 +238,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes createService without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateServiceRequest() @@ -266,9 +259,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.Service() ); - client.innerApiCalls.createService = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createService = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createService( request, @@ -294,12 +286,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes createService with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateServiceRequest() @@ -329,12 +320,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('getService', () => { it('invokes getService without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetServiceRequest() @@ -362,12 +352,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes getService without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetServiceRequest() @@ -384,9 +373,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.Service() ); - client.innerApiCalls.getService = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getService = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getService( request, @@ -412,12 +400,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes getService with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetServiceRequest() @@ -447,12 +434,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('updateService', () => { it('invokes updateService without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateServiceRequest() @@ -481,12 +467,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes updateService without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateServiceRequest() @@ -504,9 +489,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.Service() ); - client.innerApiCalls.updateService = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateService = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateService( request, @@ -532,12 +516,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes updateService with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateServiceRequest() @@ -568,12 +551,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('deleteService', () => { it('invokes deleteService without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteServiceRequest() @@ -601,12 +583,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes deleteService without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteServiceRequest() @@ -623,9 +604,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteService = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteService = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteService( request, @@ -651,12 +631,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes deleteService with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteServiceRequest() @@ -686,12 +665,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('createServiceLevelObjective', () => { it('invokes createServiceLevelObjective without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateServiceLevelObjectiveRequest() @@ -708,9 +686,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.ServiceLevelObjective() ); - client.innerApiCalls.createServiceLevelObjective = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createServiceLevelObjective = + stubSimpleCall(expectedResponse); const [response] = await client.createServiceLevelObjective(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -721,12 +698,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes createServiceLevelObjective without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateServiceLevelObjectiveRequest() @@ -743,9 +719,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.ServiceLevelObjective() ); - client.innerApiCalls.createServiceLevelObjective = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createServiceLevelObjective = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createServiceLevelObjective( request, @@ -771,12 +746,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes createServiceLevelObjective with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.CreateServiceLevelObjectiveRequest() @@ -809,12 +783,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('getServiceLevelObjective', () => { it('invokes getServiceLevelObjective without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetServiceLevelObjectiveRequest() @@ -831,9 +804,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.ServiceLevelObjective() ); - client.innerApiCalls.getServiceLevelObjective = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getServiceLevelObjective = + stubSimpleCall(expectedResponse); const [response] = await client.getServiceLevelObjective(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -844,12 +816,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes getServiceLevelObjective without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetServiceLevelObjectiveRequest() @@ -866,9 +837,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.ServiceLevelObjective() ); - client.innerApiCalls.getServiceLevelObjective = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getServiceLevelObjective = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getServiceLevelObjective( request, @@ -894,12 +864,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes getServiceLevelObjective with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.GetServiceLevelObjectiveRequest() @@ -932,12 +901,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('updateServiceLevelObjective', () => { it('invokes updateServiceLevelObjective without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateServiceLevelObjectiveRequest() @@ -955,9 +923,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.ServiceLevelObjective() ); - client.innerApiCalls.updateServiceLevelObjective = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.updateServiceLevelObjective = + stubSimpleCall(expectedResponse); const [response] = await client.updateServiceLevelObjective(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -968,12 +935,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes updateServiceLevelObjective without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateServiceLevelObjectiveRequest() @@ -991,9 +957,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.ServiceLevelObjective() ); - client.innerApiCalls.updateServiceLevelObjective = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateServiceLevelObjective = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateServiceLevelObjective( request, @@ -1019,12 +984,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes updateServiceLevelObjective with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.UpdateServiceLevelObjectiveRequest() @@ -1058,12 +1022,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('deleteServiceLevelObjective', () => { it('invokes deleteServiceLevelObjective without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteServiceLevelObjectiveRequest() @@ -1080,9 +1043,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteServiceLevelObjective = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deleteServiceLevelObjective = + stubSimpleCall(expectedResponse); const [response] = await client.deleteServiceLevelObjective(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1093,12 +1055,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes deleteServiceLevelObjective without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteServiceLevelObjectiveRequest() @@ -1115,9 +1076,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteServiceLevelObjective = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteServiceLevelObjective = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteServiceLevelObjective( request, @@ -1143,12 +1103,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes deleteServiceLevelObjective with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.DeleteServiceLevelObjectiveRequest() @@ -1181,12 +1140,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('listServices', () => { it('invokes listServices without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1216,12 +1174,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes listServices without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1240,9 +1197,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.Service()), generateSampleMessage(new protos.google.monitoring.v3.Service()), ]; - client.innerApiCalls.listServices = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listServices = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listServices( request, @@ -1268,12 +1224,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes listServices with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1301,12 +1256,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes listServicesStream without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1318,9 +1272,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.Service()), generateSampleMessage(new protos.google.monitoring.v3.Service()), ]; - client.descriptors.page.listServices.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listServices.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listServicesStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.Service[] = []; @@ -1342,21 +1295,19 @@ describe('v3.ServiceMonitoringServiceClient', () => { .calledWith(client.innerApiCalls.listServices, request) ); assert.strictEqual( - (client.descriptors.page.listServices - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServices.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listServicesStream with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1388,21 +1339,19 @@ describe('v3.ServiceMonitoringServiceClient', () => { .calledWith(client.innerApiCalls.listServices, request) ); assert.strictEqual( - (client.descriptors.page.listServices - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServices.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listServices without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1414,9 +1363,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.Service()), generateSampleMessage(new protos.google.monitoring.v3.Service()), ]; - client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listServices.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.IService[] = []; const iterable = client.listServicesAsync(request); for await (const resource of iterable) { @@ -1424,26 +1372,25 @@ describe('v3.ServiceMonitoringServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listServices - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServices.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServices - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServices.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listServices with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServicesRequest() @@ -1451,10 +1398,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listServices.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listServices.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listServicesAsync(request); await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IService[] = []; @@ -1463,15 +1408,15 @@ describe('v3.ServiceMonitoringServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listServices - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServices.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServices - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServices.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1479,12 +1424,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { describe('listServiceLevelObjectives', () => { it('invokes listServiceLevelObjectives without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1509,9 +1453,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { new protos.google.monitoring.v3.ServiceLevelObjective() ), ]; - client.innerApiCalls.listServiceLevelObjectives = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listServiceLevelObjectives = + stubSimpleCall(expectedResponse); const [response] = await client.listServiceLevelObjectives(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1522,12 +1465,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes listServiceLevelObjectives without error using callback', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1552,9 +1494,8 @@ describe('v3.ServiceMonitoringServiceClient', () => { new protos.google.monitoring.v3.ServiceLevelObjective() ), ]; - client.innerApiCalls.listServiceLevelObjectives = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listServiceLevelObjectives = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listServiceLevelObjectives( request, @@ -1580,12 +1521,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes listServiceLevelObjectives with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1616,12 +1556,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); it('invokes listServiceLevelObjectivesStream without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1639,12 +1578,12 @@ describe('v3.ServiceMonitoringServiceClient', () => { new protos.google.monitoring.v3.ServiceLevelObjective() ), ]; - client.descriptors.page.listServiceLevelObjectives.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listServiceLevelObjectives.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listServiceLevelObjectivesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.monitoring.v3.ServiceLevelObjective[] = []; + const responses: protos.google.monitoring.v3.ServiceLevelObjective[] = + []; stream.on( 'data', (response: protos.google.monitoring.v3.ServiceLevelObjective) => { @@ -1661,27 +1600,28 @@ describe('v3.ServiceMonitoringServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listServiceLevelObjectives - .createStream as SinonStub) + ( + client.descriptors.page.listServiceLevelObjectives + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listServiceLevelObjectives, request) ); assert.strictEqual( - (client.descriptors.page.listServiceLevelObjectives - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceLevelObjectives + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listServiceLevelObjectivesStream with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1689,13 +1629,12 @@ describe('v3.ServiceMonitoringServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listServiceLevelObjectives.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listServiceLevelObjectives.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listServiceLevelObjectivesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.monitoring.v3.ServiceLevelObjective[] = []; + const responses: protos.google.monitoring.v3.ServiceLevelObjective[] = + []; stream.on( 'data', (response: protos.google.monitoring.v3.ServiceLevelObjective) => { @@ -1711,27 +1650,28 @@ describe('v3.ServiceMonitoringServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listServiceLevelObjectives - .createStream as SinonStub) + ( + client.descriptors.page.listServiceLevelObjectives + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listServiceLevelObjectives, request) ); assert.strictEqual( - (client.descriptors.page.listServiceLevelObjectives - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceLevelObjectives + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listServiceLevelObjectives without error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1749,36 +1689,37 @@ describe('v3.ServiceMonitoringServiceClient', () => { new protos.google.monitoring.v3.ServiceLevelObjective() ), ]; - client.descriptors.page.listServiceLevelObjectives.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = []; + client.descriptors.page.listServiceLevelObjectives.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = + []; const iterable = client.listServiceLevelObjectivesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listServiceLevelObjectives - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServiceLevelObjectives - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listServiceLevelObjectives with error', async () => { - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); const request = generateSampleMessage( new protos.google.monitoring.v3.ListServiceLevelObjectivesRequest() @@ -1786,27 +1727,28 @@ describe('v3.ServiceMonitoringServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listServiceLevelObjectives.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listServiceLevelObjectives.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listServiceLevelObjectivesAsync(request); await assert.rejects(async () => { - const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = []; + const responses: protos.google.monitoring.v3.IServiceLevelObjective[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listServiceLevelObjectives - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listServiceLevelObjectives - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listServiceLevelObjectives + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1819,12 +1761,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { folder: 'folderValue', alert_policy: 'alertPolicyValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderAlertPolicyPathTemplate.render = sinon .stub() @@ -1840,8 +1781,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1851,21 +1794,24 @@ describe('v3.ServiceMonitoringServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1879,12 +1825,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { alert_policy: 'alertPolicyValue', condition: 'conditionValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderAlertPolicyConditionPathTemplate.render = sinon .stub() @@ -1901,47 +1846,52 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1954,12 +1904,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { folder: 'folderValue', channel_descriptor: 'channelDescriptorValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderChannelDescriptorPathTemplate.render = sinon .stub() @@ -1975,34 +1924,40 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2015,12 +1970,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { folder: 'folderValue', group: 'groupValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderGroupPathTemplate.render = sinon .stub() @@ -2066,12 +2020,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { folder: 'folderValue', notification_channel: 'notificationChannelValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderNotificationChannelPathTemplate.render = sinon .stub() @@ -2087,34 +2040,40 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2127,12 +2086,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { folder: 'folderValue', service: 'serviceValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderServicePathTemplate.render = sinon .stub() @@ -2179,19 +2137,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { service: 'serviceValue', service_level_objective: 'serviceLevelObjectiveValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -2201,47 +2156,58 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2254,12 +2220,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { folder: 'folderValue', uptime_check_config: 'uptimeCheckConfigValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.folderUptimeCheckConfigPathTemplate.render = sinon .stub() @@ -2275,34 +2240,40 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2315,12 +2286,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { organization: 'organizationValue', alert_policy: 'alertPolicyValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.organizationAlertPolicyPathTemplate.render = sinon .stub() @@ -2336,34 +2306,38 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2377,19 +2351,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { alert_policy: 'alertPolicyValue', condition: 'conditionValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -2399,47 +2370,58 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2452,19 +2434,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { organization: 'organizationValue', channel_descriptor: 'channelDescriptorValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -2473,34 +2452,42 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2513,12 +2500,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { organization: 'organizationValue', group: 'groupValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.organizationGroupPathTemplate.render = sinon .stub() @@ -2534,21 +2520,24 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2558,8 +2547,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2572,19 +2563,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { organization: 'organizationValue', notification_channel: 'notificationChannelValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -2593,34 +2581,42 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2633,12 +2629,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { organization: 'organizationValue', service: 'serviceValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.organizationServicePathTemplate.render = sinon .stub() @@ -2654,21 +2649,24 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2678,8 +2676,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2694,19 +2694,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { service: 'serviceValue', service_level_objective: 'serviceLevelObjectiveValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -2716,51 +2713,62 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2773,19 +2781,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { organization: 'organizationValue', uptime_check_config: 'uptimeCheckConfigValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -2794,34 +2799,42 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2833,12 +2846,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { const expectedParameters = { project: 'projectValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectPathTemplate.render = sinon .stub() @@ -2874,12 +2886,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { project: 'projectValue', alert_policy: 'alertPolicyValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectAlertPolicyPathTemplate.render = sinon .stub() @@ -2895,8 +2906,10 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2906,21 +2919,24 @@ describe('v3.ServiceMonitoringServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2934,16 +2950,14 @@ describe('v3.ServiceMonitoringServiceClient', () => { alert_policy: 'alertPolicyValue', condition: 'conditionValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -2956,47 +2970,52 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3009,12 +3028,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { project: 'projectValue', channel_descriptor: 'channelDescriptorValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectChannelDescriptorPathTemplate.render = sinon .stub() @@ -3030,34 +3048,40 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3070,12 +3094,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { project: 'projectValue', group: 'groupValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectGroupPathTemplate.render = sinon .stub() @@ -3121,12 +3144,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { project: 'projectValue', notification_channel: 'notificationChannelValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectNotificationChannelPathTemplate.render = sinon .stub() @@ -3142,34 +3164,40 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3182,12 +3210,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { project: 'projectValue', service: 'serviceValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectServicePathTemplate.render = sinon .stub() @@ -3237,19 +3264,16 @@ describe('v3.ServiceMonitoringServiceClient', () => { service: 'serviceValue', service_level_objective: 'serviceLevelObjectiveValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -3259,47 +3283,58 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3312,12 +3347,11 @@ describe('v3.ServiceMonitoringServiceClient', () => { project: 'projectValue', uptime_check_config: 'uptimeCheckConfigValue', }; - const client = new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient( - { + const client = + new servicemonitoringserviceModule.v3.ServiceMonitoringServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', - } - ); + }); client.initialize(); client.pathTemplates.projectUptimeCheckConfigPathTemplate.render = sinon .stub() @@ -3333,34 +3367,40 @@ describe('v3.ServiceMonitoringServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); diff --git a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts index a21314d22e9..3c0de536ba0 100644 --- a/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.ts +++ b/packages/google-cloud-monitoring/test/gapic_uptime_check_service_v3.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; @@ -218,9 +217,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.UptimeCheckConfig() ); - client.innerApiCalls.getUptimeCheckConfig = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getUptimeCheckConfig = + stubSimpleCall(expectedResponse); const [response] = await client.getUptimeCheckConfig(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -251,9 +249,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.UptimeCheckConfig() ); - client.innerApiCalls.getUptimeCheckConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getUptimeCheckConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getUptimeCheckConfig( request, @@ -332,9 +329,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.UptimeCheckConfig() ); - client.innerApiCalls.createUptimeCheckConfig = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createUptimeCheckConfig = + stubSimpleCall(expectedResponse); const [response] = await client.createUptimeCheckConfig(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -365,9 +361,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.UptimeCheckConfig() ); - client.innerApiCalls.createUptimeCheckConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createUptimeCheckConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createUptimeCheckConfig( request, @@ -450,9 +445,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.UptimeCheckConfig() ); - client.innerApiCalls.updateUptimeCheckConfig = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.updateUptimeCheckConfig = + stubSimpleCall(expectedResponse); const [response] = await client.updateUptimeCheckConfig(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -484,9 +478,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.monitoring.v3.UptimeCheckConfig() ); - client.innerApiCalls.updateUptimeCheckConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateUptimeCheckConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateUptimeCheckConfig( request, @@ -569,9 +562,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteUptimeCheckConfig = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deleteUptimeCheckConfig = + stubSimpleCall(expectedResponse); const [response] = await client.deleteUptimeCheckConfig(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -602,9 +594,8 @@ describe('v3.UptimeCheckServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteUptimeCheckConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteUptimeCheckConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteUptimeCheckConfig( request, @@ -694,9 +685,8 @@ describe('v3.UptimeCheckServiceClient', () => { new protos.google.monitoring.v3.UptimeCheckConfig() ), ]; - client.innerApiCalls.listUptimeCheckConfigs = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listUptimeCheckConfigs = + stubSimpleCall(expectedResponse); const [response] = await client.listUptimeCheckConfigs(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -735,9 +725,8 @@ describe('v3.UptimeCheckServiceClient', () => { new protos.google.monitoring.v3.UptimeCheckConfig() ), ]; - client.innerApiCalls.listUptimeCheckConfigs = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listUptimeCheckConfigs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listUptimeCheckConfigs( request, @@ -818,9 +807,8 @@ describe('v3.UptimeCheckServiceClient', () => { new protos.google.monitoring.v3.UptimeCheckConfig() ), ]; - client.descriptors.page.listUptimeCheckConfigs.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listUptimeCheckConfigs.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listUptimeCheckConfigsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.UptimeCheckConfig[] = []; @@ -840,16 +828,18 @@ describe('v3.UptimeCheckServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listUptimeCheckConfigs - .createStream as SinonStub) + ( + client.descriptors.page.listUptimeCheckConfigs + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listUptimeCheckConfigs, request) ); assert.strictEqual( - (client.descriptors.page.listUptimeCheckConfigs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listUptimeCheckConfigs + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -866,10 +856,8 @@ describe('v3.UptimeCheckServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listUptimeCheckConfigs.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listUptimeCheckConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listUptimeCheckConfigsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.UptimeCheckConfig[] = []; @@ -888,16 +876,18 @@ describe('v3.UptimeCheckServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listUptimeCheckConfigs - .createStream as SinonStub) + ( + client.descriptors.page.listUptimeCheckConfigs + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listUptimeCheckConfigs, request) ); assert.strictEqual( - (client.descriptors.page.listUptimeCheckConfigs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listUptimeCheckConfigs + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -924,9 +914,8 @@ describe('v3.UptimeCheckServiceClient', () => { new protos.google.monitoring.v3.UptimeCheckConfig() ), ]; - client.descriptors.page.listUptimeCheckConfigs.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listUptimeCheckConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.IUptimeCheckConfig[] = []; const iterable = client.listUptimeCheckConfigsAsync(request); for await (const resource of iterable) { @@ -934,15 +923,17 @@ describe('v3.UptimeCheckServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listUptimeCheckConfigs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listUptimeCheckConfigs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -959,10 +950,8 @@ describe('v3.UptimeCheckServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listUptimeCheckConfigs.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listUptimeCheckConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listUptimeCheckConfigsAsync(request); await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IUptimeCheckConfig[] = []; @@ -971,15 +960,17 @@ describe('v3.UptimeCheckServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listUptimeCheckConfigs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listUptimeCheckConfigs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listUptimeCheckConfigs + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -1001,9 +992,8 @@ describe('v3.UptimeCheckServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), ]; - client.innerApiCalls.listUptimeCheckIps = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listUptimeCheckIps = + stubSimpleCall(expectedResponse); const [response] = await client.listUptimeCheckIps(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1028,9 +1018,8 @@ describe('v3.UptimeCheckServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), ]; - client.innerApiCalls.listUptimeCheckIps = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listUptimeCheckIps = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listUptimeCheckIps( request, @@ -1092,9 +1081,8 @@ describe('v3.UptimeCheckServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), ]; - client.descriptors.page.listUptimeCheckIps.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listUptimeCheckIps.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listUptimeCheckIpsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.UptimeCheckIp[] = []; @@ -1130,10 +1118,8 @@ describe('v3.UptimeCheckServiceClient', () => { new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listUptimeCheckIps.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listUptimeCheckIps.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listUptimeCheckIpsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.monitoring.v3.UptimeCheckIp[] = []; @@ -1172,9 +1158,8 @@ describe('v3.UptimeCheckServiceClient', () => { generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), generateSampleMessage(new protos.google.monitoring.v3.UptimeCheckIp()), ]; - client.descriptors.page.listUptimeCheckIps.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listUptimeCheckIps.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.monitoring.v3.IUptimeCheckIp[] = []; const iterable = client.listUptimeCheckIpsAsync(request); for await (const resource of iterable) { @@ -1182,8 +1167,9 @@ describe('v3.UptimeCheckServiceClient', () => { } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listUptimeCheckIps - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listUptimeCheckIps.asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -1198,10 +1184,8 @@ describe('v3.UptimeCheckServiceClient', () => { new protos.google.monitoring.v3.ListUptimeCheckIpsRequest() ); const expectedError = new Error('expected'); - client.descriptors.page.listUptimeCheckIps.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listUptimeCheckIps.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listUptimeCheckIpsAsync(request); await assert.rejects(async () => { const responses: protos.google.monitoring.v3.IUptimeCheckIp[] = []; @@ -1210,8 +1194,9 @@ describe('v3.UptimeCheckServiceClient', () => { } }); assert.deepStrictEqual( - (client.descriptors.page.listUptimeCheckIps - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listUptimeCheckIps.asyncIterate as SinonStub + ).getCall(0).args[1], request ); }); @@ -1243,8 +1228,10 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -1254,21 +1241,24 @@ describe('v3.UptimeCheckServiceClient', () => { const result = client.matchFolderFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1302,47 +1292,52 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderAlertPolicyConditionName', () => { - const result = client.matchFolderFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchFolderFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromFolderAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromFolderAlertPolicyConditionName', () => { - const result = client.matchConditionFromFolderAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromFolderAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.folderAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1374,34 +1369,40 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderChannelDescriptorName', () => { - const result = client.matchFolderFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchFolderFromFolderChannelDescriptorName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromFolderChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromFolderChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromFolderChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.folderChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1482,34 +1483,40 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderNotificationChannelName', () => { - const result = client.matchFolderFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchFolderFromFolderNotificationChannelName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromFolderNotificationChannelName', () => { - const result = client.matchNotificationChannelFromFolderNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromFolderNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.folderNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1577,12 +1584,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('folderServiceServiceLevelObjectivePath', () => { const result = client.folderServiceServiceLevelObjectivePath( @@ -1592,47 +1597,58 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchFolderFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchFolderFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromFolderServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1664,34 +1680,40 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchFolderFromFolderUptimeCheckConfigName', () => { - const result = client.matchFolderFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchFolderFromFolderUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'folderValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromFolderUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromFolderUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.folderUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.folderUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1723,34 +1745,38 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1769,12 +1795,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationAlertPolicyConditionPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationAlertPolicyConditionPath', () => { const result = client.organizationAlertPolicyConditionPath( @@ -1784,47 +1808,58 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchOrganizationFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromOrganizationAlertPolicyConditionName', () => { - const result = client.matchConditionFromOrganizationAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromOrganizationAlertPolicyConditionName( + fakePath + ); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.organizationAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1842,12 +1877,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationChannelDescriptorPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationChannelDescriptorPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationChannelDescriptorPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationChannelDescriptorPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationChannelDescriptorPath', () => { const result = client.organizationChannelDescriptorPath( @@ -1856,34 +1889,42 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationChannelDescriptorName', () => { - const result = client.matchOrganizationFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromOrganizationChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromOrganizationChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromOrganizationChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.organizationChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1915,21 +1956,24 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationGroupPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationGroupName', () => { - const result = client.matchOrganizationFromOrganizationGroupName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1939,8 +1983,10 @@ describe('v3.UptimeCheckServiceClient', () => { const result = client.matchGroupFromOrganizationGroupName(fakePath); assert.strictEqual(result, 'groupValue'); assert( - (client.pathTemplates.organizationGroupPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationGroupPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -1958,12 +2004,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationNotificationChannelPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationNotificationChannelPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationNotificationChannelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationNotificationChannelPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationNotificationChannelPath', () => { const result = client.organizationNotificationChannelPath( @@ -1972,34 +2016,42 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationNotificationChannelName', () => { - const result = client.matchOrganizationFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromOrganizationNotificationChannelName', () => { - const result = client.matchNotificationChannelFromOrganizationNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromOrganizationNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.organizationNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2031,21 +2083,24 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationServicePathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceName', () => { - const result = client.matchOrganizationFromOrganizationServiceName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2055,8 +2110,10 @@ describe('v3.UptimeCheckServiceClient', () => { const result = client.matchServiceFromOrganizationServiceName(fakePath); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.organizationServicePathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationServicePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2076,12 +2133,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationServiceServiceLevelObjectivePath', () => { const result = client.organizationServiceServiceLevelObjectivePath( @@ -2091,51 +2146,62 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromOrganizationServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates - .organizationServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates + .organizationServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2153,12 +2219,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationUptimeCheckConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); it('organizationUptimeCheckConfigPath', () => { const result = client.organizationUptimeCheckConfigPath( @@ -2167,34 +2231,42 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchOrganizationFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchOrganizationFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchOrganizationFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'organizationValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromOrganizationUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.organizationUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.organizationUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2264,8 +2336,10 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -2275,21 +2349,24 @@ describe('v3.UptimeCheckServiceClient', () => { const result = client.matchProjectFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2308,9 +2385,8 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = sinon - .stub() - .returns(fakePath); + client.pathTemplates.projectAlertPolicyConditionPathTemplate.render = + sinon.stub().returns(fakePath); client.pathTemplates.projectAlertPolicyConditionPathTemplate.match = sinon .stub() .returns(expectedParameters); @@ -2323,47 +2399,52 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectAlertPolicyConditionName', () => { - const result = client.matchProjectFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchProjectFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchAlertPolicyFromProjectAlertPolicyConditionName', () => { - const result = client.matchAlertPolicyFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchAlertPolicyFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'alertPolicyValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchConditionFromProjectAlertPolicyConditionName', () => { - const result = client.matchConditionFromProjectAlertPolicyConditionName( - fakePath - ); + const result = + client.matchConditionFromProjectAlertPolicyConditionName(fakePath); assert.strictEqual(result, 'conditionValue'); assert( - (client.pathTemplates.projectAlertPolicyConditionPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectAlertPolicyConditionPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2395,34 +2476,40 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectChannelDescriptorName', () => { - const result = client.matchProjectFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchProjectFromProjectChannelDescriptorName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchChannelDescriptorFromProjectChannelDescriptorName', () => { - const result = client.matchChannelDescriptorFromProjectChannelDescriptorName( - fakePath - ); + const result = + client.matchChannelDescriptorFromProjectChannelDescriptorName( + fakePath + ); assert.strictEqual(result, 'channelDescriptorValue'); assert( - (client.pathTemplates.projectChannelDescriptorPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectChannelDescriptorPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2503,34 +2590,40 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectNotificationChannelName', () => { - const result = client.matchProjectFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchProjectFromProjectNotificationChannelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchNotificationChannelFromProjectNotificationChannelName', () => { - const result = client.matchNotificationChannelFromProjectNotificationChannelName( - fakePath - ); + const result = + client.matchNotificationChannelFromProjectNotificationChannelName( + fakePath + ); assert.strictEqual(result, 'notificationChannelValue'); assert( - (client.pathTemplates.projectNotificationChannelPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectNotificationChannelPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2601,12 +2694,10 @@ describe('v3.UptimeCheckServiceClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = sinon - .stub() - .returns(expectedParameters); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate.match = + sinon.stub().returns(expectedParameters); it('projectServiceServiceLevelObjectivePath', () => { const result = client.projectServiceServiceLevelObjectivePath( @@ -2616,47 +2707,58 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchProjectFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchProjectFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName', () => { - const result = client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( - fakePath - ); + const result = + client.matchServiceLevelObjectiveFromProjectServiceServiceLevelObjectiveName( + fakePath + ); assert.strictEqual(result, 'serviceLevelObjectiveValue'); assert( - (client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectServiceServiceLevelObjectivePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2688,34 +2790,40 @@ describe('v3.UptimeCheckServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectUptimeCheckConfigName', () => { - const result = client.matchProjectFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchProjectFromProjectUptimeCheckConfigName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchUptimeCheckConfigFromProjectUptimeCheckConfigName', () => { - const result = client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( - fakePath - ); + const result = + client.matchUptimeCheckConfigFromProjectUptimeCheckConfigName( + fakePath + ); assert.strictEqual(result, 'uptimeCheckConfigValue'); assert( - (client.pathTemplates.projectUptimeCheckConfigPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectUptimeCheckConfigPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); From 72da3d06a3766b1a4a3780076c68428d7b238cc2 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:40:29 +0000 Subject: [PATCH 370/422] chore: new owl bot post processor docker image (#537) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:b94b09fb24bf804090b8cc60ee726ca161d5e5915151e417f8ef5d8bcfe73cbc --- .../protos/protos.d.ts | 348 ++--- .../google-cloud-monitoring/protos/protos.js | 1186 ++++++++--------- .../protos/protos.json | 30 +- 3 files changed, 782 insertions(+), 782 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 8dd3d65095b..0b6daf01e10 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -19786,6 +19786,180 @@ export namespace google { 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 Struct. */ interface IStruct { @@ -20093,180 +20267,6 @@ export namespace google { */ 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 rpc. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 6cf36a8c6e5..40eb65a6f9c 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -48860,25 +48860,23 @@ return BytesValue; })(); - protobuf.Struct = (function() { + protobuf.Empty = (function() { /** - * Properties of a Struct. + * Properties of an Empty. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IEmpty */ /** - * Constructs a new Struct. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48886,98 +48884,63 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - Struct.create = function create(properties) { - return new Struct(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IStruct} message Struct 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 */ - Struct.encode = function encode(message, writer) { + Empty.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; }; /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.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.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IStruct} message Struct 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 */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Struct message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Struct + * @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.Struct} Struct + * @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 */ - Struct.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.Struct(), key, value; + 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.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; @@ -48987,131 +48950,95 @@ }; /** - * Decodes a Struct 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.Struct + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct + * @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 */ - Struct.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 Struct message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.Struct + * @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 */ - Struct.verify = function verify(message) { + Empty.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. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.Empty} Empty */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) 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; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a Struct 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.Struct + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.Empty} message Empty * @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; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this Struct to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + return Empty; })(); - protobuf.Value = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a Value. + * Properties of a FieldMask. * @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 IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Value. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Value(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) @@ -49119,154 +49046,78 @@ } /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Value.prototype.numberValue = null; + FieldMask.prototype.paths = $util.emptyArray; /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance + * 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 */ - Value.prototype.stringValue = null; + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance + * 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 */ - Value.prototype.boolValue = null; + 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; + }; /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance + * 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 */ - Value.prototype.structValue = null; + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * 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 && 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 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. + * 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); @@ -49277,214 +49128,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 {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; + return FieldMask; })(); - protobuf.ListValue = (function() { + protobuf.Struct = (function() { /** - * Properties of a ListValue. + * Properties of a Struct. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new ListValue. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49492,78 +49249,97 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - ListValue.prototype.values = $util.emptyArray; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new ListValue instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - ListValue.create = function create(properties) { - return new ListValue(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IListValue} message ListValue 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 */ - ListValue.encode = function encode(message, writer) { + Struct.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.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; }; /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.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.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IListValue} message ListValue 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 */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListValue message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ListValue + * @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.ListValue} ListValue + * @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 */ - ListValue.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.ListValue(); + 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.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + 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); @@ -49574,123 +49350,131 @@ }; /** - * Decodes a ListValue 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.ListValue + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue + * @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 */ - ListValue.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 ListValue message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.ListValue + * @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 */ - ListValue.verify = function verify(message) { + Struct.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 (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 "values." + error; + return "fields." + error; } } return null; }; /** - * Creates a ListValue 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.ListValue + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.Struct} Struct */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) 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.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 ListValue 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.ListValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + Struct.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.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 ListValue to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + 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) @@ -49698,63 +49482,155 @@ } /** - * Creates a new Empty instance using the specified properties. + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = 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; + + // 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 && 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 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; @@ -49764,95 +49640,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 {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; + })(); + + 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) @@ -49860,78 +49855,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); @@ -49942,99 +49937,104 @@ }; /** - * 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; })(); return protobuf; diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index e426e8819a3..8f463cbb593 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -9,12 +9,12 @@ "csharp_namespace": "Google.Cloud.Monitoring.V3", "go_package": "google.golang.org/genproto/googleapis/monitoring/v3;monitoring", "java_multiple_files": true, - "java_outer_classname": "UptimeProto", + "java_outer_classname": "UptimeServiceProto", "java_package": "com.google.monitoring.v3", "php_namespace": "Google\\Cloud\\Monitoring\\V3", "ruby_package": "Google::Cloud::Monitoring::V3", - "(google.api.resource_definition).type": "monitoring.googleapis.com/MonitoredResourceDescriptor", - "(google.api.resource_definition).pattern": "*", + "(google.api.resource_definition).type": "monitoring.googleapis.com/TimeSeries", + "(google.api.resource_definition).pattern": "folders/{folder}/timeSeries/{time_series}", "(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN" }, "nested": { @@ -4985,6 +4985,18 @@ } } }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, "Struct": { "fields": { "fields": { @@ -5047,18 +5059,6 @@ "id": 1 } } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } } } }, From a9477604170fa8bfefe70069f5723d6ad758404c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:38:42 -0700 Subject: [PATCH 371/422] chore: release 2.3.1 (#535) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 05dff8b88fd..40c64ff9c5e 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.3.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.0...v2.3.1) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#534](https://www.github.com/googleapis/nodejs-monitoring/issues/534)) ([ce7e9e1](https://www.github.com/googleapis/nodejs-monitoring/commit/ce7e9e1b7527fc1a4b55960596237e4cd2c43e3b)) + ## [2.3.0](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.2.0...v2.3.0) (2021-03-24) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 342a98fae3c..cece0dad1e7 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.3.0", + "version": "2.3.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 4a3df411477..c7a2e955ccc 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.3.0", + "@google-cloud/monitoring": "^2.3.1", "yargs": "^16.0.0" }, "devDependencies": { From 826b3dfa335a63ead9896b92cbab84235249defb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 May 2021 19:04:21 +0200 Subject: [PATCH 372/422] chore(deps): update dependency @types/node to v14 (#540) 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) | [`^12.12.27` -> `^14.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/12.20.13/14.17.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/compatibility-slim/12.20.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/14.17.0/confidence-slim/12.20.13)](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, 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cece0dad1e7..139a468e3f4 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^12.12.27", + "@types/node": "^14.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", From d326448229e04dc8e63aafef4b0dc4e7d5451db7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:56:34 +0200 Subject: [PATCH 373/422] chore(deps): update dependency sinon to v11 (#541) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 139a468e3f4..5a922788228 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -61,7 +61,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 66f89f6cec119252c38ff497127802bc42a29de7 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 10 Jun 2021 23:00:32 +0200 Subject: [PATCH 374/422] chore(nodejs): remove api-extractor dependencies (#548) --- packages/google-cloud-monitoring/package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 5a922788228..b7d43e4c71e 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -40,9 +40,7 @@ "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile", - "precompile": "gts clean", - "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp" + "precompile": "gts clean" }, "dependencies": { "google-gax": "^2.12.0" @@ -65,8 +63,6 @@ "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", - "webpack-cli": "^4.0.0", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "webpack-cli": "^4.0.0" } } From 203753c8b2f424316bb531239b7d57ac8a063bdc Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 11:25:05 -0400 Subject: [PATCH 375/422] fix(deps): google-gax v2.17.0 with mTLS (#552) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index b7d43e4c71e..75544654897 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" }, "devDependencies": { "@types/mocha": "^8.0.0", From b67f441a9eee14bd15d667e92cda544f3c87515c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 15:50:50 +0000 Subject: [PATCH 376/422] chore: release 2.3.2 (#553) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.1...v2.3.2) (2021-06-29) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#552](https://www.github.com/googleapis/nodejs-monitoring/issues/552)) ([43c9ddd](https://www.github.com/googleapis/nodejs-monitoring/commit/43c9dddbd75668da5e7c0b2608346e8f04402e7e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 40c64ff9c5e..3c32983826f 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.3.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.1...v2.3.2) (2021-06-29) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#552](https://www.github.com/googleapis/nodejs-monitoring/issues/552)) ([43c9ddd](https://www.github.com/googleapis/nodejs-monitoring/commit/43c9dddbd75668da5e7c0b2608346e8f04402e7e)) + ### [2.3.1](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.0...v2.3.1) (2021-05-12) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 75544654897..dbf61d5c84a 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.3.1", + "version": "2.3.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index c7a2e955ccc..ba1a608f2f3 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.3.1", + "@google-cloud/monitoring": "^2.3.2", "yargs": "^16.0.0" }, "devDependencies": { From 1eec7e1c2169d26273068c798b2913702bc2847c Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 16 Jul 2021 15:14:38 -0400 Subject: [PATCH 377/422] fix(deps): require google-gax v2.17.1 (#558) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index dbf61d5c84a..876f20da075 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From 6ca1f05672caaffab4c90b6beb0070d804ca4b7a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 12:47:36 -0700 Subject: [PATCH 378/422] chore: release 2.3.3 (#559) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 3c32983826f..3b8af53d3ec 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.2...v2.3.3) (2021-07-16) + + +### Bug Fixes + +* **deps:** require google-gax v2.17.1 ([#558](https://www.github.com/googleapis/nodejs-monitoring/issues/558)) ([e15ade6](https://www.github.com/googleapis/nodejs-monitoring/commit/e15ade6476338ada88e31fe07f480d73739073ad)) + ### [2.3.2](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.1...v2.3.2) (2021-06-29) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 876f20da075..5b90fd7c4e8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.3.2", + "version": "2.3.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index ba1a608f2f3..73df0a152ef 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.3.2", + "@google-cloud/monitoring": "^2.3.3", "yargs": "^16.0.0" }, "devDependencies": { From d58128f2e20da2d5af579823eda0048df4690e9a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:54:30 +0000 Subject: [PATCH 379/422] chore: release 2.3.3 (#562) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.2...v2.3.3) (2021-07-16) ### Bug Fixes * **deps:** require google-gax v2.17.1 ([#558](https://www.github.com/googleapis/nodejs-monitoring/issues/558)) ([e15ade6](https://www.github.com/googleapis/nodejs-monitoring/commit/e15ade6476338ada88e31fe07f480d73739073ad)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 3b8af53d3ec..dd1651a399c 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -7,6 +7,13 @@ ### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.2...v2.3.3) (2021-07-16) +### Bug Fixes + +* **deps:** require google-gax v2.17.1 ([#558](https://www.github.com/googleapis/nodejs-monitoring/issues/558)) ([e15ade6](https://www.github.com/googleapis/nodejs-monitoring/commit/e15ade6476338ada88e31fe07f480d73739073ad)) + +### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.2...v2.3.3) (2021-07-16) + + ### Bug Fixes * **deps:** require google-gax v2.17.1 ([#558](https://www.github.com/googleapis/nodejs-monitoring/issues/558)) ([e15ade6](https://www.github.com/googleapis/nodejs-monitoring/commit/e15ade6476338ada88e31fe07f480d73739073ad)) From 76b583cd78fc83fbff586ddc44ff5922c4c14924 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 4 Aug 2021 08:48:18 -0700 Subject: [PATCH 380/422] samples: use modern samples layout (#556) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * samples: use modern samples layout * fix a bunch of problems * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-monitoring/README.md | 16 ++- .../google-cloud-monitoring/samples/README.md | 108 ++++++++++++++++++ .../samples/quickstart.js | 96 ++++++++-------- .../samples/test/quickstart.test.js | 11 +- 4 files changed, 177 insertions(+), 54 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 54b3546be6a..430c82eccdc 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -64,15 +64,12 @@ npm install @google-cloud/monitoring const monitoring = require('@google-cloud/monitoring'); async function quickstart() { - // Your Google Cloud Platform project ID - const projectId = - process.env.GCLOUD_PROJECT || - process.env.GOOGLE_CLOUD_PROJECT || - 'YOUR_PROJECT_ID'; - // Creates a client const client = new monitoring.MetricServiceClient(); + // TODO(developer): Uncomment and set the following variables + // const projectId = "PROJECT_ID" + // Prepares an individual data point const dataPoint = { interval: { @@ -113,6 +110,7 @@ async function quickstart() { const [result] = await client.createTimeSeries(request); console.log('Done writing time series data.', result); } +quickstart(); ``` @@ -124,7 +122,13 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Alerts.backup Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.backupPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) | +| Alerts.delete Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.deleteChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) | +| Alerts.enable Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.enablePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) | | Alerts | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) | +| Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | +| Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | +| Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | | Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index f5ea0e5570f..8df0f4ebd16 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -14,7 +14,13 @@ and a variety of common application components including Cassandra, Nginx, Apach * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Alerts.backup Policies](#alerts.backup-policies) + * [Alerts.delete Channels](#alerts.delete-channels) + * [Alerts.enable Policies](#alerts.enable-policies) * [Alerts](#alerts) + * [Alerts.list Policies](#alerts.list-policies) + * [Alerts.replace Channels](#alerts.replace-channels) + * [Alerts.restore Policies](#alerts.restore-policies) * [Metrics](#metrics) * [Quickstart](#quickstart) * [Uptime](#uptime) @@ -34,6 +40,57 @@ Before running the samples, make sure you've followed the steps outlined in +### Alerts.backup Policies + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.backupPolicies.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) + +__Usage:__ + + +`node samples/alerts.backupPolicies.js` + + +----- + + + + +### Alerts.delete Channels + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.deleteChannels.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) + +__Usage:__ + + +`node samples/alerts.deleteChannels.js` + + +----- + + + + +### Alerts.enable Policies + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.enablePolicies.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) + +__Usage:__ + + +`node samples/alerts.enablePolicies.js` + + +----- + + + + ### Alerts View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js). @@ -51,6 +108,57 @@ __Usage:__ +### Alerts.list Policies + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) + +__Usage:__ + + +`node samples/alerts.listPolicies.js` + + +----- + + + + +### Alerts.replace Channels + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.replaceChannels.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) + +__Usage:__ + + +`node samples/alerts.replaceChannels.js` + + +----- + + + + +### Alerts.restore Policies + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.restorePolicies.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) + +__Usage:__ + + +`node samples/alerts.restorePolicies.js` + + +----- + + + + ### Metrics View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js). diff --git a/packages/google-cloud-monitoring/samples/quickstart.js b/packages/google-cloud-monitoring/samples/quickstart.js index b7194768692..bb5d33dcc87 100644 --- a/packages/google-cloud-monitoring/samples/quickstart.js +++ b/packages/google-cloud-monitoring/samples/quickstart.js @@ -14,60 +14,64 @@ 'use strict'; -// [START monitoring_quickstart] -// Imports the Google Cloud client library -const monitoring = require('@google-cloud/monitoring'); +async function main(projectId) { + // [START monitoring_quickstart] + // Imports the Google Cloud client library + const monitoring = require('@google-cloud/monitoring'); -async function quickstart() { - // Your Google Cloud Platform project ID - const projectId = - process.env.GCLOUD_PROJECT || - process.env.GOOGLE_CLOUD_PROJECT || - 'YOUR_PROJECT_ID'; + async function quickstart() { + // Creates a client + const client = new monitoring.MetricServiceClient(); - // Creates a client - const client = new monitoring.MetricServiceClient(); + // TODO(developer): Uncomment and set the following variables + // const projectId = "PROJECT_ID" - // Prepares an individual data point - const dataPoint = { - interval: { - endTime: { - seconds: Date.now() / 1000, + // Prepares an individual data point + const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000, + }, + }, + value: { + // The amount of sales + doubleValue: 123.45, }, - }, - value: { - // The amount of sales - doubleValue: 123.45, - }, - }; + }; - // Prepares the time series request - const request = { - name: client.projectPath(projectId), - timeSeries: [ - { - // Ties the data point to a custom metric - metric: { - type: 'custom.googleapis.com/stores/daily_sales', - labels: { - store_id: 'Pittsburgh', + // Prepares the time series request + const request = { + name: client.projectPath(projectId), + timeSeries: [ + { + // Ties the data point to a custom metric + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh', + }, }, - }, - resource: { - type: 'global', - labels: { - project_id: projectId, + resource: { + type: 'global', + labels: { + project_id: projectId, + }, }, + points: [dataPoint], }, - points: [dataPoint], - }, - ], - }; + ], + }; - // Writes time series data - const [result] = await client.createTimeSeries(request); - console.log('Done writing time series data.', result); + // Writes time series data + const [result] = await client.createTimeSeries(request); + console.log('Done writing time series data.', result); + } + quickstart(); + // [END monitoring_quickstart] } -// [END monitoring_quickstart] -quickstart().catch(console.error); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-monitoring/samples/test/quickstart.test.js b/packages/google-cloud-monitoring/samples/test/quickstart.test.js index 20258cc46ca..07ac58d9bb2 100644 --- a/packages/google-cloud-monitoring/samples/test/quickstart.test.js +++ b/packages/google-cloud-monitoring/samples/test/quickstart.test.js @@ -15,8 +15,11 @@ 'use strict'; const {assert} = require('chai'); -const {describe, it} = require('mocha'); +const {describe, it, before} = require('mocha'); const cp = require('child_process'); +const monitoring = require('@google-cloud/monitoring'); + +const client = new monitoring.AlertPolicyServiceClient(); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); // Tests in this suite can trigger the upstream error, @@ -33,10 +36,14 @@ const delay = async test => { }); }; describe('quickstart', () => { + let projectId; + before(async () => { + projectId = await client.getProjectId(); + }); it('should run the quickstart', async function () { this.retries(8); await delay(this.test); // delay the start of the test, if this is a retry. - const result = execSync('node quickstart'); + const result = execSync(`node quickstart.js ${projectId}`); assert.match(result, /Done writing time series data/); }); }); From 47651327d221ceb2ef7ddb47f4496510d2733b2a Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:34:35 -0400 Subject: [PATCH 381/422] chore(nodejs): update client ref docs link in metadata (#567) --- packages/google-cloud-monitoring/.repo-metadata.json | 2 +- packages/google-cloud-monitoring/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json index 0e49853fedb..f6787e6775c 100644 --- a/packages/google-cloud-monitoring/.repo-metadata.json +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -1,5 +1,5 @@ { - "client_documentation": "https://googleapis.dev/nodejs/monitoring/latest", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/monitoring/latest", "product_documentation": "https://cloud.google.com/monitoring/docs", "name": "monitoring", "requires_billing": true, diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 430c82eccdc..33f95d495c4 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -194,7 +194,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/monitoring/latest +[client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest [product-docs]: https://cloud.google.com/monitoring/docs [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 21d6aaa15f6081b3fb0e075df660850d79392e7d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 5 Aug 2021 13:54:46 -0700 Subject: [PATCH 382/422] chore: remove duplicate alert samples (#568) --- packages/google-cloud-monitoring/README.md | 1 - .../google-cloud-monitoring/samples/README.md | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 33f95d495c4..db9bda3f5c9 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -125,7 +125,6 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/ | Alerts.backup Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.backupPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) | | Alerts.delete Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.deleteChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) | | Alerts.enable Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.enablePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) | -| Alerts | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) | | Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | | Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | | Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 8df0f4ebd16..e38034f2f07 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -17,7 +17,6 @@ and a variety of common application components including Cassandra, Nginx, Apach * [Alerts.backup Policies](#alerts.backup-policies) * [Alerts.delete Channels](#alerts.delete-channels) * [Alerts.enable Policies](#alerts.enable-policies) - * [Alerts](#alerts) * [Alerts.list Policies](#alerts.list-policies) * [Alerts.replace Channels](#alerts.replace-channels) * [Alerts.restore Policies](#alerts.restore-policies) @@ -91,23 +90,6 @@ __Usage:__ -### Alerts - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.js` - - ------ - - - - ### Alerts.list Policies View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js). From cf56e9a5e01b9f5d75f2cee21b6b0338322b9fea Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:42:19 -0400 Subject: [PATCH 383/422] fix(deps): google-gax v2.24.1 (#570) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 5b90fd7c4e8..00af407da8c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" }, "devDependencies": { "@types/mocha": "^8.0.0", From 587918b2d1501b48608dcb722c43a4739e241d40 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:20:21 +0000 Subject: [PATCH 384/422] chore: release 2.3.4 (#571) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.3...v2.3.4) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#570](https://www.github.com/googleapis/nodejs-monitoring/issues/570)) ([368febb](https://www.github.com/googleapis/nodejs-monitoring/commit/368febba05606ccb71cdee0efc75255acac7d75d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index dd1651a399c..5b3bb2e13fd 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.3.4](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.3...v2.3.4) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#570](https://www.github.com/googleapis/nodejs-monitoring/issues/570)) ([368febb](https://www.github.com/googleapis/nodejs-monitoring/commit/368febba05606ccb71cdee0efc75255acac7d75d)) + ### [2.3.3](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.2...v2.3.3) (2021-07-16) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 00af407da8c..ab6a11748fb 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.3.3", + "version": "2.3.4", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 73df0a152ef..4114b07e9c3 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.3.3", + "@google-cloud/monitoring": "^2.3.4", "yargs": "^16.0.0" }, "devDependencies": { From 0c904cb6be42ec9d418d7946e2f37bda976d816b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 23:38:31 +0000 Subject: [PATCH 385/422] chore: disable renovate dependency dashboard (#1194) (#573) --- packages/google-cloud-monitoring/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index db9bda3f5c9..8fb062471e8 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -184,8 +184,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 a94a247be5b763755142c38bd2a23dae5bf94ae8 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Aug 2021 11:59:06 -0700 Subject: [PATCH 386/422] chore: split metrics samples (#572) --- packages/google-cloud-monitoring/README.md | 12 +- .../google-cloud-monitoring/samples/README.md | 206 +++++++++++++++++- 2 files changed, 212 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 8fb062471e8..688932ace75 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -128,7 +128,17 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/ | Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | | Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | | Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | -| Metrics | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) | +| Create Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.createDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) | +| Delete Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.deleteDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) | +| Get Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) | +| Get Monitored Resource Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getMonitoredResourceDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) | +| List Metric Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) | +| List Monitored Resource Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listMonitoredResourceDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) | +| Read Time Series Aggregate | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesAggregate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) | +| Read Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) | +| Read Time Series Fields | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesFields.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) | +| Read Time Series Reduce | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesReduce.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) | +| Write Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.writeTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index e38034f2f07..852d95e2f82 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -20,7 +20,17 @@ and a variety of common application components including Cassandra, Nginx, Apach * [Alerts.list Policies](#alerts.list-policies) * [Alerts.replace Channels](#alerts.replace-channels) * [Alerts.restore Policies](#alerts.restore-policies) - * [Metrics](#metrics) + * [Create Metric Descriptor](#create-metric-descriptor) + * [Delete Metric Descriptor](#delete-metric-descriptor) + * [Get Metric Descriptor](#get-metric-descriptor) + * [Get Monitored Resource Descriptor](#get-monitored-resource-descriptor) + * [List Metric Descriptors](#list-metric-descriptors) + * [List Monitored Resource Descriptors](#list-monitored-resource-descriptors) + * [Read Time Series Aggregate](#read-time-series-aggregate) + * [Read Time Series Data](#read-time-series-data) + * [Read Time Series Fields](#read-time-series-fields) + * [Read Time Series Reduce](#read-time-series-reduce) + * [Write Time Series Data](#write-time-series-data) * [Quickstart](#quickstart) * [Uptime](#uptime) @@ -141,16 +151,202 @@ __Usage:__ -### Metrics +### Create Metric Descriptor -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.js). +Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric descriptor. -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.js,samples/README.md) +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.createDescriptor.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) + +__Usage:__ + + +`node metrics.createDescriptor.js your-project-id` + + +----- + + + + +### Delete Metric Descriptor + +Deletes a custom metric descriptor. + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.deleteDescriptor.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) + +__Usage:__ + + +`node metrics.deleteDescriptor.js your-project-id custom.googleapis.com/stores/daily_sales` + + +----- + + + + +### Get Metric Descriptor + +Gets a custom metric descriptor + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getDescriptor.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) + +__Usage:__ + + +`node metrics.getDescriptor.js your-project-id custom.googleapis.com/your/id` + + +----- + + + + +### Get Monitored Resource Descriptor + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getMonitoredResourceDescriptor.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) + +__Usage:__ + + +`node metrics.getMonitoredResourceDescriptor.js your-project-id some-resource-type` + + +----- + + + + +### List Metric Descriptors + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listDescriptors.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) + +__Usage:__ + + +`node metrics.listDescriptors.js your-project-id` + + +----- + + + + +### List Monitored Resource Descriptors + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listMonitoredResourceDescriptors.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) + +__Usage:__ + + +`node metrics.listMonitoredResourceDescriptors.js your-project-id` + + +----- + + + + +### Read Time Series Aggregate + +Aggregates time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesAggregate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) + +__Usage:__ + + +`node metrics.readTimeSeriesAggregate.js your-project-id` + + +----- + + + + +### Read Time Series Data + +Reads time series data that matches the given filter. + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesData.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) + +__Usage:__ + + +`node metrics.readTimeSeriesData.js your-project-id 'metric.type="compute.googleapis.com/instance/cpu/utilization"'` + + +----- + + + + +### Read Time Series Fields + +Reads headers of time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesFields.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) + +__Usage:__ + + +`node metrics.readTimeSeriesFields.js your-project-id` + + +----- + + + + +### Read Time Series Reduce + +Reduces time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesReduce.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) + +__Usage:__ + + +`node metrics.readTimeSeriesReduce.js your-project-id` + + +----- + + + + +### Write Time Series Data + +Writes example time series data to 'custom.googleapis.com/stores/daily_sales'. + +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.writeTimeSeriesData.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) __Usage:__ -`node samples/metrics.js` +`node metrics.writeTimeSeriesData.js your-project-id` ----- From 8326fd6158e798c7dc5e1c0373396cf9bf8c3aa4 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 8 Sep 2021 11:08:20 -0400 Subject: [PATCH 387/422] fix(build): update branch to main (#574) --- packages/google-cloud-monitoring/README.md | 48 +++++++++---------- .../google-cloud-monitoring/samples/README.md | 38 +++++++-------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 688932ace75..fe78dc29a2f 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/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/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) @@ -17,7 +17,7 @@ and a variety of common application components including Cassandra, Nginx, Apach A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring/blob/main/CHANGELOG.md). * [Stackdriver Monitoring Node.js Client API Reference][client-docs] * [Stackdriver Monitoring Documentation][product-docs] @@ -118,29 +118,29 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/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-monitoring/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Alerts.backup Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.backupPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) | -| Alerts.delete Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.deleteChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) | -| Alerts.enable Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.enablePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) | -| Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | -| Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | -| Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | -| Create Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.createDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) | -| Delete Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.deleteDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) | -| Get Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) | -| Get Monitored Resource Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getMonitoredResourceDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) | -| List Metric Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) | -| List Monitored Resource Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listMonitoredResourceDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) | -| Read Time Series Aggregate | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesAggregate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) | -| Read Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) | -| Read Time Series Fields | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesFields.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) | -| Read Time Series Reduce | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesReduce.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) | -| Write Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.writeTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | +| Alerts.backup Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.backupPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) | +| Alerts.delete Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.deleteChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) | +| Alerts.enable Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.enablePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) | +| Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | +| Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | +| Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | +| Create Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.createDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) | +| Delete Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.deleteDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) | +| Get Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) | +| Get Monitored Resource Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getMonitoredResourceDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) | +| List Metric Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) | +| List Monitored Resource Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listMonitoredResourceDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) | +| Read Time Series Aggregate | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesAggregate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) | +| Read Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) | +| Read Time Series Fields | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesFields.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) | +| Read Time Series Reduce | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesReduce.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) | +| Write Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.writeTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | @@ -189,7 +189,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/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`) @@ -201,7 +201,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest [product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 852d95e2f82..13908bab92e 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -51,7 +51,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Alerts.backup Policies -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.backupPolicies.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.backupPolicies.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) @@ -68,7 +68,7 @@ __Usage:__ ### Alerts.delete Channels -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.deleteChannels.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.deleteChannels.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) @@ -85,7 +85,7 @@ __Usage:__ ### Alerts.enable Policies -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.enablePolicies.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.enablePolicies.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) @@ -102,7 +102,7 @@ __Usage:__ ### Alerts.list Policies -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.listPolicies.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.listPolicies.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) @@ -119,7 +119,7 @@ __Usage:__ ### Alerts.replace Channels -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.replaceChannels.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.replaceChannels.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) @@ -136,7 +136,7 @@ __Usage:__ ### Alerts.restore Policies -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/alerts.restorePolicies.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.restorePolicies.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) @@ -155,7 +155,7 @@ __Usage:__ Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric descriptor. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.createDescriptor.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.createDescriptor.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) @@ -174,7 +174,7 @@ __Usage:__ Deletes a custom metric descriptor. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.deleteDescriptor.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.deleteDescriptor.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) @@ -193,7 +193,7 @@ __Usage:__ Gets a custom metric descriptor -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getDescriptor.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getDescriptor.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) @@ -210,7 +210,7 @@ __Usage:__ ### Get Monitored Resource Descriptor -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.getMonitoredResourceDescriptor.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getMonitoredResourceDescriptor.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) @@ -227,7 +227,7 @@ __Usage:__ ### List Metric Descriptors -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listDescriptors.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listDescriptors.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) @@ -244,7 +244,7 @@ __Usage:__ ### List Monitored Resource Descriptors -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.listMonitoredResourceDescriptors.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listMonitoredResourceDescriptors.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) @@ -263,7 +263,7 @@ __Usage:__ Aggregates time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesAggregate.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesAggregate.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) @@ -282,7 +282,7 @@ __Usage:__ Reads time series data that matches the given filter. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesData.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesData.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) @@ -301,7 +301,7 @@ __Usage:__ Reads headers of time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesFields.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesFields.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) @@ -320,7 +320,7 @@ __Usage:__ Reduces time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.readTimeSeriesReduce.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesReduce.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) @@ -339,7 +339,7 @@ __Usage:__ Writes example time series data to 'custom.googleapis.com/stores/daily_sales'. -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/metrics.writeTimeSeriesData.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.writeTimeSeriesData.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) @@ -356,7 +356,7 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) @@ -373,7 +373,7 @@ __Usage:__ ### Uptime -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/master/samples/uptime.js). +View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/uptime.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) From 30d02f3b09bdc24d9f82a0430b938a1ff405ee8f 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:16:14 +0000 Subject: [PATCH 388/422] chore: release 2.3.5 (#575) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.5](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.4...v2.3.5) (2021-09-08) ### Bug Fixes * **build:** update branch to main ([#574](https://www.github.com/googleapis/nodejs-monitoring/issues/574)) ([955622f](https://www.github.com/googleapis/nodejs-monitoring/commit/955622f40583247a78301340fc172c9d42fa1354)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 7 +++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 5b3bb2e13fd..24e47ce4496 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +### [2.3.5](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.4...v2.3.5) (2021-09-08) + + +### Bug Fixes + +* **build:** update branch to main ([#574](https://www.github.com/googleapis/nodejs-monitoring/issues/574)) ([955622f](https://www.github.com/googleapis/nodejs-monitoring/commit/955622f40583247a78301340fc172c9d42fa1354)) + ### [2.3.4](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.3...v2.3.4) (2021-08-17) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index ab6a11748fb..2c764e6d84c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.3.4", + "version": "2.3.5", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 4114b07e9c3..f7a8b721244 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.3.4", + "@google-cloud/monitoring": "^2.3.5", "yargs": "^16.0.0" }, "devDependencies": { From 318cfc9fbacd4dda6b4a67cf65e725be60419cc5 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 07:16:54 -0700 Subject: [PATCH 389/422] chore: relocate owl bot post processor (#577) chore: relocate owl bot post processor --- packages/google-cloud-monitoring/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/.github/.OwlBot.yaml b/packages/google-cloud-monitoring/.github/.OwlBot.yaml index f27b2b4e4f4..bafe66bde95 100644 --- a/packages/google-cloud-monitoring/.github/.OwlBot.yaml +++ b/packages/google-cloud-monitoring/.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 ee95be215fdd26ac57e1ab99793a29eda4318e30 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:44:58 +0000 Subject: [PATCH 390/422] build(node): update deps used during postprocessing (#1243) (#580) --- .../google-cloud-monitoring/protos/protos.d.ts | 3 ++- packages/google-cloud-monitoring/protos/protos.js | 7 +++++++ .../google-cloud-monitoring/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 0b6daf01e10..367448a6504 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/protos/protos.d.ts @@ -13443,7 +13443,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 ResourceDescriptor. */ diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index 40eb65a6f9c..dccebb1d14a 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -32127,6 +32127,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); @@ -32137,6 +32138,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; })(); @@ -43311,6 +43313,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -43415,6 +43418,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) { diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 8f463cbb593..6f15eb73ae8 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -3469,7 +3469,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -4543,6 +4544,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 2b4b2401aa4b87a3b05c14c3dc42d4bf355dedc9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 23:18:44 +0200 Subject: [PATCH 391/422] chore(deps): update dependency @types/node to v16 (#581) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 2c764e6d84c..5677f8eb166 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/mocha": "^8.0.0", - "@types/node": "^14.0.0", + "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", From 7fd3acf1d247f04b912a904154ad3a17bab5ffc9 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 4 Nov 2021 11:50:25 -0400 Subject: [PATCH 392/422] chore(cloud-rad): delete api-extractor config (#583) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-monitoring/api-extractor.json diff --git a/packages/google-cloud-monitoring/api-extractor.json b/packages/google-cloud-monitoring/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-monitoring/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 3f33ebaf9f0eadef31b1d5bedd0c9487595b7bb5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:50:25 +0100 Subject: [PATCH 393/422] chore(deps): update dependency sinon to v12 (#582) 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) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 5677f8eb166..6e17ff341f9 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 684cddfd2b46ae1856d5316d97c546eacb4448b8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Dec 2021 22:52:26 +0000 Subject: [PATCH 394/422] build: add generated samples to .eslintignore (#584) --- packages/google-cloud-monitoring/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-monitoring/.eslintignore b/packages/google-cloud-monitoring/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-monitoring/.eslintignore +++ b/packages/google-cloud-monitoring/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From 88766046ead20a205b738e5c1beaedefa591f1ba 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:12:42 +0000 Subject: [PATCH 395/422] docs(node): support "stable"/"preview" release level (#1312) (#588) --- packages/google-cloud-monitoring/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index fe78dc29a2f..81cf83c3bd3 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -183,6 +183,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 df31953ae773cb4149107790c98a3118fa2b7983 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 12:11:08 -0500 Subject: [PATCH 396/422] chore: add api_shortname and library_type to repo metadata (#587) --- packages/google-cloud-monitoring/.repo-metadata.json | 6 ++++-- packages/google-cloud-monitoring/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json index f6787e6775c..2b601171b16 100644 --- a/packages/google-cloud-monitoring/.repo-metadata.json +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -3,12 +3,14 @@ "product_documentation": "https://cloud.google.com/monitoring/docs", "name": "monitoring", "requires_billing": true, - "release_level": "ga", + "release_level": "stable", "language": "nodejs", "api_id": "monitoring.googleapis.com", "distribution_name": "@google-cloud/monitoring", "repo": "googleapis/nodejs-monitoring", "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", "name_pretty": "Stackdriver Monitoring", - "default_version": "v3" + "default_version": "v3", + "api_shortname": "monitoring", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 81cf83c3bd3..40b21684b36 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -4,7 +4,7 @@ # [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) -[![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/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) @@ -173,10 +173,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. @@ -184,7 +184,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 6d1f0af9fe03772d3d78e85e2ad7360eb51a97b9 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:06:38 +0000 Subject: [PATCH 397/422] test(nodejs): remove 15 add 16 (#1322) (#592) --- packages/google-cloud-monitoring/README.md | 3 +-- packages/google-cloud-monitoring/protos/protos.d.ts | 2 +- packages/google-cloud-monitoring/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 40b21684b36..4e49d7a5a18 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -4,9 +4,8 @@ # [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) - +[![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/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-monitoring/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-monitoring) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 367448a6504..80de543caaa 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index dccebb1d14a..aa05e1221af 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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 954b17a54829d792ba33ba1f809671d72f8f13ca Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 Jan 2022 23:32:24 +0100 Subject: [PATCH 398/422] chore(deps): update dependency sinon to v13 (#597) 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)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 6e17ff341f9..41ecc06c41f 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 7a6f715350d81119c8661e396b75ca3ad1a76257 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:22:59 +0000 Subject: [PATCH 399/422] docs(nodejs): version support policy edits (#1346) (#599) --- packages/google-cloud-monitoring/README.md | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 4e49d7a5a18..68244b336dd 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -151,21 +151,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/monitoring@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From e7e67637fed8c0ce321b8f1609dec650ee383463 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Tue, 3 May 2022 15:18:05 -0700 Subject: [PATCH 400/422] test: update gax for test flaky (#611) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 41ecc06c41f..8f7fc79ae1c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^2.30.2" }, "devDependencies": { "@types/mocha": "^8.0.0", From 447231a3ae4a7e66d0afb56128130d97a93fa893 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 4 May 2022 01:30:00 +0200 Subject: [PATCH 401/422] chore(deps): update dependency @types/mocha to v9 (#612) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8f7fc79ae1c..4cbdf00c895 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -46,7 +46,7 @@ "google-gax": "^2.30.2" }, "devDependencies": { - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.0", From 60980f42fee40eb659faccf60cc7b232c4c68a10 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:34:13 +0200 Subject: [PATCH 402/422] chore(deps): update dependency sinon to v14 (#615) 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 4cbdf00c895..9a0e134d9e8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -59,7 +59,7 @@ "mocha": "^8.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "ts-loader": "^9.0.0", "typescript": "^3.8.3", "webpack": "^5.0.0", From 49e21881832cddf4f47b243f78118f5ae3e04a12 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 19 May 2022 17:16:23 -0700 Subject: [PATCH 403/422] build!: update library to use Node 12 (#617) * build!: Update library to use Node 12 Co-authored-by: Summer Ji Co-authored-by: Owl Bot --- packages/google-cloud-monitoring/package.json | 10 +++++----- packages/google-cloud-monitoring/samples/package.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 9a0e134d9e8..a09413d46dc 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "repository": "googleapis/nodejs-monitoring", "main": "build/src/index.js", @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^2.30.2" + "google-gax": "^3.0.1" }, "devDependencies": { "@types/mocha": "^9.0.0", @@ -51,17 +51,17 @@ "@types/sinon": "^10.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", - "gts": "^2.0.0", + "gts": "^3.1.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", "ts-loader": "^9.0.0", - "typescript": "^3.8.3", + "typescript": "^4.6.4", "webpack": "^5.0.0", "webpack-cli": "^4.0.0" } diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index f7a8b721244..e669546efa9 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -8,7 +8,7 @@ "*.js" ], "engines": { - "node": ">=8" + "node": ">=12.0.0" }, "scripts": { "test": "mocha --timeout 600000" @@ -22,4 +22,4 @@ "mocha": "^8.0.0", "uuid": "^8.0.0" } -} +} \ No newline at end of file From d0b21aeb5cc9f1bd43d1b6457fe3ae9f5bf54954 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 11:46:52 -0400 Subject: [PATCH 404/422] chore(main): release 3.0.0 (#618) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 24e47ce4496..dd688ddaa38 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,17 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [3.0.0](https://github.com/googleapis/nodejs-monitoring/compare/v2.3.5...v3.0.0) (2022-05-20) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#617) + +### Build System + +* update library to use Node 12 ([#617](https://github.com/googleapis/nodejs-monitoring/issues/617)) ([965e533](https://github.com/googleapis/nodejs-monitoring/commit/965e5333b6a0561e9147ab940ff1a582207e91ff)) + ### [2.3.5](https://www.github.com/googleapis/nodejs-monitoring/compare/v2.3.4...v2.3.5) (2021-09-08) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index a09413d46dc..8aefe6f954d 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "2.3.5", + "version": "3.0.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index e669546efa9..739cdb39c20 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^2.3.5", + "@google-cloud/monitoring": "^3.0.0", "yargs": "^16.0.0" }, "devDependencies": { From 22af571ec17fda794b435d9f20bee5c3b8fc83b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 22:10:30 +0200 Subject: [PATCH 405/422] chore(deps): update dependency jsdoc-fresh to v2 (#620) 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.1` -> `^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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 8aefe6f954d..e30011ba294 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -53,7 +53,7 @@ "codecov": "^3.6.5", "gts": "^3.1.0", "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", "mocha": "^9.2.2", From 59e6f3901c8505b894b4943848fc33c2f29eb68c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 16 Jun 2022 02:02:54 +0200 Subject: [PATCH 406/422] chore(deps): update dependency jsdoc-region-tag to v2 (#621) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index e30011ba294..354c5f9f9e8 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -54,7 +54,7 @@ "gts": "^3.1.0", "jsdoc": "^3.5.5", "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^1.0.2", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", From 972b869e906bec52ade61ca94b3c5443aea71a69 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 8 Jul 2022 23:08:20 +0200 Subject: [PATCH 407/422] chore(deps): update dependency linkinator to v4 (#622) 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 | |---|---|---|---|---|---| | [linkinator](https://togithub.com/JustinBeckwith/linkinator) | [`^2.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/linkinator/2.16.2/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.0/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.1.0...v4.0.0) ##### Features - create new release with notes ([#​508](https://togithub.com/JustinBeckwith/linkinator/issues/508)) ([2cab633](https://togithub.com/JustinBeckwith/linkinator/commit/2cab633c9659eb10794a4bac06f8b0acdc3e2c0c)) ##### BREAKING CHANGES - The commits in [#​507](https://togithub.com/JustinBeckwith/linkinator/issues/507) and [#​506](https://togithub.com/JustinBeckwith/linkinator/issues/506) both had breaking changes. They included dropping support for Node.js 12.x and updating the CSV export to be streaming, and to use a new way of writing the CSV file. This is an empty to commit using the `BREAKING CHANGE` format in the commit message to ensure a release is triggered. ### [`v3.1.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.1.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.6...v3.1.0) ##### Features - allow --skip to be defined multiple times ([#​399](https://togithub.com/JustinBeckwith/linkinator/issues/399)) ([5ca5a46](https://togithub.com/JustinBeckwith/linkinator/commit/5ca5a461508e688de12e5ae6b4cfb6565f832ebf)) ### [`v3.0.6`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.6) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.5...v3.0.6) ##### Bug Fixes - **deps:** upgrade node-glob to v8 ([#​397](https://togithub.com/JustinBeckwith/linkinator/issues/397)) ([d334dc6](https://togithub.com/JustinBeckwith/linkinator/commit/d334dc6734cd7c2b73d7ed3dea0550a6c3072ad5)) ### [`v3.0.5`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.5) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.4...v3.0.5) ##### Bug Fixes - **deps:** upgrade to htmlparser2 v8.0.1 ([#​396](https://togithub.com/JustinBeckwith/linkinator/issues/396)) ([ba3b9a8](https://togithub.com/JustinBeckwith/linkinator/commit/ba3b9a8a9b19d39af6ed91790135e833b80c1eb6)) ### [`v3.0.4`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.4) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.3...v3.0.4) ##### Bug Fixes - **deps:** update dependency gaxios to v5 ([#​391](https://togithub.com/JustinBeckwith/linkinator/issues/391)) ([48af50e](https://togithub.com/JustinBeckwith/linkinator/commit/48af50e787731204aeb7eff41325c62291311e45)) ### [`v3.0.3`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.3) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.2...v3.0.3) ##### Bug Fixes - export getConfig from index ([#​371](https://togithub.com/JustinBeckwith/linkinator/issues/371)) ([0bc0355](https://togithub.com/JustinBeckwith/linkinator/commit/0bc0355c7e2ea457f247e6b52d1577b8c4ecb3a1)) ### [`v3.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.1...v3.0.2) ##### Bug Fixes - allow server root with trailing slash ([#​370](https://togithub.com/JustinBeckwith/linkinator/issues/370)) ([8adf6b0](https://togithub.com/JustinBeckwith/linkinator/commit/8adf6b025fda250e38461f1cdad40fe08c3b3b7c)) ### [`v3.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v3.0.0...v3.0.1) ##### Bug Fixes - decode path parts in local web server ([#​369](https://togithub.com/JustinBeckwith/linkinator/issues/369)) ([4696a0c](https://togithub.com/JustinBeckwith/linkinator/commit/4696a0c38c341b178ed815f47371fca955979feb)) ### [`v3.0.0`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v3.0.0) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v2.16.2...v3.0.0) ##### Bug Fixes - **deps:** update dependency chalk to v5 ([#​362](https://togithub.com/JustinBeckwith/linkinator/issues/362)) ([4b17a8d](https://togithub.com/JustinBeckwith/linkinator/commit/4b17a8d87b649eaf813428f8ee6955e1d21dae4f)) - feat!: convert to es modules, drop node 10 ([#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359)) ([efee299](https://togithub.com/JustinBeckwith/linkinator/commit/efee299ab8a805accef751eecf8538915a4e7783)), closes [#​359](https://togithub.com/JustinBeckwith/linkinator/issues/359) ##### BREAKING CHANGES - this module now requires node.js 12 and above, and has moved to es modules by default.
--- ### 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-monitoring). --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 354c5f9f9e8..cde1365b20f 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -55,7 +55,7 @@ "jsdoc": "^3.5.5", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.0.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", From b8519c2320f0cc260b9531e9b6cd7b01ff55b732 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:26:14 +0000 Subject: [PATCH 408/422] fix: change import long to require (#624) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../protos/protos.d.ts | 1398 ++- .../google-cloud-monitoring/protos/protos.js | 7825 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 6998 insertions(+), 2249 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 80de543caaa..106dcc34ba3 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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 { @@ -171,6 +171,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlertPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AlertPolicy { @@ -269,6 +276,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Documentation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Condition. */ @@ -386,6 +400,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Condition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Condition { @@ -487,6 +508,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MetricThreshold. */ @@ -619,6 +647,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricThreshold + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MetricAbsence. */ @@ -727,6 +762,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricAbsence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MonitoringQueryLanguageCondition. */ @@ -829,6 +871,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringQueryLanguageCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -956,6 +1005,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TypedValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeInterval. */ @@ -1052,6 +1108,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeInterval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Aggregation. */ @@ -1160,6 +1223,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aggregation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Aggregation { @@ -1318,6 +1388,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutationRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents an AlertPolicyService */ @@ -1414,35 +1491,35 @@ export namespace google { namespace AlertPolicyService { /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|listAlertPolicies}. * @param error Error, if any * @param [response] ListAlertPoliciesResponse */ type ListAlertPoliciesCallback = (error: (Error|null), response?: google.monitoring.v3.ListAlertPoliciesResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|getAlertPolicy}. * @param error Error, if any * @param [response] AlertPolicy */ type GetAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|createAlertPolicy}. * @param error Error, if any * @param [response] AlertPolicy */ type CreateAlertPolicyCallback = (error: (Error|null), response?: google.monitoring.v3.AlertPolicy) => void; /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|deleteAlertPolicy}. * @param error Error, if any * @param [response] Empty */ type DeleteAlertPolicyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|updateAlertPolicy}. * @param error Error, if any * @param [response] AlertPolicy */ @@ -1543,6 +1620,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAlertPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetAlertPolicyRequest. */ @@ -1633,6 +1717,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAlertPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListAlertPoliciesRequest. */ @@ -1747,6 +1838,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAlertPoliciesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListAlertPoliciesResponse. */ @@ -1849,6 +1947,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAlertPoliciesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateAlertPolicyRequest. */ @@ -1945,6 +2050,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAlertPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteAlertPolicyRequest. */ @@ -2035,6 +2147,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAlertPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DroppedLabels. */ @@ -2125,6 +2244,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DroppedLabels + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Group. */ @@ -2239,6 +2365,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Group + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a GroupService */ @@ -2349,42 +2482,42 @@ export namespace google { namespace GroupService { /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. + * Callback as used by {@link google.monitoring.v3.GroupService|listGroups}. * @param error Error, if any * @param [response] ListGroupsResponse */ type ListGroupsCallback = (error: (Error|null), response?: google.monitoring.v3.ListGroupsResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|getGroup}. * @param error Error, if any * @param [response] Group */ type GetGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; /** - * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|createGroup}. * @param error Error, if any * @param [response] Group */ type CreateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; /** - * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|updateGroup}. * @param error Error, if any * @param [response] Group */ type UpdateGroupCallback = (error: (Error|null), response?: google.monitoring.v3.Group) => void; /** - * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|deleteGroup}. * @param error Error, if any * @param [response] Empty */ type DeleteGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. + * Callback as used by {@link google.monitoring.v3.GroupService|listGroupMembers}. * @param error Error, if any * @param [response] ListGroupMembersResponse */ @@ -2512,6 +2645,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGroupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListGroupsResponse. */ @@ -2608,6 +2748,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGroupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetGroupRequest. */ @@ -2698,6 +2845,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateGroupRequest. */ @@ -2800,6 +2954,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateGroupRequest. */ @@ -2896,6 +3057,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteGroupRequest. */ @@ -2992,6 +3160,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListGroupMembersRequest. */ @@ -3106,6 +3281,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGroupMembersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListGroupMembersResponse. */ @@ -3208,6 +3390,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGroupMembersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Point. */ @@ -3304,6 +3493,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Point + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeSeries. */ @@ -3430,6 +3626,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeries + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeSeriesDescriptor. */ @@ -3526,6 +3729,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TimeSeriesDescriptor { @@ -3636,6 +3846,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValueDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3733,6 +3950,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TimeSeriesData { @@ -3831,6 +4055,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PointData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3937,6 +4168,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryError. */ @@ -4033,6 +4271,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TextLocator. */ @@ -4147,6 +4392,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextLocator + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TextLocator { @@ -4245,6 +4497,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Position + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4384,56 +4643,56 @@ export namespace google { namespace MetricService { /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * Callback as used by {@link google.monitoring.v3.MetricService|listMonitoredResourceDescriptors}. * @param error Error, if any * @param [response] ListMonitoredResourceDescriptorsResponse */ type ListMonitoredResourceDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMonitoredResourceDescriptorsResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|getMonitoredResourceDescriptor}. * @param error Error, if any * @param [response] MonitoredResourceDescriptor */ type GetMonitoredResourceDescriptorCallback = (error: (Error|null), response?: google.api.MonitoredResourceDescriptor) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. + * Callback as used by {@link google.monitoring.v3.MetricService|listMetricDescriptors}. * @param error Error, if any * @param [response] ListMetricDescriptorsResponse */ type ListMetricDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListMetricDescriptorsResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|getMetricDescriptor}. * @param error Error, if any * @param [response] MetricDescriptor */ type GetMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|createMetricDescriptor}. * @param error Error, if any * @param [response] MetricDescriptor */ type CreateMetricDescriptorCallback = (error: (Error|null), response?: google.api.MetricDescriptor) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|deleteMetricDescriptor}. * @param error Error, if any * @param [response] Empty */ type DeleteMetricDescriptorCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * Callback as used by {@link google.monitoring.v3.MetricService|listTimeSeries}. * @param error Error, if any * @param [response] ListTimeSeriesResponse */ type ListTimeSeriesCallback = (error: (Error|null), response?: google.monitoring.v3.ListTimeSeriesResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * Callback as used by {@link google.monitoring.v3.MetricService|createTimeSeries}. * @param error Error, if any * @param [response] Empty */ @@ -4546,6 +4805,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. */ @@ -4642,6 +4908,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 GetMonitoredResourceDescriptorRequest. */ @@ -4732,6 +5005,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMonitoredResourceDescriptorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListMetricDescriptorsRequest. */ @@ -4840,6 +5120,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMetricDescriptorsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListMetricDescriptorsResponse. */ @@ -4936,6 +5223,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMetricDescriptorsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetMetricDescriptorRequest. */ @@ -5026,6 +5320,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMetricDescriptorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateMetricDescriptorRequest. */ @@ -5122,6 +5423,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMetricDescriptorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteMetricDescriptorRequest. */ @@ -5212,6 +5520,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMetricDescriptorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListTimeSeriesRequest. */ @@ -5350,6 +5665,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTimeSeriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ListTimeSeriesRequest { @@ -5467,6 +5789,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTimeSeriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateTimeSeriesRequest. */ @@ -5563,6 +5892,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTimeSeriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateTimeSeriesError. */ @@ -5659,6 +5995,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTimeSeriesError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateTimeSeriesSummary. */ @@ -5761,6 +6104,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTimeSeriesSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CreateTimeSeriesSummary { @@ -5859,6 +6209,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Error + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5968,6 +6325,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryTimeSeriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryTimeSeriesResponse. */ @@ -6076,6 +6440,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryTimeSeriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryErrorList. */ @@ -6172,6 +6543,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryErrorList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NotificationChannelDescriptor. */ @@ -6298,6 +6676,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationChannelDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NotificationChannel. */ @@ -6442,6 +6827,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationChannel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace NotificationChannel { @@ -6618,70 +7010,70 @@ export namespace google { namespace NotificationChannelService { /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|listNotificationChannelDescriptors}. * @param error Error, if any * @param [response] ListNotificationChannelDescriptorsResponse */ type ListNotificationChannelDescriptorsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelDescriptorsResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|getNotificationChannelDescriptor}. * @param error Error, if any * @param [response] NotificationChannelDescriptor */ type GetNotificationChannelDescriptorCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannelDescriptor) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|listNotificationChannels}. * @param error Error, if any * @param [response] ListNotificationChannelsResponse */ type ListNotificationChannelsCallback = (error: (Error|null), response?: google.monitoring.v3.ListNotificationChannelsResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|getNotificationChannel}. * @param error Error, if any * @param [response] NotificationChannel */ type GetNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|createNotificationChannel}. * @param error Error, if any * @param [response] NotificationChannel */ type CreateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#updateNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|updateNotificationChannel}. * @param error Error, if any * @param [response] NotificationChannel */ type UpdateNotificationChannelCallback = (error: (Error|null), response?: google.monitoring.v3.NotificationChannel) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|deleteNotificationChannel}. * @param error Error, if any * @param [response] Empty */ type DeleteNotificationChannelCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|sendNotificationChannelVerificationCode}. * @param error Error, if any * @param [response] Empty */ type SendNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|getNotificationChannelVerificationCode}. * @param error Error, if any * @param [response] GetNotificationChannelVerificationCodeResponse */ type GetNotificationChannelVerificationCodeCallback = (error: (Error|null), response?: google.monitoring.v3.GetNotificationChannelVerificationCodeResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|verifyNotificationChannel}. * @param error Error, if any * @param [response] NotificationChannel */ @@ -6788,6 +7180,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNotificationChannelDescriptorsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListNotificationChannelDescriptorsResponse. */ @@ -6884,6 +7283,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNotificationChannelDescriptorsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetNotificationChannelDescriptorRequest. */ @@ -6974,6 +7380,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNotificationChannelDescriptorRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateNotificationChannelRequest. */ @@ -7070,6 +7483,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateNotificationChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListNotificationChannelsRequest. */ @@ -7184,6 +7604,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNotificationChannelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListNotificationChannelsResponse. */ @@ -7286,6 +7713,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListNotificationChannelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetNotificationChannelRequest. */ @@ -7376,6 +7810,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNotificationChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateNotificationChannelRequest. */ @@ -7472,6 +7913,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateNotificationChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteNotificationChannelRequest. */ @@ -7568,6 +8016,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteNotificationChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SendNotificationChannelVerificationCodeRequest. */ @@ -7658,6 +8113,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SendNotificationChannelVerificationCodeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetNotificationChannelVerificationCodeRequest. */ @@ -7754,6 +8216,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNotificationChannelVerificationCodeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetNotificationChannelVerificationCodeResponse. */ @@ -7850,6 +8319,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNotificationChannelVerificationCodeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a VerifyNotificationChannelRequest. */ @@ -7946,6 +8422,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyNotificationChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a QueryService */ @@ -7986,7 +8469,7 @@ export namespace google { namespace QueryService { /** - * Callback as used by {@link google.monitoring.v3.QueryService#queryTimeSeries}. + * Callback as used by {@link google.monitoring.v3.QueryService|queryTimeSeries}. * @param error Error, if any * @param [response] QueryTimeSeriesResponse */ @@ -8132,6 +8615,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Service + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Service { @@ -8218,6 +8708,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Custom + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppEngine. */ @@ -8308,6 +8805,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngine + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CloudEndpoints. */ @@ -8398,6 +8902,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudEndpoints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClusterIstio. */ @@ -8506,6 +9017,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClusterIstio + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MeshIstio. */ @@ -8608,6 +9126,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MeshIstio + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an IstioCanonicalService. */ @@ -8710,6 +9235,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IstioCanonicalService + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Telemetry. */ @@ -8800,6 +9332,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Telemetry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8924,6 +9463,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLevelObjective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ServiceLevelObjective { @@ -9039,6 +9585,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLevelIndicator + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BasicSli. */ @@ -9156,6 +9709,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BasicSli + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BasicSli { @@ -9242,6 +9802,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AvailabilityCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LatencyCriteria. */ @@ -9332,6 +9899,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -9429,6 +10003,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 RequestBasedSli. */ @@ -9528,6 +10109,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestBasedSli + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeSeriesRatio. */ @@ -9630,6 +10218,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeriesRatio + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DistributionCut. */ @@ -9726,7 +10321,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } + + /** + * Gets the default type url for DistributionCut + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } /** Properties of a WindowsBasedSli. */ interface IWindowsBasedSli { @@ -9843,6 +10445,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WindowsBasedSli + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WindowsBasedSli { @@ -9950,6 +10559,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PerformanceThreshold + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MetricRange. */ @@ -10046,6 +10662,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10213,70 +10836,70 @@ export namespace google { namespace ServiceMonitoringService { /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|createService}. * @param error Error, if any * @param [response] Service */ type CreateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|getService}. * @param error Error, if any * @param [response] Service */ type GetServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|listServices}. * @param error Error, if any * @param [response] ListServicesResponse */ type ListServicesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServicesResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|updateService}. * @param error Error, if any * @param [response] Service */ type UpdateServiceCallback = (error: (Error|null), response?: google.monitoring.v3.Service) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|deleteService}. * @param error Error, if any * @param [response] Empty */ type DeleteServiceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|createServiceLevelObjective}. * @param error Error, if any * @param [response] ServiceLevelObjective */ type CreateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|getServiceLevelObjective}. * @param error Error, if any * @param [response] ServiceLevelObjective */ type GetServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|listServiceLevelObjectives}. * @param error Error, if any * @param [response] ListServiceLevelObjectivesResponse */ type ListServiceLevelObjectivesCallback = (error: (Error|null), response?: google.monitoring.v3.ListServiceLevelObjectivesResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|updateServiceLevelObjective}. * @param error Error, if any * @param [response] ServiceLevelObjective */ type UpdateServiceLevelObjectiveCallback = (error: (Error|null), response?: google.monitoring.v3.ServiceLevelObjective) => void; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|deleteServiceLevelObjective}. * @param error Error, if any * @param [response] Empty */ @@ -10383,6 +11006,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetServiceRequest. */ @@ -10473,6 +11103,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServicesRequest. */ @@ -10581,6 +11218,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServicesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServicesResponse. */ @@ -10677,6 +11321,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServicesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateServiceRequest. */ @@ -10773,6 +11424,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteServiceRequest. */ @@ -10863,6 +11521,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateServiceLevelObjectiveRequest. */ @@ -10965,6 +11630,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateServiceLevelObjectiveRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetServiceLevelObjectiveRequest. */ @@ -11061,6 +11733,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetServiceLevelObjectiveRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServiceLevelObjectivesRequest. */ @@ -11175,6 +11854,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServiceLevelObjectivesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListServiceLevelObjectivesResponse. */ @@ -11271,6 +11957,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListServiceLevelObjectivesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateServiceLevelObjectiveRequest. */ @@ -11367,6 +12060,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateServiceLevelObjectiveRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteServiceLevelObjectiveRequest. */ @@ -11457,6 +12157,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteServiceLevelObjectiveRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SpanContext. */ @@ -11547,6 +12254,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpanContext + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** UptimeCheckRegion enum. */ @@ -11676,6 +12390,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InternalChecker + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InternalChecker { @@ -11848,6 +12569,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UptimeCheckConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UptimeCheckConfig { @@ -11946,6 +12674,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpCheck. */ @@ -12090,6 +12825,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpCheck + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HttpCheck { @@ -12188,6 +12930,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BasicAuthentication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** RequestMethod enum. */ @@ -12292,6 +13041,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TcpCheck + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ContentMatcher. */ @@ -12388,6 +13144,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentMatcher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ContentMatcher { @@ -12503,6 +13266,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UptimeCheckIp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** GroupResourceType enum. */ @@ -12620,42 +13390,42 @@ export namespace google { namespace UptimeCheckService { /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|listUptimeCheckConfigs}. * @param error Error, if any * @param [response] ListUptimeCheckConfigsResponse */ type ListUptimeCheckConfigsCallback = (error: (Error|null), response?: google.monitoring.v3.ListUptimeCheckConfigsResponse) => void; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|getUptimeCheckConfig}. * @param error Error, if any * @param [response] UptimeCheckConfig */ type GetUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|createUptimeCheckConfig}. * @param error Error, if any * @param [response] UptimeCheckConfig */ type CreateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|updateUptimeCheckConfig}. * @param error Error, if any * @param [response] UptimeCheckConfig */ type UpdateUptimeCheckConfigCallback = (error: (Error|null), response?: google.monitoring.v3.UptimeCheckConfig) => void; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|deleteUptimeCheckConfig}. * @param error Error, if any * @param [response] Empty */ type DeleteUptimeCheckConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|listUptimeCheckIps}. * @param error Error, if any * @param [response] ListUptimeCheckIpsResponse */ @@ -12762,6 +13532,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUptimeCheckConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListUptimeCheckConfigsResponse. */ @@ -12864,6 +13641,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUptimeCheckConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetUptimeCheckConfigRequest. */ @@ -12954,6 +13738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUptimeCheckConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateUptimeCheckConfigRequest. */ @@ -13050,6 +13841,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUptimeCheckConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateUptimeCheckConfigRequest. */ @@ -13146,6 +13944,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUptimeCheckConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteUptimeCheckConfigRequest. */ @@ -13236,6 +14041,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUptimeCheckConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListUptimeCheckIpsRequest. */ @@ -13332,6 +14144,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUptimeCheckIpsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListUptimeCheckIpsResponse. */ @@ -13428,6 +14247,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUptimeCheckIpsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -13571,6 +14397,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 { @@ -13683,6 +14516,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. */ @@ -13809,6 +14649,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 { @@ -13907,6 +14754,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. */ @@ -14012,6 +14866,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 { @@ -14116,6 +14977,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. */ @@ -14218,6 +15086,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. */ @@ -14308,6 +15183,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; } } @@ -14411,6 +15293,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; } } @@ -14508,6 +15397,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. */ @@ -14655,6 +15551,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. */ @@ -14751,6 +15654,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; } /** Properties of a MonitoredResourceDescriptor. */ @@ -14871,6 +15781,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. */ @@ -14967,6 +15884,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. */ @@ -15063,6 +15987,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. */ @@ -15165,6 +16096,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 { @@ -15337,6 +16275,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 { @@ -15441,6 +16386,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. */ @@ -15557,6 +16509,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; } } @@ -15651,6 +16610,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. */ @@ -15691,6 +16657,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -15738,6 +16707,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 @@ -15807,6 +16779,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. */ @@ -15951,6 +16930,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 { @@ -16055,6 +17041,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. */ @@ -16151,6 +17144,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; } } @@ -16242,6 +17242,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. */ @@ -16392,6 +17399,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 { @@ -16520,6 +17534,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. */ @@ -16634,6 +17655,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 { @@ -16732,6 +17760,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; } } @@ -16835,6 +17870,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. */ @@ -16937,6 +17979,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. */ @@ -17057,6 +18106,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. */ @@ -17270,6 +18326,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 { @@ -17397,6 +18460,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. */ @@ -17414,6 +18484,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -17451,6 +18524,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -17529,6 +18605,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 { @@ -17636,6 +18719,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. */ @@ -17738,6 +18828,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. */ @@ -17834,6 +18931,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. */ @@ -17936,6 +19040,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. */ @@ -18044,6 +19155,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 { @@ -18180,6 +19298,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 { @@ -18278,6 +19403,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; } } @@ -18369,6 +19501,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 { @@ -18485,6 +19624,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; } } @@ -18576,6 +19722,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 { @@ -18594,6 +19747,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. */ @@ -18617,6 +19773,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 @@ -18686,6 +19845,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 + } } } @@ -18783,6 +19959,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. */ @@ -18879,6 +20062,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 a Duration. */ @@ -18975,6 +20165,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 DoubleValue. */ @@ -19065,6 +20262,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FloatValue. */ @@ -19155,6 +20359,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Int64Value. */ @@ -19245,6 +20456,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UInt64Value. */ @@ -19335,6 +20553,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Int32Value. */ @@ -19425,6 +20650,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UInt32Value. */ @@ -19515,6 +20747,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BoolValue. */ @@ -19605,6 +20844,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StringValue. */ @@ -19695,6 +20941,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BytesValue. */ @@ -19785,6 +21038,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -19869,6 +21129,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. */ @@ -19959,6 +21226,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; } /** Properties of a Struct. */ @@ -20049,6 +21323,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. */ @@ -20172,6 +21453,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. */ @@ -20267,6 +21555,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; } } @@ -20373,6 +21668,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; } } diff --git a/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index aa05e1221af..e1ac31bdab0 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -265,62 +265,73 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 13: - message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.decode(reader, reader.uint32()); - break; - case 16: - 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.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 13: { + message.documentation = $root.google.monitoring.v3.AlertPolicy.Documentation.decode(reader, reader.uint32()); + break; + } + case 16: { + 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; + } + case 12: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.monitoring.v3.AlertPolicy.Condition.decode(reader, reader.uint32())); + break; + } + case 6: { + message.combiner = reader.int32(); + break; + } + case 17: { + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 18: { + message.validity = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 14: { + if (!(message.notificationChannels && message.notificationChannels.length)) + message.notificationChannels = []; + message.notificationChannels.push(reader.string()); + break; + } + case 10: { + message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; + } + case 11: { + message.mutationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; } - message.userLabels[key] = value; - break; - case 12: - if (!(message.conditions && message.conditions.length)) - message.conditions = []; - message.conditions.push($root.google.monitoring.v3.AlertPolicy.Condition.decode(reader, reader.uint32())); - break; - case 6: - message.combiner = reader.int32(); - break; - case 17: - message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - case 18: - message.validity = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 14: - if (!(message.notificationChannels && message.notificationChannels.length)) - message.notificationChannels = []; - message.notificationChannels.push(reader.string()); - break; - case 10: - message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); - break; - case 11: - message.mutationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -585,6 +596,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AlertPolicy + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AlertPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy"; + }; + AlertPolicy.Documentation = (function() { /** @@ -688,12 +714,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.mimeType = reader.string(); - break; + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.mimeType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -792,6 +820,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Documentation + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy.Documentation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Documentation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy.Documentation"; + }; + return Documentation; })(); @@ -945,21 +988,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 12: - message.name = reader.string(); - break; - case 6: - message.displayName = reader.string(); - break; - case 1: - message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.decode(reader, reader.uint32()); - break; - case 2: - message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); - break; - case 19: - message.conditionMonitoringQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.decode(reader, reader.uint32()); - break; + case 12: { + message.name = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 1: { + message.conditionThreshold = $root.google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.decode(reader, reader.uint32()); + break; + } + case 2: { + message.conditionAbsent = $root.google.monitoring.v3.AlertPolicy.Condition.MetricAbsence.decode(reader, reader.uint32()); + break; + } + case 19: { + message.conditionMonitoringQueryLanguage = $root.google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1117,6 +1165,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Condition + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy.Condition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Condition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy.Condition"; + }; + Condition.Trigger = (function() { /** @@ -1234,12 +1297,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.count = reader.int32(); - break; - case 2: - message.percent = reader.double(); - break; + case 1: { + message.count = reader.int32(); + break; + } + case 2: { + message.percent = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -1347,6 +1412,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Trigger + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy.Condition.Trigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy.Condition.Trigger"; + }; + return Trigger; })(); @@ -1523,34 +1603,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.filter = reader.string(); - break; - case 8: - if (!(message.aggregations && message.aggregations.length)) - message.aggregations = []; - message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); - break; - case 9: - message.denominatorFilter = reader.string(); - break; - case 10: - if (!(message.denominatorAggregations && message.denominatorAggregations.length)) - message.denominatorAggregations = []; - message.denominatorAggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); - break; - case 4: - message.comparison = reader.int32(); - break; - case 5: - message.thresholdValue = reader.double(); - break; - case 6: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 7: - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); - break; + case 2: { + message.filter = reader.string(); + break; + } + case 8: { + if (!(message.aggregations && message.aggregations.length)) + message.aggregations = []; + message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + } + case 9: { + message.denominatorFilter = reader.string(); + break; + } + case 10: { + if (!(message.denominatorAggregations && message.denominatorAggregations.length)) + message.denominatorAggregations = []; + message.denominatorAggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + } + case 4: { + message.comparison = reader.int32(); + break; + } + case 5: { + message.thresholdValue = reader.double(); + break; + } + case 6: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1781,6 +1869,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetricThreshold + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricThreshold.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy.Condition.MetricThreshold"; + }; + return MetricThreshold; })(); @@ -1911,20 +2014,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.filter = reader.string(); - break; - case 5: - if (!(message.aggregations && message.aggregations.length)) - message.aggregations = []; - message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); - break; - case 2: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); - break; + case 1: { + message.filter = reader.string(); + break; + } + case 5: { + if (!(message.aggregations && message.aggregations.length)) + message.aggregations = []; + message.aggregations.push($root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2067,6 +2174,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetricAbsence + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricAbsence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy.Condition.MetricAbsence"; + }; + return MetricAbsence; })(); @@ -2184,15 +2306,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.query = reader.string(); - break; - case 2: - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); - break; + case 1: { + message.query = reader.string(); + break; + } + case 2: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.trigger = $root.google.monitoring.v3.AlertPolicy.Condition.Trigger.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2309,6 +2434,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MonitoringQueryLanguageCondition + * @function getTypeUrl + * @memberof google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringQueryLanguageCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition"; + }; + return MonitoringQueryLanguageCondition; })(); @@ -2486,21 +2626,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.boolValue = reader.bool(); - break; - case 2: - message.int64Value = reader.int64(); - break; - case 3: - message.doubleValue = reader.double(); - break; - case 4: - message.stringValue = reader.string(); - break; - case 5: - message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); - break; + case 1: { + message.boolValue = reader.bool(); + break; + } + case 2: { + message.int64Value = reader.int64(); + break; + } + case 3: { + message.doubleValue = reader.double(); + break; + } + case 4: { + message.stringValue = reader.string(); + break; + } + case 5: { + message.distributionValue = $root.google.api.Distribution.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2666,6 +2811,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TypedValue + * @function getTypeUrl + * @memberof google.monitoring.v3.TypedValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypedValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TypedValue"; + }; + return TypedValue; })(); @@ -2772,12 +2932,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2886,6 +3048,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeInterval + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeInterval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeInterval"; + }; + return TimeInterval; })(); @@ -3016,20 +3193,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 2: - message.perSeriesAligner = reader.int32(); - break; - case 4: - message.crossSeriesReducer = reader.int32(); - break; - case 5: - if (!(message.groupByFields && message.groupByFields.length)) - message.groupByFields = []; - message.groupByFields.push(reader.string()); - break; + case 1: { + message.alignmentPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.perSeriesAligner = reader.int32(); + break; + } + case 4: { + message.crossSeriesReducer = reader.int32(); + break; + } + case 5: { + if (!(message.groupByFields && message.groupByFields.length)) + message.groupByFields = []; + message.groupByFields.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -3333,6 +3514,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Aggregation + * @function getTypeUrl + * @memberof google.monitoring.v3.Aggregation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Aggregation"; + }; + /** * Aligner enum. * @name google.monitoring.v3.Aggregation.Aligner @@ -3565,12 +3761,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mutateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.mutatedBy = reader.string(); - break; + case 1: { + message.mutateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mutatedBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3674,6 +3872,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MutationRecord + * @function getTypeUrl + * @memberof google.monitoring.v3.MutationRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutationRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.MutationRecord"; + }; + return MutationRecord; })(); @@ -3710,7 +3923,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#listAlertPolicies}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|listAlertPolicies}. * @memberof google.monitoring.v3.AlertPolicyService * @typedef ListAlertPoliciesCallback * @type {function} @@ -3743,7 +3956,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#getAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|getAlertPolicy}. * @memberof google.monitoring.v3.AlertPolicyService * @typedef GetAlertPolicyCallback * @type {function} @@ -3776,7 +3989,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#createAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|createAlertPolicy}. * @memberof google.monitoring.v3.AlertPolicyService * @typedef CreateAlertPolicyCallback * @type {function} @@ -3809,7 +4022,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#deleteAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|deleteAlertPolicy}. * @memberof google.monitoring.v3.AlertPolicyService * @typedef DeleteAlertPolicyCallback * @type {function} @@ -3842,7 +4055,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.AlertPolicyService#updateAlertPolicy}. + * Callback as used by {@link google.monitoring.v3.AlertPolicyService|updateAlertPolicy}. * @memberof google.monitoring.v3.AlertPolicyService * @typedef UpdateAlertPolicyCallback * @type {function} @@ -3980,12 +4193,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 2: - message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); - break; + case 3: { + message.name = reader.string(); + break; + } + case 2: { + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4089,6 +4304,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateAlertPolicyRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateAlertPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAlertPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateAlertPolicyRequest"; + }; + return CreateAlertPolicyRequest; })(); @@ -4184,9 +4414,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4276,6 +4507,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetAlertPolicyRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetAlertPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAlertPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetAlertPolicyRequest"; + }; + return GetAlertPolicyRequest; })(); @@ -4415,21 +4661,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.orderBy = 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 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.orderBy = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4552,6 +4803,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListAlertPoliciesRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListAlertPoliciesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAlertPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListAlertPoliciesRequest"; + }; + return ListAlertPoliciesRequest; })(); @@ -4671,17 +4937,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.alertPolicies && message.alertPolicies.length)) - message.alertPolicies = []; - message.alertPolicies.push($root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); - break; + case 3: { + if (!(message.alertPolicies && message.alertPolicies.length)) + message.alertPolicies = []; + message.alertPolicies.push($root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 4: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4806,6 +5075,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListAlertPoliciesResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListAlertPoliciesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAlertPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListAlertPoliciesResponse"; + }; + return ListAlertPoliciesResponse; })(); @@ -4912,12 +5196,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); - break; + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.alertPolicy = $root.google.monitoring.v3.AlertPolicy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5026,6 +5312,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateAlertPolicyRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.UpdateAlertPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAlertPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UpdateAlertPolicyRequest"; + }; + return UpdateAlertPolicyRequest; })(); @@ -5121,9 +5422,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5213,6 +5515,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteAlertPolicyRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteAlertPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAlertPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteAlertPolicyRequest"; + }; + return DeleteAlertPolicyRequest; })(); @@ -5310,28 +5627,29 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (message.label === $util.emptyObject) - message.label = {}; - 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: { + if (message.label === $util.emptyObject) + message.label = {}; + 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.label[key] = value; + break; } - message.label[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -5435,6 +5753,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DroppedLabels + * @function getTypeUrl + * @memberof google.monitoring.v3.DroppedLabels + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DroppedLabels.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DroppedLabels"; + }; + return DroppedLabels; })(); @@ -5574,21 +5907,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.parentName = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.isCluster = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.parentName = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.isCluster = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -5711,6 +6049,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Group + * @function getTypeUrl + * @memberof google.monitoring.v3.Group + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Group.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Group"; + }; + return Group; })(); @@ -5747,7 +6100,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroups}. + * Callback as used by {@link google.monitoring.v3.GroupService|listGroups}. * @memberof google.monitoring.v3.GroupService * @typedef ListGroupsCallback * @type {function} @@ -5780,7 +6133,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.GroupService#getGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|getGroup}. * @memberof google.monitoring.v3.GroupService * @typedef GetGroupCallback * @type {function} @@ -5813,7 +6166,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.GroupService#createGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|createGroup}. * @memberof google.monitoring.v3.GroupService * @typedef CreateGroupCallback * @type {function} @@ -5846,7 +6199,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.GroupService#updateGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|updateGroup}. * @memberof google.monitoring.v3.GroupService * @typedef UpdateGroupCallback * @type {function} @@ -5879,7 +6232,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.GroupService#deleteGroup}. + * Callback as used by {@link google.monitoring.v3.GroupService|deleteGroup}. * @memberof google.monitoring.v3.GroupService * @typedef DeleteGroupCallback * @type {function} @@ -5912,7 +6265,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.GroupService#listGroupMembers}. + * Callback as used by {@link google.monitoring.v3.GroupService|listGroupMembers}. * @memberof google.monitoring.v3.GroupService * @typedef ListGroupMembersCallback * @type {function} @@ -6108,24 +6461,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: - message.name = reader.string(); - break; - case 2: - message.childrenOfGroup = reader.string(); - break; - case 3: - message.ancestorsOfGroup = reader.string(); - break; - case 4: - message.descendantsOfGroup = reader.string(); - break; - case 5: - message.pageSize = reader.int32(); - break; - case 6: - message.pageToken = reader.string(); - break; + case 7: { + message.name = reader.string(); + break; + } + case 2: { + message.childrenOfGroup = reader.string(); + break; + } + case 3: { + message.ancestorsOfGroup = reader.string(); + break; + } + case 4: { + message.descendantsOfGroup = reader.string(); + break; + } + case 5: { + message.pageSize = reader.int32(); + break; + } + case 6: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6273,6 +6632,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListGroupsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListGroupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListGroupsRequest"; + }; + return ListGroupsRequest; })(); @@ -6381,14 +6755,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.group && message.group.length)) - message.group = []; - message.group.push($root.google.monitoring.v3.Group.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.group && message.group.length)) + message.group = []; + message.group.push($root.google.monitoring.v3.Group.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6504,6 +6880,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListGroupsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListGroupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListGroupsResponse"; + }; + return ListGroupsResponse; })(); @@ -6599,9 +6990,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6691,6 +7083,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetGroupRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetGroupRequest"; + }; + return GetGroupRequest; })(); @@ -6808,15 +7215,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 2: - message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 2: { + message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6928,6 +7338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateGroupRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateGroupRequest"; + }; + return CreateGroupRequest; })(); @@ -7034,12 +7459,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); - break; - case 3: - message.validateOnly = reader.bool(); - break; + case 2: { + message.group = $root.google.monitoring.v3.Group.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7143,6 +7570,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateGroupRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.UpdateGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UpdateGroupRequest"; + }; + return UpdateGroupRequest; })(); @@ -7249,12 +7691,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 4: - message.recursive = reader.bool(); - break; + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.recursive = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7353,6 +7797,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteGroupRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteGroupRequest"; + }; + return DeleteGroupRequest; })(); @@ -7492,21 +7951,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: - message.name = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.filter = reader.string(); - break; - case 6: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; + case 7: { + message.name = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7634,6 +8098,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListGroupMembersRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListGroupMembersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGroupMembersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListGroupMembersRequest"; + }; + return ListGroupMembersRequest; })(); @@ -7753,17 +8232,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.members && message.members.length)) - message.members = []; - message.members.push($root.google.api.MonitoredResource.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - message.totalSize = reader.int32(); - break; + case 1: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.google.api.MonitoredResource.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7888,6 +8370,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListGroupMembersResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListGroupMembersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGroupMembersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListGroupMembersResponse"; + }; + return ListGroupMembersResponse; })(); @@ -7994,12 +8491,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; - case 2: - message.value = $root.google.monitoring.v3.TypedValue.decode(reader, reader.uint32()); - break; + case 1: { + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + } + case 2: { + message.value = $root.google.monitoring.v3.TypedValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8108,6 +8607,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Point + * @function getTypeUrl + * @memberof google.monitoring.v3.Point + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Point"; + }; + return Point; })(); @@ -8271,29 +8785,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.metric = $root.google.api.Metric.decode(reader, reader.uint32()); - break; - case 2: - message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 7: - message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); - break; - case 3: - message.metricKind = reader.int32(); - break; - case 4: - message.valueType = reader.int32(); - break; - case 5: - if (!(message.points && message.points.length)) - message.points = []; - message.points.push($root.google.monitoring.v3.Point.decode(reader, reader.uint32())); - break; - case 8: - message.unit = reader.string(); - break; + case 1: { + message.metric = $root.google.api.Metric.decode(reader, reader.uint32()); + break; + } + case 2: { + message.resource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + } + case 7: { + message.metadata = $root.google.api.MonitoredResourceMetadata.decode(reader, reader.uint32()); + break; + } + case 3: { + message.metricKind = reader.int32(); + break; + } + case 4: { + message.valueType = reader.int32(); + break; + } + case 5: { + if (!(message.points && message.points.length)) + message.points = []; + message.points.push($root.google.monitoring.v3.Point.decode(reader, reader.uint32())); + break; + } + case 8: { + message.unit = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8526,6 +9047,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeries + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeSeries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeSeries"; + }; + return TimeSeries; })(); @@ -8636,16 +9172,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.labelDescriptors && message.labelDescriptors.length)) - message.labelDescriptors = []; - message.labelDescriptors.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.pointDescriptors && message.pointDescriptors.length)) - message.pointDescriptors = []; - message.pointDescriptors.push($root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.labelDescriptors && message.labelDescriptors.length)) + message.labelDescriptors = []; + message.labelDescriptors.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.pointDescriptors && message.pointDescriptors.length)) + message.pointDescriptors = []; + message.pointDescriptors.push($root.google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8778,6 +9316,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeriesDescriptor + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeSeriesDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeSeriesDescriptor"; + }; + TimeSeriesDescriptor.ValueDescriptor = (function() { /** @@ -8903,18 +9456,22 @@ 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.metricKind = reader.int32(); - break; - case 4: - message.unit = reader.string(); - break; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.valueType = reader.int32(); + break; + } + case 3: { + message.metricKind = reader.int32(); + break; + } + case 4: { + message.unit = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9090,6 +9647,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ValueDescriptor + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValueDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor"; + }; + return ValueDescriptor; })(); @@ -9203,16 +9775,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.labelValues && message.labelValues.length)) - message.labelValues = []; - message.labelValues.push($root.google.monitoring.v3.LabelValue.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.pointData && message.pointData.length)) - message.pointData = []; - message.pointData.push($root.google.monitoring.v3.TimeSeriesData.PointData.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.labelValues && message.labelValues.length)) + message.labelValues = []; + message.labelValues.push($root.google.monitoring.v3.LabelValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.pointData && message.pointData.length)) + message.pointData = []; + message.pointData.push($root.google.monitoring.v3.TimeSeriesData.PointData.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -9345,6 +9919,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeriesData + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeSeriesData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeSeriesData"; + }; + TimeSeriesData.PointData = (function() { /** @@ -9450,14 +10039,16 @@ 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.monitoring.v3.TypedValue.decode(reader, reader.uint32())); - break; - case 2: - message.timeInterval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.monitoring.v3.TypedValue.decode(reader, reader.uint32())); + break; + } + case 2: { + message.timeInterval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9578,6 +10169,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PointData + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeSeriesData.PointData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PointData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeSeriesData.PointData"; + }; + return PointData; })(); @@ -9712,15 +10318,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.boolValue = reader.bool(); - break; - case 2: - message.int64Value = reader.int64(); - break; - case 3: - message.stringValue = reader.string(); - break; + case 1: { + message.boolValue = reader.bool(); + break; + } + case 2: { + message.int64Value = reader.int64(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9852,6 +10461,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelValue + * @function getTypeUrl + * @memberof google.monitoring.v3.LabelValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.LabelValue"; + }; + return LabelValue; })(); @@ -9958,12 +10582,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.locator = $root.google.monitoring.v3.TextLocator.decode(reader, reader.uint32()); - break; - case 2: - message.message = reader.string(); - break; + case 1: { + message.locator = $root.google.monitoring.v3.TextLocator.decode(reader, reader.uint32()); + break; + } + case 2: { + message.message = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10067,6 +10693,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryError + * @function getTypeUrl + * @memberof google.monitoring.v3.QueryError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.QueryError"; + }; + return QueryError; })(); @@ -10206,21 +10847,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.source = reader.string(); - break; - case 2: - message.startPosition = $root.google.monitoring.v3.TextLocator.Position.decode(reader, reader.uint32()); - break; - case 3: - message.endPosition = $root.google.monitoring.v3.TextLocator.Position.decode(reader, reader.uint32()); - break; - case 4: - message.nestedLocator = $root.google.monitoring.v3.TextLocator.decode(reader, reader.uint32()); - break; - case 5: - message.nestingReason = reader.string(); - break; + case 1: { + message.source = reader.string(); + break; + } + case 2: { + message.startPosition = $root.google.monitoring.v3.TextLocator.Position.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endPosition = $root.google.monitoring.v3.TextLocator.Position.decode(reader, reader.uint32()); + break; + } + case 4: { + message.nestedLocator = $root.google.monitoring.v3.TextLocator.decode(reader, reader.uint32()); + break; + } + case 5: { + message.nestingReason = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10358,6 +11004,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TextLocator + * @function getTypeUrl + * @memberof google.monitoring.v3.TextLocator + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextLocator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TextLocator"; + }; + TextLocator.Position = (function() { /** @@ -10461,12 +11122,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.line = reader.int32(); - break; - case 2: - message.column = reader.int32(); - break; + case 1: { + message.line = reader.int32(); + break; + } + case 2: { + message.column = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10565,6 +11228,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Position + * @function getTypeUrl + * @memberof google.monitoring.v3.TextLocator.Position + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TextLocator.Position"; + }; + return Position; })(); @@ -10604,7 +11282,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMonitoredResourceDescriptors}. + * Callback as used by {@link google.monitoring.v3.MetricService|listMonitoredResourceDescriptors}. * @memberof google.monitoring.v3.MetricService * @typedef ListMonitoredResourceDescriptorsCallback * @type {function} @@ -10637,7 +11315,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMonitoredResourceDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|getMonitoredResourceDescriptor}. * @memberof google.monitoring.v3.MetricService * @typedef GetMonitoredResourceDescriptorCallback * @type {function} @@ -10670,7 +11348,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#listMetricDescriptors}. + * Callback as used by {@link google.monitoring.v3.MetricService|listMetricDescriptors}. * @memberof google.monitoring.v3.MetricService * @typedef ListMetricDescriptorsCallback * @type {function} @@ -10703,7 +11381,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#getMetricDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|getMetricDescriptor}. * @memberof google.monitoring.v3.MetricService * @typedef GetMetricDescriptorCallback * @type {function} @@ -10736,7 +11414,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#createMetricDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|createMetricDescriptor}. * @memberof google.monitoring.v3.MetricService * @typedef CreateMetricDescriptorCallback * @type {function} @@ -10769,7 +11447,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#deleteMetricDescriptor}. + * Callback as used by {@link google.monitoring.v3.MetricService|deleteMetricDescriptor}. * @memberof google.monitoring.v3.MetricService * @typedef DeleteMetricDescriptorCallback * @type {function} @@ -10802,7 +11480,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#listTimeSeries}. + * Callback as used by {@link google.monitoring.v3.MetricService|listTimeSeries}. * @memberof google.monitoring.v3.MetricService * @typedef ListTimeSeriesCallback * @type {function} @@ -10835,7 +11513,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.MetricService#createTimeSeries}. + * Callback as used by {@link google.monitoring.v3.MetricService|createTimeSeries}. * @memberof google.monitoring.v3.MetricService * @typedef CreateTimeSeriesCallback * @type {function} @@ -10995,18 +11673,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 5: { + message.name = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11121,6 +11803,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMonitoredResourceDescriptorsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsRequest"; + }; + return ListMonitoredResourceDescriptorsRequest; })(); @@ -11229,14 +11926,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; @@ -11352,6 +12051,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMonitoredResourceDescriptorsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.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.monitoring.v3.ListMonitoredResourceDescriptorsResponse"; + }; + return ListMonitoredResourceDescriptorsResponse; })(); @@ -11447,9 +12161,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11539,6 +12254,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetMonitoredResourceDescriptorRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetMonitoredResourceDescriptorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMonitoredResourceDescriptorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetMonitoredResourceDescriptorRequest"; + }; + return GetMonitoredResourceDescriptorRequest; })(); @@ -11667,18 +12397,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 5: { + message.name = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11793,6 +12527,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMetricDescriptorsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListMetricDescriptorsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetricDescriptorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListMetricDescriptorsRequest"; + }; + return ListMetricDescriptorsRequest; })(); @@ -11901,14 +12650,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.metricDescriptors && message.metricDescriptors.length)) - message.metricDescriptors = []; - message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.metricDescriptors && message.metricDescriptors.length)) + message.metricDescriptors = []; + message.metricDescriptors.push($root.google.api.MetricDescriptor.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12024,6 +12775,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMetricDescriptorsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListMetricDescriptorsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMetricDescriptorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListMetricDescriptorsResponse"; + }; + return ListMetricDescriptorsResponse; })(); @@ -12119,9 +12885,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12211,6 +12978,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetMetricDescriptorRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetMetricDescriptorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMetricDescriptorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetMetricDescriptorRequest"; + }; + return GetMetricDescriptorRequest; })(); @@ -12317,12 +13099,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 2: - message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); - break; + case 3: { + message.name = reader.string(); + break; + } + case 2: { + message.metricDescriptor = $root.google.api.MetricDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12426,6 +13210,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateMetricDescriptorRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateMetricDescriptorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMetricDescriptorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateMetricDescriptorRequest"; + }; + return CreateMetricDescriptorRequest; })(); @@ -12521,9 +13320,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12613,6 +13413,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteMetricDescriptorRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteMetricDescriptorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMetricDescriptorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteMetricDescriptorRequest"; + }; + return DeleteMetricDescriptorRequest; })(); @@ -12796,33 +13611,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 10: - message.name = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 4: - message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); - break; - case 5: - message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); - break; - case 11: - message.secondaryAggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); - break; - case 6: - message.orderBy = reader.string(); - break; - case 7: - message.view = reader.int32(); - break; - case 8: - message.pageSize = reader.int32(); - break; - case 9: - message.pageToken = reader.string(); - break; + case 10: { + message.name = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 4: { + message.interval = $root.google.monitoring.v3.TimeInterval.decode(reader, reader.uint32()); + break; + } + case 5: { + message.aggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); + break; + } + case 11: { + message.secondaryAggregation = $root.google.monitoring.v3.Aggregation.decode(reader, reader.uint32()); + break; + } + case 6: { + message.orderBy = reader.string(); + break; + } + case 7: { + message.view = reader.int32(); + break; + } + case 8: { + message.pageSize = reader.int32(); + break; + } + case 9: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13005,6 +13829,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListTimeSeriesRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListTimeSeriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTimeSeriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListTimeSeriesRequest"; + }; + /** * TimeSeriesView enum. * @name google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView @@ -13151,22 +13990,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.timeSeries && message.timeSeries.length)) - message.timeSeries = []; - message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.executionErrors && message.executionErrors.length)) - message.executionErrors = []; - message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - case 5: - message.unit = reader.string(); - break; + case 1: { + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.executionErrors && message.executionErrors.length)) + message.executionErrors = []; + message.executionErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 5: { + message.unit = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13317,6 +14160,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListTimeSeriesResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListTimeSeriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTimeSeriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListTimeSeriesResponse"; + }; + return ListTimeSeriesResponse; })(); @@ -13425,14 +14283,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 2: - if (!(message.timeSeries && message.timeSeries.length)) - message.timeSeries = []; - message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); - break; + case 3: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.timeSeries && message.timeSeries.length)) + message.timeSeries = []; + message.timeSeries.push($root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -13548,6 +14408,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateTimeSeriesRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateTimeSeriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTimeSeriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateTimeSeriesRequest"; + }; + return CreateTimeSeriesRequest; })(); @@ -13654,12 +14529,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); - break; - case 2: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; + case 1: { + message.timeSeries = $root.google.monitoring.v3.TimeSeries.decode(reader, reader.uint32()); + break; + } + case 2: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13768,6 +14645,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateTimeSeriesError + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateTimeSeriesError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTimeSeriesError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateTimeSeriesError"; + }; + return CreateTimeSeriesError; })(); @@ -13887,17 +14779,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.totalPointCount = reader.int32(); - break; - case 2: - message.successPointCount = reader.int32(); - break; - case 3: - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); - break; + case 1: { + message.totalPointCount = reader.int32(); + break; + } + case 2: { + message.successPointCount = reader.int32(); + break; + } + case 3: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.monitoring.v3.CreateTimeSeriesSummary.Error.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -14022,6 +14917,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateTimeSeriesSummary + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateTimeSeriesSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTimeSeriesSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateTimeSeriesSummary"; + }; + CreateTimeSeriesSummary.Error = (function() { /** @@ -14125,12 +15035,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 2: - message.pointCount = reader.int32(); - break; + case 1: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pointCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14234,6 +15146,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Error + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateTimeSeriesSummary.Error + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateTimeSeriesSummary.Error"; + }; + return Error; })(); @@ -14365,18 +15292,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 7: - message.query = reader.string(); - break; - case 9: - message.pageSize = reader.int32(); - break; - case 10: - message.pageToken = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 7: { + message.query = reader.string(); + break; + } + case 9: { + message.pageSize = reader.int32(); + break; + } + case 10: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14491,6 +15422,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryTimeSeriesRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.QueryTimeSeriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryTimeSeriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.QueryTimeSeriesRequest"; + }; + return QueryTimeSeriesRequest; })(); @@ -14623,22 +15569,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - message.timeSeriesDescriptor = $root.google.monitoring.v3.TimeSeriesDescriptor.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.timeSeriesData && message.timeSeriesData.length)) - message.timeSeriesData = []; - message.timeSeriesData.push($root.google.monitoring.v3.TimeSeriesData.decode(reader, reader.uint32())); - break; - case 10: - message.nextPageToken = reader.string(); - break; - case 11: - if (!(message.partialErrors && message.partialErrors.length)) - message.partialErrors = []; - message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; + case 8: { + message.timeSeriesDescriptor = $root.google.monitoring.v3.TimeSeriesDescriptor.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.timeSeriesData && message.timeSeriesData.length)) + message.timeSeriesData = []; + message.timeSeriesData.push($root.google.monitoring.v3.TimeSeriesData.decode(reader, reader.uint32())); + break; + } + case 10: { + message.nextPageToken = reader.string(); + break; + } + case 11: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -14794,6 +15744,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryTimeSeriesResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.QueryTimeSeriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryTimeSeriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.QueryTimeSeriesResponse"; + }; + return QueryTimeSeriesResponse; })(); @@ -14902,14 +15867,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.monitoring.v3.QueryError.decode(reader, reader.uint32())); - break; - case 2: - message.errorSummary = reader.string(); - break; + case 1: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.monitoring.v3.QueryError.decode(reader, reader.uint32())); + break; + } + case 2: { + message.errorSummary = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15025,6 +15992,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryErrorList + * @function getTypeUrl + * @memberof google.monitoring.v3.QueryErrorList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryErrorList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.QueryErrorList"; + }; + return QueryErrorList; })(); @@ -15193,36 +16175,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: - 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 5: - if (!(message.supportedTiers && message.supportedTiers.length)) - message.supportedTiers = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 6: { + 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 5: { + if (!(message.supportedTiers && message.supportedTiers.length)) + message.supportedTiers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedTiers.push(reader.int32()); + } else message.supportedTiers.push(reader.int32()); - } else - message.supportedTiers.push(reader.int32()); - break; - case 7: - message.launchStage = reader.int32(); - break; + break; + } + case 7: { + message.launchStage = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -15455,6 +16444,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NotificationChannelDescriptor + * @function getTypeUrl + * @memberof google.monitoring.v3.NotificationChannelDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationChannelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.NotificationChannelDescriptor"; + }; + return NotificationChannelDescriptor; })(); @@ -15655,76 +16659,86 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 6: - message.name = reader.string(); - break; - case 3: - message.displayName = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - 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 6: { + message.name = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + 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; - case 8: - 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 8: { + 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; + } + case 9: { + message.verificationStatus = reader.int32(); + break; + } + case 11: { + message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 12: { + message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.mutationRecords && message.mutationRecords.length)) + message.mutationRecords = []; + message.mutationRecords.push($root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32())); + break; } - message.userLabels[key] = value; - break; - case 9: - message.verificationStatus = reader.int32(); - break; - case 11: - message.enabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - case 12: - message.creationRecord = $root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32()); - break; - case 13: - if (!(message.mutationRecords && message.mutationRecords.length)) - message.mutationRecords = []; - message.mutationRecords.push($root.google.monitoring.v3.MutationRecord.decode(reader, reader.uint32())); - break; default: reader.skipType(tag & 7); break; @@ -15962,6 +16976,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NotificationChannel + * @function getTypeUrl + * @memberof google.monitoring.v3.NotificationChannel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationChannel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.NotificationChannel"; + }; + /** * VerificationStatus enum. * @name google.monitoring.v3.NotificationChannel.VerificationStatus @@ -16014,7 +17043,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannelDescriptors}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|listNotificationChannelDescriptors}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef ListNotificationChannelDescriptorsCallback * @type {function} @@ -16047,7 +17076,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelDescriptor}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|getNotificationChannelDescriptor}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef GetNotificationChannelDescriptorCallback * @type {function} @@ -16080,7 +17109,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#listNotificationChannels}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|listNotificationChannels}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef ListNotificationChannelsCallback * @type {function} @@ -16113,7 +17142,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|getNotificationChannel}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef GetNotificationChannelCallback * @type {function} @@ -16146,7 +17175,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#createNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|createNotificationChannel}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef CreateNotificationChannelCallback * @type {function} @@ -16179,7 +17208,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#updateNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|updateNotificationChannel}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef UpdateNotificationChannelCallback * @type {function} @@ -16212,7 +17241,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#deleteNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|deleteNotificationChannel}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef DeleteNotificationChannelCallback * @type {function} @@ -16245,7 +17274,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#sendNotificationChannelVerificationCode}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|sendNotificationChannelVerificationCode}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef SendNotificationChannelVerificationCodeCallback * @type {function} @@ -16278,7 +17307,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#getNotificationChannelVerificationCode}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|getNotificationChannelVerificationCode}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef GetNotificationChannelVerificationCodeCallback * @type {function} @@ -16311,7 +17340,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.NotificationChannelService#verifyNotificationChannel}. + * Callback as used by {@link google.monitoring.v3.NotificationChannelService|verifyNotificationChannel}. * @memberof google.monitoring.v3.NotificationChannelService * @typedef VerifyNotificationChannelCallback * @type {function} @@ -16460,15 +17489,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = 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 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16575,6 +17607,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListNotificationChannelDescriptorsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNotificationChannelDescriptorsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListNotificationChannelDescriptorsRequest"; + }; + return ListNotificationChannelDescriptorsRequest; })(); @@ -16683,14 +17730,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.channelDescriptors && message.channelDescriptors.length)) - message.channelDescriptors = []; - message.channelDescriptors.push($root.google.monitoring.v3.NotificationChannelDescriptor.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.channelDescriptors && message.channelDescriptors.length)) + message.channelDescriptors = []; + message.channelDescriptors.push($root.google.monitoring.v3.NotificationChannelDescriptor.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16806,6 +17855,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListNotificationChannelDescriptorsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListNotificationChannelDescriptorsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNotificationChannelDescriptorsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListNotificationChannelDescriptorsResponse"; + }; + return ListNotificationChannelDescriptorsResponse; })(); @@ -16901,9 +17965,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16993,6 +18058,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetNotificationChannelDescriptorRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetNotificationChannelDescriptorRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNotificationChannelDescriptorRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetNotificationChannelDescriptorRequest"; + }; + return GetNotificationChannelDescriptorRequest; })(); @@ -17099,12 +18179,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 2: - message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); - break; + case 3: { + message.name = reader.string(); + break; + } + case 2: { + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17208,6 +18290,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateNotificationChannelRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateNotificationChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateNotificationChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateNotificationChannelRequest"; + }; + return CreateNotificationChannelRequest; })(); @@ -17347,21 +18444,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 6: - message.filter = reader.string(); - break; - case 7: - message.orderBy = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 5: { + message.name = reader.string(); + break; + } + case 6: { + message.filter = reader.string(); + break; + } + case 7: { + message.orderBy = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17484,6 +18586,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListNotificationChannelsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListNotificationChannelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNotificationChannelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListNotificationChannelsRequest"; + }; + return ListNotificationChannelsRequest; })(); @@ -17603,17 +18720,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (!(message.notificationChannels && message.notificationChannels.length)) - message.notificationChannels = []; - message.notificationChannels.push($root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 4: - message.totalSize = reader.int32(); - break; + case 3: { + if (!(message.notificationChannels && message.notificationChannels.length)) + message.notificationChannels = []; + message.notificationChannels.push($root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 4: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17738,6 +18858,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListNotificationChannelsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListNotificationChannelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListNotificationChannelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListNotificationChannelsResponse"; + }; + return ListNotificationChannelsResponse; })(); @@ -17833,9 +18968,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17925,6 +19061,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetNotificationChannelRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetNotificationChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNotificationChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetNotificationChannelRequest"; + }; + return GetNotificationChannelRequest; })(); @@ -18031,12 +19182,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); - break; + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notificationChannel = $root.google.monitoring.v3.NotificationChannel.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18145,6 +19298,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateNotificationChannelRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.UpdateNotificationChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateNotificationChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UpdateNotificationChannelRequest"; + }; + return UpdateNotificationChannelRequest; })(); @@ -18251,12 +19419,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 5: - message.force = reader.bool(); - break; + case 3: { + message.name = reader.string(); + break; + } + case 5: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -18355,6 +19525,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteNotificationChannelRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteNotificationChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteNotificationChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteNotificationChannelRequest"; + }; + return DeleteNotificationChannelRequest; })(); @@ -18450,9 +19635,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; @@ -18542,6 +19728,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SendNotificationChannelVerificationCodeRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SendNotificationChannelVerificationCodeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.SendNotificationChannelVerificationCodeRequest"; + }; + return SendNotificationChannelVerificationCodeRequest; })(); @@ -18648,12 +19849,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18757,6 +19960,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetNotificationChannelVerificationCodeRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNotificationChannelVerificationCodeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetNotificationChannelVerificationCodeRequest"; + }; + return GetNotificationChannelVerificationCodeRequest; })(); @@ -18863,12 +20081,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.string(); - break; - case 2: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.code = reader.string(); + break; + } + case 2: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18972,6 +20192,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetNotificationChannelVerificationCodeResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNotificationChannelVerificationCodeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetNotificationChannelVerificationCodeResponse"; + }; + return GetNotificationChannelVerificationCodeResponse; })(); @@ -19078,12 +20313,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.code = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.code = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19182,6 +20419,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VerifyNotificationChannelRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.VerifyNotificationChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyNotificationChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.VerifyNotificationChannelRequest"; + }; + return VerifyNotificationChannelRequest; })(); @@ -19218,7 +20470,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.QueryService#queryTimeSeries}. + * Callback as used by {@link google.monitoring.v3.QueryService|queryTimeSeries}. * @memberof google.monitoring.v3.QueryService * @typedef QueryTimeSeriesCallback * @type {function} @@ -19447,33 +20699,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 6: - message.custom = $root.google.monitoring.v3.Service.Custom.decode(reader, reader.uint32()); - break; - case 7: - message.appEngine = $root.google.monitoring.v3.Service.AppEngine.decode(reader, reader.uint32()); - break; - case 8: - message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.decode(reader, reader.uint32()); - break; - case 9: - message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.decode(reader, reader.uint32()); - break; - case 10: - message.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.decode(reader, reader.uint32()); - break; - case 11: - message.istioCanonicalService = $root.google.monitoring.v3.Service.IstioCanonicalService.decode(reader, reader.uint32()); - break; - case 13: - message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 6: { + message.custom = $root.google.monitoring.v3.Service.Custom.decode(reader, reader.uint32()); + break; + } + case 7: { + message.appEngine = $root.google.monitoring.v3.Service.AppEngine.decode(reader, reader.uint32()); + break; + } + case 8: { + message.cloudEndpoints = $root.google.monitoring.v3.Service.CloudEndpoints.decode(reader, reader.uint32()); + break; + } + case 9: { + message.clusterIstio = $root.google.monitoring.v3.Service.ClusterIstio.decode(reader, reader.uint32()); + break; + } + case 10: { + message.meshIstio = $root.google.monitoring.v3.Service.MeshIstio.decode(reader, reader.uint32()); + break; + } + case 11: { + message.istioCanonicalService = $root.google.monitoring.v3.Service.IstioCanonicalService.decode(reader, reader.uint32()); + break; + } + case 13: { + message.telemetry = $root.google.monitoring.v3.Service.Telemetry.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19704,6 +20965,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Service + * @function getTypeUrl + * @memberof google.monitoring.v3.Service + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Service.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service"; + }; + Service.Custom = (function() { /** @@ -19861,6 +21137,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Custom + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.Custom + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Custom.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.Custom"; + }; + return Custom; })(); @@ -19956,9 +21247,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.moduleId = reader.string(); - break; + case 1: { + message.moduleId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20048,6 +21340,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppEngine + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.AppEngine + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngine.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.AppEngine"; + }; + return AppEngine; })(); @@ -20143,9 +21450,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.service = reader.string(); - break; + case 1: { + message.service = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20235,6 +21543,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CloudEndpoints + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.CloudEndpoints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudEndpoints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.CloudEndpoints"; + }; + return CloudEndpoints; })(); @@ -20363,18 +21686,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - message.clusterName = reader.string(); - break; - case 3: - message.serviceNamespace = reader.string(); - break; - case 4: - message.serviceName = reader.string(); - break; + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.clusterName = reader.string(); + break; + } + case 3: { + message.serviceNamespace = reader.string(); + break; + } + case 4: { + message.serviceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20489,6 +21816,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClusterIstio + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.ClusterIstio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClusterIstio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.ClusterIstio"; + }; + return ClusterIstio; })(); @@ -20606,15 +21948,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.meshUid = reader.string(); - break; - case 3: - message.serviceNamespace = reader.string(); - break; - case 4: - message.serviceName = reader.string(); - break; + case 1: { + message.meshUid = reader.string(); + break; + } + case 3: { + message.serviceNamespace = reader.string(); + break; + } + case 4: { + message.serviceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20721,6 +22066,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MeshIstio + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.MeshIstio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MeshIstio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.MeshIstio"; + }; + return MeshIstio; })(); @@ -20838,15 +22198,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.meshUid = reader.string(); - break; - case 3: - message.canonicalServiceNamespace = reader.string(); - break; - case 4: - message.canonicalService = reader.string(); - break; + case 1: { + message.meshUid = reader.string(); + break; + } + case 3: { + message.canonicalServiceNamespace = reader.string(); + break; + } + case 4: { + message.canonicalService = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20953,6 +22316,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IstioCanonicalService + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.IstioCanonicalService + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IstioCanonicalService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.IstioCanonicalService"; + }; + return IstioCanonicalService; })(); @@ -21048,9 +22426,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.resourceName = reader.string(); - break; + case 1: { + message.resourceName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21140,6 +22519,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Telemetry + * @function getTypeUrl + * @memberof google.monitoring.v3.Service.Telemetry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Telemetry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.Service.Telemetry"; + }; + return Telemetry; })(); @@ -21307,24 +22701,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 11: - message.displayName = reader.string(); - break; - case 3: - message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.decode(reader, reader.uint32()); - break; - case 4: - message.goal = reader.double(); - break; - case 5: - message.rollingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.calendarPeriod = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 11: { + message.displayName = reader.string(); + break; + } + case 3: { + message.serviceLevelIndicator = $root.google.monitoring.v3.ServiceLevelIndicator.decode(reader, reader.uint32()); + break; + } + case 4: { + message.goal = reader.double(); + break; + } + case 5: { + message.rollingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.calendarPeriod = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -21520,6 +22920,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceLevelObjective + * @function getTypeUrl + * @memberof google.monitoring.v3.ServiceLevelObjective + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceLevelObjective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ServiceLevelObjective"; + }; + /** * View enum. * @name google.monitoring.v3.ServiceLevelObjective.View @@ -21667,15 +23082,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.basicSli = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); - break; - case 1: - message.requestBased = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); - break; - case 2: - message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.decode(reader, reader.uint32()); - break; + case 4: { + message.basicSli = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + break; + } + case 1: { + message.requestBased = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); + break; + } + case 2: { + message.windowsBased = $root.google.monitoring.v3.WindowsBasedSli.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21815,6 +23233,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceLevelIndicator + * @function getTypeUrl + * @memberof google.monitoring.v3.ServiceLevelIndicator + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceLevelIndicator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ServiceLevelIndicator"; + }; + return ServiceLevelIndicator; })(); @@ -21974,27 +23407,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push(reader.string()); - break; - case 8: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push(reader.string()); - break; - case 9: - if (!(message.version && message.version.length)) - message.version = []; - message.version.push(reader.string()); - break; - case 2: - message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.decode(reader, reader.uint32()); - break; - case 3: - message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.decode(reader, reader.uint32()); - break; + case 7: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push(reader.string()); + break; + } + case 8: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push(reader.string()); + break; + } + case 9: { + if (!(message.version && message.version.length)) + message.version = []; + message.version.push(reader.string()); + break; + } + case 2: { + message.availability = $root.google.monitoring.v3.BasicSli.AvailabilityCriteria.decode(reader, reader.uint32()); + break; + } + case 3: { + message.latency = $root.google.monitoring.v3.BasicSli.LatencyCriteria.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22176,6 +23614,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BasicSli + * @function getTypeUrl + * @memberof google.monitoring.v3.BasicSli + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BasicSli.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.BasicSli"; + }; + BasicSli.AvailabilityCriteria = (function() { /** @@ -22333,6 +23786,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AvailabilityCriteria + * @function getTypeUrl + * @memberof google.monitoring.v3.BasicSli.AvailabilityCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvailabilityCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.BasicSli.AvailabilityCriteria"; + }; + return AvailabilityCriteria; })(); @@ -22428,9 +23896,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.threshold = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 3: { + message.threshold = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22525,6 +23994,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LatencyCriteria + * @function getTypeUrl + * @memberof google.monitoring.v3.BasicSli.LatencyCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.BasicSli.LatencyCriteria"; + }; + return LatencyCriteria; })(); @@ -22634,12 +24118,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; @@ -22738,6 +24224,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.monitoring.v3.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.monitoring.v3.Range"; + }; + return Range; })(); @@ -22858,12 +24359,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.decode(reader, reader.uint32()); - break; - case 3: - message.distributionCut = $root.google.monitoring.v3.DistributionCut.decode(reader, reader.uint32()); - break; + case 1: { + message.goodTotalRatio = $root.google.monitoring.v3.TimeSeriesRatio.decode(reader, reader.uint32()); + break; + } + case 3: { + message.distributionCut = $root.google.monitoring.v3.DistributionCut.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22983,6 +24486,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RequestBasedSli + * @function getTypeUrl + * @memberof google.monitoring.v3.RequestBasedSli + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestBasedSli.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.RequestBasedSli"; + }; + return RequestBasedSli; })(); @@ -23100,15 +24618,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.goodServiceFilter = reader.string(); - break; - case 5: - message.badServiceFilter = reader.string(); - break; - case 6: - message.totalServiceFilter = reader.string(); - break; + case 4: { + message.goodServiceFilter = reader.string(); + break; + } + case 5: { + message.badServiceFilter = reader.string(); + break; + } + case 6: { + message.totalServiceFilter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23215,6 +24736,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSeriesRatio + * @function getTypeUrl + * @memberof google.monitoring.v3.TimeSeriesRatio + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeriesRatio.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.TimeSeriesRatio"; + }; + return TimeSeriesRatio; })(); @@ -23321,12 +24857,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.distributionFilter = reader.string(); - break; - case 5: - message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); - break; + case 4: { + message.distributionFilter = reader.string(); + break; + } + case 5: { + message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23430,6 +24968,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DistributionCut + * @function getTypeUrl + * @memberof google.monitoring.v3.DistributionCut + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DistributionCut.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DistributionCut"; + }; + return DistributionCut; })(); @@ -23583,21 +25136,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.goodBadMetricFilter = reader.string(); - break; - case 2: - message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.decode(reader, reader.uint32()); - break; - case 6: - message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); - break; - case 7: - message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); - break; - case 4: - message.windowPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 5: { + message.goodBadMetricFilter = reader.string(); + break; + } + case 2: { + message.goodTotalRatioThreshold = $root.google.monitoring.v3.WindowsBasedSli.PerformanceThreshold.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricMeanInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); + break; + } + case 7: { + message.metricSumInRange = $root.google.monitoring.v3.WindowsBasedSli.MetricRange.decode(reader, reader.uint32()); + break; + } + case 4: { + message.windowPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23765,6 +25323,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WindowsBasedSli + * @function getTypeUrl + * @memberof google.monitoring.v3.WindowsBasedSli + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WindowsBasedSli.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.WindowsBasedSli"; + }; + WindowsBasedSli.PerformanceThreshold = (function() { /** @@ -23893,15 +25466,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.performance = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); - break; - case 3: - message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); - break; - case 2: - message.threshold = reader.double(); - break; + case 1: { + message.performance = $root.google.monitoring.v3.RequestBasedSli.decode(reader, reader.uint32()); + break; + } + case 3: { + message.basicSliPerformance = $root.google.monitoring.v3.BasicSli.decode(reader, reader.uint32()); + break; + } + case 2: { + message.threshold = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -24030,6 +25606,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PerformanceThreshold + * @function getTypeUrl + * @memberof google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PerformanceThreshold.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.WindowsBasedSli.PerformanceThreshold"; + }; + return PerformanceThreshold; })(); @@ -24136,12 +25727,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timeSeries = reader.string(); - break; - case 4: - message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); - break; + case 1: { + message.timeSeries = reader.string(); + break; + } + case 4: { + message.range = $root.google.monitoring.v3.Range.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24245,6 +25838,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MetricRange + * @function getTypeUrl + * @memberof google.monitoring.v3.WindowsBasedSli.MetricRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.WindowsBasedSli.MetricRange"; + }; + return MetricRange; })(); @@ -24284,7 +25892,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|createService}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef CreateServiceCallback * @type {function} @@ -24317,7 +25925,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|getService}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef GetServiceCallback * @type {function} @@ -24350,7 +25958,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServices}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|listServices}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef ListServicesCallback * @type {function} @@ -24383,7 +25991,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|updateService}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef UpdateServiceCallback * @type {function} @@ -24416,7 +26024,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteService}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|deleteService}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef DeleteServiceCallback * @type {function} @@ -24449,7 +26057,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#createServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|createServiceLevelObjective}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef CreateServiceLevelObjectiveCallback * @type {function} @@ -24482,7 +26090,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#getServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|getServiceLevelObjective}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef GetServiceLevelObjectiveCallback * @type {function} @@ -24515,7 +26123,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#listServiceLevelObjectives}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|listServiceLevelObjectives}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef ListServiceLevelObjectivesCallback * @type {function} @@ -24548,7 +26156,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#updateServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|updateServiceLevelObjective}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef UpdateServiceLevelObjectiveCallback * @type {function} @@ -24581,7 +26189,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService#deleteServiceLevelObjective}. + * Callback as used by {@link google.monitoring.v3.ServiceMonitoringService|deleteServiceLevelObjective}. * @memberof google.monitoring.v3.ServiceMonitoringService * @typedef DeleteServiceLevelObjectiveCallback * @type {function} @@ -24730,15 +26338,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 3: - message.serviceId = reader.string(); - break; - case 2: - message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.serviceId = reader.string(); + break; + } + case 2: { + message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24850,6 +26461,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateServiceRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateServiceRequest"; + }; + return CreateServiceRequest; })(); @@ -24945,9 +26571,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; @@ -25037,6 +26664,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetServiceRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetServiceRequest"; + }; + return GetServiceRequest; })(); @@ -25165,18 +26807,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25291,6 +26937,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServicesRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListServicesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListServicesRequest"; + }; + return ListServicesRequest; })(); @@ -25399,14 +27060,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.services && message.services.length)) - message.services = []; - message.services.push($root.google.monitoring.v3.Service.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.services && message.services.length)) + message.services = []; + message.services.push($root.google.monitoring.v3.Service.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25522,6 +27185,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServicesResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListServicesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListServicesResponse"; + }; + return ListServicesResponse; })(); @@ -25628,12 +27306,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.service = $root.google.monitoring.v3.Service.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25742,6 +27422,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateServiceRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.UpdateServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UpdateServiceRequest"; + }; + return UpdateServiceRequest; })(); @@ -25837,9 +27532,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; @@ -25929,6 +27625,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteServiceRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteServiceRequest"; + }; + return DeleteServiceRequest; })(); @@ -26046,15 +27757,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 3: - message.serviceLevelObjectiveId = reader.string(); - break; - case 2: - message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.serviceLevelObjectiveId = reader.string(); + break; + } + case 2: { + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26166,6 +27880,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateServiceLevelObjectiveRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateServiceLevelObjectiveRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServiceLevelObjectiveRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateServiceLevelObjectiveRequest"; + }; + return CreateServiceLevelObjectiveRequest; })(); @@ -26272,12 +28001,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.view = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26394,6 +28125,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetServiceLevelObjectiveRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetServiceLevelObjectiveRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServiceLevelObjectiveRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetServiceLevelObjectiveRequest"; + }; + return GetServiceLevelObjectiveRequest; })(); @@ -26533,21 +28279,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.filter = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; - case 5: - message.view = reader.int32(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26688,6 +28439,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServiceLevelObjectivesRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListServiceLevelObjectivesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServiceLevelObjectivesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListServiceLevelObjectivesRequest"; + }; + return ListServiceLevelObjectivesRequest; })(); @@ -26796,14 +28562,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.serviceLevelObjectives && message.serviceLevelObjectives.length)) - message.serviceLevelObjectives = []; - message.serviceLevelObjectives.push($root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.serviceLevelObjectives && message.serviceLevelObjectives.length)) + message.serviceLevelObjectives = []; + message.serviceLevelObjectives.push($root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -26919,6 +28687,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListServiceLevelObjectivesResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListServiceLevelObjectivesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServiceLevelObjectivesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListServiceLevelObjectivesResponse"; + }; + return ListServiceLevelObjectivesResponse; })(); @@ -27025,12 +28808,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + case 1: { + message.serviceLevelObjective = $root.google.monitoring.v3.ServiceLevelObjective.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27139,6 +28924,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateServiceLevelObjectiveRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.UpdateServiceLevelObjectiveRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateServiceLevelObjectiveRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UpdateServiceLevelObjectiveRequest"; + }; + return UpdateServiceLevelObjectiveRequest; })(); @@ -27234,9 +29034,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; @@ -27326,6 +29127,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteServiceLevelObjectiveRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteServiceLevelObjectiveRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteServiceLevelObjectiveRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteServiceLevelObjectiveRequest"; + }; + return DeleteServiceLevelObjectiveRequest; })(); @@ -27421,9 +29237,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.spanName = reader.string(); - break; + case 1: { + message.spanName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27513,6 +29330,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SpanContext + * @function getTypeUrl + * @memberof google.monitoring.v3.SpanContext + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpanContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.SpanContext"; + }; + return SpanContext; })(); @@ -27683,24 +29515,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.network = reader.string(); - break; - case 4: - message.gcpZone = reader.string(); - break; - case 6: - message.peerProjectId = reader.string(); - break; - case 7: - message.state = reader.int32(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.network = reader.string(); + break; + } + case 4: { + message.gcpZone = reader.string(); + break; + } + case 6: { + message.peerProjectId = reader.string(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -27849,6 +29687,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InternalChecker + * @function getTypeUrl + * @memberof google.monitoring.v3.InternalChecker + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InternalChecker.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.InternalChecker"; + }; + /** * State enum. * @name google.monitoring.v3.InternalChecker.State @@ -28115,53 +29968,65 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.monitoredResource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); - break; - case 4: - message.resourceGroup = $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.decode(reader, reader.uint32()); - break; - case 5: - message.httpCheck = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.decode(reader, reader.uint32()); - break; - case 6: - message.tcpCheck = $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.decode(reader, reader.uint32()); - break; - case 7: - message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 8: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.contentMatchers && message.contentMatchers.length)) - message.contentMatchers = []; - message.contentMatchers.push($root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.selectedRegions && message.selectedRegions.length)) - message.selectedRegions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.monitoredResource = $root.google.api.MonitoredResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.resourceGroup = $root.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.decode(reader, reader.uint32()); + break; + } + case 5: { + message.httpCheck = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tcpCheck = $root.google.monitoring.v3.UptimeCheckConfig.TcpCheck.decode(reader, reader.uint32()); + break; + } + case 7: { + message.period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.contentMatchers && message.contentMatchers.length)) + message.contentMatchers = []; + message.contentMatchers.push($root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.selectedRegions && message.selectedRegions.length)) + message.selectedRegions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.selectedRegions.push(reader.int32()); + } else message.selectedRegions.push(reader.int32()); - } else - message.selectedRegions.push(reader.int32()); - break; - case 15: - message.isInternal = reader.bool(); - break; - case 14: - if (!(message.internalCheckers && message.internalCheckers.length)) - message.internalCheckers = []; - message.internalCheckers.push($root.google.monitoring.v3.InternalChecker.decode(reader, reader.uint32())); - break; + break; + } + case 15: { + message.isInternal = reader.bool(); + break; + } + case 14: { + if (!(message.internalCheckers && message.internalCheckers.length)) + message.internalCheckers = []; + message.internalCheckers.push($root.google.monitoring.v3.InternalChecker.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -28473,6 +30338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UptimeCheckConfig + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UptimeCheckConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckConfig"; + }; + UptimeCheckConfig.ResourceGroup = (function() { /** @@ -28576,12 +30456,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupId = reader.string(); - break; - case 2: - message.resourceType = reader.int32(); - break; + case 1: { + message.groupId = reader.string(); + break; + } + case 2: { + message.resourceType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -28698,6 +30580,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceGroup + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckConfig.ResourceGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckConfig.ResourceGroup"; + }; + return ResourceGroup; })(); @@ -28894,55 +30791,65 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 8: - message.requestMethod = reader.int32(); - break; - case 1: - message.useSsl = reader.bool(); - break; - case 2: - message.path = reader.string(); - break; - case 3: - message.port = reader.int32(); - break; - case 4: - message.authInfo = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.decode(reader, reader.uint32()); - break; - case 5: - message.maskHeaders = reader.bool(); - break; - case 6: - if (message.headers === $util.emptyObject) - message.headers = {}; - 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 8: { + message.requestMethod = reader.int32(); + break; + } + case 1: { + message.useSsl = reader.bool(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.port = reader.int32(); + break; + } + case 4: { + message.authInfo = $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.decode(reader, reader.uint32()); + break; + } + case 5: { + message.maskHeaders = reader.bool(); + break; + } + case 6: { + if (message.headers === $util.emptyObject) + message.headers = {}; + 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.headers[key] = value; + break; + } + case 9: { + message.contentType = reader.int32(); + break; + } + case 7: { + message.validateSsl = reader.bool(); + break; + } + case 10: { + message.body = reader.bytes(); + break; } - message.headers[key] = value; - break; - case 9: - message.contentType = reader.int32(); - break; - case 7: - message.validateSsl = reader.bool(); - break; - case 10: - message.body = reader.bytes(); - break; default: reader.skipType(tag & 7); break; @@ -29090,7 +30997,7 @@ if (object.body != null) if (typeof object.body === "string") $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length) + else if (object.body.length >= 0) message.body = object.body; return message; }; @@ -29165,6 +31072,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpCheck + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpCheck.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckConfig.HttpCheck"; + }; + HttpCheck.BasicAuthentication = (function() { /** @@ -29268,12 +31190,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.username = reader.string(); - break; - case 2: - message.password = reader.string(); - break; + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.password = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29372,6 +31296,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BasicAuthentication + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BasicAuthentication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication"; + }; + return BasicAuthentication; })(); @@ -29500,9 +31439,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.port = reader.int32(); - break; + case 1: { + message.port = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -29592,6 +31532,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TcpCheck + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckConfig.TcpCheck + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TcpCheck.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckConfig.TcpCheck"; + }; + return TcpCheck; })(); @@ -29698,12 +31653,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.content = reader.string(); - break; - case 2: - message.matcher = reader.int32(); - break; + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.matcher = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -29830,6 +31787,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ContentMatcher + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckConfig.ContentMatcher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentMatcher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckConfig.ContentMatcher"; + }; + /** * ContentMatcherOption enum. * @name google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption @@ -29970,15 +31942,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.region = reader.int32(); - break; - case 2: - message.location = reader.string(); - break; - case 3: - message.ipAddress = reader.string(); - break; + case 1: { + message.region = reader.int32(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30113,6 +32088,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UptimeCheckIp + * @function getTypeUrl + * @memberof google.monitoring.v3.UptimeCheckIp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UptimeCheckIp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UptimeCheckIp"; + }; + return UptimeCheckIp; })(); @@ -30165,7 +32155,7 @@ }; /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckConfigs}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|listUptimeCheckConfigs}. * @memberof google.monitoring.v3.UptimeCheckService * @typedef ListUptimeCheckConfigsCallback * @type {function} @@ -30198,7 +32188,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#getUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|getUptimeCheckConfig}. * @memberof google.monitoring.v3.UptimeCheckService * @typedef GetUptimeCheckConfigCallback * @type {function} @@ -30231,7 +32221,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#createUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|createUptimeCheckConfig}. * @memberof google.monitoring.v3.UptimeCheckService * @typedef CreateUptimeCheckConfigCallback * @type {function} @@ -30264,7 +32254,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#updateUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|updateUptimeCheckConfig}. * @memberof google.monitoring.v3.UptimeCheckService * @typedef UpdateUptimeCheckConfigCallback * @type {function} @@ -30297,7 +32287,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#deleteUptimeCheckConfig}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|deleteUptimeCheckConfig}. * @memberof google.monitoring.v3.UptimeCheckService * @typedef DeleteUptimeCheckConfigCallback * @type {function} @@ -30330,7 +32320,7 @@ */ /** - * Callback as used by {@link google.monitoring.v3.UptimeCheckService#listUptimeCheckIps}. + * Callback as used by {@link google.monitoring.v3.UptimeCheckService|listUptimeCheckIps}. * @memberof google.monitoring.v3.UptimeCheckService * @typedef ListUptimeCheckIpsCallback * @type {function} @@ -30479,15 +32469,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 3: - message.pageSize = reader.int32(); - break; - case 4: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30594,6 +32587,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListUptimeCheckConfigsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListUptimeCheckConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUptimeCheckConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListUptimeCheckConfigsRequest"; + }; + return ListUptimeCheckConfigsRequest; })(); @@ -30713,17 +32721,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.uptimeCheckConfigs && message.uptimeCheckConfigs.length)) - message.uptimeCheckConfigs = []; - message.uptimeCheckConfigs.push($root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - message.totalSize = reader.int32(); - break; + case 1: { + if (!(message.uptimeCheckConfigs && message.uptimeCheckConfigs.length)) + message.uptimeCheckConfigs = []; + message.uptimeCheckConfigs.push($root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -30848,6 +32859,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListUptimeCheckConfigsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListUptimeCheckConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUptimeCheckConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListUptimeCheckConfigsResponse"; + }; + return ListUptimeCheckConfigsResponse; })(); @@ -30943,9 +32969,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; @@ -31035,6 +33062,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetUptimeCheckConfigRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.GetUptimeCheckConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUptimeCheckConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.GetUptimeCheckConfigRequest"; + }; + return GetUptimeCheckConfigRequest; })(); @@ -31141,12 +33183,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -31250,6 +33294,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateUptimeCheckConfigRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.CreateUptimeCheckConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUptimeCheckConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.CreateUptimeCheckConfigRequest"; + }; + return CreateUptimeCheckConfigRequest; })(); @@ -31356,12 +33415,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); - break; + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uptimeCheckConfig = $root.google.monitoring.v3.UptimeCheckConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -31470,6 +33531,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateUptimeCheckConfigRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.UpdateUptimeCheckConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUptimeCheckConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.UpdateUptimeCheckConfigRequest"; + }; + return UpdateUptimeCheckConfigRequest; })(); @@ -31565,9 +33641,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; @@ -31657,6 +33734,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteUptimeCheckConfigRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.DeleteUptimeCheckConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUptimeCheckConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.DeleteUptimeCheckConfigRequest"; + }; + return DeleteUptimeCheckConfigRequest; })(); @@ -31763,12 +33855,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31867,6 +33961,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListUptimeCheckIpsRequest + * @function getTypeUrl + * @memberof google.monitoring.v3.ListUptimeCheckIpsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUptimeCheckIpsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListUptimeCheckIpsRequest"; + }; + return ListUptimeCheckIpsRequest; })(); @@ -31975,14 +34084,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.uptimeCheckIps && message.uptimeCheckIps.length)) - message.uptimeCheckIps = []; - message.uptimeCheckIps.push($root.google.monitoring.v3.UptimeCheckIp.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.uptimeCheckIps && message.uptimeCheckIps.length)) + message.uptimeCheckIps = []; + message.uptimeCheckIps.push($root.google.monitoring.v3.UptimeCheckIp.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32098,6 +34209,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListUptimeCheckIpsResponse + * @function getTypeUrl + * @memberof google.monitoring.v3.ListUptimeCheckIpsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUptimeCheckIpsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.monitoring.v3.ListUptimeCheckIpsResponse"; + }; + return ListUptimeCheckIpsResponse; })(); @@ -32307,36 +34433,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; @@ -32534,6 +34667,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 @@ -32670,12 +34818,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; @@ -32774,6 +34924,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; })(); @@ -32942,36 +35107,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; @@ -33175,6 +35347,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() { /** @@ -33278,12 +35465,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; @@ -33382,6 +35571,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; })(); @@ -33513,15 +35717,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; @@ -33661,6 +35868,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() { /** @@ -33775,15 +35997,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; @@ -33890,6 +36115,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; })(); @@ -34007,15 +36247,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; @@ -34122,6 +36365,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; })(); @@ -34222,16 +36480,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; @@ -34333,6 +36592,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; })(); @@ -34455,17 +36729,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; @@ -34595,6 +36872,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; })(); @@ -34706,14 +36998,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; @@ -34829,6 +37123,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; })(); @@ -35039,38 +37348,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; @@ -35292,6 +37611,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; })(); @@ -35398,12 +37732,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; @@ -35502,6 +37838,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; })(); @@ -35654,26 +38005,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; @@ -35865,6 +38222,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; })(); @@ -35973,31 +38345,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; @@ -36110,6 +38484,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; })(); @@ -36218,31 +38607,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; @@ -36360,6 +38751,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; })(); @@ -36477,15 +38883,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; @@ -36610,6 +39019,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 @@ -36861,43 +39285,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; @@ -37208,6 +39643,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() { /** @@ -37322,15 +39772,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; @@ -37490,6 +39943,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; })(); @@ -37643,31 +40111,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; @@ -37780,6 +40250,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; })(); @@ -37889,11 +40374,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; @@ -38000,6 +40486,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; })(); @@ -38021,6 +40522,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 */ /** @@ -38141,6 +40643,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 @@ -38196,6 +40706,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; }; @@ -38230,66 +40742,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; @@ -38401,6 +40929,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; }; @@ -38493,6 +41024,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -38524,6 +41057,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -38570,6 +41104,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; }; @@ -38584,6 +41120,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; })(); @@ -38794,52 +41345,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; @@ -39140,6 +41701,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() { /** @@ -39254,15 +41830,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; @@ -39374,6 +41953,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; })(); @@ -39480,12 +42074,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; @@ -39584,6 +42180,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; })(); @@ -39684,11 +42295,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; @@ -39795,6 +42407,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; })(); @@ -40000,39 +42627,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; @@ -40319,6 +42957,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 @@ -40487,12 +43140,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; @@ -40596,6 +43251,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; })(); @@ -40741,27 +43411,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; @@ -40937,6 +43612,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() { /** @@ -41040,12 +43730,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; @@ -41144,6 +43836,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; })(); @@ -41264,15 +43971,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; @@ -41384,6 +44094,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; })(); @@ -41503,17 +44228,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; @@ -41643,6 +44371,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; })(); @@ -41793,24 +44536,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; @@ -41946,6 +44695,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; })(); @@ -42276,76 +45040,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; @@ -42658,6 +45444,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 @@ -42826,26 +45627,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; @@ -42999,6 +45806,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; })(); @@ -43012,6 +45834,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 @@ -43068,6 +45891,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -43144,6 +45975,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(); @@ -43189,42 +46022,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; @@ -43284,6 +46130,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"; @@ -43369,6 +46218,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) @@ -43456,6 +46307,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")) @@ -43470,6 +46322,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) @@ -43496,6 +46350,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 @@ -43625,11 +46494,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; @@ -43736,6 +46606,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; })(); @@ -43855,17 +46740,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; @@ -43990,6 +46878,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; })(); @@ -44098,14 +47001,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; @@ -44221,6 +47126,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; })(); @@ -44351,20 +47271,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; @@ -44497,6 +47421,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; })(); @@ -44640,25 +47579,30 @@ 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 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; @@ -44835,6 +47779,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 @@ -45014,29 +47973,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; @@ -45149,7 +48115,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); @@ -45230,6 +48196,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() { /** @@ -45331,12 +48312,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; @@ -45437,6 +48420,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; })(); @@ -45537,11 +48535,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; @@ -45648,6 +48647,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() { /** @@ -45796,37 +48810,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; @@ -45987,6 +49006,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; })(); @@ -46087,11 +49121,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; @@ -46198,6 +49233,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() { /** @@ -46208,6 +49258,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 */ /** @@ -46258,6 +49309,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 @@ -46294,6 +49353,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; }; @@ -46328,25 +49389,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; @@ -46398,6 +49467,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; }; @@ -46426,6 +49504,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; }; @@ -46448,6 +49540,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -46460,6 +49553,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; }; @@ -46474,6 +49569,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; })(); @@ -46583,12 +49709,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; @@ -46650,7 +49778,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; }; @@ -46696,6 +49824,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; })(); @@ -46802,12 +49945,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; @@ -46920,6 +50065,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; })(); @@ -47026,12 +50186,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; @@ -47144,6 +50306,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; })(); @@ -47239,9 +50416,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; + case 1: { + message.value = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -47331,6 +50509,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + return DoubleValue; })(); @@ -47426,9 +50619,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.float(); - break; + case 1: { + message.value = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -47518,6 +50712,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + return FloatValue; })(); @@ -47613,9 +50822,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int64(); - break; + case 1: { + message.value = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -47719,6 +50929,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + return Int64Value; })(); @@ -47814,9 +51039,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.uint64(); - break; + case 1: { + message.value = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -47920,6 +51146,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + return UInt64Value; })(); @@ -48015,9 +51256,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int32(); - break; + case 1: { + message.value = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -48107,6 +51349,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + return Int32Value; })(); @@ -48202,9 +51459,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.uint32(); - break; + case 1: { + message.value = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -48294,6 +51552,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + return UInt32Value; })(); @@ -48389,9 +51662,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.bool(); - break; + case 1: { + message.value = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -48481,6 +51755,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + return BoolValue; })(); @@ -48576,9 +51865,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; + case 1: { + message.value = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -48668,6 +51958,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + return StringValue; })(); @@ -48763,9 +52068,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.bytes(); - break; + case 1: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -48822,7 +52128,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; }; @@ -48864,6 +52170,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + return BytesValue; })(); @@ -49024,6 +52345,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; })(); @@ -49121,11 +52457,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; @@ -49227,6 +52564,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; })(); @@ -49326,28 +52678,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; @@ -49456,6 +52809,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; })(); @@ -49620,24 +52988,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; @@ -49821,6 +53195,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; })(); @@ -49930,11 +53319,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; @@ -50041,6 +53431,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; })(); @@ -50172,17 +53577,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; @@ -50307,6 +53715,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; })(); diff --git a/packages/google-cloud-monitoring/protos/protos.json b/packages/google-cloud-monitoring/protos/protos.json index 6f15eb73ae8..091e2146d62 100644 --- a/packages/google-cloud-monitoring/protos/protos.json +++ b/packages/google-cloud-monitoring/protos/protos.json @@ -4065,6 +4065,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -4593,6 +4597,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -4885,6 +4896,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 1ece3e2d3ae89db109f11a7118119e73c5bc8281 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Aug 2022 12:29:52 -0700 Subject: [PATCH 409/422] chore(main): release 3.0.1 (#625) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 8 ++++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index dd688ddaa38..8bd5b35d43f 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [3.0.1](https://github.com/googleapis/nodejs-monitoring/compare/v3.0.0...v3.0.1) (2022-08-23) + + +### Bug Fixes + +* change import long to require ([#624](https://github.com/googleapis/nodejs-monitoring/issues/624)) ([5cd302e](https://github.com/googleapis/nodejs-monitoring/commit/5cd302e9bb803ce2b2da844faaccacadac73f833)) +* remove pip install statements ([#1546](https://github.com/googleapis/nodejs-monitoring/issues/1546)) ([#626](https://github.com/googleapis/nodejs-monitoring/issues/626)) ([7f1f9c6](https://github.com/googleapis/nodejs-monitoring/commit/7f1f9c6f226c9abc48d9da4d6a452312ce3085d2)) + ## [3.0.0](https://github.com/googleapis/nodejs-monitoring/compare/v2.3.5...v3.0.0) (2022-05-20) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index cde1365b20f..88a8046560c 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "3.0.0", + "version": "3.0.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 739cdb39c20..833d274f1b0 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^3.0.0", + "@google-cloud/monitoring": "^3.0.1", "yargs": "^16.0.0" }, "devDependencies": { From 676cf86190b0924c586c2033aaa1d21cfd764ec3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:04:19 +0000 Subject: [PATCH 410/422] fix: do not import the whole google-gax from proto JS (#1553) (#627) 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 --- packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/protos/protos.d.ts | 2 +- packages/google-cloud-monitoring/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 88a8046560c..19cec1f61fc 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index 106dcc34ba3..df43ec879e2 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index e1ac31bdab0..fd18ade2d59 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/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 e54d3aaaedcb1b529862d9ec982de7c841f6eae5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 03:56:28 +0200 Subject: [PATCH 411/422] chore(deps): update dependency uuid to v9 (#629) 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 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-monitoring). --- packages/google-cloud-monitoring/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 833d274f1b0..dac1f727d48 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -20,6 +20,6 @@ "devDependencies": { "chai": "^4.2.0", "mocha": "^8.0.0", - "uuid": "^8.0.0" + "uuid": "^9.0.0" } } \ No newline at end of file From ebcaa5cec0fc3c6a11b3d105a31e015942517bd0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 15:24:13 +0000 Subject: [PATCH 412/422] chore(main): release 3.0.2 (#628) :robot: I have created a release *beep* *boop* --- ## [3.0.2](https://github.com/googleapis/nodejs-monitoring/compare/v3.0.1...v3.0.2) (2022-09-09) ### Bug Fixes * Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-monitoring/issues/1553)) ([#627](https://github.com/googleapis/nodejs-monitoring/issues/627)) ([647e8ab](https://github.com/googleapis/nodejs-monitoring/commit/647e8abda29928143953929c3ef0113ea88e9e9c)) * use google-gax v3.3.0 ([647e8ab](https://github.com/googleapis/nodejs-monitoring/commit/647e8abda29928143953929c3ef0113ea88e9e9c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-cloud-monitoring/CHANGELOG.md | 8 ++++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 8bd5b35d43f..1c13dcdb3ba 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [3.0.2](https://github.com/googleapis/nodejs-monitoring/compare/v3.0.1...v3.0.2) (2022-09-09) + + +### Bug Fixes + +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-monitoring/issues/1553)) ([#627](https://github.com/googleapis/nodejs-monitoring/issues/627)) ([647e8ab](https://github.com/googleapis/nodejs-monitoring/commit/647e8abda29928143953929c3ef0113ea88e9e9c)) +* use google-gax v3.3.0 ([647e8ab](https://github.com/googleapis/nodejs-monitoring/commit/647e8abda29928143953929c3ef0113ea88e9e9c)) + ## [3.0.1](https://github.com/googleapis/nodejs-monitoring/compare/v3.0.0...v3.0.1) (2022-08-23) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 19cec1f61fc..f397b4e0166 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "3.0.1", + "version": "3.0.2", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index dac1f727d48..510bb1d76e0 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^3.0.1", + "@google-cloud/monitoring": "^3.0.2", "yargs": "^16.0.0" }, "devDependencies": { From f701bee1e8b5e429611a75782b4ba8b71358ce64 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 11 Oct 2022 13:28:36 -0700 Subject: [PATCH 413/422] chore: added extra variables owlbot kokoro configs (#623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: added extra variables owlbot kokoro configs * 🦉 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> --- packages/google-cloud-monitoring/owlbot.py | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/google-cloud-monitoring/owlbot.py b/packages/google-cloud-monitoring/owlbot.py index 57f66fb1889..dd988993bb6 100644 --- a/packages/google-cloud-monitoring/owlbot.py +++ b/packages/google-cloud-monitoring/owlbot.py @@ -14,6 +14,29 @@ """This script is used to synthesize generated parts of this library.""" +import synthtool as s import synthtool.languages.node as node +import os + node.owlbot_main(staging_excludes=["README.md", "package.json"]) + +# -------------------------------------------------------------------------- +# 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 c70cfd7e723f3ac646d74fff057ecb721da6652a Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:50:24 -0700 Subject: [PATCH 414/422] fix(deps): use google-gax v3.5.2 (#647) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index f397b4e0166..919b379cb89 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -43,7 +43,7 @@ "precompile": "gts clean" }, "dependencies": { - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" }, "devDependencies": { "@types/mocha": "^9.0.0", From c05959800498ac6c8967627aa50dd6c91cfe2f39 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 00:05:27 -0800 Subject: [PATCH 415/422] fix: update proto definitions(#651) fix: update proto definitions Source-Link: https://github.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e Co-authored-by: Owl Bot --- .../protos/protos.d.ts | 2 +- .../google-cloud-monitoring/protos/protos.js | 304 +++++++++++++++--- 2 files changed, 266 insertions(+), 40 deletions(-) diff --git a/packages/google-cloud-monitoring/protos/protos.d.ts b/packages/google-cloud-monitoring/protos/protos.d.ts index df43ec879e2..abdc8d2eee8 100644 --- a/packages/google-cloud-monitoring/protos/protos.d.ts +++ b/packages/google-cloud-monitoring/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/packages/google-cloud-monitoring/protos/protos.js b/packages/google-cloud-monitoring/protos/protos.js index fd18ade2d59..1bd8a260358 100644 --- a/packages/google-cloud-monitoring/protos/protos.js +++ b/packages/google-cloud-monitoring/protos/protos.js @@ -474,6 +474,12 @@ } } switch (object.combiner) { + default: + if (typeof object.combiner === "number") { + message.combiner = object.combiner; + break; + } + break; case "COMBINE_UNSPECIFIED": case 0: message.combiner = 0; @@ -555,7 +561,7 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.combiner != null && message.hasOwnProperty("combiner")) - object.combiner = options.enums === String ? $root.google.monitoring.v3.AlertPolicy.ConditionCombinerType[message.combiner] : message.combiner; + object.combiner = options.enums === String ? $root.google.monitoring.v3.AlertPolicy.ConditionCombinerType[message.combiner] === undefined ? message.combiner : $root.google.monitoring.v3.AlertPolicy.ConditionCombinerType[message.combiner] : message.combiner; if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) object.creationRecord = $root.google.monitoring.v3.MutationRecord.toObject(message.creationRecord, options); if (message.mutationRecord != null && message.hasOwnProperty("mutationRecord")) @@ -1764,6 +1770,12 @@ } } switch (object.comparison) { + default: + if (typeof object.comparison === "number") { + message.comparison = object.comparison; + break; + } + break; case "COMPARISON_UNSPECIFIED": case 0: message.comparison = 0; @@ -1836,7 +1848,7 @@ if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; if (message.comparison != null && message.hasOwnProperty("comparison")) - object.comparison = options.enums === String ? $root.google.monitoring.v3.ComparisonType[message.comparison] : message.comparison; + object.comparison = options.enums === String ? $root.google.monitoring.v3.ComparisonType[message.comparison] === undefined ? message.comparison : $root.google.monitoring.v3.ComparisonType[message.comparison] : message.comparison; if (message.thresholdValue != null && message.hasOwnProperty("thresholdValue")) object.thresholdValue = options.json && !isFinite(message.thresholdValue) ? String(message.thresholdValue) : message.thresholdValue; if (message.duration != null && message.hasOwnProperty("duration")) @@ -3324,6 +3336,12 @@ message.alignmentPeriod = $root.google.protobuf.Duration.fromObject(object.alignmentPeriod); } switch (object.perSeriesAligner) { + default: + if (typeof object.perSeriesAligner === "number") { + message.perSeriesAligner = object.perSeriesAligner; + break; + } + break; case "ALIGN_NONE": case 0: message.perSeriesAligner = 0; @@ -3402,6 +3420,12 @@ break; } switch (object.crossSeriesReducer) { + default: + if (typeof object.crossSeriesReducer === "number") { + message.crossSeriesReducer = object.crossSeriesReducer; + break; + } + break; case "REDUCE_NONE": case 0: message.crossSeriesReducer = 0; @@ -3492,9 +3516,9 @@ if (message.alignmentPeriod != null && message.hasOwnProperty("alignmentPeriod")) object.alignmentPeriod = $root.google.protobuf.Duration.toObject(message.alignmentPeriod, options); if (message.perSeriesAligner != null && message.hasOwnProperty("perSeriesAligner")) - object.perSeriesAligner = options.enums === String ? $root.google.monitoring.v3.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; + object.perSeriesAligner = options.enums === String ? $root.google.monitoring.v3.Aggregation.Aligner[message.perSeriesAligner] === undefined ? message.perSeriesAligner : $root.google.monitoring.v3.Aggregation.Aligner[message.perSeriesAligner] : message.perSeriesAligner; if (message.crossSeriesReducer != null && message.hasOwnProperty("crossSeriesReducer")) - object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.v3.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; + object.crossSeriesReducer = options.enums === String ? $root.google.monitoring.v3.Aggregation.Reducer[message.crossSeriesReducer] === undefined ? message.crossSeriesReducer : $root.google.monitoring.v3.Aggregation.Reducer[message.crossSeriesReducer] : message.crossSeriesReducer; if (message.groupByFields && message.groupByFields.length) { object.groupByFields = []; for (var j = 0; j < message.groupByFields.length; ++j) @@ -8931,6 +8955,12 @@ message.metadata = $root.google.api.MonitoredResourceMetadata.fromObject(object.metadata); } switch (object.metricKind) { + default: + if (typeof object.metricKind === "number") { + message.metricKind = object.metricKind; + break; + } + break; case "METRIC_KIND_UNSPECIFIED": case 0: message.metricKind = 0; @@ -8949,6 +8979,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; @@ -9021,9 +9057,9 @@ if (message.resource != null && message.hasOwnProperty("resource")) object.resource = $root.google.api.MonitoredResource.toObject(message.resource, 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.points && message.points.length) { object.points = []; for (var j = 0; j < message.points.length; ++j) @@ -9554,6 +9590,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 "VALUE_TYPE_UNSPECIFIED": case 0: message.valueType = 0; @@ -9584,6 +9626,12 @@ break; } switch (object.metricKind) { + default: + if (typeof object.metricKind === "number") { + message.metricKind = object.metricKind; + break; + } + break; case "METRIC_KIND_UNSPECIFIED": case 0: message.metricKind = 0; @@ -9628,9 +9676,9 @@ 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.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.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.unit != null && message.hasOwnProperty("unit")) object.unit = message.unit; return object; @@ -13757,6 +13805,12 @@ if (object.orderBy != null) message.orderBy = String(object.orderBy); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "FULL": case 0: message.view = 0; @@ -13806,7 +13860,7 @@ if (message.orderBy != null && message.hasOwnProperty("orderBy")) object.orderBy = message.orderBy; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; + object.view = options.enums === String ? $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] === undefined ? message.view : $root.google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView[message.view] : message.view; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -16335,6 +16389,10 @@ for (var i = 0; i < object.supportedTiers.length; ++i) switch (object.supportedTiers[i]) { default: + if (typeof object.supportedTiers[i] === "number") { + message.supportedTiers[i] = object.supportedTiers[i]; + break; + } case "SERVICE_TIER_UNSPECIFIED": case 0: message.supportedTiers[i] = 0; @@ -16350,6 +16408,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; @@ -16424,12 +16488,12 @@ if (message.supportedTiers && message.supportedTiers.length) { object.supportedTiers = []; for (var j = 0; j < message.supportedTiers.length; ++j) - object.supportedTiers[j] = options.enums === String ? $root.google.monitoring.v3.ServiceTier[message.supportedTiers[j]] : message.supportedTiers[j]; + object.supportedTiers[j] = options.enums === String ? $root.google.monitoring.v3.ServiceTier[message.supportedTiers[j]] === undefined ? message.supportedTiers[j] : $root.google.monitoring.v3.ServiceTier[message.supportedTiers[j]] : message.supportedTiers[j]; } 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; }; @@ -16868,6 +16932,12 @@ message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); } switch (object.verificationStatus) { + default: + if (typeof object.verificationStatus === "number") { + message.verificationStatus = object.verificationStatus; + break; + } + break; case "VERIFICATION_STATUS_UNSPECIFIED": case 0: message.verificationStatus = 0; @@ -16952,7 +17022,7 @@ object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; } if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) - object.verificationStatus = options.enums === String ? $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] : message.verificationStatus; + object.verificationStatus = options.enums === String ? $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] === undefined ? message.verificationStatus : $root.google.monitoring.v3.NotificationChannel.VerificationStatus[message.verificationStatus] : message.verificationStatus; if (message.enabled != null && message.hasOwnProperty("enabled")) object.enabled = $root.google.protobuf.BoolValue.toObject(message.enabled, options); if (message.creationRecord != null && message.hasOwnProperty("creationRecord")) @@ -22833,6 +22903,12 @@ message.rollingPeriod = $root.google.protobuf.Duration.fromObject(object.rollingPeriod); } switch (object.calendarPeriod) { + default: + if (typeof object.calendarPeriod === "number") { + message.calendarPeriod = object.calendarPeriod; + break; + } + break; case "CALENDAR_PERIOD_UNSPECIFIED": case 0: message.calendarPeriod = 0; @@ -22900,7 +22976,7 @@ object.period = "rollingPeriod"; } if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { - object.calendarPeriod = options.enums === String ? $root.google.type.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; + object.calendarPeriod = options.enums === String ? $root.google.type.CalendarPeriod[message.calendarPeriod] === undefined ? message.calendarPeriod : $root.google.type.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; if (options.oneofs) object.period = "calendarPeriod"; } @@ -28074,6 +28150,12 @@ if (object.name != null) message.name = String(object.name); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -28110,7 +28192,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; + object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] === undefined ? message.view : $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; return object; }; @@ -28379,6 +28461,12 @@ if (object.pageToken != null) message.pageToken = String(object.pageToken); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -28424,7 +28512,7 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; + object.view = options.enums === String ? $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] === undefined ? message.view : $root.google.monitoring.v3.ServiceLevelObjective.View[message.view] : message.view; return object; }; @@ -29624,6 +29712,12 @@ if (object.peerProjectId != null) message.peerProjectId = String(object.peerProjectId); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "UNSPECIFIED": case 0: message.state = 0; @@ -29672,7 +29766,7 @@ if (message.peerProjectId != null && message.hasOwnProperty("peerProjectId")) object.peerProjectId = message.peerProjectId; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.monitoring.v3.InternalChecker.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.monitoring.v3.InternalChecker.State[message.state] === undefined ? message.state : $root.google.monitoring.v3.InternalChecker.State[message.state] : message.state; return object; }; @@ -30217,6 +30311,10 @@ for (var i = 0; i < object.selectedRegions.length; ++i) switch (object.selectedRegions[i]) { default: + if (typeof object.selectedRegions[i] === "number") { + message.selectedRegions[i] = object.selectedRegions[i]; + break; + } case "REGION_UNSPECIFIED": case 0: message.selectedRegions[i] = 0; @@ -30315,7 +30413,7 @@ if (message.selectedRegions && message.selectedRegions.length) { object.selectedRegions = []; for (var j = 0; j < message.selectedRegions.length; ++j) - object.selectedRegions[j] = options.enums === String ? $root.google.monitoring.v3.UptimeCheckRegion[message.selectedRegions[j]] : message.selectedRegions[j]; + object.selectedRegions[j] = options.enums === String ? $root.google.monitoring.v3.UptimeCheckRegion[message.selectedRegions[j]] === undefined ? message.selectedRegions[j] : $root.google.monitoring.v3.UptimeCheckRegion[message.selectedRegions[j]] : message.selectedRegions[j]; } if (message.internalCheckers && message.internalCheckers.length) { object.internalCheckers = []; @@ -30529,6 +30627,12 @@ if (object.groupId != null) message.groupId = String(object.groupId); switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; case "RESOURCE_TYPE_UNSPECIFIED": case 0: message.resourceType = 0; @@ -30565,7 +30669,7 @@ if (message.groupId != null && message.hasOwnProperty("groupId")) object.groupId = message.groupId; if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.monitoring.v3.GroupResourceType[message.resourceType] : message.resourceType; + object.resourceType = options.enums === String ? $root.google.monitoring.v3.GroupResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.monitoring.v3.GroupResourceType[message.resourceType] : message.resourceType; return object; }; @@ -30949,6 +31053,12 @@ return object; var message = new $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck(); switch (object.requestMethod) { + default: + if (typeof object.requestMethod === "number") { + message.requestMethod = object.requestMethod; + break; + } + break; case "METHOD_UNSPECIFIED": case 0: message.requestMethod = 0; @@ -30983,6 +31093,12 @@ message.headers[keys[i]] = String(object.headers[keys[i]]); } switch (object.contentType) { + default: + if (typeof object.contentType === "number") { + message.contentType = object.contentType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.contentType = 0; @@ -31053,9 +31169,9 @@ if (message.validateSsl != null && message.hasOwnProperty("validateSsl")) object.validateSsl = message.validateSsl; if (message.requestMethod != null && message.hasOwnProperty("requestMethod")) - object.requestMethod = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod[message.requestMethod] : message.requestMethod; + object.requestMethod = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod[message.requestMethod] === undefined ? message.requestMethod : $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod[message.requestMethod] : message.requestMethod; if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType[message.contentType] : message.contentType; + object.contentType = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType[message.contentType] === undefined ? message.contentType : $root.google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType[message.contentType] : message.contentType; if (message.body != null && message.hasOwnProperty("body")) object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; return object; @@ -31728,6 +31844,12 @@ if (object.content != null) message.content = String(object.content); switch (object.matcher) { + default: + if (typeof object.matcher === "number") { + message.matcher = object.matcher; + break; + } + break; case "CONTENT_MATCHER_OPTION_UNSPECIFIED": case 0: message.matcher = 0; @@ -31772,7 +31894,7 @@ if (message.content != null && message.hasOwnProperty("content")) object.content = message.content; if (message.matcher != null && message.hasOwnProperty("matcher")) - object.matcher = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption[message.matcher] : message.matcher; + object.matcher = options.enums === String ? $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption[message.matcher] === undefined ? message.matcher : $root.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption[message.matcher] : message.matcher; return object; }; @@ -32022,6 +32144,12 @@ return object; var message = new $root.google.monitoring.v3.UptimeCheckIp(); switch (object.region) { + default: + if (typeof object.region === "number") { + message.region = object.region; + break; + } + break; case "REGION_UNSPECIFIED": case 0: message.region = 0; @@ -32069,7 +32197,7 @@ object.ipAddress = ""; } if (message.region != null && message.hasOwnProperty("region")) - object.region = options.enums === String ? $root.google.monitoring.v3.UptimeCheckRegion[message.region] : message.region; + object.region = options.enums === String ? $root.google.monitoring.v3.UptimeCheckRegion[message.region] === undefined ? message.region : $root.google.monitoring.v3.UptimeCheckRegion[message.region] : message.region; if (message.location != null && message.hasOwnProperty("location")) object.location = message.location; if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) @@ -34572,6 +34700,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; @@ -34596,6 +34730,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; @@ -34643,7 +34781,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")) @@ -34651,7 +34789,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; }; @@ -38135,6 +38273,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; @@ -38207,7 +38351,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; }; @@ -38963,6 +39107,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; @@ -39002,7 +39152,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; @@ -39471,6 +39621,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; @@ -39489,6 +39645,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; @@ -39530,6 +39692,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; @@ -39609,9 +39777,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")) @@ -39623,7 +39791,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) @@ -39859,6 +40027,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; @@ -39924,7 +40098,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")) @@ -42788,6 +42962,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; @@ -42802,6 +42982,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; @@ -42928,9 +43114,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")) @@ -45277,6 +45463,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; @@ -45385,7 +45577,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")) @@ -46187,6 +46379,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; @@ -46203,6 +46401,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; @@ -46241,6 +46445,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; @@ -46311,7 +46519,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")) @@ -46319,7 +46527,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")) @@ -46332,7 +46540,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); @@ -47689,6 +47897,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; @@ -47752,7 +47966,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) @@ -49505,6 +49719,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; @@ -49554,7 +49774,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; }; @@ -53114,6 +53334,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; @@ -53152,7 +53378,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"; } From e50b2e47f5d0365e604c3cfaa32a10b779d154c6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 23:35:42 +0100 Subject: [PATCH 416/422] chore(deps): update dependency @types/node to v18 (#645) --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 919b379cb89..1a4323d8a11 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/mocha": "^9.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/sinon": "^10.0.0", "c8": "^7.1.0", "codecov": "^3.6.5", From 4da7bc4e70f4b71ad09bc427651128854de9aec1 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 11 Nov 2022 01:25:28 +0100 Subject: [PATCH 417/422] chore(deps): update dependency jsdoc to v4 (#650) Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-monitoring/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 1a4323d8a11..313411223b2 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -52,7 +52,7 @@ "c8": "^7.1.0", "codecov": "^3.6.5", "gts": "^3.1.0", - "jsdoc": "^3.5.5", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From 644c402863f501c3a822eee9160e8dec922fca02 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 00:31:35 -0800 Subject: [PATCH 418/422] chore(main): release 3.0.3 (#649) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-cloud-monitoring/CHANGELOG.md | 9 +++++++++ packages/google-cloud-monitoring/package.json | 2 +- packages/google-cloud-monitoring/samples/package.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-monitoring/CHANGELOG.md b/packages/google-cloud-monitoring/CHANGELOG.md index 1c13dcdb3ba..72a95cc0381 100644 --- a/packages/google-cloud-monitoring/CHANGELOG.md +++ b/packages/google-cloud-monitoring/CHANGELOG.md @@ -4,6 +4,15 @@ [1]: https://www.npmjs.com/package/@google-cloud/monitoring?activeTab=versions +## [3.0.3](https://github.com/googleapis/nodejs-monitoring/compare/v3.0.2...v3.0.3) (2022-11-11) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#647](https://github.com/googleapis/nodejs-monitoring/issues/647)) ([bb6a564](https://github.com/googleapis/nodejs-monitoring/commit/bb6a56486913d06994b3e8c3f1ecd6f9ab38f3db)) +* update proto definitions ([28c9ff7](https://github.com/googleapis/nodejs-monitoring/commit/28c9ff76f052f1f1232ea98ba1be0cca7f5f9826)) +* Update proto definitions([#651](https://github.com/googleapis/nodejs-monitoring/issues/651)) ([28c9ff7](https://github.com/googleapis/nodejs-monitoring/commit/28c9ff76f052f1f1232ea98ba1be0cca7f5f9826)) + ## [3.0.2](https://github.com/googleapis/nodejs-monitoring/compare/v3.0.1...v3.0.2) (2022-09-09) diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 313411223b2..c2f1a95ca73 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/monitoring", "description": "Stackdriver Monitoring API client for Node.js", - "version": "3.0.2", + "version": "3.0.3", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-monitoring/samples/package.json b/packages/google-cloud-monitoring/samples/package.json index 510bb1d76e0..42273019e8e 100644 --- a/packages/google-cloud-monitoring/samples/package.json +++ b/packages/google-cloud-monitoring/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 600000" }, "dependencies": { - "@google-cloud/monitoring": "^3.0.2", + "@google-cloud/monitoring": "^3.0.3", "yargs": "^16.0.0" }, "devDependencies": { From 756b701bf41c5b2e6cea6f53b67ea2a3490d70f4 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 00:37:40 -0800 Subject: [PATCH 419/422] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 ++---- .../google-cloud-monitoring/.repo-metadata.json | 2 +- packages/google-cloud-monitoring/owlbot.py | 4 ++-- packages/google-cloud-monitoring/package.json | 13 +++++++++---- release-please-config.json | 3 ++- 6 files changed, 17 insertions(+), 12 deletions(-) rename packages/google-cloud-monitoring/{.github => }/.OwlBot.yaml (80%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 308e8105687..243447b72bb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -22,6 +22,7 @@ "packages/google-cloud-gkemulticloud": "0.1.4", "packages/google-cloud-language": "5.1.2", "packages/google-cloud-memcache": "2.1.4", + "packages/google-cloud-monitoring": "3.0.3", "packages/google-cloud-oslogin": "4.0.4", "packages/google-cloud-phishingprotection": "3.0.6", "packages/google-cloud-policytroubleshooter": "2.0.6", diff --git a/packages/google-cloud-monitoring/.github/.OwlBot.yaml b/packages/google-cloud-monitoring/.OwlBot.yaml similarity index 80% rename from packages/google-cloud-monitoring/.github/.OwlBot.yaml rename to packages/google-cloud-monitoring/.OwlBot.yaml index bafe66bde95..61c518e89e9 100644 --- a/packages/google-cloud-monitoring/.github/.OwlBot.yaml +++ b/packages/google-cloud-monitoring/.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/cloud/monitoring/(v.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/monitoring/(v.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-monitoring/$1 begin-after-commit-hash: ed3195d0a29ae8c2608dc5a2aa2590554a3f9d14 diff --git a/packages/google-cloud-monitoring/.repo-metadata.json b/packages/google-cloud-monitoring/.repo-metadata.json index 2b601171b16..537daec5c13 100644 --- a/packages/google-cloud-monitoring/.repo-metadata.json +++ b/packages/google-cloud-monitoring/.repo-metadata.json @@ -7,7 +7,7 @@ "language": "nodejs", "api_id": "monitoring.googleapis.com", "distribution_name": "@google-cloud/monitoring", - "repo": "googleapis/nodejs-monitoring", + "repo": "googleapis/google-cloud-node", "issue_tracker": "https://issuetracker.google.com/savedsearches/559785", "name_pretty": "Stackdriver Monitoring", "default_version": "v3", diff --git a/packages/google-cloud-monitoring/owlbot.py b/packages/google-cloud-monitoring/owlbot.py index dd988993bb6..3289c79cd0e 100644 --- a/packages/google-cloud-monitoring/owlbot.py +++ b/packages/google-cloud-monitoring/owlbot.py @@ -15,11 +15,11 @@ """This script is used to synthesize generated parts of this library.""" import synthtool as s -import synthtool.languages.node as node +import synthtool.languages.node_mono_repo as node import os -node.owlbot_main(staging_excludes=["README.md", "package.json"]) +node.owlbot_main(relative_dir="packages/google-cloud-monitoring",staging_excludes=["README.md", "package.json"]) # -------------------------------------------------------------------------- # Modify test configs diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index c2f1a95ca73..85ea4f0c590 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -7,7 +7,11 @@ "engines": { "node": ">=12.0.0" }, - "repository": "googleapis/nodejs-monitoring", + "repository": { + "type": "git", + "directory": "packages/google-cloud-monitoring", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "main": "build/src/index.js", "files": [ "build/src", @@ -29,8 +33,8 @@ "scripts": { "docs": "jsdoc -c .jsdoc.js", "lint": "gts check", - "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", - "system-test": "mocha build/system-test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test", "fix": "gts fix", "docs-test": "linkinator docs", @@ -64,5 +68,6 @@ "typescript": "^4.6.4", "webpack": "^5.0.0", "webpack-cli": "^4.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring" } diff --git a/release-please-config.json b/release-please-config.json index 31b94480330..3d3bfbe1323 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -23,6 +23,7 @@ "packages/google-cloud-gkemulticloud": {}, "packages/google-cloud-language": {}, "packages/google-cloud-memcache": {}, + "packages/google-cloud-monitoring": {}, "packages/google-cloud-oslogin": {}, "packages/google-cloud-phishingprotection": {}, "packages/google-cloud-policytroubleshooter": {}, @@ -47,4 +48,4 @@ } ], "release-type": "node" -} \ No newline at end of file +} From 35ae46e5e9df6bd6fcc86b1608ca9c4f87763866 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Fri, 11 Nov 2022 00:56:03 -0800 Subject: [PATCH 420/422] Delete metrics_service_smoke_test.ts --- .../system-test/metrics_service_smoke_test.ts | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100644 packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts diff --git a/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts b/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts deleted file mode 100644 index 4923de6f4f8..00000000000 --- a/packages/google-cloud-monitoring/system-test/metrics_service_smoke_test.ts +++ /dev/null @@ -1,99 +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. - -import {describe, it} from 'mocha'; - -describe('MetricServiceSmokeTest', () => { - 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 using promises', done => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const monitoring = require('../src'); - - const client = new monitoring.v3.MetricServiceClient({ - // optional auth parameters. - }); - - // Iterate over all elements. - const formattedName = client.projectPath(projectId); - - client - .listMonitoredResourceDescriptors({name: formattedName}) - .then((responses: string[]) => { - const resources = responses[0]; - for (let i = 0; i < resources.length; i += 1) { - console.log(resources[i]); - } - }) - .then(done) - .catch(done); - }); - - it('successfully makes a call to the service using callbacks', done => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const monitoring = require('../src'); - - const client = new monitoring.v3.MetricServiceClient({ - // optional auth parameters. - }); - - // Or obtain the paged response. - const formattedName = client.projectPath(projectId); - - const options = {autoPaginate: false}; - const callback = (responses: string[]) => { - // 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 (let i = 0; i < resources.length; i += 1) { - console.log(resources[i]); - } - if (nextRequest) { - // Fetch the next page. - return client - .listMonitoredResourceDescriptors(nextRequest, options) - .then(callback); - } - }; - client - .listMonitoredResourceDescriptors({name: formattedName}, options) - .then(callback) - .then(done) - .catch(done); - }); - - it('successfully makes a call to the service using streaming', done => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const monitoring = require('../src'); - - const client = new monitoring.v3.MetricServiceClient({ - // optional auth parameters. - }); - - const formattedName = client.projectPath(projectId); - client - .listMonitoredResourceDescriptorsStream({name: formattedName}) - .on('data', (element: string) => { - console.log(element); - }) - .on('error', done) - .on('end', done); - }); -}); From e338e978af154786cb0206c08f5f17c3c856a14e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 08:59:34 +0000 Subject: [PATCH 421/422] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=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 --- packages/google-cloud-monitoring/.mocharc.js | 2 +- .../google-cloud-monitoring/.prettierrc.js | 2 +- packages/google-cloud-monitoring/README.md | 37 +- .../google-cloud-monitoring/samples/README.md | 348 +----------------- packages/google-cloud-monitoring/src/index.ts | 2 +- release-please-config.json | 2 +- 6 files changed, 25 insertions(+), 368 deletions(-) diff --git a/packages/google-cloud-monitoring/.mocharc.js b/packages/google-cloud-monitoring/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-monitoring/.mocharc.js +++ b/packages/google-cloud-monitoring/.mocharc.js @@ -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. diff --git a/packages/google-cloud-monitoring/.prettierrc.js b/packages/google-cloud-monitoring/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-monitoring/.prettierrc.js +++ b/packages/google-cloud-monitoring/.prettierrc.js @@ -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. diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 68244b336dd..dc275a392cd 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) +# [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/google-cloud-node) [![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/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) @@ -10,17 +10,15 @@ -[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from -Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, -and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. +Stackdriver Monitoring API client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring/CHANGELOG.md). * [Stackdriver Monitoring Node.js Client API Reference][client-docs] * [Stackdriver Monitoring Documentation][product-docs] -* [github.com/googleapis/nodejs-monitoring](https://github.com/googleapis/nodejs-monitoring) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-monitoring](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -117,29 +115,12 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/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/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Alerts.backup Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.backupPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) | -| Alerts.delete Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.deleteChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) | -| Alerts.enable Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.enablePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) | -| Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | -| Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | -| Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | -| Create Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.createDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) | -| Delete Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.deleteDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) | -| Get Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) | -| Get Monitored Resource Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getMonitoredResourceDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) | -| List Metric Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) | -| List Monitored Resource Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listMonitoredResourceDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) | -| Read Time Series Aggregate | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesAggregate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) | -| Read Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) | -| Read Time Series Fields | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesFields.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) | -| Read Time Series Reduce | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesReduce.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) | -| Write Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.writeTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/quickstart.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=packages/google-cloud-monitoring/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/test/quickstart.test.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=packages/google-cloud-monitoring/samples/test/quickstart.test.js,samples/README.md) | @@ -189,7 +170,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/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`) @@ -201,7 +182,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest [product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 13908bab92e..89c434774f6 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -2,42 +2,23 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Stackdriver Monitoring: Node.js Samples](https://github.com/googleapis/nodejs-monitoring) +# [Stackdriver Monitoring: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] -[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from -Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, -and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. + ## Table of Contents * [Before you begin](#before-you-begin) * [Samples](#samples) - * [Alerts.backup Policies](#alerts.backup-policies) - * [Alerts.delete Channels](#alerts.delete-channels) - * [Alerts.enable Policies](#alerts.enable-policies) - * [Alerts.list Policies](#alerts.list-policies) - * [Alerts.replace Channels](#alerts.replace-channels) - * [Alerts.restore Policies](#alerts.restore-policies) - * [Create Metric Descriptor](#create-metric-descriptor) - * [Delete Metric Descriptor](#delete-metric-descriptor) - * [Get Metric Descriptor](#get-metric-descriptor) - * [Get Monitored Resource Descriptor](#get-monitored-resource-descriptor) - * [List Metric Descriptors](#list-metric-descriptors) - * [List Monitored Resource Descriptors](#list-monitored-resource-descriptors) - * [Read Time Series Aggregate](#read-time-series-aggregate) - * [Read Time Series Data](#read-time-series-data) - * [Read Time Series Fields](#read-time-series-fields) - * [Read Time Series Reduce](#read-time-series-reduce) - * [Write Time Series Data](#write-time-series-data) * [Quickstart](#quickstart) - * [Uptime](#uptime) + * [Quickstart.test](#quickstart.test) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-monitoring#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -49,321 +30,16 @@ Before running the samples, make sure you've followed the steps outlined in -### Alerts.backup Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.backupPolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.backupPolicies.js` - - ------ - - - - -### Alerts.delete Channels - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.deleteChannels.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.deleteChannels.js` - - ------ - - - - -### Alerts.enable Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.enablePolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.enablePolicies.js` - - ------ - - - - -### Alerts.list Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.listPolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.listPolicies.js` - - ------ - - - - -### Alerts.replace Channels - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.replaceChannels.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.replaceChannels.js` - - ------ - - - - -### Alerts.restore Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.restorePolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.restorePolicies.js` - - ------ - - - - -### Create Metric Descriptor - -Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric descriptor. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.createDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.createDescriptor.js your-project-id` - - ------ - - - - -### Delete Metric Descriptor - -Deletes a custom metric descriptor. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.deleteDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.deleteDescriptor.js your-project-id custom.googleapis.com/stores/daily_sales` - - ------ - - - - -### Get Metric Descriptor - -Gets a custom metric descriptor - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.getDescriptor.js your-project-id custom.googleapis.com/your/id` - - ------ - - - - -### Get Monitored Resource Descriptor - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getMonitoredResourceDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.getMonitoredResourceDescriptor.js your-project-id some-resource-type` - - ------ - - - - -### List Metric Descriptors - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listDescriptors.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) - -__Usage:__ - - -`node metrics.listDescriptors.js your-project-id` - - ------ - - - - -### List Monitored Resource Descriptors - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listMonitoredResourceDescriptors.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) - -__Usage:__ - - -`node metrics.listMonitoredResourceDescriptors.js your-project-id` - - ------ - - - - -### Read Time Series Aggregate - -Aggregates time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesAggregate.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesAggregate.js your-project-id` - - ------ - - - - -### Read Time Series Data - -Reads time series data that matches the given filter. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesData.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesData.js your-project-id 'metric.type="compute.googleapis.com/instance/cpu/utilization"'` - - ------ - - - - -### Read Time Series Fields - -Reads headers of time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesFields.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesFields.js your-project-id` - - ------ - - - - -### Read Time Series Reduce - -Reduces time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesReduce.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesReduce.js your-project-id` - - ------ - - - - -### Write Time Series Data - -Writes example time series data to 'custom.googleapis.com/stores/daily_sales'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.writeTimeSeriesData.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) - -__Usage:__ - - -`node metrics.writeTimeSeriesData.js your-project-id` - - ------ - - - - ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![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=packages/google-cloud-monitoring/samples/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-monitoring/samples/quickstart.js` ----- @@ -371,16 +47,16 @@ __Usage:__ -### Uptime +### Quickstart.test -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/uptime.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/test/quickstart.test.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) +[![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=packages/google-cloud-monitoring/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node samples/uptime.js` +`node packages/google-cloud-monitoring/samples/test/quickstart.test.js` @@ -388,5 +64,5 @@ __Usage:__ [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/nodejs-monitoring&page=editor&open_in_editor=samples/README.md +[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/monitoring/docs diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts index 385e844deef..5da2bb2ad1e 100644 --- a/packages/google-cloud-monitoring/src/index.ts +++ b/packages/google-cloud-monitoring/src/index.ts @@ -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. diff --git a/release-please-config.json b/release-please-config.json index 3d3bfbe1323..47814193c28 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -48,4 +48,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file From 3b08d30cead7a93d912a98e06d5da1b56f406910 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 09:18:09 +0000 Subject: [PATCH 422/422] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=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 --- packages/google-cloud-monitoring/.mocharc.js | 2 +- .../google-cloud-monitoring/.prettierrc.js | 2 +- packages/google-cloud-monitoring/README.md | 37 +- .../google-cloud-monitoring/samples/README.md | 348 +----------------- packages/google-cloud-monitoring/src/index.ts | 2 +- release-please-config.json | 2 +- 6 files changed, 25 insertions(+), 368 deletions(-) diff --git a/packages/google-cloud-monitoring/.mocharc.js b/packages/google-cloud-monitoring/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-monitoring/.mocharc.js +++ b/packages/google-cloud-monitoring/.mocharc.js @@ -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. diff --git a/packages/google-cloud-monitoring/.prettierrc.js b/packages/google-cloud-monitoring/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-monitoring/.prettierrc.js +++ b/packages/google-cloud-monitoring/.prettierrc.js @@ -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. diff --git a/packages/google-cloud-monitoring/README.md b/packages/google-cloud-monitoring/README.md index 68244b336dd..dc275a392cd 100644 --- a/packages/google-cloud-monitoring/README.md +++ b/packages/google-cloud-monitoring/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/nodejs-monitoring) +# [Stackdriver Monitoring: Node.js Client](https://github.com/googleapis/google-cloud-node) [![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/monitoring.svg)](https://www.npmjs.org/package/@google-cloud/monitoring) @@ -10,17 +10,15 @@ -[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from -Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, -and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. +Stackdriver Monitoring API client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-monitoring/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring/CHANGELOG.md). * [Stackdriver Monitoring Node.js Client API Reference][client-docs] * [Stackdriver Monitoring Documentation][product-docs] -* [github.com/googleapis/nodejs-monitoring](https://github.com/googleapis/nodejs-monitoring) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-monitoring](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -117,29 +115,12 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-monitoring/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/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Alerts.backup Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.backupPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) | -| Alerts.delete Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.deleteChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) | -| Alerts.enable Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.enablePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) | -| Alerts.list Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.listPolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) | -| Alerts.replace Channels | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.replaceChannels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) | -| Alerts.restore Policies | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.restorePolicies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) | -| Create Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.createDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) | -| Delete Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.deleteDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) | -| Get Metric Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) | -| Get Monitored Resource Descriptor | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getMonitoredResourceDescriptor.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) | -| List Metric Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) | -| List Monitored Resource Descriptors | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listMonitoredResourceDescriptors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) | -| Read Time Series Aggregate | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesAggregate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) | -| Read Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) | -| Read Time Series Fields | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesFields.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) | -| Read Time Series Reduce | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesReduce.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) | -| Write Time Series Data | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.writeTimeSeriesData.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-monitoring/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-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | -| Uptime | [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/uptime.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/quickstart.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=packages/google-cloud-monitoring/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/test/quickstart.test.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=packages/google-cloud-monitoring/samples/test/quickstart.test.js,samples/README.md) | @@ -189,7 +170,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-monitoring/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`) @@ -201,7 +182,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-monitoring/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/monitoring/latest [product-docs]: https://cloud.google.com/monitoring/docs diff --git a/packages/google-cloud-monitoring/samples/README.md b/packages/google-cloud-monitoring/samples/README.md index 13908bab92e..89c434774f6 100644 --- a/packages/google-cloud-monitoring/samples/README.md +++ b/packages/google-cloud-monitoring/samples/README.md @@ -2,42 +2,23 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Stackdriver Monitoring: Node.js Samples](https://github.com/googleapis/nodejs-monitoring) +# [Stackdriver Monitoring: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] -[Stackdriver Monitoring](https://cloud.google.com/monitoring/docs) collects metrics, events, and metadata from -Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, -and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. + ## Table of Contents * [Before you begin](#before-you-begin) * [Samples](#samples) - * [Alerts.backup Policies](#alerts.backup-policies) - * [Alerts.delete Channels](#alerts.delete-channels) - * [Alerts.enable Policies](#alerts.enable-policies) - * [Alerts.list Policies](#alerts.list-policies) - * [Alerts.replace Channels](#alerts.replace-channels) - * [Alerts.restore Policies](#alerts.restore-policies) - * [Create Metric Descriptor](#create-metric-descriptor) - * [Delete Metric Descriptor](#delete-metric-descriptor) - * [Get Metric Descriptor](#get-metric-descriptor) - * [Get Monitored Resource Descriptor](#get-monitored-resource-descriptor) - * [List Metric Descriptors](#list-metric-descriptors) - * [List Monitored Resource Descriptors](#list-monitored-resource-descriptors) - * [Read Time Series Aggregate](#read-time-series-aggregate) - * [Read Time Series Data](#read-time-series-data) - * [Read Time Series Fields](#read-time-series-fields) - * [Read Time Series Reduce](#read-time-series-reduce) - * [Write Time Series Data](#write-time-series-data) * [Quickstart](#quickstart) - * [Uptime](#uptime) + * [Quickstart.test](#quickstart.test) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-monitoring#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -49,321 +30,16 @@ Before running the samples, make sure you've followed the steps outlined in -### Alerts.backup Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.backupPolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.backupPolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.backupPolicies.js` - - ------ - - - - -### Alerts.delete Channels - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.deleteChannels.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.deleteChannels.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.deleteChannels.js` - - ------ - - - - -### Alerts.enable Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.enablePolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.enablePolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.enablePolicies.js` - - ------ - - - - -### Alerts.list Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.listPolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.listPolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.listPolicies.js` - - ------ - - - - -### Alerts.replace Channels - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.replaceChannels.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.replaceChannels.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.replaceChannels.js` - - ------ - - - - -### Alerts.restore Policies - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/alerts.restorePolicies.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/alerts.restorePolicies.js,samples/README.md) - -__Usage:__ - - -`node samples/alerts.restorePolicies.js` - - ------ - - - - -### Create Metric Descriptor - -Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric descriptor. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.createDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.createDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.createDescriptor.js your-project-id` - - ------ - - - - -### Delete Metric Descriptor - -Deletes a custom metric descriptor. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.deleteDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.deleteDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.deleteDescriptor.js your-project-id custom.googleapis.com/stores/daily_sales` - - ------ - - - - -### Get Metric Descriptor - -Gets a custom metric descriptor - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.getDescriptor.js your-project-id custom.googleapis.com/your/id` - - ------ - - - - -### Get Monitored Resource Descriptor - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.getMonitoredResourceDescriptor.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.getMonitoredResourceDescriptor.js,samples/README.md) - -__Usage:__ - - -`node metrics.getMonitoredResourceDescriptor.js your-project-id some-resource-type` - - ------ - - - - -### List Metric Descriptors - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listDescriptors.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listDescriptors.js,samples/README.md) - -__Usage:__ - - -`node metrics.listDescriptors.js your-project-id` - - ------ - - - - -### List Monitored Resource Descriptors - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.listMonitoredResourceDescriptors.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.listMonitoredResourceDescriptors.js,samples/README.md) - -__Usage:__ - - -`node metrics.listMonitoredResourceDescriptors.js your-project-id` - - ------ - - - - -### Read Time Series Aggregate - -Aggregates time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesAggregate.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesAggregate.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesAggregate.js your-project-id` - - ------ - - - - -### Read Time Series Data - -Reads time series data that matches the given filter. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesData.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesData.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesData.js your-project-id 'metric.type="compute.googleapis.com/instance/cpu/utilization"'` - - ------ - - - - -### Read Time Series Fields - -Reads headers of time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesFields.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesFields.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesFields.js your-project-id` - - ------ - - - - -### Read Time Series Reduce - -Reduces time series data that matches 'compute.googleapis.com/instance/cpu/utilization'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.readTimeSeriesReduce.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.readTimeSeriesReduce.js,samples/README.md) - -__Usage:__ - - -`node metrics.readTimeSeriesReduce.js your-project-id` - - ------ - - - - -### Write Time Series Data - -Writes example time series data to 'custom.googleapis.com/stores/daily_sales'. - -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/metrics.writeTimeSeriesData.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/metrics.writeTimeSeriesData.js,samples/README.md) - -__Usage:__ - - -`node metrics.writeTimeSeriesData.js your-project-id` - - ------ - - - - ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![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=packages/google-cloud-monitoring/samples/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node packages/google-cloud-monitoring/samples/quickstart.js` ----- @@ -371,16 +47,16 @@ __Usage:__ -### Uptime +### Quickstart.test -View the [source code](https://github.com/googleapis/nodejs-monitoring/blob/main/samples/uptime.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-monitoring/samples/test/quickstart.test.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-monitoring&page=editor&open_in_editor=samples/uptime.js,samples/README.md) +[![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=packages/google-cloud-monitoring/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node samples/uptime.js` +`node packages/google-cloud-monitoring/samples/test/quickstart.test.js` @@ -388,5 +64,5 @@ __Usage:__ [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/nodejs-monitoring&page=editor&open_in_editor=samples/README.md +[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/monitoring/docs diff --git a/packages/google-cloud-monitoring/src/index.ts b/packages/google-cloud-monitoring/src/index.ts index 385e844deef..5da2bb2ad1e 100644 --- a/packages/google-cloud-monitoring/src/index.ts +++ b/packages/google-cloud-monitoring/src/index.ts @@ -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. diff --git a/release-please-config.json b/release-please-config.json index 3d3bfbe1323..47814193c28 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -48,4 +48,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file